summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2013-11-07 11:37:27 -0500
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-09 15:30:51 +0900
commitd84cdb655e883960f783e2cb55e13a9f21f7d4c2 (patch)
tree0532f6c0b2d8eb0ffc8e79afd3f0a88135c36043 /qt-ui/mainwindow.h
parent460aa4c1bdee64f25e1c846ac9a6182e4e8e9820 (diff)
downloadsubsurface-d84cdb655e883960f783e2cb55e13a9f21f7d4c2.tar.gz
Fix inconsistent position of screen splitters
I basically rewrote the way we handled the splitters. It now uses a state to know what it's doing, and will only update the value of the saved-to-disk splitter size if the state shows the splitters (currently only VIEWALL), where all the other states should hide the splitters, and the values of the splitters don't matter. Fixes #225 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.h')
-rw-r--r--qt-ui/mainwindow.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index e35230a3c..9a8deb1a0 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -36,6 +36,7 @@ public:
enum {COLLAPSED, EXPANDED};
enum StackWidgetIndexes{ PROFILE, PLANNERPROFILE};
enum InfoWidgetIndexes{ MAINTAB, PLANNERWIDGET};
+ enum CurrentState{ VIEWALL, GLOBE_MAXIMIZED, INFO_MAXIMIZED, PROFILE_MAXIMIZED, LIST_MAXIMIZED};
MainWindow();
ProfileGraphicsView *graphics();
@@ -116,12 +117,15 @@ private:
QAction *actionNextDive;
QAction *actionPreviousDive;
QWebView *helpView;
+ CurrentState state;
QString filter();
bool askSaveChanges();
void writeSettings();
void redrawProfile();
void file_save();
void file_save_as();
+ void beginChangeState(CurrentState s);
+ void saveSplitterSizes();
};
MainWindow *mainWindow();