mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16: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>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="horizontalSpacing">
|
<property name="horizontalSpacing">
|
||||||
<number>-1</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>4</number>
|
<number>4</number>
|
||||||
</property>
|
</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">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -70,6 +57,9 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="diveSiteCoordinates"/>
|
||||||
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -77,14 +67,35 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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"/>
|
<widget class="QPlainTextEdit" name="diveSiteNotes"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="0" column="0" colspan="3">
|
||||||
<widget class="QLineEdit" name="diveSiteCoordinates"/>
|
<widget class="KMessageWidget" name="diveSiteMessage" native="true">
|
||||||
</item>
|
<property name="sizePolicy">
|
||||||
<item row="3" column="1">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<widget class="QLineEdit" name="diveSiteDescription"/>
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -96,6 +107,8 @@
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../subsurface.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#include "globe.h"
|
#include "globe.h"
|
||||||
#include "filtermodels.h"
|
#include "filtermodels.h"
|
||||||
#include "divelocationmodel.h"
|
#include "divelocationmodel.h"
|
||||||
|
#include "divesitehelpers.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QShowEvent>
|
#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(startFilterDiveSite(uint32_t)), MultiFilterSortModel::instance(), SLOT(startFilterDiveSite(uint32_t)));
|
||||||
connect(this, SIGNAL(stopFilterDiveSite()), MultiFilterSortModel::instance(), SLOT(stopFilterDiveSite()));
|
connect(this, SIGNAL(stopFilterDiveSite()), MultiFilterSortModel::instance(), SLOT(stopFilterDiveSite()));
|
||||||
|
connect(ui.geoCodeButton, SIGNAL(clicked()), this, SLOT(reverseGeocode()));
|
||||||
|
|
||||||
#ifndef NO_MARBLE
|
#ifndef NO_MARBLE
|
||||||
// Globe Management Code.
|
// Globe Management Code.
|
||||||
|
@ -248,3 +251,11 @@ void LocationManagementEditHelper::resetDiveSiteUuid() {
|
||||||
uint32_t LocationManagementEditHelper::diveSiteUuid() const {
|
uint32_t LocationManagementEditHelper::diveSiteUuid() const {
|
||||||
return last_uuid;
|
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_diveSiteDescription_textChanged(const QString& text);
|
||||||
void on_diveSiteName_textChanged(const QString& text);
|
void on_diveSiteName_textChanged(const QString& text);
|
||||||
void on_diveSiteNotes_textChanged();
|
void on_diveSiteNotes_textChanged();
|
||||||
|
void reverseGeocode();
|
||||||
private slots:
|
private slots:
|
||||||
void updateLabels();
|
void updateLabels();
|
||||||
signals:
|
signals:
|
||||||
|
|
|
@ -1656,10 +1656,3 @@ void MainTab::showAndTriggerEditSelective(struct dive_components what)
|
||||||
weightModel->changed = true;
|
weightModel->changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainTab::reverseGeocode()
|
|
||||||
{
|
|
||||||
ReverseGeoLookupThread *geoLookup = ReverseGeoLookupThread::instance();
|
|
||||||
geoLookup->lookup(&displayed_dive_site);
|
|
||||||
updateDiveInfo();
|
|
||||||
}
|
|
||||||
|
|
|
@ -99,7 +99,6 @@ slots:
|
||||||
void enableGeoLookupEdition();
|
void enableGeoLookupEdition();
|
||||||
void disableGeoLookupEdition();
|
void disableGeoLookupEdition();
|
||||||
void setCurrentLocationIndex();
|
void setCurrentLocationIndex();
|
||||||
void reverseGeocode();
|
|
||||||
private:
|
private:
|
||||||
Ui::MainTab ui;
|
Ui::MainTab ui;
|
||||||
WeightModel *weightModel;
|
WeightModel *weightModel;
|
||||||
|
|
Loading…
Add table
Reference in a new issue