From c86822c2f47973528b3441d633b2b9df98ed465a Mon Sep 17 00:00:00 2001 From: Boris Barbulovski Date: Wed, 12 Feb 2014 15:22:54 +0100 Subject: Replace mainWindow() with MainWindow::instance() C++ style of accessing single instance class object. Signed-off-by: Boris Barbulovski Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui/mainwindow.h') 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(); -- cgit v1.2.3-70-g09d2