diff options
Diffstat (limited to 'qt-ui/mainwindow.h')
-rw-r--r-- | qt-ui/mainwindow.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 2364caadc..85a63123b 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -10,6 +10,7 @@ #include <QMainWindow> #include <QAction> #include <QUrl> +#include <QUuid> #include "ui_mainwindow.h" @@ -30,6 +31,11 @@ class QWebView; class QSettings; class UpdateManager; class UserManual; +class DivePlannerWidget; +class ProfileWidget2; +class PlannerDetails; +class PlannerSettingsWidget; +class QUndoStack; enum MainWindowTitleFormat { MWTF_DEFAULT, @@ -43,10 +49,7 @@ public: COLLAPSED, EXPANDED }; - enum InfoWidgetIndexes { - MAINTAB, - PLANNERWIDGET - }; + enum CurrentState { VIEWALL, GLOBE_MAXIMIZED, @@ -64,6 +67,9 @@ public: void removeRecentFile(QStringList failedFiles); DiveListView *dive_list(); GlobeGPS *globe(); + DivePlannerWidget *divePlannerWidget(); + PlannerSettingsWidget *divePlannerSettingsWidget(); + LocationInformationWidget *locationInformationWidget(); void showError(QString message); void setTitle(enum MainWindowTitleFormat format); @@ -77,11 +83,14 @@ public: void cleanUpEmpty(); void setToolButtonsEnabled(bool enabled); ProfileWidget2 *graphics() const; + PlannerDetails *plannerDetails() const; void setLoadedWithFiles(bool filesFromCommandLine); bool filesFromCommandLine() const; void setPlanNotes(const char *notes); void printPlan(); void checkSurvey(QSettings *s); + void setApplicationState(const QByteArray& state); + QUndoStack *undoStack; private slots: /* file menu action */ @@ -151,6 +160,8 @@ slots: void on_paste_triggered(); void on_actionFilterTags_triggered(); void on_actionConfigure_Dive_Computer_triggered(); + void enableDiveSiteEdit(uint32_t id); + void setDefaultState(); protected: void closeEvent(QCloseEvent *); @@ -185,6 +196,7 @@ private: void saveSplitterSizes(); QString lastUsedDir(); void updateLastUsedDir(const QString &s); + void registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *topRight, QWidget *bottomLeft, QWidget *bottomRight); bool filesAsArguments; UpdateManager *updateManager; @@ -194,6 +206,17 @@ private: struct dive copyPasteDive; struct dive_components what; QList<QAction *> profileToolbarActions; + + struct WidgetForQuadrant { + WidgetForQuadrant(QWidget *tl = 0, QWidget *tr = 0, QWidget *bl = 0, QWidget *br = 0) : + topLeft(tl), topRight(tr), bottomLeft(bl), bottomRight(br) {} + QWidget *topLeft; + QWidget *topRight; + QWidget *bottomLeft; + QWidget *bottomRight; + }; + QHash<QByteArray, WidgetForQuadrant> applicationState; + QByteArray currentApplicationState; }; #endif // MAINWINDOW_H |