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
a359caf4
Commit
a359caf4
authored
Jun 10, 2021
by
Maxime Goret
Browse files
Parametrage nv modèleé
parent
184fa06f
Changes
2
Hide whitespace changes
Inline
Side-by-side
includes/parametragemodele.h
View file @
a359caf4
...
...
@@ -49,6 +49,7 @@ class NouveauModele : public QWidget {
QLabel
*
seuilMin
;
QLabel
*
destination
;
QLabel
*
etatCourant
;
QLabel
*
etatCourant2
;
QComboBox
*
valid_Etat
;
QSpinBox
*
numEtatCourant
;
...
...
src/parametragemodele.cpp
View file @
a359caf4
...
...
@@ -64,6 +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()));
...
...
@@ -80,11 +81,6 @@ NouveauModele::NouveauModele(QWidget* parent) : QWidget() {
form_choix
->
addWidget
(
bouton_valide
);
general
->
addWidget
(
fenetre_init
,
0
,
0
,
9
,
1
);
//définition de la frame contenant la grille de sélection du voisinage
...
...
@@ -110,6 +106,9 @@ NouveauModele::NouveauModele(QWidget* parent) : QWidget() {
connect
(
boutonEtat
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
parametrerEtats
()));
form_choix
->
addWidget
(
boutonEtat
);
}
void
NouveauModele
::
parametrerEtats
()
{
...
...
@@ -150,15 +149,13 @@ void NouveauModele::paramRegle(const QString& choix_regle) {
valid_Etat
->
addItem
(
"Non"
);
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
);
...
...
@@ -176,7 +173,7 @@ void NouveauModele::paramRegle(const QString& choix_regle) {
for
(
unsigned
int
i
=
0
;
i
<
8
;
i
++
)
{
numSeuilMin
[
i
]
=
new
QLineEdit
;
numSeuilMin
[
i
]
->
setFixedWidth
(
22
);
numSeuilMin
[
i
]
->
setMaxLength
(
1
);
numSeuilMin
[
i
]
->
setMaxLength
(
2
);
numSeuilMin
[
i
]
->
setText
(
"-1"
);
numSeuilMin
[
i
]
->
setValidator
(
seuilValidator
);
layouth1
->
addWidget
(
numSeuilMin
[
i
]);
...
...
@@ -203,16 +200,21 @@ void NouveauModele::paramRegle(const QString& choix_regle) {
}
void
NouveauModele
::
choisirEtatCourant
(
const
QString
&
validEtat
){
if
(
validEtat
==
"Oui"
){
numEtatCourant
=
new
QSpinBox
;
numEtatCourant
->
setRange
(
1
,
8
);
etatCourant2
=
new
QLabel
(
"Etat Courant : "
);
QHBoxLayout
*
layout
=
new
QHBoxLayout
;
form_choix
->
addRow
(
layout
);
layout
->
addWidget
(
etatCourant
);
layout
->
addWidget
(
numEtatCourant
);
if
(
validEtat
==
"Oui"
){
numEtatCourant
=
new
QSpinBox
;
numEtatCourant
->
setRange
(
1
,
8
);
layout
->
addWidget
(
etatCourant
);
layout
->
addWidget
(
numEtatCourant
);
}
else
{
delete
layout
;
}
}
...
...
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