#include <kdialog.h>
#include <tdelocale.h>

/****************************************************************************
** Form implementation generated from reading ui file 'configdlgbase.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "configdlgbase.h"

#include <ntqvariant.h>
#include <knuminput.h>
#include <ntqpushbutton.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqslider.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a ConfigDlgBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
ConfigDlgBase::ConfigDlgBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "ConfigDlgBase" );
    ConfigDlgBaseLayout = new TQVBoxLayout( this, 0, 6, "ConfigDlgBaseLayout"); 

    kcfg_DragEnabled = new TQCheckBox( this, "kcfg_DragEnabled" );
    ConfigDlgBaseLayout->addWidget( kcfg_DragEnabled );

    kcfg_ShowDesktopEnabled = new TQCheckBox( this, "kcfg_ShowDesktopEnabled" );
    ConfigDlgBaseLayout->addWidget( kcfg_ShowDesktopEnabled );

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQGridLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    kcfg_ConserveSpace = new TQCheckBox( groupBox2, "kcfg_ConserveSpace" );

    groupBox2Layout->addMultiCellWidget( kcfg_ConserveSpace, 1, 1, 0, 2 );

    textLabel1_2 = new TQLabel( groupBox2, "textLabel1_2" );

    groupBox2Layout->addWidget( textLabel1_2, 0, 0 );

    iconDim = new TQComboBox( false, groupBox2, "iconDim" );
    iconDim->setEditable( true );

    groupBox2Layout->addWidget( iconDim, 0, 1 );
    spacer4_2 = new TQSpacerItem( 332, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox2Layout->addItem( spacer4_2, 0, 2 );
    ConfigDlgBaseLayout->addWidget( groupBox2 );

    autoAdjustGroup = new TQGroupBox( this, "autoAdjustGroup" );
    autoAdjustGroup->setColumnLayout(0, TQt::Vertical );
    autoAdjustGroup->layout()->setSpacing( 6 );
    autoAdjustGroup->layout()->setMargin( 11 );
    autoAdjustGroupLayout = new TQGridLayout( autoAdjustGroup->layout() );
    autoAdjustGroupLayout->setAlignment( TQt::AlignTop );

    layout1 = new TQGridLayout( 0, 1, 1, 0, 6, "layout1"); 

    kcfg_HistoryHorizon = new TQSlider( autoAdjustGroup, "kcfg_HistoryHorizon" );
    kcfg_HistoryHorizon->setMaxValue( 100 );
    kcfg_HistoryHorizon->setLineStep( 0 );
    kcfg_HistoryHorizon->setValue( 10 );
    kcfg_HistoryHorizon->setOrientation( TQSlider::Horizontal );

    layout1->addMultiCellWidget( kcfg_HistoryHorizon, 0, 0, 0, 2 );
    spacer7 = new TQSpacerItem( 140, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout1->addItem( spacer7, 1, 1 );

    textLabel1 = new TQLabel( autoAdjustGroup, "textLabel1" );
    textLabel1->setAlignment( int( TQLabel::AlignCenter ) );

    layout1->addWidget( textLabel1, 1, 0 );

    textLabel2 = new TQLabel( autoAdjustGroup, "textLabel2" );
    textLabel2->setAlignment( int( TQLabel::AlignCenter ) );

    layout1->addWidget( textLabel2, 1, 2 );

    autoAdjustGroupLayout->addMultiCellLayout( layout1, 3, 3, 0, 2 );

    textLabel3 = new TQLabel( autoAdjustGroup, "textLabel3" );

    autoAdjustGroupLayout->addWidget( textLabel3, 2, 0 );

    kcfg_AutoAdjustMinItems = new KIntSpinBox( autoAdjustGroup, "kcfg_AutoAdjustMinItems" );

    autoAdjustGroupLayout->addWidget( kcfg_AutoAdjustMinItems, 1, 1 );
    spacer4 = new TQSpacerItem( 50, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    autoAdjustGroupLayout->addItem( spacer4, 2, 2 );

    kcfg_AutoAdjustMaxItems = new KIntSpinBox( autoAdjustGroup, "kcfg_AutoAdjustMaxItems" );

    autoAdjustGroupLayout->addWidget( kcfg_AutoAdjustMaxItems, 2, 1 );

    textLabel3_2 = new TQLabel( autoAdjustGroup, "textLabel3_2" );

    autoAdjustGroupLayout->addWidget( textLabel3_2, 1, 0 );

    kcfg_AutoAdjustEnabled = new TQCheckBox( autoAdjustGroup, "kcfg_AutoAdjustEnabled" );
    kcfg_AutoAdjustEnabled->setChecked( true );

    autoAdjustGroupLayout->addMultiCellWidget( kcfg_AutoAdjustEnabled, 0, 0, 0, 2 );
    ConfigDlgBaseLayout->addWidget( autoAdjustGroup );
    languageChange();
    resize( TQSize(371, 338).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_AutoAdjustEnabled, TQ_SIGNAL( toggled(bool) ), kcfg_AutoAdjustMinItems, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_AutoAdjustEnabled, TQ_SIGNAL( toggled(bool) ), kcfg_AutoAdjustMaxItems, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_AutoAdjustEnabled, TQ_SIGNAL( toggled(bool) ), kcfg_HistoryHorizon, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_AutoAdjustEnabled, TQ_SIGNAL( toggled(bool) ), textLabel1, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_AutoAdjustEnabled, TQ_SIGNAL( toggled(bool) ), textLabel2, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_AutoAdjustEnabled, TQ_SIGNAL( toggled(bool) ), textLabel3, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_AutoAdjustEnabled, TQ_SIGNAL( toggled(bool) ), textLabel3_2, TQ_SLOT( setEnabled(bool) ) );
}

/*
 *  Destroys the object and frees any allocated resources
 */
ConfigDlgBase::~ConfigDlgBase()
{
    // no need to delete child widgets, TQt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConfigDlgBase::languageChange()
{
    kcfg_DragEnabled->setText( tr2i18n( "Allow drag and drop" ) );
    kcfg_ShowDesktopEnabled->setText( tr2i18n( "Enable 'Show Desktop' button" ) );
    groupBox2->setTitle( tr2i18n( "Layout" ) );
    kcfg_ConserveSpace->setText( tr2i18n( "Conserve space" ) );
    TQToolTip::add( kcfg_ConserveSpace, tr2i18n( "Do not expand icons to the size of the panel" ) );
    textLabel1_2->setText( tr2i18n( "Icon size:" ) );
    autoAdjustGroup->setTitle( tr2i18n( "Most Popular Applications" ) );
    textLabel1->setText( tr2i18n( "Short Term" ) );
    textLabel2->setText( tr2i18n( "Long Term" ) );
    textLabel3->setText( tr2i18n( "Maximum number of applications:" ) );
    textLabel3_2->setText( tr2i18n( "Minimum number of applications:" ) );
    kcfg_AutoAdjustEnabled->setText( tr2i18n( "Add/remove applications based on their popularity" ) );
}

/****************************************************************************
** ConfigDlgBase meta object code from reading C++ file 'configdlgbase.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "configdlgbase.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *ConfigDlgBase::className() const
{
    return "ConfigDlgBase";
}

TQMetaObject *ConfigDlgBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ConfigDlgBase( "ConfigDlgBase", &ConfigDlgBase::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString ConfigDlgBase::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "ConfigDlgBase", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString ConfigDlgBase::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "ConfigDlgBase", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* ConfigDlgBase::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQWidget::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"ConfigDlgBase", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ConfigDlgBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* ConfigDlgBase::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "ConfigDlgBase" ) )
	return this;
    return TQWidget::tqt_cast( clname );
}

bool ConfigDlgBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool ConfigDlgBase::tqt_emit( int _id, TQUObject* _o )
{
    return TQWidget::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

bool ConfigDlgBase::tqt_property( int id, int f, TQVariant* v)
{
    return TQWidget::tqt_property( id, f, v);
}

bool ConfigDlgBase::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
