diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-08-22 07:05:13 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-22 07:05:13 -0700 |
commit | ccd2cb25020e62f37fbf15dcc8b6eccbd643b7f0 (patch) | |
tree | d18a50a7448fc6b71ac18c2f99c54c938843dc8b /qt-ui | |
parent | e86fd45efde7e8314b8045cb88495c48838bb4bd (diff) | |
download | subsurface-ccd2cb25020e62f37fbf15dcc8b6eccbd643b7f0.tar.gz |
Continue to separate logic code from UI code
We don't want to call into the MainWindow from C code.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/mainwindow.cpp | 9 | ||||
-rw-r--r-- | qt-ui/mainwindow.h | 1 |
2 files changed, 2 insertions, 8 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index dec550389..4d416d2be 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -1731,10 +1731,10 @@ void MainWindow::setApplicationState(const QByteArray& state) { if (!applicationState.keys().contains(state)) return; - if (currentApplicationState == state) + if (getCurrentAppState() == state) return; - currentApplicationState = state; + setCurrentAppState(state); #define SET_CURRENT_INDEX( X ) \ if (applicationState[state].X) { \ @@ -1762,8 +1762,3 @@ void MainWindow::setApplicationState(const QByteArray& state) { } #undef SET_CURRENT_INDEX } - -bool MainWindow::inPlanner() -{ - return (currentApplicationState == "PlanDive" || currentApplicationState == "EditPlannedDive"); -} diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 2d2ea8847..226e9b6ee 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -243,7 +243,6 @@ private: QHash<QByteArray, WidgetForQuadrant> applicationState; QHash<QByteArray, PropertiesForQuadrant> stateProperties; - QByteArray currentApplicationState; WindowTitleUpdate *wtu; }; |