#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 <ntqcheckbox.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, 11, 6, "SettingsLayout"); 

    kcfg_Gravity = new TQCheckBox( this, "kcfg_Gravity" );
    SettingsLayout->addWidget( kcfg_Gravity );

    kcfg_Solvable = new TQCheckBox( this, "kcfg_Solvable" );
    SettingsLayout->addWidget( kcfg_Solvable );

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

    kcfg_Level = new TQSlider( difficulty_groupBox, "kcfg_Level" );
    kcfg_Level->setMaxValue( 2 );
    kcfg_Level->setPageStep( 1 );
    kcfg_Level->setValue( 1 );
    kcfg_Level->setOrientation( TQSlider::Horizontal );
    kcfg_Level->setTickmarks( TQSlider::Below );

    difficulty_groupBoxLayout->addMultiCellWidget( kcfg_Level, 0, 0, 0, 1 );

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

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

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

    difficulty_groupBoxLayout->addWidget( textLabel3, 1, 1 );
    SettingsLayout->addWidget( difficulty_groupBox );

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

    kcfg_Speed = new TQSlider( speed_groupBox, "kcfg_Speed" );
    kcfg_Speed->setMaxValue( 4 );
    kcfg_Speed->setPageStep( 1 );
    kcfg_Speed->setValue( 2 );
    kcfg_Speed->setOrientation( TQSlider::Horizontal );
    kcfg_Speed->setTickmarks( TQSlider::Below );

    speed_groupBoxLayout->addMultiCellWidget( kcfg_Speed, 0, 0, 0, 2 );

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

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

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

    speed_groupBoxLayout->addWidget( textLabel6, 1, 2 );
    SettingsLayout->addWidget( speed_groupBox );

    kcfg_Unscaled = new TQCheckBox( this, "kcfg_Unscaled" );
    SettingsLayout->addWidget( kcfg_Unscaled );

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

    textLabel8 = new TQLabel( size_groupBox, "textLabel8" );

    size_groupBoxLayout->addWidget( textLabel8, 1, 0 );

    textLabel9 = new TQLabel( size_groupBox, "textLabel9" );
    textLabel9->setAlignment( int( TQLabel::AlignCenter ) );

    size_groupBoxLayout->addWidget( textLabel9, 1, 1 );

    textLabel11 = new TQLabel( size_groupBox, "textLabel11" );
    textLabel11->setAlignment( int( TQLabel::AlignCenter ) );

    size_groupBoxLayout->addWidget( textLabel11, 1, 3 );

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

    size_groupBoxLayout->addWidget( textLabel12, 1, 4 );

    kcfg_Size = new TQSlider( size_groupBox, "kcfg_Size" );
    kcfg_Size->setMinValue( 0 );
    kcfg_Size->setMaxValue( 4 );
    kcfg_Size->setPageStep( 1 );
    kcfg_Size->setValue( 2 );
    kcfg_Size->setOrientation( TQSlider::Horizontal );
    kcfg_Size->setTickmarks( TQSlider::Below );

    size_groupBoxLayout->addMultiCellWidget( kcfg_Size, 0, 0, 0, 4 );

    textLabel10 = new TQLabel( size_groupBox, "textLabel10" );
    textLabel10->setAlignment( int( TQLabel::AlignCenter ) );

    size_groupBoxLayout->addWidget( textLabel10, 1, 2 );
    SettingsLayout->addWidget( size_groupBox );
    spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    SettingsLayout->addItem( spacer1 );
    languageChange();
    resize( TQSize(385, 381).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()
{
    kcfg_Gravity->setText( tr2i18n( "Gravity" ) );
    kcfg_Solvable->setText( tr2i18n( "Allow unsolvable games" ) );
    difficulty_groupBox->setTitle( tr2i18n( "Board Difficulty" ) );
    textLabel1->setText( tr2i18n( "Easy" ) );
    textLabel3->setText( tr2i18n( "Hard" ) );
    speed_groupBox->setTitle( tr2i18n( "Piece Removal Speed" ) );
    textLabel4->setText( tr2i18n( "Slow" ) );
    textLabel6->setText( tr2i18n( "Fast" ) );
    kcfg_Unscaled->setText( tr2i18n( "Prefer unscaled tiles" ) );
    size_groupBox->setTitle( tr2i18n( "Tile Size" ) );
    textLabel8->setText( tr2i18n( "14x6" ) );
    textLabel9->setText( tr2i18n( "18x8" ) );
    textLabel11->setText( tr2i18n( "26x14" ) );
    textLabel12->setText( tr2i18n( "30x16" ) );
    textLabel10->setText( tr2i18n( "24x12" ) );
}

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