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>
This commit is contained in:
Boris Barbulovski 2014-02-12 15:22:54 +01:00 committed by Dirk Hohndel
parent cc37d2e94a
commit c86822c2f4
18 changed files with 104 additions and 96 deletions

View file

@ -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();