diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-02-11 13:19:35 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-11 16:34:02 -0800 |
commit | e3d800885f9b5814f88235f49982635f7644da8e (patch) | |
tree | 497bdc17d16c5fd2c06f1cb1aff063ff736169ca | |
parent | 3516ff2ab27905bc7698d5b052084b162042427f (diff) | |
download | subsurface-e3d800885f9b5814f88235f49982635f7644da8e.tar.gz |
Create a new state for the MainWindow: EditDiveSite
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/mainwindow.cpp | 7 | ||||
-rw-r--r-- | qt-ui/mainwindow.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 257f394d6..c763f8e58 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -67,12 +67,15 @@ MainWindow::MainWindow() : QMainWindow(), PlannerSettingsWidget *plannerSettings = new PlannerSettingsWidget(); DivePlannerWidget *plannerWidget = new DivePlannerWidget(); PlannerDetails *plannerDetails = new PlannerDetails(); + LocationInformationWidget *locationInformation = new LocationInformationWidget(); registerApplicationState("Default", mainTab, profileWidget, diveListView, globeGps ); registerApplicationState("AddDive", mainTab, profileWidget, diveListView, globeGps ); registerApplicationState("EditDive", mainTab, profileWidget, diveListView, globeGps ); registerApplicationState("PlanDive", plannerWidget, profileWidget, plannerSettings, plannerDetails ); registerApplicationState("EditPlannedDive", plannerWidget, profileWidget, diveListView, globeGps ); + registerApplicationState("EditDiveSite",locationInformation, profileWidget, diveListView, globeGps ); + setApplicationState("Default"); ui.multiFilter->hide(); @@ -205,6 +208,10 @@ PlannerSettingsWidget *MainWindow::divePlannerSettingsWidget() { return qobject_cast<PlannerSettingsWidget*>(applicationState["PlanDive"].bottomLeft); } +LocationInformationWidget *MainWindow::locationInformationWidget() { + return qobject_cast<LocationInformationWidget*>(applicationState["EditDiveSite"].topLeft); +} + void MainWindow::setLoadedWithFiles(bool f) { filesAsArguments = f; diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 25771d650..6d4c05acc 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -68,7 +68,7 @@ public: GlobeGPS *globe(); DivePlannerWidget *divePlannerWidget(); PlannerSettingsWidget *divePlannerSettingsWidget(); - + LocationInformationWidget *locationInformationWidget(); void showError(QString message); void setTitle(enum MainWindowTitleFormat format); |