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

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

#include "kthemedlg.h"

#include <ntqvariant.h>
#include <kurllabel.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqframe.h>
#include <ntqtoolbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "kthemedlg.ui.h"

/*
 *  Constructs a KThemeDlg as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KThemeDlg::KThemeDlg( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KThemeDlg" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
    KThemeDlgLayout = new TQGridLayout( this, 1, 1, 0, 6, "KThemeDlgLayout"); 

    layout2 = new TQHBoxLayout( 0, 0, 6, "layout2"); 

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setFrameShape( TQLabel::NoFrame );
    textLabel1->setFrameShadow( TQLabel::Plain );
    layout2->addWidget( textLabel1 );
    spacer2 = new TQSpacerItem( 170, 20, TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer2 );

    lbGet = new KURLLabel( this, "lbGet" );
    lbGet->setUseTips( true );
    layout2->addWidget( lbGet );

    KThemeDlgLayout->addLayout( layout2, 0, 0 );

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

    lbPreview = new TQLabel( this, "lbPreview" );
    lbPreview->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 0, lbPreview->sizePolicy().hasHeightForWidth() ) );
    lbPreview->setFrameShape( TQLabel::Box );
    lbPreview->setAlignment( int( TQLabel::AlignCenter ) );

    layout1->addMultiCellWidget( lbPreview, 0, 3, 1, 1 );

    btnRemove = new TQPushButton( this, "btnRemove" );

    layout1->addWidget( btnRemove, 2, 0 );

    btnCreate = new TQPushButton( this, "btnCreate" );

    layout1->addWidget( btnCreate, 3, 0 );

    btnInstall = new TQPushButton( this, "btnInstall" );

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

    lvThemes = new TQListView( this, "lvThemes" );
    lvThemes->addColumn( tr2i18n( "Theme" ) );
    lvThemes->header()->setResizeEnabled( false, lvThemes->header()->count() - 1 );
    lvThemes->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, lvThemes->sizePolicy().hasHeightForWidth() ) );
    lvThemes->setShowSortIndicator( true );
    lvThemes->setResizeMode( TQListView::AllColumns );

    layout1->addWidget( lvThemes, 0, 0 );

    KThemeDlgLayout->addLayout( layout1, 1, 0 );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );

    KThemeDlgLayout->addWidget( line1, 2, 0 );

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

    KThemeDlgLayout->addWidget( textLabel1_2, 3, 0 );

    layout4 = new TQHBoxLayout( 0, 0, 6, "layout4"); 

    btnBackground = new TQToolButton( this, "btnBackground" );
    btnBackground->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, btnBackground->sizePolicy().hasHeightForWidth() ) );
    btnBackground->setMinimumSize( TQSize( 80, 60 ) );
    btnBackground->setMaximumSize( TQSize( 32767, 60 ) );
    btnBackground->setFocusPolicy( TQToolButton::TabFocus );
    btnBackground->setUsesTextLabel( true );
    layout4->addWidget( btnBackground );

    btnColors = new TQToolButton( this, "btnColors" );
    btnColors->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, btnColors->sizePolicy().hasHeightForWidth() ) );
    btnColors->setMinimumSize( TQSize( 80, 60 ) );
    btnColors->setMaximumSize( TQSize( 32767, 60 ) );
    btnColors->setFocusPolicy( TQToolButton::TabFocus );
    btnColors->setUsesTextLabel( true );
    layout4->addWidget( btnColors );

    btnStyle = new TQToolButton( this, "btnStyle" );
    btnStyle->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, btnStyle->sizePolicy().hasHeightForWidth() ) );
    btnStyle->setMinimumSize( TQSize( 80, 60 ) );
    btnStyle->setMaximumSize( TQSize( 32767, 60 ) );
    btnStyle->setFocusPolicy( TQToolButton::TabFocus );
    btnStyle->setUsesTextLabel( true );
    layout4->addWidget( btnStyle );

    btnIcons = new TQToolButton( this, "btnIcons" );
    btnIcons->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, btnIcons->sizePolicy().hasHeightForWidth() ) );
    btnIcons->setMinimumSize( TQSize( 80, 60 ) );
    btnIcons->setMaximumSize( TQSize( 32767, 60 ) );
    btnIcons->setFocusPolicy( TQToolButton::TabFocus );
    btnIcons->setUsesTextLabel( true );
    layout4->addWidget( btnIcons );

    btnFonts = new TQToolButton( this, "btnFonts" );
    btnFonts->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, btnFonts->sizePolicy().hasHeightForWidth() ) );
    btnFonts->setMinimumSize( TQSize( 80, 60 ) );
    btnFonts->setMaximumSize( TQSize( 32767, 60 ) );
    btnFonts->setFocusPolicy( TQToolButton::TabFocus );
    btnFonts->setUsesTextLabel( true );
    layout4->addWidget( btnFonts );

    btnSaver = new TQToolButton( this, "btnSaver" );
    btnSaver->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, btnSaver->sizePolicy().hasHeightForWidth() ) );
    btnSaver->setMinimumSize( TQSize( 80, 60 ) );
    btnSaver->setMaximumSize( TQSize( 32767, 60 ) );
    btnSaver->setFocusPolicy( TQToolButton::TabFocus );
    btnSaver->setUsesTextLabel( true );
    layout4->addWidget( btnSaver );

    KThemeDlgLayout->addLayout( layout4, 4, 0 );
    languageChange();
    resize( TQSize(687, 382).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( lbGet, TQ_SIGNAL( leftClickedURL(const TQString&) ), this, TQ_SLOT( startKonqui(const TQString&) ) );
    connect( btnBackground, TQ_SIGNAL( clicked() ), this, TQ_SLOT( startBackground() ) );
    connect( btnColors, TQ_SIGNAL( clicked() ), this, TQ_SLOT( startColors() ) );
    connect( btnStyle, TQ_SIGNAL( clicked() ), this, TQ_SLOT( startStyle() ) );
    connect( btnIcons, TQ_SIGNAL( clicked() ), this, TQ_SLOT( startIcons() ) );
    connect( btnFonts, TQ_SIGNAL( clicked() ), this, TQ_SLOT( startFonts() ) );
    connect( btnSaver, TQ_SIGNAL( clicked() ), this, TQ_SLOT( startSaver() ) );

    // tab order
    setTabOrder( lvThemes, btnInstall );
    setTabOrder( btnInstall, btnRemove );
    setTabOrder( btnRemove, btnCreate );
    setTabOrder( btnCreate, btnBackground );
    setTabOrder( btnBackground, btnColors );
    setTabOrder( btnColors, btnStyle );
    setTabOrder( btnStyle, btnIcons );
    setTabOrder( btnIcons, btnFonts );
    setTabOrder( btnFonts, btnSaver );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KThemeDlg::languageChange()
{
    textLabel1->setText( tr2i18n( "Choose your visual TDE theme:" ) );
    lbGet->setText( tr2i18n( "Get new themes..." ) );
    lbGet->setProperty( "url", tr2i18n( "https://www.trinity-look.org/" ) );
    lbGet->setTipText( tr2i18n( "Go to the TDE themes website" ) );
    btnRemove->setText( tr2i18n( "&Remove Theme" ) );
    btnCreate->setText( tr2i18n( "Create &New Theme..." ) );
    btnInstall->setText( tr2i18n( "&Install New Theme..." ) );
    lvThemes->header()->setLabel( 0, tr2i18n( "Theme" ) );
    textLabel1_2->setText( tr2i18n( "Customize your theme:" ) );
    btnBackground->setText( TQString::null );
    btnBackground->setTextLabel( tr2i18n( "Background" ) );
    TQToolTip::add( btnBackground, tr2i18n( "Customize the desktop background" ) );
    btnColors->setText( TQString::null );
    btnColors->setTextLabel( tr2i18n( "Colors" ) );
    TQToolTip::add( btnColors, tr2i18n( "Customize colors" ) );
    btnStyle->setText( TQString::null );
    btnStyle->setTextLabel( tr2i18n( "Style" ) );
    TQToolTip::add( btnStyle, tr2i18n( "Customize the widget style" ) );
    btnIcons->setText( TQString::null );
    btnIcons->setTextLabel( tr2i18n( "Icons" ) );
    TQToolTip::add( btnIcons, tr2i18n( "Customize the icon theme" ) );
    btnFonts->setText( TQString::null );
    btnFonts->setTextLabel( tr2i18n( "Fonts" ) );
    TQToolTip::add( btnFonts, tr2i18n( "Customize the font theme" ) );
    btnSaver->setText( TQString::null );
    btnSaver->setTextLabel( tr2i18n( "Screen Saver" ) );
    TQToolTip::add( btnSaver, tr2i18n( "Customize the screen saver" ) );
}

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

TQMetaObject *KThemeDlg::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KThemeDlg( "KThemeDlg", &KThemeDlg::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KThemeDlg::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[] = {
	{ "url", &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"startKonqui", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"startBackground", 0, 0 };
    static const TQUMethod slot_2 = {"startColors", 0, 0 };
    static const TQUMethod slot_3 = {"startStyle", 0, 0 };
    static const TQUMethod slot_4 = {"startIcons", 0, 0 };
    static const TQUMethod slot_5 = {"startFonts", 0, 0 };
    static const TQUMethod slot_6 = {"startSaver", 0, 0 };
    static const TQUMethod slot_7 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "startKonqui(const TQString&)", &slot_0, TQMetaData::Public },
	{ "startBackground()", &slot_1, TQMetaData::Public },
	{ "startColors()", &slot_2, TQMetaData::Public },
	{ "startStyle()", &slot_3, TQMetaData::Public },
	{ "startIcons()", &slot_4, TQMetaData::Public },
	{ "startFonts()", &slot_5, TQMetaData::Public },
	{ "startSaver()", &slot_6, TQMetaData::Public },
	{ "languageChange()", &slot_7, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KThemeDlg", parentObject,
	slot_tbl, 8,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KThemeDlg.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool KThemeDlg::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: startKonqui((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 1: startBackground(); break;
    case 2: startColors(); break;
    case 3: startStyle(); break;
    case 4: startIcons(); break;
    case 5: startFonts(); break;
    case 6: startSaver(); break;
    case 7: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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