#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/home/arnaud/Works/Corporation/Gaia/Games/New/kmastermind/src/appearancedlg.ui'
**
** Created: ven sep 2 17:55:57 2005
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "appearancedlg.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qcombobox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a AppearanceDlg as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
AppearanceDlg::AppearanceDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "AppearanceDlg" );
    setSizeGripEnabled( FALSE );
    setModal( TRUE );
    AppearanceDlgLayout = new QGridLayout( this, 1, 1, 11, 6, "AppearanceDlgLayout"); 
    AppearanceDlgLayout->setResizeMode( QLayout::Fixed );

    iconGroup = new QGroupBox( this, "iconGroup" );
    iconGroup->setColumnLayout(0, Qt::Vertical );
    iconGroup->layout()->setSpacing( 6 );
    iconGroup->layout()->setMargin( 11 );
    iconGroupLayout = new QVBoxLayout( iconGroup->layout() );
    iconGroupLayout->setAlignment( Qt::AlignTop );

    sizeLabel = new QLabel( iconGroup, "sizeLabel" );
    iconGroupLayout->addWidget( sizeLabel );

    comboSize = new QComboBox( FALSE, iconGroup, "comboSize" );
    iconGroupLayout->addWidget( comboSize );

    themeLabel = new QLabel( iconGroup, "themeLabel" );
    iconGroupLayout->addWidget( themeLabel );

    comboTheme = new QComboBox( FALSE, iconGroup, "comboTheme" );
    iconGroupLayout->addWidget( comboTheme );

    AppearanceDlgLayout->addWidget( iconGroup, 0, 0 );

    Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); 
    Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout1->addItem( Horizontal_Spacing2 );

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( TRUE );
    buttonOk->setDefault( TRUE );
    Layout1->addWidget( buttonOk );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( TRUE );
    Layout1->addWidget( buttonCancel );

    AppearanceDlgLayout->addMultiCellLayout( Layout1, 1, 1, 0, 1 );

    backGroup = new QGroupBox( this, "backGroup" );
    backGroup->setColumnLayout(0, Qt::Vertical );
    backGroup->layout()->setSpacing( 6 );
    backGroup->layout()->setMargin( 11 );
    backGroupLayout = new QVBoxLayout( backGroup->layout() );
    backGroupLayout->setAlignment( Qt::AlignTop );

    sitesLabel = new QLabel( backGroup, "sitesLabel" );
    backGroupLayout->addWidget( sitesLabel );

    comboSites = new QComboBox( FALSE, backGroup, "comboSites" );
    backGroupLayout->addWidget( comboSites );

    ticksLabel = new QLabel( backGroup, "ticksLabel" );
    backGroupLayout->addWidget( ticksLabel );

    comboTicks = new QComboBox( FALSE, backGroup, "comboTicks" );
    backGroupLayout->addWidget( comboTicks );

    AppearanceDlgLayout->addWidget( backGroup, 0, 1 );
    languageChange();
    resize( QSize(251, 193).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );

    // tab order
    setTabOrder( comboSize, comboTheme );
    setTabOrder( comboTheme, comboSites );
    setTabOrder( comboSites, comboTicks );
    setTabOrder( comboTicks, buttonOk );
    setTabOrder( buttonOk, buttonCancel );

    // buddies
    sizeLabel->setBuddy( comboSize );
    themeLabel->setBuddy( comboTheme );
    sitesLabel->setBuddy( comboSites );
    ticksLabel->setBuddy( comboTicks );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AppearanceDlg::languageChange()
{
    setCaption( tr2i18n( "Change the appearance" ) );
    iconGroup->setTitle( tr2i18n( "icons" ) );
    sizeLabel->setText( tr2i18n( "icon s&ize" ) );
    comboSize->clear();
    comboSize->insertItem( tr2i18n( "16x16" ) );
    comboSize->insertItem( tr2i18n( "22x22" ) );
    comboSize->insertItem( tr2i18n( "32x32" ) );
    comboSize->insertItem( tr2i18n( "48x48" ) );
    themeLabel->setText( tr2i18n( "icon t&heme" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonOk->setAccel( QKeySequence( QString::null ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    buttonCancel->setAccel( QKeySequence( QString::null ) );
    backGroup->setTitle( tr2i18n( "backgrounds" ) );
    sitesLabel->setText( tr2i18n( "&sites background" ) );
    comboSites->clear();
    comboSites->insertItem( tr2i18n( "3point" ) );
    comboSites->insertItem( tr2i18n( "default" ) );
    comboSites->insertItem( tr2i18n( "floor" ) );
    comboSites->insertItem( tr2i18n( "flower" ) );
    comboSites->insertItem( tr2i18n( "ice" ) );
    comboSites->insertItem( tr2i18n( "leaf" ) );
    comboSites->insertItem( tr2i18n( "marble" ) );
    comboSites->insertItem( tr2i18n( "noeud" ) );
    comboSites->insertItem( tr2i18n( "parquet" ) );
    comboSites->insertItem( tr2i18n( "pine" ) );
    comboSites->insertItem( tr2i18n( "rain" ) );
    comboSites->insertItem( tr2i18n( "rosee" ) );
    ticksLabel->setText( tr2i18n( "&ticks background" ) );
    comboTicks->clear();
    comboTicks->insertItem( tr2i18n( "3point" ) );
    comboTicks->insertItem( tr2i18n( "default" ) );
    comboTicks->insertItem( tr2i18n( "floor" ) );
    comboTicks->insertItem( tr2i18n( "flower" ) );
    comboTicks->insertItem( tr2i18n( "ice" ) );
    comboTicks->insertItem( tr2i18n( "leaf" ) );
    comboTicks->insertItem( tr2i18n( "marble" ) );
    comboTicks->insertItem( tr2i18n( "noeud" ) );
    comboTicks->insertItem( tr2i18n( "parquet" ) );
    comboTicks->insertItem( tr2i18n( "pine" ) );
    comboTicks->insertItem( tr2i18n( "rain" ) );
    comboTicks->insertItem( tr2i18n( "rosee" ) );
}

#include "appearancedlg.moc"
