1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| #include "../h/ViewChooseValue.h"
#include "../h/FullButton.h"
ViewChooseValue::ViewChooseValue( )
{
/* Properties of the window */
this->setWindowTitle( "Choisir une carte " );
/* Geometry */
this->setFixedSize( 700, 200 );
/* Layout */
this->layout = new QVBoxLayout();
this->layoutFirstRow = new QHBoxLayout();
this->layoutSecondRow = new QHBoxLayout();
this->layout->setContentsMargins( 0, 0, 0, 0 );
/* My 4 buttons */
this->pushButtonsValue[0] = new FullButton( "./images/2.png", "2", this );
this->pushButtonsValue[1] = new FullButton( "./images/3.png", "3", this );
this->pushButtonsValue[2] = new FullButton( "./images/4.png", "4", this );
this->pushButtonsValue[3] = new FullButton( "./images/5.png", "5", this );
this->pushButtonsValue[4] = new FullButton( "./images/6.png", "6", this );
this->pushButtonsValue[5] = new FullButton( "./images/7.png", "7", this );
this->pushButtonsValue[6] = new FullButton( "./images/8.png", "8", this );
this->pushButtonsValue[7] = new FullButton( "./images/9.png", "9", this );
this->pushButtonsValue[8] = new FullButton( "./images/10.png", "10", this );
this->pushButtonsValue[9] = new FullButton( "./images/V.png", "Valet", this );
this->pushButtonsValue[10] = new FullButton( "./images/D.png", "Dame", this );
this->pushButtonsValue[11] = new FullButton( "./images/K.png", "King", this );
this->pushButtonsValue[12] = new FullButton( "./images/A.png", "As", this );
this->layoutFirstRow->addWidget( this->pushButtonsValue[0] );
this->layoutFirstRow->addWidget( this->pushButtonsValue[1] );
this->layoutFirstRow->addWidget( this->pushButtonsValue[2] );
this->layoutFirstRow->addWidget( this->pushButtonsValue[3] );
this->layoutFirstRow->addWidget( this->pushButtonsValue[4] );
this->layoutFirstRow->addWidget( this->pushButtonsValue[5] );
this->layoutFirstRow->addWidget( this->pushButtonsValue[6] );
this->layoutSecondRow->addWidget( this->pushButtonsValue[7] );
this->layoutSecondRow->addWidget( this->pushButtonsValue[8] );
this->layoutSecondRow->addWidget( this->pushButtonsValue[9] );
this->layoutSecondRow->addWidget( this->pushButtonsValue[10] );
this->layoutSecondRow->addWidget( this->pushButtonsValue[11] );
this->layoutSecondRow->addWidget( this->pushButtonsValue[12] );
this->layout->addLayout( this->layoutFirstRow );
this->layout->addLayout( this->layoutSecondRow );
this->setLayout( this->layout );
this->show();
} |
Partager