aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2015-07-30 21:53:53 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-31 10:28:28 -0700
commit2faff7ceaea61a6b9dc6b53fbc52169671a27874 (patch)
treec92d0290aab6d1fdc7dc73a9c110099c83cde022
parent7efa924067942e6ad32894454e90bf7c5c99a5ae (diff)
downloadsubsurface-2faff7ceaea61a6b9dc6b53fbc52169671a27874.tar.gz
Add a button to pick the coordinates via globe on the dive site edit
It's a placeholder for now, but next commit will make it work. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/locationInformation.ui59
-rw-r--r--qt-ui/locationinformation.cpp5
-rw-r--r--qt-ui/locationinformation.h1
3 files changed, 42 insertions, 23 deletions
diff --git a/qt-ui/locationInformation.ui b/qt-ui/locationInformation.ui
index 8b7992439..30034a016 100644
--- a/qt-ui/locationInformation.ui
+++ b/qt-ui/locationInformation.ui
@@ -34,15 +34,18 @@
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="diveSiteName"/>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Coordinates</string>
+ <item row="5" column="0">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- </widget>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="diveSiteCoordinates"/>
@@ -54,9 +57,6 @@
</property>
</widget>
</item>
- <item row="3" column="1">
- <widget class="QLineEdit" name="diveSiteDescription"/>
- </item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
@@ -64,20 +64,31 @@
</property>
</widget>
</item>
- <item row="5" column="0">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Coordinates</string>
</property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QToolButton" name="btnPickCoordinates">
+ <property name="text">
+ <string>Pick on the globe</string>
</property>
- </spacer>
+ <property name="icon">
+ <iconset resource="../subsurface.qrc">
+ <normaloff>:/geocode</normaloff>:/geocode</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">
+ <item row="4" column="1" rowspan="2" colspan="2">
<widget class="QPlainTextEdit" name="diveSiteNotes"/>
</item>
</layout>
@@ -90,6 +101,8 @@
<container>1</container>
</customwidget>
</customwidgets>
- <resources/>
+ <resources>
+ <include location="../subsurface.qrc"/>
+ </resources>
<connections/>
</ui>
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 48d5035ab..aec20f936 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -89,6 +89,11 @@ void LocationInformationWidget::acceptChanges()
emit coordinatesChanged();
}
+void LocationInformationWidget::on_btnPickCoordinates_clicked()
+{
+ qDebug() << "Sim, Deve haver o perdao";
+}
+
void LocationInformationWidget::rejectChanges()
{
resetState();
diff --git a/qt-ui/locationinformation.h b/qt-ui/locationinformation.h
index 3eff271c2..ef28ddafd 100644
--- a/qt-ui/locationinformation.h
+++ b/qt-ui/locationinformation.h
@@ -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 on_btnPickCoordinates_clicked();
private slots:
void updateLabels();
signals: