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

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

#include "keyecandypagedlg.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqslider.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KEyeCandyPageDlg as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KEyeCandyPageDlg::KEyeCandyPageDlg( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KEyeCandyPageDlg" );
    KEyeCandyPageDlgLayout = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "KEyeCandyPageDlgLayout"); 

    px_eyecandySidebar = new TQLabel( this, "px_eyecandySidebar" );
    px_eyecandySidebar->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, px_eyecandySidebar->sizePolicy().hasHeightForWidth() ) );
    px_eyecandySidebar->setMinimumSize( TQSize( 170, 430 ) );
    px_eyecandySidebar->setFrameShape( TQLabel::Panel );
    px_eyecandySidebar->setFrameShadow( TQLabel::Sunken );
    px_eyecandySidebar->setScaledContents( true );
    px_eyecandySidebar->setIndent( 0 );

    KEyeCandyPageDlgLayout->addMultiCellWidget( px_eyecandySidebar, 0, 5, 0, 0 );

    TextLabel8 = new TQLabel( this, "TextLabel8" );
    TextLabel8->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, TextLabel8->sizePolicy().hasHeightForWidth() ) );
    TextLabel8->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop | TQLabel::AlignLeft ) );

    KEyeCandyPageDlgLayout->addWidget( TextLabel8, 0, 1 );

    Layout8 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout8"); 

    TextLabel3_2 = new TQLabel( this, "TextLabel3_2" );
    TextLabel3_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, TextLabel3_2->sizePolicy().hasHeightForWidth() ) );
    TextLabel3_2->setTextFormat( TQLabel::PlainText );
    TextLabel3_2->setAlignment( int( TQLabel::AlignCenter ) );
    Layout8->addWidget( TextLabel3_2 );
    Spacer13 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout8->addItem( Spacer13 );

    Fast_2 = new TQLabel( this, "Fast_2" );
    Fast_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, Fast_2->sizePolicy().hasHeightForWidth() ) );
    Fast_2->setAlignment( int( TQLabel::AlignCenter ) );
    Layout8->addWidget( Fast_2 );

    KEyeCandyPageDlgLayout->addLayout( Layout8, 1, 1 );

    sld_effects = new TQSlider( this, "sld_effects" );
    sld_effects->setMaxValue( 9 );
    sld_effects->setPageStep( 1 );
    sld_effects->setValue( 4 );
    sld_effects->setOrientation( TQSlider::Horizontal );
    sld_effects->setTickmarks( TQSlider::Right );

    KEyeCandyPageDlgLayout->addWidget( sld_effects, 2, 1 );

    Layout7 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout7"); 

    btn_detail = new TQPushButton( this, "btn_detail" );
    btn_detail->setToggleButton( true );
    Layout7->addWidget( btn_detail );
    Spacer12 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout7->addItem( Spacer12 );

    KEyeCandyPageDlgLayout->addLayout( Layout7, 3, 1 );
    spacer_details = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    KEyeCandyPageDlgLayout->addItem( spacer_details, 4, 1 );

    klv_features = new TDEListView( this, "klv_features" );
    klv_features->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, klv_features->sizePolicy().hasHeightForWidth() ) );
    klv_features->setMinimumSize( TQSize( 0, 120 ) );

    KEyeCandyPageDlgLayout->addWidget( klv_features, 5, 1 );
    languageChange();
    resize( TQSize(598, 475).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( btn_detail, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( slotEyeCandyShowDetails(bool) ) );
    connect( sld_effects, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( slotEyeCandySliderMoved(int) ) );
    connect( sld_effects, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( slotEyeCandySliderMoved(int) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KEyeCandyPageDlg::languageChange()
{
    TextLabel8->setText( tr2i18n( "<P>Trinity offers many visually appealing special effects, such as smoothed fonts, previews in the file manager and animated menus. All this beauty, however, comes at a small performance cost. </P>\n"
"If you have a fast, new processor, you might want to turn them all on, but for those of us with slower processors, starting off with less eye candy helps to keep your desktop more responsive." ) );
    TextLabel3_2->setText( tr2i18n( "Slow Processor\n"
"(fewer effects)" ) );
    TQToolTip::add( TextLabel3_2, tr2i18n( "Slow processors perform poorly with effects" ) );
    Fast_2->setText( tr2i18n( "Fast Processor\n"
"(more effects)" ) );
    TQToolTip::add( Fast_2, tr2i18n( "Fast processors can support all effects" ) );
    btn_detail->setText( tr2i18n( "Show &Details >>" ) );
}

void KEyeCandyPageDlg::slotEyeCandyShowDetails(bool)
{
    tqWarning( "KEyeCandyPageDlg::slotEyeCandyShowDetails(bool): Not implemented yet" );
}

void KEyeCandyPageDlg::slotEyeCandySliderMoved(int)
{
    tqWarning( "KEyeCandyPageDlg::slotEyeCandySliderMoved(int): Not implemented yet" );
}

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

TQMetaObject *KEyeCandyPageDlg::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KEyeCandyPageDlg( "KEyeCandyPageDlg", &KEyeCandyPageDlg::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KEyeCandyPageDlg::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[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"slotEyeCandyShowDetails", 1, param_slot_0 };
    static const TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"slotEyeCandySliderMoved", 1, param_slot_1 };
    static const TQUMethod slot_2 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotEyeCandyShowDetails(bool)", &slot_0, TQMetaData::Public },
	{ "slotEyeCandySliderMoved(int)", &slot_1, TQMetaData::Public },
	{ "languageChange()", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KEyeCandyPageDlg", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KEyeCandyPageDlg.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool KEyeCandyPageDlg::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotEyeCandyShowDetails((bool)static_QUType_bool.get(_o+1)); break;
    case 1: slotEyeCandySliderMoved((int)static_QUType_int.get(_o+1)); break;
    case 2: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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