Commit 578936c9 authored by Victor Blanchet's avatar Victor Blanchet
Browse files

Conversion de Autocell en singleton

parent 79539662
......@@ -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();
};
......
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