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

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

#include "analog.h"

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

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

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

    kcfg_AnalogShowDate = new TQCheckBox( ButtonGroup2_3_2, "kcfg_AnalogShowDate" );
    ButtonGroup2_3_2Layout->addWidget( kcfg_AnalogShowDate );

    kcfg_AnalogShowSeconds = new TQCheckBox( ButtonGroup2_3_2, "kcfg_AnalogShowSeconds" );
    kcfg_AnalogShowSeconds->setChecked( true );
    ButtonGroup2_3_2Layout->addWidget( kcfg_AnalogShowSeconds );

    kcfg_AnalogShowDayOfWeek = new TQCheckBox( ButtonGroup2_3_2, "kcfg_AnalogShowDayOfWeek" );
    ButtonGroup2_3_2Layout->addWidget( kcfg_AnalogShowDayOfWeek );

    kcfg_AnalogShowFrame = new TQCheckBox( ButtonGroup2_3_2, "kcfg_AnalogShowFrame" );
    ButtonGroup2_3_2Layout->addWidget( kcfg_AnalogShowFrame );
    spacer20 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    ButtonGroup2_3_2Layout->addItem( spacer20 );
    AnalogWidgetLayout->addWidget( ButtonGroup2_3_2 );

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

    layout9 = new TQGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout9"); 

    kcfg_AnalogBackgroundColor = new KColorButton( groupBox1, "kcfg_AnalogBackgroundColor" );
    kcfg_AnalogBackgroundColor->setEnabled( false );

    layout9->addWidget( kcfg_AnalogBackgroundColor, 2, 1 );

    kcfg_AnalogShadowColor = new KColorButton( groupBox1, "kcfg_AnalogShadowColor" );
    kcfg_AnalogShadowColor->setEnabled( false );

    layout9->addWidget( kcfg_AnalogShadowColor, 1, 1 );

    foregroundAnalogLabel = new TQLabel( groupBox1, "foregroundAnalogLabel" );
    foregroundAnalogLabel->setEnabled( false );

    layout9->addWidget( foregroundAnalogLabel, 0, 0 );
    spacer13 = new TQSpacerItem( 16, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer13, 1, 2 );

    backgroundAnalogLabel = new TQLabel( groupBox1, "backgroundAnalogLabel" );
    backgroundAnalogLabel->setEnabled( false );

    layout9->addWidget( backgroundAnalogLabel, 2, 0 );

    kcfg_AnalogForegroundColor = new KColorButton( groupBox1, "kcfg_AnalogForegroundColor" );
    kcfg_AnalogForegroundColor->setEnabled( false );

    layout9->addWidget( kcfg_AnalogForegroundColor, 0, 1 );

    shadowAnalogLabel = new TQLabel( groupBox1, "shadowAnalogLabel" );
    shadowAnalogLabel->setEnabled( false );

    layout9->addWidget( shadowAnalogLabel, 1, 0 );

    groupBox1Layout->addMultiCellLayout( layout9, 2, 2, 0, 2 );

    TextLabel1_3 = new TQLabel( groupBox1, "TextLabel1_3" );

    groupBox1Layout->addWidget( TextLabel1_3, 0, 0 );

    kcfg_AnalogAntialias = new TQComboBox( false, groupBox1, "kcfg_AnalogAntialias" );

    groupBox1Layout->addWidget( kcfg_AnalogAntialias, 0, 1 );
    Spacer18_2 = new TQSpacerItem( 310, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox1Layout->addItem( Spacer18_2, 0, 2 );

    kcfg_AnalogLCDStyle = new TQCheckBox( groupBox1, "kcfg_AnalogLCDStyle" );
    kcfg_AnalogLCDStyle->setChecked( true );

    groupBox1Layout->addMultiCellWidget( kcfg_AnalogLCDStyle, 1, 1, 0, 2 );
    spacer54 = new TQSpacerItem( 20, 50, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    groupBox1Layout->addItem( spacer54, 3, 2 );
    AnalogWidgetLayout->addWidget( groupBox1 );
    languageChange();
    resize( TQSize(524, 307).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_AnalogLCDStyle, TQ_SIGNAL( toggled(bool) ), foregroundAnalogLabel, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_AnalogLCDStyle, TQ_SIGNAL( toggled(bool) ), backgroundAnalogLabel, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_AnalogLCDStyle, TQ_SIGNAL( toggled(bool) ), shadowAnalogLabel, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_AnalogLCDStyle, TQ_SIGNAL( toggled(bool) ), kcfg_AnalogForegroundColor, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_AnalogLCDStyle, TQ_SIGNAL( toggled(bool) ), kcfg_AnalogShadowColor, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_AnalogLCDStyle, TQ_SIGNAL( toggled(bool) ), kcfg_AnalogBackgroundColor, TQ_SLOT( setDisabled(bool) ) );

    // tab order
    setTabOrder( kcfg_AnalogShowDate, kcfg_AnalogShowSeconds );
    setTabOrder( kcfg_AnalogShowSeconds, kcfg_AnalogShowFrame );
    setTabOrder( kcfg_AnalogShowFrame, kcfg_AnalogAntialias );
    setTabOrder( kcfg_AnalogAntialias, kcfg_AnalogLCDStyle );
    setTabOrder( kcfg_AnalogLCDStyle, kcfg_AnalogForegroundColor );
    setTabOrder( kcfg_AnalogForegroundColor, kcfg_AnalogShadowColor );
    setTabOrder( kcfg_AnalogShadowColor, kcfg_AnalogBackgroundColor );

    // buddies
    foregroundAnalogLabel->setBuddy( kcfg_AnalogForegroundColor );
    backgroundAnalogLabel->setBuddy( kcfg_AnalogBackgroundColor );
    shadowAnalogLabel->setBuddy( kcfg_AnalogShadowColor );
    TextLabel1_3->setBuddy( kcfg_AnalogAntialias );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AnalogWidget::languageChange()
{
    ButtonGroup2_3_2->setTitle( tr2i18n( "Display" ) );
    kcfg_AnalogShowDate->setText( tr2i18n( "Dat&e" ) );
    kcfg_AnalogShowSeconds->setText( tr2i18n( "Seco&nds" ) );
    kcfg_AnalogShowDayOfWeek->setText( tr2i18n( "Da&y of week" ) );
    kcfg_AnalogShowFrame->setText( tr2i18n( "&Frame" ) );
    groupBox1->setTitle( tr2i18n( "Time" ) );
    kcfg_AnalogBackgroundColor->setText( TQString::null );
    kcfg_AnalogShadowColor->setText( TQString::null );
    foregroundAnalogLabel->setText( tr2i18n( "Foreground color:" ) );
    backgroundAnalogLabel->setText( tr2i18n( "Background color:" ) );
    kcfg_AnalogForegroundColor->setText( TQString::null );
    shadowAnalogLabel->setText( tr2i18n( "Shadow color:" ) );
    TextLabel1_3->setText( tr2i18n( "Antialias:" ) );
    kcfg_AnalogAntialias->clear();
    kcfg_AnalogAntialias->insertItem( tr2i18n( "None" ) );
    kcfg_AnalogAntialias->insertItem( tr2i18n( "Low Quality" ) );
    kcfg_AnalogAntialias->insertItem( tr2i18n( "High Quality" ) );
    kcfg_AnalogAntialias->setCurrentItem( 0 );
    kcfg_AnalogLCDStyle->setText( tr2i18n( "&LCD look" ) );
}

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

TQMetaObject *AnalogWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AnalogWidget( "AnalogWidget", &AnalogWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* AnalogWidget::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(
	"AnalogWidget", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_AnalogWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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