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
578936c9
Commit
578936c9
authored
Jun 07, 2021
by
Victor Blanchet
Browse files
Conversion de Autocell en singleton
parent
79539662
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/autocell.h
View file @
578936c9
...
...
@@ -28,6 +28,8 @@ extern EnsembleEtat& enseEtats;
class
AutoCell
:
public
QWidget
{
static
std
::
unique_ptr
<
AutoCell
>
instance
;
Reseau
*
Grille
=
nullptr
;
Q_OBJECT
...
...
@@ -80,9 +82,18 @@ class AutoCell : public QWidget
QWidget
*
win_notice
;
QLabel
*
lab_notice
;
public:
explicit
AutoCell
(
QWidget
*
parent
=
nullptr
);
public:
static
AutoCell
&
getInstance
()
{
if
(
instance
==
nullptr
)
{
instance
.
reset
(
new
AutoCell
);
}
return
*
instance
;
}
public
slots
:
//void chargerModele();
//void listerModele(); //à faire en dernier
...
...
@@ -101,6 +112,7 @@ class AutoCell : public QWidget
//Reseau& modifierCellule(const QModelIndex&, Reseau& Grille);//à implémenter
void
modifierCellule
(
const
QModelIndex
&
index
);
void
sauvegarderGrille
();
void
defNouveauModele
();
};
...
...
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