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

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

#include "newGameDlg_ui.h"

#include <ntqvariant.h>
#include <minimap.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqslider.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlineedit.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "minimap.h"

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

    layout9 = new TQHBoxLayout( 0, 0, 6, "layout9"); 

    layout4 = new TQVBoxLayout( 0, 0, 6, "layout4"); 

    labelPlayers = new TQLabel( this, "labelPlayers" );
    layout4->addWidget( labelPlayers );

    sliderPlayers = new TQSlider( this, "sliderPlayers" );
    sliderPlayers->setMinValue( 2 );
    sliderPlayers->setMaxValue( 9 );
    sliderPlayers->setOrientation( TQSlider::Horizontal );
    layout4->addWidget( sliderPlayers );

    labelPlayerList = new TQLabel( this, "labelPlayerList" );
    layout4->addWidget( labelPlayerList );

    listPlayers = new TQListView( this, "listPlayers" );
    listPlayers->addColumn( tr2i18n( "Name" ) );
    listPlayers->addColumn( tr2i18n( "New Column" ) );
    layout4->addWidget( listPlayers );

    layout3 = new TQHBoxLayout( 0, 0, 6, "layout3"); 

    labelNewPlayer = new TQLabel( this, "labelNewPlayer" );
    layout3->addWidget( labelNewPlayer );

    newPlayer = new TQLineEdit( this, "newPlayer" );
    newPlayer->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 1, 0, newPlayer->sizePolicy().hasHeightForWidth() ) );
    layout3->addWidget( newPlayer );
    layout4->addLayout( layout3 );

    layout2 = new TQHBoxLayout( 0, 0, 6, "layout2"); 
    spacer2 = new TQSpacerItem( 0, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer2 );

    addPlayer = new TQPushButton( this, "addPlayer" );
    layout2->addWidget( addPlayer );
    spacer1 = new TQSpacerItem( 0, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer1 );
    layout4->addLayout( layout2 );
    layout9->addLayout( layout4 );
    spacer5 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout9->addItem( spacer5 );

    layout8 = new TQVBoxLayout( 0, 0, 6, "layout8"); 

    labelPlanets = new TQLabel( this, "labelPlanets" );
    layout8->addWidget( labelPlanets );

    sliderPlanets = new TQSlider( this, "sliderPlanets" );
    sliderPlanets->setMinValue( 1 );
    sliderPlanets->setMaxValue( 35 );
    sliderPlanets->setValue( 1 );
    sliderPlanets->setOrientation( TQSlider::Horizontal );
    layout8->addWidget( sliderPlanets );

    labelMap = new TQLabel( this, "labelMap" );
    layout8->addWidget( labelMap );

    layout7 = new TQHBoxLayout( 0, 0, 6, "layout7"); 
    spacer7 = new TQSpacerItem( 0, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( spacer7 );

    map = new MiniMap( this, "map" );
    layout7->addWidget( map );
    spacer7_2 = new TQSpacerItem( 0, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( spacer7_2 );
    layout8->addLayout( layout7 );
    spacer6 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout8->addItem( spacer6 );

    layout5 = new TQHBoxLayout( 0, 0, 6, "layout5"); 
    spacer3 = new TQSpacerItem( 31, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer3 );

    rejectMap = new TQPushButton( this, "rejectMap" );
    layout5->addWidget( rejectMap );
    spacer4 = new TQSpacerItem( 51, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer4 );
    layout8->addLayout( layout5 );
    layout9->addLayout( layout8 );
    NewGameDlgUILayout->addLayout( layout9 );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );
    NewGameDlgUILayout->addWidget( line1 );

    labelTurns = new TQLabel( this, "labelTurns" );
    NewGameDlgUILayout->addWidget( labelTurns );

    sliderTurns = new TQSlider( this, "sliderTurns" );
    sliderTurns->setMinValue( 5 );
    sliderTurns->setMaxValue( 40 );
    sliderTurns->setPageStep( 5 );
    sliderTurns->setOrientation( TQSlider::Horizontal );
    NewGameDlgUILayout->addWidget( sliderTurns );
    languageChange();
    resize( TQSize(661, 461).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    labelPlayers->setBuddy( sliderPlayers );
    labelPlayerList->setBuddy( listPlayers );
    labelNewPlayer->setBuddy( newPlayer );
    labelPlanets->setBuddy( sliderPlanets );
    labelTurns->setBuddy( sliderTurns );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void NewGameDlgUI::languageChange()
{
    labelPlayers->setText( TQString::null );
    labelPlayerList->setText( tr2i18n( "Player list:" ) );
    listPlayers->header()->setLabel( 0, tr2i18n( "Name" ) );
    listPlayers->header()->setLabel( 1, tr2i18n( "New Column" ) );
    labelNewPlayer->setText( tr2i18n( "&Human player:" ) );
    addPlayer->setText( tr2i18n( "&Add Human Player" ) );
    labelPlanets->setText( TQString::null );
    labelMap->setText( tr2i18n( "Preview map:" ) );
    rejectMap->setText( tr2i18n( "Reject &Map" ) );
    labelTurns->setText( TQString::null );
}

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

TQMetaObject *NewGameDlgUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_NewGameDlgUI( "NewGameDlgUI", &NewGameDlgUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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