Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Romain De Laage De Bellefaye
LO21-projet
Commits
8be23e3a
Commit
8be23e3a
authored
Jun 11, 2021
by
Maxime Goret
Browse files
Merge
parent
1d59b56c
Changes
2
Hide whitespace changes
Inline
Side-by-side
includes/parametragemodele.h
View file @
8be23e3a
...
...
@@ -58,10 +58,12 @@ class NouveauModele : public QWidget {
QLabel
*
destination
;
QLabel
*
etatCourant
;
QLabel
*
etatCourant2
=
nullptr
;
QLabel
*
etat_d
=
nullptr
;
QComboBox
*
valid_Etat
;
QSpinBox
*
numEtatCourant
=
nullptr
;
QSpinBox
*
etatDest
;
QSpinBox
*
etat_default
=
nullptr
;
QPushButton
*
fin
=
nullptr
;
QPushButton
*
next
=
nullptr
;
...
...
@@ -74,6 +76,7 @@ class NouveauModele : public QWidget {
QHBoxLayout
*
layouth2
=
nullptr
;
QHBoxLayout
*
layouth3
=
nullptr
;
QHBoxLayout
*
layouth4
=
nullptr
;
QHBoxLayout
*
layouth
=
nullptr
;
QVBoxLayout
*
layoutv2
=
nullptr
;
QHBoxLayout
*
layouth5
=
nullptr
;
...
...
src/parametragemodele.cpp
View file @
8be23e3a
...
...
@@ -99,7 +99,7 @@ NouveauModele::NouveauModele(QWidget* parent) : QWidget() {
form_choix
->
addRow
(
"Auteur :"
,
auteur
);
form_choix
->
addRow
(
"Année :"
,
annee
);
form_choix
->
addRow
(
"Description :"
,
description
);
form_choix
->
addRow
(
"Etat par défaut"
,
etat_defaut
);
//
form_choix->addRow("Etat par défaut", etat_defaut);
form_choix
->
addRow
(
"Nombre d'états :"
,
nb_etats
);
form_choix
->
addRow
(
"Règle de transition :"
,
liste_regle_transition
);
form_choix
->
addRow
(
"Voisinage :"
,
liste_voisinage
);
...
...
@@ -332,6 +332,10 @@ void NouveauModele::paramRegle(const QString& choix_regle) {
seuilMin
=
new
QLabel
(
"Seuil Min : "
);
destination
=
new
QLabel
(
"Destination : "
);
etatCourant
=
new
QLabel
(
"Etat Courant : "
);
etat_d
=
new
QLabel
(
"Etat défault : "
);
etat_default
=
new
QSpinBox
;
etat_default
->
setRange
(
0
,(
nb_etats
->
value
())
-
1
);
/*QLabel* etat_d = new QLabel("Etat Defaut : ");
QSpinBox* etat_defaut = new QSpinBox;
...
...
@@ -349,6 +353,7 @@ void NouveauModele::paramRegle(const QString& choix_regle) {
if
(
choix_regle
==
"Nouvelle fonction de transition"
)
{
seuilValidator
=
new
QIntValidator
;
//if(layouth != nullptr) delete layouth;
if
(
layouth1
!=
nullptr
)
delete
layouth1
;
if
(
layouth2
!=
nullptr
)
delete
layouth2
;
if
(
layouth3
!=
nullptr
)
delete
layouth3
;
...
...
@@ -358,21 +363,24 @@ void NouveauModele::paramRegle(const QString& choix_regle) {
if
(
layouth6
!=
nullptr
)
delete
layouth6
;
if
(
layoutv2
!=
nullptr
)
delete
layoutv2
;
layoutv
=
new
QVBoxLayout
;
layouth
=
new
QHBoxLayout
;
layouth1
=
new
QHBoxLayout
;
layouth2
=
new
QHBoxLayout
;
layouth3
=
new
QHBoxLayout
;
layouth4
=
new
QHBoxLayout
;
layoutv
=
new
QVBoxLayout
;
layouth6
=
new
QHBoxLayout
;
layouth5
=
new
QHBoxLayout
;
layoutv2
=
new
QVBoxLayout
;
//layouth6 = new QHBoxLayout;
//layouth5 = new QHBoxLayout;
//layoutv2 = new QVBoxLayout;
form_choix
->
addRow
(
layoutv
);
layoutv
->
addLayout
(
layouth1
);
layoutv
->
addLayout
(
layouth2
);
layoutv
->
addLayout
(
layouth3
);
layoutv
->
addLayout
(
layouth4
);
layoutv
->
addLayout
(
layouth
);
...
...
@@ -407,6 +415,9 @@ void NouveauModele::paramRegle(const QString& choix_regle) {
layouth4
->
addWidget
(
etatCourant
);
layouth4
->
addWidget
(
valid_Etat
);
layouth
->
addWidget
(
etat_d
);
layouth
->
addWidget
(
etat_default
);
connect
(
valid_Etat
,
SIGNAL
(
currentTextChanged
(
const
QString
&
)),
this
,
SLOT
(
choisirEtatCourant
(
const
QString
&
)));
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment