#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 <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqslider.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.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"); 

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

    textLabel3 = new TQLabel( groupBox2, "textLabel3" );

    groupBox2Layout->addWidget( textLabel3, 0, 0 );

    textLabel4 = new TQLabel( groupBox2, "textLabel4" );

    groupBox2Layout->addWidget( textLabel4, 1, 0 );

    kcfg_Name1 = new TQLineEdit( groupBox2, "kcfg_Name1" );

    groupBox2Layout->addWidget( kcfg_Name1, 0, 1 );

    kcfg_Name2 = new TQLineEdit( groupBox2, "kcfg_Name2" );

    groupBox2Layout->addWidget( kcfg_Name2, 1, 1 );

    SettingsLayout->addWidget( groupBox2, 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 );

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

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

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

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

    kcfg_level = new TQSlider( groupBox1, "kcfg_level" );
    kcfg_level->setMinValue( 1 );
    kcfg_level->setMaxValue( 10 );
    kcfg_level->setPageStep( 1 );
    kcfg_level->setValue( 3 );
    kcfg_level->setOrientation( TQSlider::Horizontal );
    kcfg_level->setTickmarks( TQSlider::Below );

    groupBox1Layout->addMultiCellWidget( kcfg_level, 0, 0, 0, 1 );

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

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

    radioButton1 = new TQRadioButton( kcfg_Colour1, "radioButton1" );
    radioButton1->setChecked( true );
    kcfg_Colour1Layout->addWidget( radioButton1 );

    radioButton2 = new TQRadioButton( kcfg_Colour1, "radioButton2" );
    kcfg_Colour1Layout->addWidget( radioButton2 );

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

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

    radioButton6 = new TQRadioButton( kcfg_Input2, "radioButton6" );
    radioButton6->setChecked( true );
    kcfg_Input2Layout->addWidget( radioButton6 );

    radioButton7 = new TQRadioButton( kcfg_Input2, "radioButton7" );
    kcfg_Input2Layout->addWidget( radioButton7 );

    radioButton8 = new TQRadioButton( kcfg_Input2, "radioButton8" );
    kcfg_Input2Layout->addWidget( radioButton8 );

    SettingsLayout->addWidget( kcfg_Input2, 1, 1 );

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

    radioButton3 = new TQRadioButton( kcfg_Input1, "radioButton3" );
    radioButton3->setChecked( true );
    kcfg_Input1Layout->addWidget( radioButton3 );

    radioButton4 = new TQRadioButton( kcfg_Input1, "radioButton4" );
    kcfg_Input1Layout->addWidget( radioButton4 );

    radioButton5 = new TQRadioButton( kcfg_Input1, "radioButton5" );
    kcfg_Input1Layout->addWidget( radioButton5 );

    SettingsLayout->addWidget( kcfg_Input1, 1, 0 );
    spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    SettingsLayout->addItem( spacer1, 3, 1 );
    languageChange();
    resize( TQSize(411, 319).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()
{
    groupBox2->setTitle( tr2i18n( "Player Names" ) );
    textLabel3->setText( tr2i18n( "Player 1:" ) );
    textLabel4->setText( tr2i18n( "Player 2:" ) );
    groupBox1->setTitle( tr2i18n( "Computer Difficulty" ) );
    textLabel1->setText( tr2i18n( "Easy" ) );
    textLabel2->setText( tr2i18n( "Hard" ) );
    TQWhatsThis::add( kcfg_level, tr2i18n( "Change the strength of the computer player." ) );
    kcfg_Colour1->setTitle( tr2i18n( "Starting Player Color" ) );
    radioButton1->setText( tr2i18n( "Red" ) );
    radioButton2->setText( tr2i18n( "Yellow" ) );
    kcfg_Input2->setTitle( tr2i18n( "Red Plays With" ) );
    radioButton6->setText( tr2i18n( "Mouse" ) );
    radioButton7->setText( tr2i18n( "Computer" ) );
    radioButton8->setText( tr2i18n( "Keyboard" ) );
    kcfg_Input1->setTitle( tr2i18n( "Yellow Plays With" ) );
    radioButton3->setText( tr2i18n( "Mouse" ) );
    radioButton4->setText( tr2i18n( "Computer" ) );
    radioButton5->setText( tr2i18n( "Keyboard" ) );
}

/****************************************************************************
** 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
