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
|
QVBoxLayout *layoutAux = new QVBoxLayout;//.....Création du layout vertical aux
layoutAux->setAlignment(Qt::AlignTop);//.......Alignement haut
for (int x = 0; x < 14; x++)
{
QPushButton *BpAux = new QPushButton(nameLoop[x]);
BpAux->setFont(QFont("",t_police_preset,QFont::DemiBold));
BpAux->setCheckable(true);
QDoubleSpinBox *ValueRepeat = new QDoubleSpinBox;
ValueRepeat->setFont(QFont("",t_police_preset,QFont::Normal));
ValueRepeat->setSuffix(" sec");//...........Ajoute le suffixe seconde
ValueRepeat->setDecimals(1);//............Bloque la decimale a 1
ValueRepeat->setSingleStep(0.1);//.........Incremente le pas de 0.1
ValueRepeat->setValue(value_shift_min);//............initialise le temps
ValueRepeat->setRange(value_shift_min,value_shift_max);//............initialise le temps min et max
QHBoxLayout *layoutSpin = new QHBoxLayout;//.....Création du layout horizontal repeat
layoutSpin->addWidget(ValueRepeat);
QGroupBox *GroupAuxRepeat = new QGroupBox("Repeat");//.....Création du Group Data Loop
GroupAuxRepeat->setCheckable(true);
GroupAuxRepeat->setChecked(false);
GroupAuxRepeat->setLayout(layoutSpin);
GroupAuxRepeat->setEnabled(false);
QHBoxLayout *layoutRepeat = new QHBoxLayout;//.....Création du layout horizontal repeat
layoutRepeat->setAlignment(Qt::AlignLeft);//.......Alignement a gauche
layoutRepeat->addWidget(BpAux);//...............Ajoute le bouton
layoutRepeat->addWidget(GroupAuxRepeat);//...............Ajoute le check shift
layoutAux->addLayout(layoutRepeat);
connect(BpAux, SIGNAL(toggled(bool)), GroupAuxRepeat, SLOT(setEnabled(bool)));//.....Connexion du clic du bouton
} |
Partager