mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
028f0401f6
commit
aaa70ff56e
4 changed files with 18 additions and 12 deletions
|
@ -76,7 +76,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
||||||
locationManagementEditHelper, &LocationManagementEditHelper::handleActivation);
|
locationManagementEditHelper, &LocationManagementEditHelper::handleActivation);
|
||||||
|
|
||||||
ui.location->setCompleter(completer);
|
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);
|
QAction *action = new QAction(tr("Apply changes"), this);
|
||||||
connect(action, SIGNAL(triggered(bool)), this, SLOT(acceptChanges()));
|
connect(action, SIGNAL(triggered(bool)), this, SLOT(acceptChanges()));
|
||||||
|
@ -520,7 +520,7 @@ void MainTab::updateDiveInfo(bool clear)
|
||||||
if (ds)
|
if (ds)
|
||||||
copy_dive_site(ds, &displayed_dive_site);
|
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) {
|
if (ds) {
|
||||||
// construct the location tags
|
// construct the location tags
|
||||||
QString locationTag;
|
QString locationTag;
|
||||||
|
|
|
@ -55,8 +55,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>449</width>
|
<width>445</width>
|
||||||
<height>758</height>
|
<height>760</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
@ -209,13 +209,13 @@
|
||||||
<widget class="QLineEdit" name="location"/>
|
<widget class="QLineEdit" name="location"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="geocodeButton">
|
<widget class="QToolButton" name="editDiveSiteButton">
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Perform a location lookup based on GPS information (country, city, body of water, etc.)</string>
|
<string>Perform a location lookup based on GPS information (country, city, body of water, etc.)</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../subsurface.qrc">
|
<iconset resource="../subsurface.qrc">
|
||||||
<normaloff>:/geocode</normaloff>:/geocode</iconset>
|
<normaloff>:/geocode</normaloff>:/geocode</iconset>
|
||||||
|
@ -650,8 +650,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>317</width>
|
<width>287</width>
|
||||||
<height>365</height>
|
<height>320</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="diveInfoScrollAreaLayout">
|
<layout class="QGridLayout" name="diveInfoScrollAreaLayout">
|
||||||
|
@ -991,8 +991,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>331</width>
|
<width>297</width>
|
||||||
<height>220</height>
|
<height>187</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
|
|
@ -165,6 +165,8 @@ MainWindow::MainWindow() : QMainWindow(),
|
||||||
connect(DivePlannerPointsModel::instance(), SIGNAL(planCreated()), this, SLOT(planCreated()));
|
connect(DivePlannerPointsModel::instance(), SIGNAL(planCreated()), this, SLOT(planCreated()));
|
||||||
connect(DivePlannerPointsModel::instance(), SIGNAL(planCanceled()), this, SLOT(planCanceled()));
|
connect(DivePlannerPointsModel::instance(), SIGNAL(planCanceled()), this, SLOT(planCanceled()));
|
||||||
connect(plannerDetails->printPlan(), SIGNAL(pressed()), divePlannerWidget(), SLOT(printDecoPlan()));
|
connect(plannerDetails->printPlan(), SIGNAL(pressed()), divePlannerWidget(), SLOT(printDecoPlan()));
|
||||||
|
connect(this, SIGNAL(startDiveSiteEdit()), this, SLOT(on_actionDiveSiteEdit_triggered()));
|
||||||
|
|
||||||
#ifndef NO_MARBLE
|
#ifndef NO_MARBLE
|
||||||
connect(information(), SIGNAL(diveSiteChanged(struct dive_site *)), globeGps, SLOT(centerOnDiveSite(struct dive_site *)));
|
connect(information(), SIGNAL(diveSiteChanged(struct dive_site *)), globeGps, SLOT(centerOnDiveSite(struct dive_site *)));
|
||||||
#endif
|
#endif
|
||||||
|
@ -234,6 +236,7 @@ void MainWindow::setStateProperties(const QByteArray& state, const PropertyList&
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionDiveSiteEdit_triggered() {
|
void MainWindow::on_actionDiveSiteEdit_triggered() {
|
||||||
|
qDebug() << "Chamou";
|
||||||
setApplicationState("EditDiveSite");
|
setApplicationState("EditDiveSite");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,9 @@ slots:
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent *);
|
void closeEvent(QCloseEvent *);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void startDiveSiteEdit();
|
||||||
|
|
||||||
public
|
public
|
||||||
slots:
|
slots:
|
||||||
void turnOffNdlTts();
|
void turnOffNdlTts();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue