#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 <kcolorbutton.h>
#include <kled.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqslider.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqframe.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    groupBox6 = new TQGroupBox( this, "groupBox6" );
    groupBox6->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, groupBox6->sizePolicy().hasHeightForWidth() ) );
    groupBox6->setFrameShape( TQGroupBox::GroupBoxPanel );
    groupBox6->setFrameShadow( TQGroupBox::Sunken );
    groupBox6->setColumnLayout(0, TQt::Vertical );
    groupBox6->layout()->setSpacing( 6 );
    groupBox6->layout()->setMargin( 11 );
    groupBox6Layout = new TQGridLayout( groupBox6->layout() );
    groupBox6Layout->setAlignment( TQt::AlignTop );

    textLabel5 = new TQLabel( groupBox6, "textLabel5" );

    groupBox6Layout->addWidget( textLabel5, 1, 0 );

    kcfg_DarkFactor = new TQSlider( groupBox6, "kcfg_DarkFactor" );
    kcfg_DarkFactor->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, kcfg_DarkFactor->sizePolicy().hasHeightForWidth() ) );
    kcfg_DarkFactor->setMinValue( 1 );
    kcfg_DarkFactor->setMaxValue( 1000 );
    kcfg_DarkFactor->setLineStep( 5 );
    kcfg_DarkFactor->setPageStep( 10 );
    kcfg_DarkFactor->setValue( 300 );
    kcfg_DarkFactor->setOrientation( TQSlider::Horizontal );
    kcfg_DarkFactor->setTickmarks( TQSlider::NoMarks );
    kcfg_DarkFactor->setTickInterval( 50 );

    groupBox6Layout->addMultiCellWidget( kcfg_DarkFactor, 0, 0, 0, 2 );
    spacer1 = new TQSpacerItem( 21, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox6Layout->addItem( spacer1, 1, 1 );

    textLabel6 = new TQLabel( groupBox6, "textLabel6" );
    textLabel6->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox6Layout->addWidget( textLabel6, 1, 2 );

    SettingsLayout->addMultiCellWidget( groupBox6, 2, 2, 0, 1 );

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

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

    groupBox1Layout->addWidget( textLabel2, 1, 0 );

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

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

    kcfg_Color = new KColorButton( groupBox1, "kcfg_Color" );

    groupBox1Layout->addWidget( kcfg_Color, 0, 1 );

    kcfg_Background = new KColorButton( groupBox1, "kcfg_Background" );

    groupBox1Layout->addWidget( kcfg_Background, 1, 1 );
    spacer2 = new TQSpacerItem( 16, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox1Layout->addMultiCell( spacer2, 0, 1, 2, 2 );

    SettingsLayout->addMultiCellWidget( groupBox1, 1, 1, 0, 1 );

    kcfg_Shape = new TQButtonGroup( this, "kcfg_Shape" );
    kcfg_Shape->setColumnLayout(0, TQt::Vertical );
    kcfg_Shape->layout()->setSpacing( 6 );
    kcfg_Shape->layout()->setMargin( 11 );
    kcfg_ShapeLayout = new TQVBoxLayout( kcfg_Shape->layout() );
    kcfg_ShapeLayout->setAlignment( TQt::AlignTop );

    Shape_Rectangular = new TQRadioButton( kcfg_Shape, "Shape_Rectangular" );
    kcfg_ShapeLayout->addWidget( Shape_Rectangular );

    Shape_Circular = new TQRadioButton( kcfg_Shape, "Shape_Circular" );
    Shape_Circular->setChecked( true );
    kcfg_ShapeLayout->addWidget( Shape_Circular );

    SettingsLayout->addWidget( kcfg_Shape, 2, 2 );

    kcfg_Look = new TQButtonGroup( this, "kcfg_Look" );
    kcfg_Look->setColumnLayout(0, TQt::Vertical );
    kcfg_Look->layout()->setSpacing( 6 );
    kcfg_Look->layout()->setMargin( 11 );
    kcfg_LookLayout = new TQVBoxLayout( kcfg_Look->layout() );
    kcfg_LookLayout->setAlignment( TQt::AlignTop );

    Look_Flat = new TQRadioButton( kcfg_Look, "Look_Flat" );
    kcfg_LookLayout->addWidget( Look_Flat );

    Look_Raised = new TQRadioButton( kcfg_Look, "Look_Raised" );
    Look_Raised->setChecked( true );
    kcfg_LookLayout->addWidget( Look_Raised );

    Look_Sunken = new TQRadioButton( kcfg_Look, "Look_Sunken" );
    kcfg_LookLayout->addWidget( Look_Sunken );

    SettingsLayout->addWidget( kcfg_Look, 1, 2 );

    layout3 = new TQVBoxLayout( 0, 0, 6, "layout3"); 

    preview = new TQGroupBox( this, "preview" );
    preview->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)4, 0, 0, preview->sizePolicy().hasHeightForWidth() ) );
    preview->setColumnLayout(0, TQt::Vertical );
    preview->layout()->setSpacing( 6 );
    preview->layout()->setMargin( 11 );
    previewLayout = new TQHBoxLayout( preview->layout() );
    previewLayout->setAlignment( TQt::AlignTop );
    spacer6 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    previewLayout->addItem( spacer6 );

    frame1 = new TQFrame( preview, "frame1" );
    frame1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)4, 0, 0, frame1->sizePolicy().hasHeightForWidth() ) );
    frame1->setFrameShape( TQFrame::StyledPanel );
    frame1->setFrameShadow( TQFrame::Raised );
    frame1->setLineWidth( 1 );
    frame1->setMargin( 0 );
    frame1Layout = new TQGridLayout( frame1, 1, 1, 2, 0, "frame1Layout"); 

    kLed1 = new KLed( frame1, "kLed1" );
    kLed1->setMinimumSize( TQSize( 32, 32 ) );
    kLed1->setState( KLed::Off );

    frame1Layout->addWidget( kLed1, 0, 0 );

    kLed2 = new KLed( frame1, "kLed2" );
    kLed2->setMinimumSize( TQSize( 32, 32 ) );

    frame1Layout->addWidget( kLed2, 0, 1 );

    kLed4 = new KLed( frame1, "kLed4" );
    kLed4->setMinimumSize( TQSize( 32, 32 ) );

    frame1Layout->addWidget( kLed4, 1, 1 );

    kLed3 = new KLed( frame1, "kLed3" );
    kLed3->setMinimumSize( TQSize( 32, 32 ) );
    kLed3->setState( KLed::Off );

    frame1Layout->addWidget( kLed3, 1, 0 );

    kLed6 = new KLed( frame1, "kLed6" );
    kLed6->setMinimumSize( TQSize( 32, 32 ) );
    kLed6->setState( KLed::Off );

    frame1Layout->addWidget( kLed6, 2, 1 );

    kLed5 = new KLed( frame1, "kLed5" );
    kLed5->setMinimumSize( TQSize( 32, 32 ) );

    frame1Layout->addWidget( kLed5, 2, 0 );
    previewLayout->addWidget( frame1 );
    spacer7 = new TQSpacerItem( 21, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    previewLayout->addItem( spacer7 );
    layout3->addWidget( preview );
    spacer5 = new TQSpacerItem( 20, 84, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout3->addItem( spacer5 );

    SettingsLayout->addMultiCellLayout( layout3, 0, 2, 4, 4 );

    kcfg_Show_Seconds = new TQCheckBox( this, "kcfg_Show_Seconds" );

    SettingsLayout->addWidget( kcfg_Show_Seconds, 0, 0 );

    kcfg_Hide_Off_Leds = new TQCheckBox( this, "kcfg_Hide_Off_Leds" );

    SettingsLayout->addMultiCellWidget( kcfg_Hide_Off_Leds, 0, 0, 1, 2 );

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

    SettingsLayout->addMultiCellWidget( line1, 0, 2, 3, 3 );
    languageChange();
    resize( TQSize(452, 247).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Settings::languageChange()
{
    groupBox6->setTitle( tr2i18n( "Disabled LED" ) );
    textLabel5->setText( tr2i18n( "Light" ) );
    textLabel6->setText( tr2i18n( "Dark" ) );
    groupBox1->setTitle( tr2i18n( "Color" ) );
    textLabel2->setText( tr2i18n( "Background:" ) );
    textLabel1->setText( tr2i18n( "LED:" ) );
    kcfg_Color->setText( TQString::null );
    kcfg_Background->setText( TQString::null );
    kcfg_Shape->setTitle( tr2i18n( "LED Shape" ) );
    Shape_Rectangular->setText( tr2i18n( "&Rectangular" ) );
    Shape_Circular->setText( tr2i18n( "&Circular" ) );
    kcfg_Look->setTitle( tr2i18n( "LED Look" ) );
    Look_Flat->setText( tr2i18n( "&Flat" ) );
    Look_Raised->setText( tr2i18n( "R&aised" ) );
    Look_Sunken->setText( tr2i18n( "&Sunken" ) );
    preview->setTitle( tr2i18n( "Preview" ) );
    kcfg_Show_Seconds->setText( tr2i18n( "Show seconds" ) );
    kcfg_Hide_Off_Leds->setText( tr2i18n( "Hide unlit LEDs" ) );
}

/****************************************************************************
** Settings 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 *Settings::className() const
{
    return "Settings";
}

TQMetaObject *Settings::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_Settings( "Settings", &Settings::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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