aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-06-25 15:42:28 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-26 18:50:14 -0700
commit3435d13509e2623ee26de0c75f571982603f0baa (patch)
tree766d1841722e7ec7b8c424823f172123f943e891
parente28af7c639d9c985b9be5dba2ede497e7a7e4cda (diff)
downloadsubsurface-3435d13509e2623ee26de0c75f571982603f0baa.tar.gz
Dive site rewrite: add the taxonomy labels for the dive sites
This doesn't work yet because we don't get the taxonomy from the geo referencing services yet - but it's ready to be populated. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/maintab.cpp7
-rw-r--r--qt-ui/maintab.ui19
2 files changed, 20 insertions, 6 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 99459dbd3..31a94b73a 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -566,6 +566,7 @@ void MainTab::updateDiveInfo(bool clear)
ui.waterTemperatureText->setText(get_temperature_string(displayed_dive.watertemp, true));
ui.airTemperatureText->setText(get_temperature_string(displayed_dive.airtemp, true));
ui.DiveType->setCurrentIndex(get_dive_dc(&displayed_dive, dc_number)->divemode);
+
volume_t gases[MAX_CYLINDERS] = {};
get_gas_used(&displayed_dive, gases);
QString volumes;
@@ -690,6 +691,12 @@ void MainTab::updateDiveInfo(bool clear)
gasUsedString.append(QString("O2: %2\n").arg(get_volume_string(o2_tot, true)));
}
ui.gasConsumption->setText(gasUsedString);
+ ui.locationTags->setText(ds->description); // TODO: This should be three tags following davide's explanation.
+ if(ui.locationTags->text().isEmpty())
+ ui.locationTags->hide();
+ else
+ ui.locationTags->show();
+
} else {
/* clear the fields */
clearInfo();
diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui
index c78ced6f3..ccd55bd18 100644
--- a/qt-ui/maintab.ui
+++ b/qt-ui/maintab.ui
@@ -181,6 +181,13 @@
</widget>
</item>
<item>
+ <widget class="QLabel" name="locationTags">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>2</number>
@@ -532,8 +539,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>100</width>
- <height>30</height>
+ <width>449</width>
+ <height>743</height>
</rect>
</property>
<layout class="QGridLayout" name="equipmentTabScrollAreaLayout">
@@ -627,8 +634,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>389</width>
- <height>430</height>
+ <width>449</width>
+ <height>743</height>
</rect>
</property>
<layout class="QGridLayout" name="diveInfoScrollAreaLayout">
@@ -968,8 +975,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>408</width>
- <height>253</height>
+ <width>449</width>
+ <height>743</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">