summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@qt.io>2016-10-05 10:40:24 +0200
committerMaurice Kalinowski <maurice.kalinowski@qt.io>2016-10-06 07:58:49 +0000
commit5a9e461d9484139f6667d7b01c61d01cfe5675d9 (patch)
tree8b2e0079bf1ab1a07e3631a1032d1b2b5ccaae4f
parent0624390ef163f352903029f24c51b66f31aced46 (diff)
downloadqtlocation-5a9e461d9484139f6667d7b01c61d01cfe5675d9.tar.gz
Add labels for ground speed and direction
So far the manual test application was missing those items in case the backend supports them. Change-Id: Ia9fd96fe7d06ee2c36aff59f52fe7f9d898db1ea Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--tests/applications/positioning_backend/widget.cpp10
-rw-r--r--tests/applications/positioning_backend/widget.ui54
2 files changed, 51 insertions, 13 deletions
diff --git a/tests/applications/positioning_backend/widget.cpp b/tests/applications/positioning_backend/widget.cpp
index ecf9b7e8..93a42a80 100644
--- a/tests/applications/positioning_backend/widget.cpp
+++ b/tests/applications/positioning_backend/widget.cpp
@@ -71,6 +71,16 @@ void Widget::positionUpdated(QGeoPositionInfo gpsPos)
ui->labelVAccuracy->setText(QString::number(gpsPos.attribute(QGeoPositionInfo::VerticalAccuracy)));
else
ui->labelVAccuracy->setText(QStringLiteral("N/A"));
+
+ if (gpsPos.hasAttribute(QGeoPositionInfo::Direction))
+ ui->labelDirection->setText(QString::number(gpsPos.attribute(QGeoPositionInfo::Direction)));
+ else
+ ui->labelDirection->setText(QStringLiteral("N/A"));
+
+ if (gpsPos.hasAttribute(QGeoPositionInfo::GroundSpeed))
+ ui->labelSpeed->setText(QString::number(gpsPos.attribute(QGeoPositionInfo::GroundSpeed)));
+ else
+ ui->labelSpeed->setText(QStringLiteral("N/A"));
}
void Widget::positionTimedOut()
diff --git a/tests/applications/positioning_backend/widget.ui b/tests/applications/positioning_backend/widget.ui
index d19497d2..a96a83f6 100644
--- a/tests/applications/positioning_backend/widget.ui
+++ b/tests/applications/positioning_backend/widget.ui
@@ -61,56 +61,56 @@
</property>
</widget>
</item>
- <item row="3" column="0">
+ <item row="5" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>TimeStamp:</string>
</property>
</widget>
</item>
- <item row="3" column="1">
+ <item row="5" column="1">
<widget class="QLabel" name="labelTimeStamp">
<property name="text">
<string>N/A</string>
</property>
</widget>
</item>
- <item row="4" column="0">
+ <item row="7" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Horizontal Accuracy:</string>
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="7" column="1">
<widget class="QLabel" name="labelHAccuracy">
<property name="text">
<string>N/A</string>
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="8" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Vertical Accuracy:</string>
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="8" column="1">
<widget class="QLabel" name="labelVAccuracy">
<property name="text">
<string>N/A</string>
</property>
</widget>
</item>
- <item row="6" column="0">
+ <item row="9" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>TimeOut:</string>
</property>
</widget>
</item>
- <item row="6" column="1">
+ <item row="9" column="1">
<widget class="QLabel" name="labelTimeOut">
<property name="enabled">
<bool>true</bool>
@@ -120,28 +120,28 @@
</property>
</widget>
</item>
- <item row="7" column="0">
+ <item row="10" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Supported Methods:</string>
</property>
</widget>
</item>
- <item row="8" column="0">
+ <item row="11" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Error State:</string>
</property>
</widget>
</item>
- <item row="8" column="1">
+ <item row="11" column="1">
<widget class="QLabel" name="labelErrorState">
<property name="text">
<string>N/A</string>
</property>
</widget>
</item>
- <item row="7" column="1">
+ <item row="10" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="labelSupported">
@@ -159,6 +159,34 @@
</item>
</layout>
</item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_11">
+ <property name="text">
+ <string>Direction:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLabel" name="labelDirection">
+ <property name="text">
+ <string>N/A</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_12">
+ <property name="text">
+ <string>Speed:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QLabel" name="labelSpeed">
+ <property name="text">
+ <string>N/A</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
@@ -171,7 +199,7 @@
<rect>
<x>43</x>
<y>21</y>
- <width>243</width>
+ <width>251</width>
<height>71</height>
</rect>
</property>