#include <kdialog.h>
#include <tdelocale.h>

/****************************************************************************
** Form implementation generated from reading ui file 'general.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "general.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqslider.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqspinbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    kcfg_Skill = new TQSlider( groupBox4, "kcfg_Skill" );
    kcfg_Skill->setMaxValue( 3 );
    kcfg_Skill->setPageStep( 1 );
    kcfg_Skill->setOrientation( TQSlider::Horizontal );
    kcfg_Skill->setTickmarks( TQSlider::Below );

    groupBox4Layout->addMultiCellWidget( kcfg_Skill, 0, 0, 0, 1 );

    textLabel10 = new TQLabel( groupBox4, "textLabel10" );

    groupBox4Layout->addWidget( textLabel10, 1, 0 );

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

    groupBox4Layout->addWidget( textLabel12, 1, 1 );
    GeneralLayout->addWidget( groupBox4 );

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

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

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

    kcfg_SnakesAI = new TQComboBox( false, groupBox6, "kcfg_SnakesAI" );

    groupBox6Layout->addWidget( kcfg_SnakesAI, 1, 1 );

    kcfg_ComputerSnakes = new TQSpinBox( groupBox6, "kcfg_ComputerSnakes" );
    kcfg_ComputerSnakes->setValue( 1 );

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

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

    groupBox6Layout->addWidget( textLabel8, 0, 0 );
    GeneralLayout->addWidget( groupBox6 );

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

    textLabel9 = new TQLabel( groupBox5, "textLabel9" );

    groupBox5Layout->addWidget( textLabel9, 0, 0 );

    kcfg_Balls = new TQSpinBox( groupBox5, "kcfg_Balls" );
    kcfg_Balls->setValue( 1 );

    groupBox5Layout->addWidget( kcfg_Balls, 0, 1 );

    kcfg_BallsAI = new TQComboBox( false, groupBox5, "kcfg_BallsAI" );

    groupBox5Layout->addWidget( kcfg_BallsAI, 1, 1 );

    textLabel13 = new TQLabel( groupBox5, "textLabel13" );

    groupBox5Layout->addWidget( textLabel13, 1, 0 );
    GeneralLayout->addWidget( groupBox5 );
    spacer1 = new TQSpacerItem( 20, 70, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GeneralLayout->addItem( spacer1 );
    languageChange();
    resize( TQSize(333, 409).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void General::languageChange()
{
    groupBox4->setTitle( tr2i18n( "Speed" ) );
    textLabel10->setText( tr2i18n( "Slow" ) );
    textLabel12->setText( tr2i18n( "Fast" ) );
    groupBox6->setTitle( tr2i18n( "Snakes" ) );
    textLabel7->setText( tr2i18n( "Snake behavior:" ) );
    kcfg_SnakesAI->clear();
    kcfg_SnakesAI->insertItem( tr2i18n( "Random" ) );
    kcfg_SnakesAI->insertItem( tr2i18n( "Eater" ) );
    kcfg_SnakesAI->insertItem( tr2i18n( "Killer" ) );
    textLabel8->setText( tr2i18n( "Number of snakes:" ) );
    groupBox5->setTitle( tr2i18n( "Balls" ) );
    textLabel9->setText( tr2i18n( "Number of balls:" ) );
    kcfg_BallsAI->clear();
    kcfg_BallsAI->insertItem( tr2i18n( "Dumb" ) );
    kcfg_BallsAI->insertItem( tr2i18n( "Average" ) );
    kcfg_BallsAI->insertItem( tr2i18n( "Killer" ) );
    textLabel13->setText( tr2i18n( "Ball behavior:" ) );
}

/****************************************************************************
** General meta object code from reading C++ file 'general.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 "general.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 *General::className() const
{
    return "General";
}

TQMetaObject *General::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_General( "General", &General::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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