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

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

#include "dlgperformance.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <kiconloader.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>

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

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, groupBox1->sizePolicy().hasHeightForWidth() ) );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQHBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    layout9 = new TQVBoxLayout( 0, 0, 6, "layout9"); 

    kcfg_EnableCompositing = new TQCheckBox( groupBox1, "kcfg_EnableCompositing" );
    layout9->addWidget( kcfg_EnableCompositing );

    kcfg_EnableThreading = new TQCheckBox( groupBox1, "kcfg_EnableThreading" );
    layout9->addWidget( kcfg_EnableThreading );
    groupBox1Layout->addLayout( layout9 );

    layout6_2 = new TQVBoxLayout( 0, 0, 6, "layout6_2"); 

    pixmapLabel1_2 = new TQLabel( groupBox1, "pixmapLabel1_2" );
    pixmapLabel1_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, pixmapLabel1_2->sizePolicy().hasHeightForWidth() ) );
    pixmapLabel1_2->setPixmap( DesktopIcon( "kcmprocessor", 32 ) );
    layout6_2->addWidget( pixmapLabel1_2 );
    spacer7_2 = new TQSpacerItem( 21, 1, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    layout6_2->addItem( spacer7_2 );
    groupBox1Layout->addLayout( layout6_2 );
    DlgPerformanceLayout->addWidget( groupBox1 );

    kcfg_MemoryLevel = new TQButtonGroup( this, "kcfg_MemoryLevel" );
    kcfg_MemoryLevel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, kcfg_MemoryLevel->sizePolicy().hasHeightForWidth() ) );
    kcfg_MemoryLevel->setColumnLayout(0, TQt::Vertical );
    kcfg_MemoryLevel->layout()->setSpacing( 6 );
    kcfg_MemoryLevel->layout()->setMargin( 11 );
    kcfg_MemoryLevelLayout = new TQGridLayout( kcfg_MemoryLevel->layout() );
    kcfg_MemoryLevelLayout->setAlignment( TQt::AlignTop );

    descLabel = new TQLabel( kcfg_MemoryLevel, "descLabel" );
    descLabel->setTextFormat( TQLabel::PlainText );
    descLabel->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );

    kcfg_MemoryLevelLayout->addMultiCellWidget( descLabel, 1, 1, 0, 1 );

    layout5 = new TQVBoxLayout( 0, 0, 6, "layout5"); 

    lowRadio = new TQRadioButton( kcfg_MemoryLevel, "lowRadio" );
    layout5->addWidget( lowRadio );

    normalRadio = new TQRadioButton( kcfg_MemoryLevel, "normalRadio" );
    layout5->addWidget( normalRadio );

    aggressiveRadio = new TQRadioButton( kcfg_MemoryLevel, "aggressiveRadio" );
    layout5->addWidget( aggressiveRadio );

    kcfg_MemoryLevelLayout->addLayout( layout5, 0, 0 );

    layout6 = new TQVBoxLayout( 0, 0, 6, "layout6"); 

    pixmapLabel1 = new TQLabel( kcfg_MemoryLevel, "pixmapLabel1" );
    pixmapLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, pixmapLabel1->sizePolicy().hasHeightForWidth() ) );
    pixmapLabel1->setPixmap( DesktopIcon( "kcmmemory", 32 ) );
    layout6->addWidget( pixmapLabel1 );
    spacer7 = new TQSpacerItem( 21, 1, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    layout6->addItem( spacer7 );

    kcfg_MemoryLevelLayout->addLayout( layout6, 0, 1 );
    DlgPerformanceLayout->addWidget( kcfg_MemoryLevel );
    spacer1 = new TQSpacerItem( 21, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    DlgPerformanceLayout->addItem( spacer1 );
    languageChange();
    resize( TQSize(284, 222).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( lowRadio, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( lowRadio_toggled(bool) ) );
    connect( normalRadio, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( normalRadio_toggled(bool) ) );
    connect( aggressiveRadio, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( aggressiveRadio_toggled(bool) ) );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DlgPerformance::languageChange()
{
    groupBox1->setTitle( tr2i18n( "CPU Usage" ) );
    kcfg_EnableCompositing->setText( tr2i18n( "Enable &transparency effects" ) );
    kcfg_EnableThreading->setText( tr2i18n( "Enable &background generation" ) );
    kcfg_MemoryLevel->setTitle( tr2i18n( "Memory Usage" ) );
    descLabel->setText( TQString::null );
    lowRadio->setText( tr2i18n( "&Low" ) );
    normalRadio->setText( tr2i18n( "&Normal (default)" ) );
    aggressiveRadio->setText( tr2i18n( "&Aggressive" ) );
}

/****************************************************************************
** DlgPerformance meta object code from reading C++ file 'dlgperformance.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 "dlgperformance.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 *DlgPerformance::className() const
{
    return "DlgPerformance";
}

TQMetaObject *DlgPerformance::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_DlgPerformance( "DlgPerformance", &DlgPerformance::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* DlgPerformance::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 TQUParameter param_slot_0[] = {
	{ "on", &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"lowRadio_toggled", 1, param_slot_0 };
    static const TQUParameter param_slot_1[] = {
	{ "on", &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"normalRadio_toggled", 1, param_slot_1 };
    static const TQUParameter param_slot_2[] = {
	{ "on", &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"aggressiveRadio_toggled", 1, param_slot_2 };
    static const TQUMethod slot_3 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "lowRadio_toggled(bool)", &slot_0, TQMetaData::Public },
	{ "normalRadio_toggled(bool)", &slot_1, TQMetaData::Public },
	{ "aggressiveRadio_toggled(bool)", &slot_2, TQMetaData::Public },
	{ "languageChange()", &slot_3, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"DlgPerformance", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_DlgPerformance.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool DlgPerformance::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: lowRadio_toggled((bool)static_QUType_bool.get(_o+1)); break;
    case 1: normalRadio_toggled((bool)static_QUType_bool.get(_o+1)); break;
    case 2: aggressiveRadio_toggled((bool)static_QUType_bool.get(_o+1)); break;
    case 3: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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