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

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

#include "digital.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 <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    kcfg_DigitalShowDate = new TQCheckBox( ButtonGroup2_3, "kcfg_DigitalShowDate" );
    kcfg_DigitalShowDate->setChecked( true );
    ButtonGroup2_3Layout->addWidget( kcfg_DigitalShowDate );

    kcfg_DigitalShowSeconds = new TQCheckBox( ButtonGroup2_3, "kcfg_DigitalShowSeconds" );
    ButtonGroup2_3Layout->addWidget( kcfg_DigitalShowSeconds );

    kcfg_DigitalShowDayOfWeek = new TQCheckBox( ButtonGroup2_3, "kcfg_DigitalShowDayOfWeek" );
    ButtonGroup2_3Layout->addWidget( kcfg_DigitalShowDayOfWeek );

    kcfg_DigitalBlink = new TQCheckBox( ButtonGroup2_3, "kcfg_DigitalBlink" );
    ButtonGroup2_3Layout->addWidget( kcfg_DigitalBlink );

    kcfg_DigitalShowFrame = new TQCheckBox( ButtonGroup2_3, "kcfg_DigitalShowFrame" );
    ButtonGroup2_3Layout->addWidget( kcfg_DigitalShowFrame );
    spacer21 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    ButtonGroup2_3Layout->addItem( spacer21 );
    DigitalWidgetLayout->addWidget( ButtonGroup2_3 );

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

    kcfg_DigitalLCDStyle = new TQCheckBox( groupBox1, "kcfg_DigitalLCDStyle" );
    kcfg_DigitalLCDStyle->setChecked( false );
    groupBox1Layout->addWidget( kcfg_DigitalLCDStyle );

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

    Foreground_ColorL = new TQLabel( groupBox1, "Foreground_ColorL" );
    Foreground_ColorL->setEnabled( true );

    layout14->addWidget( Foreground_ColorL, 0, 0 );

    kcfg_DigitalBackgroundColor = new KColorButton( groupBox1, "kcfg_DigitalBackgroundColor" );
    kcfg_DigitalBackgroundColor->setEnabled( true );

    layout14->addWidget( kcfg_DigitalBackgroundColor, 2, 1 );

    backgroundDigitalLabel = new TQLabel( groupBox1, "backgroundDigitalLabel" );
    backgroundDigitalLabel->setEnabled( true );

    layout14->addWidget( backgroundDigitalLabel, 2, 0 );

    kcfg_DigitalForegroundColor = new KColorButton( groupBox1, "kcfg_DigitalForegroundColor" );
    kcfg_DigitalForegroundColor->setEnabled( true );

    layout14->addWidget( kcfg_DigitalForegroundColor, 0, 1 );

    kcfg_DigitalShadowColor = new KColorButton( groupBox1, "kcfg_DigitalShadowColor" );
    kcfg_DigitalShadowColor->setEnabled( true );

    layout14->addWidget( kcfg_DigitalShadowColor, 1, 1 );
    spacer9 = new TQSpacerItem( 110, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout14->addItem( spacer9, 1, 2 );

    Shadow_ColorL = new TQLabel( groupBox1, "Shadow_ColorL" );
    Shadow_ColorL->setEnabled( true );

    layout14->addWidget( Shadow_ColorL, 1, 0 );
    groupBox1Layout->addLayout( layout14 );
    spacer75 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    groupBox1Layout->addItem( spacer75 );
    DigitalWidgetLayout->addWidget( groupBox1 );
    languageChange();
    resize( TQSize(553, 251).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_DigitalLCDStyle, TQ_SIGNAL( toggled(bool) ), kcfg_DigitalBackgroundColor, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_DigitalLCDStyle, TQ_SIGNAL( toggled(bool) ), backgroundDigitalLabel, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_DigitalLCDStyle, TQ_SIGNAL( toggled(bool) ), kcfg_DigitalForegroundColor, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_DigitalLCDStyle, TQ_SIGNAL( toggled(bool) ), Foreground_ColorL, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_DigitalLCDStyle, TQ_SIGNAL( toggled(bool) ), kcfg_DigitalShadowColor, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_DigitalLCDStyle, TQ_SIGNAL( toggled(bool) ), Shadow_ColorL, TQ_SLOT( setDisabled(bool) ) );

    // tab order
    setTabOrder( kcfg_DigitalShowDate, kcfg_DigitalShowSeconds );
    setTabOrder( kcfg_DigitalShowSeconds, kcfg_DigitalBlink );
    setTabOrder( kcfg_DigitalBlink, kcfg_DigitalShowFrame );
    setTabOrder( kcfg_DigitalShowFrame, kcfg_DigitalLCDStyle );
    setTabOrder( kcfg_DigitalLCDStyle, kcfg_DigitalForegroundColor );
    setTabOrder( kcfg_DigitalForegroundColor, kcfg_DigitalShadowColor );
    setTabOrder( kcfg_DigitalShadowColor, kcfg_DigitalBackgroundColor );

    // buddies
    Foreground_ColorL->setBuddy( kcfg_DigitalForegroundColor );
    backgroundDigitalLabel->setBuddy( kcfg_DigitalBackgroundColor );
    Shadow_ColorL->setBuddy( kcfg_DigitalShadowColor );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DigitalWidget::languageChange()
{
    ButtonGroup2_3->setTitle( tr2i18n( "Display" ) );
    kcfg_DigitalShowDate->setText( tr2i18n( "Dat&e" ) );
    kcfg_DigitalShowSeconds->setText( tr2i18n( "Seco&nds" ) );
    kcfg_DigitalShowDayOfWeek->setText( tr2i18n( "Da&y of week" ) );
    kcfg_DigitalBlink->setText( tr2i18n( "Blin&king dots" ) );
    kcfg_DigitalShowFrame->setText( tr2i18n( "&Frame" ) );
    groupBox1->setTitle( tr2i18n( "Time" ) );
    kcfg_DigitalLCDStyle->setText( tr2i18n( "LCD look" ) );
    Foreground_ColorL->setText( tr2i18n( "Foreground color:" ) );
    kcfg_DigitalBackgroundColor->setText( TQString::null );
    backgroundDigitalLabel->setText( tr2i18n( "Background color:" ) );
    kcfg_DigitalForegroundColor->setText( TQString::null );
    kcfg_DigitalShadowColor->setText( TQString::null );
    Shadow_ColorL->setText( tr2i18n( "Shadow color:" ) );
}

void DigitalWidget::kcfg_DigitalLCDStyle_stateChanged(int)
{
    tqWarning( "DigitalWidget::kcfg_DigitalLCDStyle_stateChanged(int): Not implemented yet" );
}

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

TQMetaObject *DigitalWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_DigitalWidget( "DigitalWidget", &DigitalWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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