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

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

#include "appearance.h"

#include <ntqvariant.h>
#include <kcolorbutton.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqframe.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqgroupbox.h>
#include <ntqslider.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    frame4 = new TQFrame( this, "frame4" );
    frame4->setFrameShape( TQFrame::StyledPanel );
    frame4->setFrameShadow( TQFrame::Raised );
    frame4->setLineWidth( 0 );
    frame4Layout = new TQGridLayout( frame4, 1, 1, 11, 6, "frame4Layout"); 

    textLabel16 = new TQLabel( frame4, "textLabel16" );

    frame4Layout->addMultiCellWidget( textLabel16, 0, 0, 0, 1 );

    kcfg_Style = new TQComboBox( false, frame4, "kcfg_Style" );

    frame4Layout->addWidget( kcfg_Style, 0, 2 );

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

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

    groupBox4Layout->addWidget( textLabel13, 1, 2 );

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

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

    textLabel12 = new TQLabel( groupBox4, "textLabel12" );
    textLabel12->setAlignment( int( TQLabel::AlignCenter ) );

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

    kcfg_RectSize = new TQSlider( groupBox4, "kcfg_RectSize" );
    kcfg_RectSize->setMinValue( 4 );
    kcfg_RectSize->setMaxValue( 16 );
    kcfg_RectSize->setLineStep( 3 );
    kcfg_RectSize->setPageStep( 3 );
    kcfg_RectSize->setValue( 10 );
    kcfg_RectSize->setOrientation( TQSlider::Horizontal );
    kcfg_RectSize->setTickmarks( TQSlider::Right );
    kcfg_RectSize->setTickInterval( 1 );

    groupBox4Layout->addMultiCellWidget( kcfg_RectSize, 0, 0, 0, 2 );

    frame4Layout->addMultiCellWidget( groupBox4, 1, 1, 0, 2 );

    kcfg_BackgroundImageChoice = new TQButtonGroup( frame4, "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" );
    BackgroundColorChoice->setChecked( true );

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

    kcfg_BackgroundImage = new KURLRequester( kcfg_BackgroundImageChoice, "kcfg_BackgroundImage" );
    kcfg_BackgroundImage->setEnabled( false );

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

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

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

    kcfg_Color_Background = new KColorButton( kcfg_BackgroundImageChoice, "kcfg_Color_Background" );
    kcfg_Color_Background->setEnabled( true );
    kcfg_Color_Background->setColor( TQColor( 0, 0, 0 ) );

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

    frame4Layout->addMultiCellWidget( kcfg_BackgroundImageChoice, 2, 2, 0, 2 );

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

    frame4Layout->addWidget( textLabel7, 3, 0 );

    kcfg_Color_Player1 = new KColorButton( frame4, "kcfg_Color_Player1" );
    kcfg_Color_Player1->setColor( TQColor( 255, 0, 0 ) );

    frame4Layout->addMultiCellWidget( kcfg_Color_Player1, 3, 3, 1, 2 );

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

    frame4Layout->addWidget( textLabel8, 4, 0 );

    kcfg_Color_Player2 = new KColorButton( frame4, "kcfg_Color_Player2" );
    kcfg_Color_Player2->setColor( TQColor( 0, 0, 255 ) );

    frame4Layout->addMultiCellWidget( kcfg_Color_Player2, 4, 4, 1, 2 );
    spacer2 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    frame4Layout->addItem( spacer2, 5, 2 );
    AppearanceLayout->addWidget( frame4 );
    languageChange();
    resize( TQSize(284, 337).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( BackgroundColorChoice, TQ_SIGNAL( toggled(bool) ), kcfg_Color_Background, TQ_SLOT( setEnabled(bool) ) );
    connect( BackgroundImageChoice, TQ_SIGNAL( toggled(bool) ), kcfg_BackgroundImage, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( kcfg_Style, kcfg_RectSize );
    setTabOrder( kcfg_RectSize, kcfg_Color_Player1 );
    setTabOrder( kcfg_Color_Player1, kcfg_Color_Player2 );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Appearance::languageChange()
{
    textLabel16->setText( tr2i18n( "Line style:" ) );
    kcfg_Style->clear();
    kcfg_Style->insertItem( tr2i18n( "3D Line" ) );
    kcfg_Style->insertItem( tr2i18n( "3D Rectangles" ) );
    kcfg_Style->insertItem( tr2i18n( "Flat" ) );
    kcfg_Style->insertItem( tr2i18n( "Circles" ) );
    groupBox4->setTitle( tr2i18n( "Line Size" ) );
    textLabel13->setText( tr2i18n( "Large" ) );
    textLabel11->setText( tr2i18n( "Small" ) );
    textLabel12->setText( tr2i18n( "Medium" ) );
    kcfg_BackgroundImageChoice->setTitle( tr2i18n( "Background" ) );
    BackgroundColorChoice->setText( tr2i18n( "Color:" ) );
    BackgroundImageChoice->setText( tr2i18n( "Image:" ) );
    kcfg_Color_Background->setText( TQString::null );
    textLabel7->setText( tr2i18n( "Player 1 color:" ) );
    kcfg_Color_Player1->setText( TQString::null );
    textLabel8->setText( tr2i18n( "Player 2 color:" ) );
    kcfg_Color_Player2->setText( TQString::null );
}

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

TQMetaObject *Appearance::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_Appearance( "Appearance", &Appearance::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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