diff options
Diffstat (limited to 'qt-ui/mainwindow.h')
-rw-r--r-- | qt-ui/mainwindow.h | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 2364caadc..f963330cc 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -10,8 +10,10 @@ #include <QMainWindow> #include <QAction> #include <QUrl> +#include <QUuid> #include "ui_mainwindow.h" +#include "notificationwidget.h" struct DiveList; class QSortFilterProxyModel; @@ -30,6 +32,12 @@ class QWebView; class QSettings; class UpdateManager; class UserManual; +class DivePlannerWidget; +class ProfileWidget2; +class PlannerDetails; +class PlannerSettingsWidget; +class QUndoStack; +class LocationInformationWidget; enum MainWindowTitleFormat { MWTF_DEFAULT, @@ -43,10 +51,7 @@ public: COLLAPSED, EXPANDED }; - enum InfoWidgetIndexes { - MAINTAB, - PLANNERWIDGET - }; + enum CurrentState { VIEWALL, GLOBE_MAXIMIZED, @@ -64,7 +69,9 @@ public: void removeRecentFile(QStringList failedFiles); DiveListView *dive_list(); GlobeGPS *globe(); - void showError(QString message); + DivePlannerWidget *divePlannerWidget(); + PlannerSettingsWidget *divePlannerSettingsWidget(); + LocationInformationWidget *locationInformationWidget(); void setTitle(enum MainWindowTitleFormat format); // Some shortcuts like "change DC" or "copy/paste dive components" @@ -77,11 +84,16 @@ 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); + void showV2Dialog(); + QUndoStack *undoStack; + NotificationWidget *getNotificationWidget(); private slots: /* file menu action */ @@ -94,6 +106,7 @@ slots: void on_actionPrint_triggered(); void on_actionPreferences_triggered(); void on_actionQuit_triggered(); + void on_actionHash_images_triggered(); /* log menu actions */ void on_actionDownloadDC_triggered(); @@ -101,6 +114,7 @@ slots: void on_actionDivelogs_de_triggered(); void on_actionEditDeviceNames_triggered(); void on_actionAddDive_triggered(); + void on_actionEditDive_triggered(); void on_actionRenumber_triggered(); void on_actionAutoGroup_triggered(); void on_actionYearlyStatistics_triggered(); @@ -151,6 +165,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 +201,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 +211,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 |