From 1aaa37e5116148652a9ce7193d14320e30ee5bb1 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sat, 25 Jul 2015 12:30:20 -0300 Subject: Re-enable the dive site edit Since now we found the perfect way to deal with dive site handling on the dive, we can reenable this widget. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 11 +++++++++++ qt-ui/mainwindow.h | 1 + qt-ui/mainwindow.ui | 8 +++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 971b31c1c..2b3b30a6a 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -39,6 +39,8 @@ #include "usersurvey.h" #include "divesitehelpers.h" #include "windowtitleupdate.h" +#include "locationinformation.h" + #ifndef NO_USERMANUAL #include "usermanual.h" #endif @@ -107,11 +109,16 @@ MainWindow::MainWindow() : QMainWindow(), profLayout->addWidget(toolBar); profLayout->addWidget(profileWidget); profileContainer->setLayout(profLayout); + + LocationInformationWidget * diveSiteEdit = new LocationInformationWidget(); + QWidget *diveSitePictures = new QWidget(); // Placeholder + registerApplicationState("Default", mainTab, profileContainer, diveListView, globeGps ); registerApplicationState("AddDive", mainTab, profileContainer, diveListView, globeGps ); registerApplicationState("EditDive", mainTab, profileContainer, diveListView, globeGps ); registerApplicationState("PlanDive", plannerWidget, profileContainer, plannerSettings, plannerDetails ); registerApplicationState("EditPlannedDive", plannerWidget, profileContainer, diveListView, globeGps ); + registerApplicationState("EditDiveSite", diveSiteEdit, diveSitePictures, diveListView, globeGps); setApplicationState("Default"); @@ -197,6 +204,10 @@ MainWindow::~MainWindow() m_Instance = NULL; } +void MainWindow::on_actionDiveSiteEdit_triggered() { + setApplicationState("EditDiveSite"); +} + void MainWindow::enableDisableCloudActions() { #ifdef USE_LIBGIT23_API diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index b1f6c5ca3..f3a0f221b 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -139,6 +139,7 @@ slots: void on_actionReplanDive_triggered(); void on_action_Check_for_Updates_triggered(); + void on_actionDiveSiteEdit_triggered(); void current_dive_changed(int divenr); void initialUiSetup(); diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index a2c63740b..20ee70738 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -62,7 +62,7 @@ 0 0 861 - 29 + 22 @@ -119,6 +119,7 @@ + @@ -731,6 +732,11 @@ &Manage dive sites + + + Dive Site Edit + + -- cgit v1.2.3-70-g09d2