#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 <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqframe.h>
#include <ntqcheckbox.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqgroupbox.h>
#include <ntqslider.h>
#include <ntqlabel.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::Raised );
    frame3->setLineWidth( 0 );
    frame3Layout = new TQGridLayout( frame3, 1, 1, 11, 6, "frame3Layout"); 
    spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    frame3Layout->addItem( spacer2, 4, 0 );

    kcfg_Grayscale = new TQCheckBox( frame3, "kcfg_Grayscale" );

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

    kcfg_CompetitiveGameChoice = new TQButtonGroup( frame3, "kcfg_CompetitiveGameChoice" );
    kcfg_CompetitiveGameChoice->setColumnLayout(0, TQt::Vertical );
    kcfg_CompetitiveGameChoice->layout()->setSpacing( 6 );
    kcfg_CompetitiveGameChoice->layout()->setMargin( 11 );
    kcfg_CompetitiveGameChoiceLayout = new TQVBoxLayout( kcfg_CompetitiveGameChoice->layout() );
    kcfg_CompetitiveGameChoiceLayout->setAlignment( TQt::AlignTop );

    CasualGameChoice = new TQRadioButton( kcfg_CompetitiveGameChoice, "CasualGameChoice" );
    CasualGameChoice->setChecked( true );
    kcfg_CompetitiveGameChoiceLayout->addWidget( CasualGameChoice );

    CompetitiveGameChoice = new TQRadioButton( kcfg_CompetitiveGameChoice, "CompetitiveGameChoice" );
    kcfg_CompetitiveGameChoiceLayout->addWidget( CompetitiveGameChoice );

    frame3Layout->addMultiCellWidget( kcfg_CompetitiveGameChoice, 0, 1, 1, 1 );

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

    kcfg_skill = new TQSlider( skillGroup, "kcfg_skill" );
    kcfg_skill->setMinValue( 1 );
    kcfg_skill->setMaxValue( 7 );
    kcfg_skill->setPageStep( 1 );
    kcfg_skill->setOrientation( TQSlider::Horizontal );
    kcfg_skill->setTickmarks( TQSlider::NoMarks );

    skillGroupLayout->addMultiCellWidget( kcfg_skill, 0, 0, 0, 2 );

    Beginner = new TQLabel( skillGroup, "Beginner" );
    Beginner->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignLeft ) );

    skillGroupLayout->addWidget( Beginner, 1, 0 );

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

    skillGroupLayout->addWidget( Expert, 1, 2 );

    Average = new TQLabel( skillGroup, "Average" );
    Average->setAlignment( int( TQLabel::AlignCenter ) );

    skillGroupLayout->addWidget( Average, 1, 1 );

    frame3Layout->addWidget( skillGroup, 2, 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 );

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

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

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

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

    kcfg_AnimationSpeed = new TQSlider( groupBox2, "kcfg_AnimationSpeed" );
    kcfg_AnimationSpeed->setMinValue( 1 );
    kcfg_AnimationSpeed->setMaxValue( 10 );
    kcfg_AnimationSpeed->setLineStep( 1 );
    kcfg_AnimationSpeed->setPageStep( 1 );
    kcfg_AnimationSpeed->setOrientation( TQSlider::Horizontal );
    kcfg_AnimationSpeed->setTickmarks( TQSlider::NoMarks );

    groupBox2Layout->addMultiCellWidget( kcfg_AnimationSpeed, 0, 0, 0, 1 );

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

    kcfg_Animation = new TQCheckBox( frame3, "kcfg_Animation" );
    kcfg_Animation->setChecked( true );

    frame3Layout->addWidget( kcfg_Animation, 1, 0 );

    kcfg_BackgroundImageChoice = new TQButtonGroup( frame3, "kcfg_BackgroundImageChoice" );
    kcfg_BackgroundImageChoice->setColumnLayout(0, TQt::Vertical );
    kcfg_BackgroundImageChoice->layout()->setSpacing( 6 );
    kcfg_BackgroundImageChoice->layout()->setMargin( 11 );
    kcfg_BackgroundImageChoiceLayout = new TQGridLayout( kcfg_BackgroundImageChoice->layout() );
    kcfg_BackgroundImageChoiceLayout->setAlignment( TQt::AlignTop );

    BackgroundColorChoice = new TQRadioButton( kcfg_BackgroundImageChoice, "BackgroundColorChoice" );

    kcfg_BackgroundImageChoiceLayout->addWidget( BackgroundColorChoice, 0, 0 );

    kcfg_BackgroundImage = new KURLRequester( kcfg_BackgroundImageChoice, "kcfg_BackgroundImage" );

    kcfg_BackgroundImageChoiceLayout->addWidget( kcfg_BackgroundImage, 1, 1 );

    BackgroundImageChoice = new TQRadioButton( kcfg_BackgroundImageChoice, "BackgroundImageChoice" );
    BackgroundImageChoice->setChecked( true );

    kcfg_BackgroundImageChoiceLayout->addWidget( BackgroundImageChoice, 1, 0 );

    kcfg_BackgroundColor = new KColorButton( kcfg_BackgroundImageChoice, "kcfg_BackgroundColor" );
    kcfg_BackgroundColor->setEnabled( false );
    kcfg_BackgroundColor->setColor( TQColor( 255, 255, 255 ) );

    kcfg_BackgroundImageChoiceLayout->addWidget( kcfg_BackgroundColor, 0, 1 );

    frame3Layout->addMultiCellWidget( kcfg_BackgroundImageChoice, 3, 3, 0, 1 );
    SettingsLayout->addWidget( frame3 );
    languageChange();
    resize( TQSize(431, 323).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_Animation, TQ_SIGNAL( toggled(bool) ), groupBox2, TQ_SLOT( setEnabled(bool) ) );
    connect( BackgroundColorChoice, TQ_SIGNAL( toggled(bool) ), kcfg_BackgroundColor, TQ_SLOT( setEnabled(bool) ) );
    connect( BackgroundImageChoice, TQ_SIGNAL( toggled(bool) ), kcfg_BackgroundImage, TQ_SLOT( setEnabled(bool) ) );
}

/*
 *  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()
{
    setCaption( tr2i18n( "Settings" ) );
    kcfg_Grayscale->setText( tr2i18n( "&Grayscale chips" ) );
    kcfg_CompetitiveGameChoice->setTitle( tr2i18n( "Play Game" ) );
    CasualGameChoice->setText( tr2i18n( "Casually" ) );
    CompetitiveGameChoice->setText( tr2i18n( "Competitively" ) );
    skillGroup->setTitle( tr2i18n( "&Computer Skill" ) );
    Beginner->setText( tr2i18n( "Beginner" ) );
    Expert->setText( tr2i18n( "Expert" ) );
    Average->setText( tr2i18n( "Average" ) );
    groupBox2->setTitle( tr2i18n( "Animation Speed" ) );
    textLabel1->setText( tr2i18n( "Slow" ) );
    textLabel3->setText( tr2i18n( "Fast" ) );
    kcfg_Animation->setText( tr2i18n( "&Animation" ) );
    kcfg_BackgroundImageChoice->setTitle( tr2i18n( "&Background" ) );
    BackgroundColorChoice->setText( tr2i18n( "Color:" ) );
    BackgroundImageChoice->setText( tr2i18n( "&Image:" ) );
    kcfg_BackgroundColor->setText( TQString::null );
}

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