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

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

#include "settings.h"

#include <ntqvariant.h>
#include <tqheader.h>
#include <kcolorbutton.h>
#include <kdialog.h>
#include <tdefontrequester.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqwidgetstack.h>
#include <ntqbuttongroup.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    tabs = new TQTabWidget( this, "tabs" );

    tab = new TQWidget( tabs, "tab" );
    tabLayout = new TQVBoxLayout( tab, KDialog::marginHint(), KDialog::spacingHint(), "tabLayout"); 

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

    TextLabel1 = new TQLabel( tab, "TextLabel1" );
    TextLabel1->setFrameShape( TQLabel::NoFrame );
    TextLabel1->setFrameShadow( TQLabel::Plain );
    layout14->addWidget( TextLabel1 );

    kcfg_Type = new TQComboBox( false, tab, "kcfg_Type" );
    kcfg_Type->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, kcfg_Type->sizePolicy().hasHeightForWidth() ) );
    layout14->addWidget( kcfg_Type );
    Spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout14->addItem( Spacer2 );
    tabLayout->addLayout( layout14 );

    widgetStack = new TQWidgetStack( tab, "widgetStack" );
    widgetStack->setLineWidth( 0 );

    page = new TQWidget( widgetStack, "page" );
    pageLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint(), "pageLayout"); 

    ButtonGroup2_3_2_2 = new TQButtonGroup( page, "ButtonGroup2_3_2_2" );
    ButtonGroup2_3_2_2->setColumnLayout(0, TQt::Vertical );
    ButtonGroup2_3_2_2->layout()->setSpacing( KDialog::spacingHint() );
    ButtonGroup2_3_2_2->layout()->setMargin( KDialog::marginHint() );
    ButtonGroup2_3_2_2Layout = new TQHBoxLayout( ButtonGroup2_3_2_2->layout() );
    ButtonGroup2_3_2_2Layout->setAlignment( TQt::AlignTop );

    kcfg_PlainShowDate = new TQCheckBox( ButtonGroup2_3_2_2, "kcfg_PlainShowDate" );
    kcfg_PlainShowDate->setChecked( true );
    ButtonGroup2_3_2_2Layout->addWidget( kcfg_PlainShowDate );

    kcfg_PlainShowSeconds = new TQCheckBox( ButtonGroup2_3_2_2, "kcfg_PlainShowSeconds" );
    ButtonGroup2_3_2_2Layout->addWidget( kcfg_PlainShowSeconds );

    kcfg_PlainShowDayOfWeek = new TQCheckBox( ButtonGroup2_3_2_2, "kcfg_PlainShowDayOfWeek" );
    ButtonGroup2_3_2_2Layout->addWidget( kcfg_PlainShowDayOfWeek );

    kcfg_PlainShowFrame = new TQCheckBox( ButtonGroup2_3_2_2, "kcfg_PlainShowFrame" );
    ButtonGroup2_3_2_2Layout->addWidget( kcfg_PlainShowFrame );

    kcfg_TransparentUseShadow = new TQCheckBox( ButtonGroup2_3_2_2, "kcfg_TransparentUseShadow" );
    ButtonGroup2_3_2_2Layout->addWidget( kcfg_TransparentUseShadow );
    spacer14 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    ButtonGroup2_3_2_2Layout->addItem( spacer14 );
    pageLayout->addWidget( ButtonGroup2_3_2_2 );

    groupBox2 = new TQGroupBox( page, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( KDialog::spacingHint() );
    groupBox2->layout()->setMargin( KDialog::marginHint() );
    groupBox2Layout = new TQGridLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    TextLabel1_3_3_2 = new TQLabel( groupBox2, "TextLabel1_3_3_2" );
    TextLabel1_3_3_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)1, 0, 0, TextLabel1_3_3_2->sizePolicy().hasHeightForWidth() ) );

    groupBox2Layout->addWidget( TextLabel1_3_3_2, 2, 0 );

    TextLabel1_2_3_4_3_2 = new TQLabel( groupBox2, "TextLabel1_2_3_4_3_2" );
    TextLabel1_2_3_4_3_2->setEnabled( true );

    groupBox2Layout->addMultiCellWidget( TextLabel1_2_3_4_3_2, 1, 1, 0, 1 );

    kcfg_PlainBackgroundColor = new KColorButton( groupBox2, "kcfg_PlainBackgroundColor" );
    kcfg_PlainBackgroundColor->setEnabled( true );

    groupBox2Layout->addWidget( kcfg_PlainBackgroundColor, 1, 2 );

    kcfg_PlainForegroundColor = new KColorButton( groupBox2, "kcfg_PlainForegroundColor" );
    kcfg_PlainForegroundColor->setEnabled( true );

    groupBox2Layout->addWidget( kcfg_PlainForegroundColor, 0, 2 );

    TextLabel1_4_3_2_2 = new TQLabel( groupBox2, "TextLabel1_4_3_2_2" );
    TextLabel1_4_3_2_2->setEnabled( true );

    groupBox2Layout->addMultiCellWidget( TextLabel1_4_3_2_2, 0, 0, 0, 1 );
    spacer17 = new TQSpacerItem( 230, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox2Layout->addItem( spacer17, 0, 3 );

    kcfg_PlainFont = new TDEFontRequester( groupBox2, "kcfg_PlainFont" );

    groupBox2Layout->addMultiCellWidget( kcfg_PlainFont, 2, 2, 1, 3 );
    spacer6 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    groupBox2Layout->addItem( spacer6, 3, 3 );
    pageLayout->addWidget( groupBox2 );
    widgetStack->addWidget( page, 0 );
    tabLayout->addWidget( widgetStack );

    dateBox = new TQGroupBox( tab, "dateBox" );
    dateBox->setColumnLayout(0, TQt::Vertical );
    dateBox->layout()->setSpacing( KDialog::spacingHint() );
    dateBox->layout()->setMargin( KDialog::marginHint() );
    dateBoxLayout = new TQGridLayout( dateBox->layout() );
    dateBoxLayout->setAlignment( TQt::AlignTop );

    kcfg_DateBackgroundColor = new KColorButton( dateBox, "kcfg_DateBackgroundColor" );

    dateBoxLayout->addWidget( kcfg_DateBackgroundColor, 1, 1 );

    textLabel1_3 = new TQLabel( dateBox, "textLabel1_3" );

    dateBoxLayout->addWidget( textLabel1_3, 0, 0 );

    kcfg_DateForegroundColor = new KColorButton( dateBox, "kcfg_DateForegroundColor" );

    dateBoxLayout->addWidget( kcfg_DateForegroundColor, 0, 1 );

    textLabel2 = new TQLabel( dateBox, "textLabel2" );

    dateBoxLayout->addWidget( textLabel2, 1, 0 );
    spacer15 = new TQSpacerItem( 343, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    dateBoxLayout->addItem( spacer15, 0, 2 );

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

    textLabel4 = new TQLabel( dateBox, "textLabel4" );
    layout2->addWidget( textLabel4 );

    kcfg_DateFont = new TDEFontRequester( dateBox, "kcfg_DateFont" );
    kcfg_DateFont->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, kcfg_DateFont->sizePolicy().hasHeightForWidth() ) );
    layout2->addWidget( kcfg_DateFont );

    dateBoxLayout->addMultiCellLayout( layout2, 2, 2, 0, 2 );
    tabLayout->addWidget( dateBox );
    spacer6_2 = new TQSpacerItem( 20, 100, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout->addItem( spacer6_2 );
    tabs->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( tabs, "tab_2" );
    tabLayout_2 = new TQVBoxLayout( tab_2, KDialog::marginHint(), KDialog::spacingHint(), "tabLayout_2"); 

    tzListView = new TDEListView( tab_2, "tzListView" );
    tzListView->addColumn( tr2i18n( "City" ) );
    tzListView->addColumn( tr2i18n( "Comment" ) );
    tabLayout_2->addWidget( tzListView );
    tabs->insertTab( tab_2, TQString::fromLatin1("") );
    SettingsWidgetLayout->addWidget( tabs );
    languageChange();
    resize( TQSize(605, 639).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( tabs, kcfg_Type );
    setTabOrder( kcfg_Type, kcfg_PlainShowDate );
    setTabOrder( kcfg_PlainShowDate, kcfg_PlainShowSeconds );
    setTabOrder( kcfg_PlainShowSeconds, kcfg_PlainShowFrame );
    setTabOrder( kcfg_PlainShowFrame, kcfg_PlainForegroundColor );
    setTabOrder( kcfg_PlainForegroundColor, kcfg_PlainBackgroundColor );
    setTabOrder( kcfg_PlainBackgroundColor, kcfg_DateBackgroundColor );
    setTabOrder( kcfg_DateBackgroundColor, kcfg_DateForegroundColor );
    setTabOrder( kcfg_DateForegroundColor, kcfg_DateFont );
    setTabOrder( kcfg_DateFont, tzListView );

    // buddies
    TextLabel1_2_3_4_3_2->setBuddy( kcfg_PlainBackgroundColor );
    TextLabel1_4_3_2_2->setBuddy( kcfg_PlainForegroundColor );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SettingsWidget::languageChange()
{
    TextLabel1->setText( tr2i18n( "Clock type:" ) );
    kcfg_Type->clear();
    kcfg_Type->insertItem( tr2i18n( "Plain Clock" ) );
    kcfg_Type->insertItem( tr2i18n( "Digital Clock" ) );
    kcfg_Type->insertItem( tr2i18n( "Analog Clock" ) );
    kcfg_Type->insertItem( tr2i18n( "Fuzzy Clock" ) );
    ButtonGroup2_3_2_2->setTitle( tr2i18n( "Display" ) );
    kcfg_PlainShowDate->setText( tr2i18n( "Dat&e" ) );
    kcfg_PlainShowSeconds->setText( tr2i18n( "&Seconds" ) );
    kcfg_PlainShowDayOfWeek->setText( tr2i18n( "Da&y of week" ) );
    kcfg_PlainShowFrame->setText( tr2i18n( "&Frame" ) );
    kcfg_TransparentUseShadow->setText( tr2i18n( "&Shadow" ) );
    groupBox2->setTitle( tr2i18n( "Time" ) );
    TextLabel1_3_3_2->setText( tr2i18n( "Font:" ) );
    TextLabel1_2_3_4_3_2->setText( tr2i18n( "Background color:" ) );
    kcfg_PlainBackgroundColor->setText( TQString::null );
    kcfg_PlainForegroundColor->setText( TQString::null );
    TextLabel1_4_3_2_2->setText( tr2i18n( "Foreground color:" ) );
    dateBox->setTitle( tr2i18n( "Date" ) );
    kcfg_DateBackgroundColor->setText( TQString::null );
    textLabel1_3->setText( tr2i18n( "Foreground color:" ) );
    kcfg_DateForegroundColor->setText( TQString::null );
    textLabel2->setText( tr2i18n( "Background color:" ) );
    textLabel4->setText( tr2i18n( "Font:" ) );
    tabs->changeTab( tab, tr2i18n( "&Appearance" ) );
    tzListView->header()->setLabel( 0, tr2i18n( "City" ) );
    tzListView->header()->setLabel( 1, tr2i18n( "Comment" ) );
    TQToolTip::add( tzListView, TQString::null );
    TQWhatsThis::add( tzListView, tr2i18n( "A list of timezones known to your system. Press the middle mouse button on the clock in the taskbar and it shows you the time in the selected cities." ) );
    tabs->changeTab( tab_2, tr2i18n( "&Timezones" ) );
}

void SettingsWidget::configureType()
{
    tqWarning( "SettingsWidget::configureType(): Not implemented yet" );
}

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

TQMetaObject *SettingsWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SettingsWidget( "SettingsWidget", &SettingsWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SettingsWidget::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 = {"configureType", 0, 0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "configureType()", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"SettingsWidget", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SettingsWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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