aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-08-25 18:27:19 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-25 17:58:46 -0700
commitaaa70ff56e2b5891f1c8241bf10a8e236bf86108 (patch)
tree579161ce0442d3d0f55609f1f643dd144bf96bc3 /qt-ui
parent028f0401f652334d033cb01b7c1a49609b9e69b4 (diff)
downloadsubsurface-aaa70ff56e2b5891f1c8241bf10a8e236bf86108.tar.gz
Turn the get taxonomy button into a manage dive site button
The get taxonomy button will be inside the manage dive site interface. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp4
-rw-r--r--qt-ui/maintab.ui20
-rw-r--r--qt-ui/mainwindow.cpp3
-rw-r--r--qt-ui/mainwindow.h3
4 files changed, 18 insertions, 12 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index c200b36be..dc9ec9441 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -76,7 +76,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
locationManagementEditHelper, &LocationManagementEditHelper::handleActivation);
ui.location->setCompleter(completer);
- connect(ui.geocodeButton, SIGNAL(clicked()), this, SLOT(reverseGeocode()));
+ connect(ui.editDiveSiteButton, SIGNAL(clicked()), MainWindow::instance(), SIGNAL(startDiveSiteEdit()));
QAction *action = new QAction(tr("Apply changes"), this);
connect(action, SIGNAL(triggered(bool)), this, SLOT(acceptChanges()));
@@ -520,7 +520,7 @@ void MainTab::updateDiveInfo(bool clear)
if (ds)
copy_dive_site(ds, &displayed_dive_site);
}
- ui.geocodeButton->setVisible(ds && dive_site_has_gps_location(ds));
+ ui.editDiveSiteButton->setVisible(ds && dive_site_has_gps_location(ds));
if (ds) {
// construct the location tags
QString locationTag;
diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui
index 4390d045b..fb4180dbc 100644
--- a/qt-ui/maintab.ui
+++ b/qt-ui/maintab.ui
@@ -55,8 +55,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>449</width>
- <height>758</height>
+ <width>445</width>
+ <height>760</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
@@ -209,13 +209,13 @@
<widget class="QLineEdit" name="location"/>
</item>
<item>
- <widget class="QToolButton" name="geocodeButton">
- <property name="text">
- <string>...</string>
- </property>
+ <widget class="QToolButton" name="editDiveSiteButton">
<property name="toolTip">
<string>Perform a location lookup based on GPS information (country, city, body of water, etc.)</string>
</property>
+ <property name="text">
+ <string>...</string>
+ </property>
<property name="icon">
<iconset resource="../subsurface.qrc">
<normaloff>:/geocode</normaloff>:/geocode</iconset>
@@ -650,8 +650,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>317</width>
- <height>365</height>
+ <width>287</width>
+ <height>320</height>
</rect>
</property>
<layout class="QGridLayout" name="diveInfoScrollAreaLayout">
@@ -991,8 +991,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>331</width>
- <height>220</height>
+ <width>297</width>
+ <height>187</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 0307b081f..99be8422c 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -165,6 +165,8 @@ MainWindow::MainWindow() : QMainWindow(),
connect(DivePlannerPointsModel::instance(), SIGNAL(planCreated()), this, SLOT(planCreated()));
connect(DivePlannerPointsModel::instance(), SIGNAL(planCanceled()), this, SLOT(planCanceled()));
connect(plannerDetails->printPlan(), SIGNAL(pressed()), divePlannerWidget(), SLOT(printDecoPlan()));
+ connect(this, SIGNAL(startDiveSiteEdit()), this, SLOT(on_actionDiveSiteEdit_triggered()));
+
#ifndef NO_MARBLE
connect(information(), SIGNAL(diveSiteChanged(struct dive_site *)), globeGps, SLOT(centerOnDiveSite(struct dive_site *)));
#endif
@@ -234,6 +236,7 @@ void MainWindow::setStateProperties(const QByteArray& state, const PropertyList&
}
void MainWindow::on_actionDiveSiteEdit_triggered() {
+ qDebug() << "Chamou";
setApplicationState("EditDiveSite");
}
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index 759132146..713ab9d61 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -178,6 +178,9 @@ slots:
protected:
void closeEvent(QCloseEvent *);
+signals:
+ void startDiveSiteEdit();
+
public
slots:
void turnOffNdlTts();