/**************************************************************************** ** Form implementation generated from reading ui file 'formaddition.ui' ** ** Created: dim. 25. mai 14:05:22 2003 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.1.2 edited Dec 19 11:45 $) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ #include "formaddition.h" #include #include #include #include #include #include #include #include #include #include #include #include "formaddition.ui.h" /* * Constructs a FormAddition 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. */ FormAddition::FormAddition( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "FormAddition" ); setPaletteBackgroundColor( QColor( 0, 85, 127 ) ); setIcon( QPixmap::fromMimeSource( "generic.png" ) ); FormAdditionLayout = new QVBoxLayout( this, 11, 6, "FormAdditionLayout"); Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); PushButton4 = new QPushButton( this, "PushButton4" ); QFont PushButton4_font( PushButton4->font() ); PushButton4_font.setPointSize( 13 ); PushButton4_font.setBold( TRUE ); PushButton4->setFont( PushButton4_font ); Layout1->addWidget( PushButton4, 1, 0 ); PushButton3 = new QPushButton( this, "PushButton3" ); QFont PushButton3_font( PushButton3->font() ); PushButton3_font.setPointSize( 13 ); PushButton3_font.setBold( TRUE ); PushButton3->setFont( PushButton3_font ); Layout1->addWidget( PushButton3, 0, 2 ); PushButton9 = new QPushButton( this, "PushButton9" ); QFont PushButton9_font( PushButton9->font() ); PushButton9_font.setPointSize( 13 ); PushButton9_font.setBold( TRUE ); PushButton9->setFont( PushButton9_font ); Layout1->addWidget( PushButton9, 2, 2 ); PushButton8 = new QPushButton( this, "PushButton8" ); QFont PushButton8_font( PushButton8->font() ); PushButton8_font.setPointSize( 13 ); PushButton8_font.setBold( TRUE ); PushButton8->setFont( PushButton8_font ); Layout1->addWidget( PushButton8, 2, 1 ); PushButton7 = new QPushButton( this, "PushButton7" ); QFont PushButton7_font( PushButton7->font() ); PushButton7_font.setPointSize( 13 ); PushButton7_font.setBold( TRUE ); PushButton7->setFont( PushButton7_font ); Layout1->addWidget( PushButton7, 2, 0 ); PushButton6 = new QPushButton( this, "PushButton6" ); QFont PushButton6_font( PushButton6->font() ); PushButton6_font.setPointSize( 13 ); PushButton6_font.setBold( TRUE ); PushButton6->setFont( PushButton6_font ); Layout1->addWidget( PushButton6, 1, 2 ); PushButton1 = new QPushButton( this, "PushButton1" ); QFont PushButton1_font( PushButton1->font() ); PushButton1_font.setPointSize( 13 ); PushButton1_font.setBold( TRUE ); PushButton1->setFont( PushButton1_font ); Layout1->addWidget( PushButton1, 0, 0 ); PushButton5 = new QPushButton( this, "PushButton5" ); QFont PushButton5_font( PushButton5->font() ); PushButton5_font.setPointSize( 13 ); PushButton5_font.setBold( TRUE ); PushButton5->setFont( PushButton5_font ); Layout1->addWidget( PushButton5, 1, 1 ); PushButton2 = new QPushButton( this, "PushButton2" ); QFont PushButton2_font( PushButton2->font() ); PushButton2_font.setPointSize( 13 ); PushButton2_font.setBold( TRUE ); PushButton2->setFont( PushButton2_font ); Layout1->addWidget( PushButton2, 0, 1 ); FormAdditionLayout->addLayout( Layout1 ); Layout3 = new QHBoxLayout( 0, 0, 6, "Layout3"); TextLabelNb1 = new QLabel( this, "TextLabelNb1" ); QFont TextLabelNb1_font( TextLabelNb1->font() ); TextLabelNb1_font.setPointSize( 20 ); TextLabelNb1_font.setBold( TRUE ); TextLabelNb1->setFont( TextLabelNb1_font ); TextLabelNb1->setMargin( 0 ); TextLabelNb1->setMidLineWidth( 0 ); TextLabelNb1->setAlignment( int( QLabel::AlignCenter ) ); Layout3->addWidget( TextLabelNb1 ); TextLabelPlus = new QLabel( this, "TextLabelPlus" ); QFont TextLabelPlus_font( TextLabelPlus->font() ); TextLabelPlus_font.setPointSize( 20 ); TextLabelPlus_font.setBold( TRUE ); TextLabelPlus->setFont( TextLabelPlus_font ); TextLabelPlus->setAlignment( int( QLabel::AlignCenter ) ); Layout3->addWidget( TextLabelPlus ); TextLabelNb2 = new QLabel( this, "TextLabelNb2" ); QFont TextLabelNb2_font( TextLabelNb2->font() ); TextLabelNb2_font.setPointSize( 20 ); TextLabelNb2_font.setBold( TRUE ); TextLabelNb2->setFont( TextLabelNb2_font ); TextLabelNb2->setAlignment( int( QLabel::AlignCenter ) ); Layout3->addWidget( TextLabelNb2 ); TextLabelEgal = new QLabel( this, "TextLabelEgal" ); QFont TextLabelEgal_font( TextLabelEgal->font() ); TextLabelEgal_font.setPointSize( 20 ); TextLabelEgal_font.setBold( TRUE ); TextLabelEgal->setFont( TextLabelEgal_font ); TextLabelEgal->setAlignment( int( QLabel::AlignCenter ) ); Layout3->addWidget( TextLabelEgal ); TextLabelNb3 = new QLabel( this, "TextLabelNb3" ); QFont TextLabelNb3_font( TextLabelNb3->font() ); TextLabelNb3_font.setPointSize( 20 ); TextLabelNb3_font.setBold( TRUE ); TextLabelNb3->setFont( TextLabelNb3_font ); TextLabelNb3->setAlignment( int( QLabel::AlignCenter ) ); Layout3->addWidget( TextLabelNb3 ); FormAdditionLayout->addLayout( Layout3 ); Layout6 = new QHBoxLayout( 0, 0, 6, "Layout6"); TextLabelCompteur = new QLabel( this, "TextLabelCompteur" ); TextLabelCompteur->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); Layout6->addWidget( TextLabelCompteur ); LCDNumberCompteur = new QLCDNumber( this, "LCDNumberCompteur" ); LCDNumberCompteur->setProperty( "value", 0 ); Layout6->addWidget( LCDNumberCompteur ); FormAdditionLayout->addLayout( Layout6 ); Layout6_2 = new QHBoxLayout( 0, 0, 6, "Layout6_2"); PushButtonNouveau = new QPushButton( this, "PushButtonNouveau" ); Layout6_2->addWidget( PushButtonNouveau ); ComboBox1 = new QComboBox( FALSE, this, "ComboBox1" ); Layout6_2->addWidget( ComboBox1 ); FormAdditionLayout->addLayout( Layout6_2 ); Layout5 = new QHBoxLayout( 0, 0, 6, "Layout5"); PushButtonAPD = new QPushButton( this, "PushButtonAPD" ); Layout5->addWidget( PushButtonAPD ); PushButtonQuit = new QPushButton( this, "PushButtonQuit" ); Layout5->addWidget( PushButtonQuit ); FormAdditionLayout->addLayout( Layout5 ); languageChange(); resize( QSize(295, 268).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( PushButtonNouveau, SIGNAL( clicked() ), this, SLOT( nouveau() ) ); connect( PushButtonAPD, SIGNAL( clicked() ), this, SLOT( apd() ) ); connect( PushButtonQuit, SIGNAL( clicked() ), this, SLOT( accept() ) ); connect( ComboBox1, SIGNAL( activated(int) ), this, SLOT( selection_niveau(int) ) ); connect( PushButton1, SIGNAL( clicked() ), this, SLOT( click_bouton() ) ); connect( PushButton2, SIGNAL( clicked() ), this, SLOT( click_bouton() ) ); connect( PushButton3, SIGNAL( clicked() ), this, SLOT( click_bouton() ) ); connect( PushButton4, SIGNAL( clicked() ), this, SLOT( click_bouton() ) ); connect( PushButton5, SIGNAL( clicked() ), this, SLOT( click_bouton() ) ); connect( PushButton6, SIGNAL( clicked() ), this, SLOT( click_bouton() ) ); connect( PushButton7, SIGNAL( clicked() ), this, SLOT( click_bouton() ) ); connect( PushButton8, SIGNAL( clicked() ), this, SLOT( click_bouton() ) ); connect( PushButton9, SIGNAL( clicked() ), this, SLOT( click_bouton() ) ); // tab order setTabOrder( PushButton1, PushButton2 ); setTabOrder( PushButton2, PushButton3 ); setTabOrder( PushButton3, PushButton4 ); setTabOrder( PushButton4, PushButton5 ); setTabOrder( PushButton5, PushButton6 ); setTabOrder( PushButton6, PushButton7 ); setTabOrder( PushButton7, PushButton8 ); setTabOrder( PushButton8, PushButton9 ); setTabOrder( PushButton9, PushButtonNouveau ); setTabOrder( PushButtonNouveau, PushButtonQuit ); init(); } /* * Destroys the object and frees any allocated resources */ FormAddition::~FormAddition() { // no need to delete child widgets, Qt does it all for us } /* * Sets the strings of the subwidgets using the current * language. */ void FormAddition::languageChange() { setCaption( tr( "Apprendre l'addition..." ) ); PushButton4->setText( tr( "4" ) ); PushButton3->setText( tr( "3" ) ); PushButton9->setText( tr( "9" ) ); PushButton8->setText( tr( "8" ) ); PushButton7->setText( tr( "7" ) ); PushButton6->setText( tr( "6" ) ); PushButton1->setText( tr( "1" ) ); PushButton5->setText( tr( "5" ) ); PushButton2->setText( tr( "2" ) ); QToolTip::add( PushButton2, QString::null ); TextLabelNb1->setText( tr( "?" ) ); TextLabelPlus->setText( tr( "+" ) ); TextLabelNb2->setText( tr( "?" ) ); TextLabelEgal->setText( tr( "=" ) ); TextLabelNb3->setText( tr( "?" ) ); TextLabelCompteur->setText( tr( "Nombre d'essais :" ) ); PushButtonNouveau->setText( tr( "&Nouveau" ) ); QToolTip::add( PushButtonNouveau, trUtf8( "Cliquez ici pour créer une nouvelle addition" ) ); ComboBox1->clear(); ComboBox1->insertItem( tr( "Facile" ) ); ComboBox1->insertItem( tr( "Moyen" ) ); ComboBox1->insertItem( tr( "Difficile" ) ); ComboBox1->insertItem( tr( "Au hasard" ) ); PushButtonAPD->setText( tr( "&A propos de..." ) ); PushButtonQuit->setText( tr( "&Quitter" ) ); QToolTip::add( PushButtonQuit, tr( "Cliquez ici pour quitter le programme" ) ); }