#include #include /**************************************************************************** ** Form implementation generated from reading ui file '/home/arnaud/Works/Corporation/Gaia/Games/New/kmastermind/src/datadlg.ui' ** ** Created: mar sep 27 23:15:56 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 "datadlg.h" #include #include #include #include #include #include #include #include /* * Constructs a DataDlg 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. */ DataDlg::DataDlg( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "DataDlg" ); setSizeGripEnabled( FALSE ); setModal( TRUE ); DataDlgLayout = new QVBoxLayout( this, 11, 6, "DataDlgLayout"); DataDlgLayout->setResizeMode( QLayout::Fixed ); dataGroup = new QGroupBox( this, "dataGroup" ); dataGroup->setColumnLayout(0, Qt::Vertical ); dataGroup->layout()->setSpacing( 6 ); dataGroup->layout()->setMargin( 11 ); dataGroupLayout = new QGridLayout( dataGroup->layout() ); dataGroupLayout->setAlignment( Qt::AlignTop ); spinTries = new QSpinBox( dataGroup, "spinTries" ); spinTries->setMaxValue( 12 ); spinTries->setMinValue( 5 ); spinTries->setValue( 10 ); dataGroupLayout->addWidget( spinTries, 0, 1 ); spinPions = new QSpinBox( dataGroup, "spinPions" ); spinPions->setMaxValue( 7 ); spinPions->setMinValue( 4 ); spinPions->setValue( 5 ); dataGroupLayout->addWidget( spinPions, 1, 1 ); spinColors = new QSpinBox( dataGroup, "spinColors" ); spinColors->setMaxValue( 8 ); spinColors->setMinValue( 5 ); spinColors->setValue( 6 ); dataGroupLayout->addWidget( spinColors, 2, 1 ); textLabel6 = new QLabel( dataGroup, "textLabel6" ); textLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel6->sizePolicy().hasHeightForWidth() ) ); dataGroupLayout->addWidget( textLabel6, 1, 0 ); textLabel5 = new QLabel( dataGroup, "textLabel5" ); textLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel5->sizePolicy().hasHeightForWidth() ) ); dataGroupLayout->addWidget( textLabel5, 0, 0 ); textLabel7 = new QLabel( dataGroup, "textLabel7" ); textLabel7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel7->sizePolicy().hasHeightForWidth() ) ); dataGroupLayout->addWidget( textLabel7, 2, 0 ); DataDlgLayout->addWidget( dataGroup ); 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 ); DataDlgLayout->addLayout( Layout1 ); languageChange(); resize( QSize(202, 163).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); // buddies textLabel6->setBuddy( spinPions ); textLabel5->setBuddy( spinTries ); textLabel7->setBuddy( spinColors ); } /* * Destroys the object and frees any allocated resources */ DataDlg::~DataDlg() { // no need to delete child widgets, Qt does it all for us } /* * Sets the strings of the subwidgets using the current * language. */ void DataDlg::languageChange() { setCaption( tr2i18n( "Modify the datas" ) ); dataGroup->setTitle( tr2i18n( "datas" ) ); textLabel6->setText( tr2i18n( "number of &pieces :" ) ); textLabel5->setText( tr2i18n( "number of &tries :" ) ); textLabel7->setText( tr2i18n( "number of c&olors :" ) ); buttonOk->setText( tr2i18n( "&OK" ) ); buttonOk->setAccel( QKeySequence( QString::null ) ); buttonCancel->setText( tr2i18n( "&Cancel" ) ); buttonCancel->setAccel( QKeySequence( QString::null ) ); } #include "datadlg.moc"