diff options
author | Boris Barbulovski <bbarbulovski@gmail.com> | 2014-02-12 15:22:54 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-12 11:42:59 -0800 |
commit | c86822c2f47973528b3441d633b2b9df98ed465a (patch) | |
tree | 211d6b282dab31c3956e1fb4d5aaaa9811203c62 /qt-ui/mainwindow.h | |
parent | cc37d2e94ae34b8f260a1426e49c0ca082226502 (diff) | |
download | subsurface-c86822c2f47973528b3441d633b2b9df98ed465a.tar.gz |
Replace mainWindow() with MainWindow::instance()
C++ style of accessing single instance class object.
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.h')
-rw-r--r-- | qt-ui/mainwindow.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index a1b678296..deacdec76 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -41,6 +41,8 @@ public: enum CurrentState{ VIEWALL, GLOBE_MAXIMIZED, INFO_MAXIMIZED, PROFILE_MAXIMIZED, LIST_MAXIMIZED}; MainWindow(); + virtual ~MainWindow(); + static MainWindow *instance(); ProfileGraphicsView *graphics(); MainTab *information(); DiveListView *dive_list(); @@ -135,6 +137,7 @@ private: UserManual *helpView; CurrentState state; QString filter(); + static MainWindow *m_Instance; bool askSaveChanges(); void writeSettings(); void redrawProfile(); |