Commit 89065203 authored by Leon Do Castelo's avatar Leon Do Castelo
Browse files

Update paramalpha.cpp

parent 4878bd08
Pipeline #79799 passed with stage
in 15 seconds
...@@ -29,7 +29,7 @@ ParamAlpha::ParamAlpha(const int nbEtats, const QWidget *parent): QWidget(), nb( ...@@ -29,7 +29,7 @@ ParamAlpha::ParamAlpha(const int nbEtats, const QWidget *parent): QWidget(), nb(
form[i]->addRow("Bleu:", blue[i]); form[i]->addRow("Bleu:", blue[i]);
} }
connect(valider, SIGNAL(clicked()), this, SLOT(valide())); connect(valider, SIGNAL(clicked()), this, SLOT(valide()));
connect(valider, SIGNAL(clicked()), parent, SLOT(changerVoisinage())); connect(valider, SIGNAL(clicked()), parent, SLOT(changerVoisinage()));
connect(valider, SIGNAL(clicked()), parent, SLOT(paramRegle())); connect(valider, SIGNAL(clicked()), parent, SLOT(paramRegle()));
connect(valider, SIGNAL(clicked()), this, SLOT(close())); connect(valider, SIGNAL(clicked()), this, SLOT(close()));
...@@ -50,13 +50,14 @@ ParamAlpha::ParamAlpha(const int nbEtats, const QWidget *parent): QWidget(), nb( ...@@ -50,13 +50,14 @@ ParamAlpha::ParamAlpha(const int nbEtats, const QWidget *parent): QWidget(), nb(
if(nb == 8) if(nb == 8)
general->addLayout(form[7], 2, 1, 1, 1); general->addLayout(form[7], 2, 1, 1, 1);
general->addWidget(valider, 2, 2, 1, 1, Qt::AlignBottom); general->addWidget(valider, 2, 2, 1, 1, Qt::AlignBottom);
}
void ParamAlpha::valide() {
Automate::getInstance().getEnsemble().reset();
for(int i = 0; i < nb; ++i)
Automate::getInstance().getEnsemble().ajouterEtat(i, label[i]->text().toStdString(), red[i]->value(), green[i]->value(), blue[i]->value());
this->close(); }
void ParamAlpha::valide() {
Automate::getInstance().getEnsemble().reset();
for(int i = 0; i < nb; ++i) {
Automate::getInstance().getEnsemble().ajouterEtat(i, label[i]->text().toStdString(), red[i]->value(), green[i]->value(), blue[i]->value());
}
} }
Markdown is supported
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