mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 19:36:15 +00:00
Get taxonomy from edit dive site widget
Moved the get taxonomy button from the maintab to the edit dive site widget. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
aaa70ff56e
commit
03702edf87
5 changed files with 46 additions and 29 deletions
|
@ -18,24 +18,11 @@
|
|||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>-1</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="KMessageWidget" name="diveSiteMessage" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="diveSiteName"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
|
@ -70,6 +57,9 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="diveSiteCoordinates"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
|
@ -77,14 +67,35 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" rowspan="2">
|
||||
<item row="2" column="2">
|
||||
<widget class="QToolButton" name="geoCodeButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:/satellite</normaloff>:/satellite</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="diveSiteName"/>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="diveSiteDescription"/>
|
||||
</item>
|
||||
<item row="4" column="1" rowspan="2" colspan="2">
|
||||
<widget class="QPlainTextEdit" name="diveSiteNotes"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="diveSiteCoordinates"/>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="diveSiteDescription"/>
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="KMessageWidget" name="diveSiteMessage" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
@ -96,6 +107,8 @@
|
|||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../subsurface.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include "globe.h"
|
||||
#include "filtermodels.h"
|
||||
#include "divelocationmodel.h"
|
||||
#include "divesitehelpers.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QShowEvent>
|
||||
|
||||
|
@ -26,6 +28,7 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo
|
|||
|
||||
connect(this, SIGNAL(startFilterDiveSite(uint32_t)), MultiFilterSortModel::instance(), SLOT(startFilterDiveSite(uint32_t)));
|
||||
connect(this, SIGNAL(stopFilterDiveSite()), MultiFilterSortModel::instance(), SLOT(stopFilterDiveSite()));
|
||||
connect(ui.geoCodeButton, SIGNAL(clicked()), this, SLOT(reverseGeocode()));
|
||||
|
||||
#ifndef NO_MARBLE
|
||||
// Globe Management Code.
|
||||
|
@ -248,3 +251,11 @@ void LocationManagementEditHelper::resetDiveSiteUuid() {
|
|||
uint32_t LocationManagementEditHelper::diveSiteUuid() const {
|
||||
return last_uuid;
|
||||
}
|
||||
|
||||
void LocationInformationWidget::reverseGeocode()
|
||||
{
|
||||
qDebug() << "Chamou";
|
||||
ReverseGeoLookupThread *geoLookup = ReverseGeoLookupThread::instance();
|
||||
geoLookup->lookup(&displayed_dive_site);
|
||||
updateLabels();
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ public slots:
|
|||
void on_diveSiteDescription_textChanged(const QString& text);
|
||||
void on_diveSiteName_textChanged(const QString& text);
|
||||
void on_diveSiteNotes_textChanged();
|
||||
void reverseGeocode();
|
||||
private slots:
|
||||
void updateLabels();
|
||||
signals:
|
||||
|
|
|
@ -1656,10 +1656,3 @@ void MainTab::showAndTriggerEditSelective(struct dive_components what)
|
|||
weightModel->changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
void MainTab::reverseGeocode()
|
||||
{
|
||||
ReverseGeoLookupThread *geoLookup = ReverseGeoLookupThread::instance();
|
||||
geoLookup->lookup(&displayed_dive_site);
|
||||
updateDiveInfo();
|
||||
}
|
||||
|
|
|
@ -99,7 +99,6 @@ slots:
|
|||
void enableGeoLookupEdition();
|
||||
void disableGeoLookupEdition();
|
||||
void setCurrentLocationIndex();
|
||||
void reverseGeocode();
|
||||
private:
|
||||
Ui::MainTab ui;
|
||||
WeightModel *weightModel;
|
||||
|
|
Loading…
Add table
Reference in a new issue