Commit 995fc40b authored by Maxime Goret's avatar Maxime Goret
Browse files

param modele

parent a359caf4
......@@ -64,7 +64,7 @@ NouveauModele::NouveauModele(QWidget* parent) : QWidget() {
bouton_valide = new QPushButton("Valider");
bouton_valide->setFixedWidth(50);
connect(bouton_valide, SIGNAL(clicked()),this, SLOT(quit()));
//connect(bouton_valide, SIGNAL(clicked()), SLOT(affParametrage()));
......@@ -106,9 +106,6 @@ NouveauModele::NouveauModele(QWidget* parent) : QWidget() {
connect(boutonEtat, SIGNAL(clicked()), this, SLOT(parametrerEtats()));
form_choix->addWidget(boutonEtat);
}
void NouveauModele::parametrerEtats() {
......@@ -150,52 +147,47 @@ void NouveauModele::paramRegle(const QString& choix_regle) {
valid_Etat->setCurrentIndex(-1);
QVBoxLayout* layoutv = new QVBoxLayout;
QHBoxLayout* layouth1 = new QHBoxLayout;
QHBoxLayout* layouth2 = new QHBoxLayout;
QHBoxLayout* layouth3 = new QHBoxLayout;
QHBoxLayout* layouth4 = new QHBoxLayout;
if (choix_regle == "Nouvelle fonction de transition") {
seuilValidator=new QIntValidator;
seuilValidator->setRange(0,1);
/*for(unsigned int i=0; i<8; i++) {
numSeuilMin[i]=new QLineEdit;
numSeuilMin[i]->setFixedWidth(22);
numSeuilMin[i]->setMaxLength(1);
numSeuilMin[i]->setText("-1");
numSeuilMin[i]->setValidator(seuilValidator);
form_init->addWidget(numSeuilMin[i]);
}*/
form_choix->addRow(layoutv);
layoutv->addLayout(layouth1);
layouth1->addWidget(seuilMin);
for(unsigned int i=0; i<8; i++) {
numSeuilMin[i]=new QLineEdit;
numSeuilMin[i]->setFixedWidth(22);
numSeuilMin[i]->setMaxLength(2);
numSeuilMin[i]->setText("-1");
numSeuilMin[i]->setValidator(seuilValidator);
layouth1->addWidget(numSeuilMin[i]);
}
layoutv->addLayout(layouth2);
layouth2->addWidget(seuilMax);
for(unsigned int i=0; i<8; i++) {
numSeuilMax[i]=new QLineEdit;
numSeuilMax[i]->setFixedWidth(22);
numSeuilMax[i]->setMaxLength(2);
numSeuilMax[i]->setText("-1");
numSeuilMax[i]->setValidator(seuilValidator);
layouth2->addWidget(numSeuilMax[i]);
}
layoutv->addLayout(layouth3);
layouth3->addWidget(destination);
layouth3->addWidget(etatDest);
layoutv->addLayout(layouth4);
layouth4->addWidget(etatCourant);
layouth4->addWidget(valid_Etat);
connect(valid_Etat, SIGNAL(currentTextChanged(const QString&)), this, SLOT(choisirEtatCourant(const QString&)));
seuilValidator->setRange(0,1);
QVBoxLayout* layoutv = new QVBoxLayout;
QHBoxLayout* layouth1 = new QHBoxLayout;
QHBoxLayout* layouth2 = new QHBoxLayout;
QHBoxLayout* layouth3 = new QHBoxLayout;
QHBoxLayout* layouth4 = new QHBoxLayout;
form_choix->addRow(layoutv);
layoutv->addLayout(layouth1);
layouth1->addWidget(seuilMin);
for(unsigned int i=0; i<8; i++) {
numSeuilMin[i]=new QLineEdit;
numSeuilMin[i]->setFixedWidth(22);
numSeuilMin[i]->setMaxLength(2);
numSeuilMin[i]->setText("-1");
numSeuilMin[i]->setValidator(seuilValidator);
layouth1->addWidget(numSeuilMin[i]);
}
layoutv->addLayout(layouth2);
layouth2->addWidget(seuilMax);
for(unsigned int i=0; i<8; i++) {
numSeuilMax[i]=new QLineEdit;
numSeuilMax[i]->setFixedWidth(22);
numSeuilMax[i]->setMaxLength(2);
numSeuilMax[i]->setText("-1");
numSeuilMax[i]->setValidator(seuilValidator);
layouth2->addWidget(numSeuilMax[i]);
}
layoutv->addLayout(layouth3);
layouth3->addWidget(destination);
layouth3->addWidget(etatDest);
layoutv->addLayout(layouth4);
layouth4->addWidget(etatCourant);
layouth4->addWidget(valid_Etat);
connect(valid_Etat, SIGNAL(currentTextChanged(const QString&)), this, SLOT(choisirEtatCourant(const QString&)));
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment