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 /qthelper.cpp | |
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 'qthelper.cpp')
-rw-r--r-- | qthelper.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/qthelper.cpp b/qthelper.cpp index 44bb8a33a..de1d893df 100644 --- a/qthelper.cpp +++ b/qthelper.cpp @@ -1274,7 +1274,19 @@ extern "C" void parse_display_units(char *line) qDebug() << line; } +static QByteArray currentApplicationState; + +QByteArray getCurrentAppState() +{ + return currentApplicationState; +} + +void setCurrentAppState(QByteArray state) +{ + currentApplicationState = state; +} + extern "C" bool in_planner() { - return MainWindow::instance()->inPlanner(); + return (currentApplicationState == "PlanDive" || currentApplicationState == "EditPlannedDive"); } |