#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 <ntqpushbutton.h>
#include <ntqframe.h>
#include <ntqgroupbox.h>
#include <ntqslider.h>
#include <ntqlabel.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 TQVBoxLayout( this, 0, 0, "SettingsLayout"); 

    frame3 = new TQFrame( this, "frame3" );
    frame3->setFrameShape( TQFrame::StyledPanel );
    frame3->setFrameShadow( TQFrame::Plain );
    frame3->setLineWidth( 0 );
    frame3Layout = new TQGridLayout( frame3, 1, 1, 11, 6, "frame3Layout"); 

    groupBox3 = new TQGroupBox( frame3, "groupBox3" );
    groupBox3->setFrameShape( TQGroupBox::GroupBoxPanel );
    groupBox3->setFrameShadow( TQGroupBox::Sunken );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new TQGridLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

    kcfg_CubeDim = new TQSlider( groupBox3, "kcfg_CubeDim" );
    kcfg_CubeDim->setMinValue( 5 );
    kcfg_CubeDim->setMaxValue( 10 );
    kcfg_CubeDim->setPageStep( 1 );
    kcfg_CubeDim->setValue( 6 );
    kcfg_CubeDim->setOrientation( TQSlider::Horizontal );
    kcfg_CubeDim->setTickmarks( TQSlider::Right );

    groupBox3Layout->addMultiCellWidget( kcfg_CubeDim, 0, 0, 0, 2 );

    textLabel6 = new TQLabel( groupBox3, "textLabel6" );

    groupBox3Layout->addWidget( textLabel6, 1, 0 );

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

    groupBox3Layout->addWidget( textLabel8, 1, 2 );

    frame3Layout->addWidget( groupBox3, 0, 1 );
    spacer1 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    frame3Layout->addItem( spacer1, 2, 0 );

    groupBox7 = new TQGroupBox( frame3, "groupBox7" );
    groupBox7->setColumnLayout(0, TQt::Vertical );
    groupBox7->layout()->setSpacing( 6 );
    groupBox7->layout()->setMargin( 11 );
    groupBox7Layout = new TQGridLayout( groupBox7->layout() );
    groupBox7Layout->setAlignment( TQt::AlignTop );

    kcfg_Color2 = new KColorButton( groupBox7, "kcfg_Color2" );

    groupBox7Layout->addWidget( kcfg_Color2, 1, 1 );

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

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

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

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

    kcfg_Color1 = new KColorButton( groupBox7, "kcfg_Color1" );

    groupBox7Layout->addWidget( kcfg_Color1, 0, 1 );

    frame3Layout->addWidget( groupBox7, 1, 1 );

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

    textLabel4 = new TQLabel( groupBox2, "textLabel4" );
    textLabel4->setAlignment( int( TQLabel::AlignCenter ) );

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

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

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

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

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

    kcfg_Skill = new TQSlider( groupBox2, "kcfg_Skill" );
    kcfg_Skill->setMinValue( 0 );
    kcfg_Skill->setMaxValue( 2 );
    kcfg_Skill->setPageStep( 1 );
    kcfg_Skill->setOrientation( TQSlider::Horizontal );
    kcfg_Skill->setTickmarks( TQSlider::Right );

    groupBox2Layout->addMultiCellWidget( kcfg_Skill, 0, 0, 0, 2 );

    frame3Layout->addWidget( groupBox2, 0, 0 );

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

    kcfg_ComputerPlayer1 = new TQCheckBox( groupBox1, "kcfg_ComputerPlayer1" );
    groupBox1Layout->addWidget( kcfg_ComputerPlayer1 );

    kcfg_ComputerPlayer2 = new TQCheckBox( groupBox1, "kcfg_ComputerPlayer2" );
    kcfg_ComputerPlayer2->setChecked( true );
    groupBox1Layout->addWidget( kcfg_ComputerPlayer2 );

    frame3Layout->addWidget( groupBox1, 1, 0 );
    SettingsLayout->addWidget( frame3 );
    languageChange();
    resize( TQSize(422, 214).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()
{
    groupBox3->setTitle( tr2i18n( "Board Size" ) );
    textLabel6->setText( tr2i18n( "5x5" ) );
    textLabel8->setText( tr2i18n( "10x10" ) );
    groupBox7->setTitle( tr2i18n( "Board Color" ) );
    kcfg_Color2->setText( TQString::null );
    textLabel1->setText( tr2i18n( "Player 1:" ) );
    textLabel2->setText( tr2i18n( "Player 2:" ) );
    kcfg_Color1->setText( TQString::null );
    groupBox2->setTitle( tr2i18n( "Computer Skill" ) );
    textLabel4->setText( tr2i18n( "Average" ) );
    textLabel3->setText( tr2i18n( "Beginner" ) );
    textLabel5->setText( tr2i18n( "Expert" ) );
    groupBox1->setTitle( tr2i18n( "Computer Plays As" ) );
    kcfg_ComputerPlayer1->setText( tr2i18n( "Player 1" ) );
    kcfg_ComputerPlayer2->setText( tr2i18n( "Player 2" ) );
}

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