summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/mainwindow.cpp7
-rw-r--r--qt-ui/mainwindow.h2
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);