aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/wearable/qml/Fitness/FitnessPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols2/wearable/qml/Fitness/FitnessPage.qml')
-rw-r--r--examples/quickcontrols2/wearable/qml/Fitness/FitnessPage.qml139
1 files changed, 66 insertions, 73 deletions
diff --git a/examples/quickcontrols2/wearable/qml/Fitness/FitnessPage.qml b/examples/quickcontrols2/wearable/qml/Fitness/FitnessPage.qml
index 920f2594..6504c4b3 100644
--- a/examples/quickcontrols2/wearable/qml/Fitness/FitnessPage.qml
+++ b/examples/quickcontrols2/wearable/qml/Fitness/FitnessPage.qml
@@ -54,94 +54,87 @@ import "../Style"
import "fitness.js" as FitnessData
Item {
- Item {
- anchors.centerIn: parent
+ QQ2.SwipeView {
+ id: svFitnessContainer
- width: UIStyle.visibleDiameter
- height: UIStyle.visibleRectHeight
+ anchors.fill: parent
- QQ2.SwipeView {
- id: svFitnessContainer
+ clip: true
+ currentIndex: 0
- anchors.fill: parent
+ Item {
+ id: fitnessPage1
- clip: true
- currentIndex: 0
+ Column {
+ anchors.centerIn: parent
+ spacing: 15
- Item {
- id: fitnessPage1
-
- Column {
- anchors.centerIn: parent
- spacing: 15
-
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: qsTr("Steps: ") + FitnessData.getSteps()
- font.italic: true
- font.pixelSize: UIStyle.fontSizeM
- color: UIStyle.colorQtGray1
- }
- Image {
- anchors.horizontalCenter: parent.horizontalCenter
- height: 64
- width: 64
- source: "images/man-walking.png"
- }
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: qsTr("Calories: ") + FitnessData.getCalories()
- font.pixelSize: UIStyle.fontSizeS
- font.italic: true
- color: UIStyle.colorQtGray3
- }
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Steps: ") + FitnessData.getSteps()
+ font.italic: true
+ font.pixelSize: UIStyle.fontSizeM
+ color: UIStyle.colorQtGray1
+ }
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ height: 64
+ width: 64
+ source: "images/man-walking.png"
+ }
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Calories: ") + FitnessData.getCalories()
+ font.pixelSize: UIStyle.fontSizeS
+ font.italic: true
+ color: UIStyle.colorQtGray3
}
}
+ }
- Item {
- id: fitnessPage2
+ Item {
+ id: fitnessPage2
- Column {
- anchors.centerIn: parent
- spacing: 15
+ Column {
+ anchors.centerIn: parent
+ spacing: 15
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: qsTr("Distance: ")
- + FitnessData.getDistance()
- + qsTr(" miles")
- font.italic: true
- font.pixelSize: UIStyle.fontSizeM
- color: UIStyle.colorQtGray1
- }
- Image {
- anchors.horizontalCenter: parent.horizontalCenter
- height: 64
- width: 64
- source: "images/man-running.png"
- }
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: qsTr("Time: ")
- + FitnessData.getTime()
- + qsTr(" mins")
- font.pixelSize: UIStyle.fontSizeS
- font.italic: true
- color: UIStyle.colorQtGray3
- }
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Distance: ")
+ + FitnessData.getDistance()
+ + qsTr(" miles")
+ font.italic: true
+ font.pixelSize: UIStyle.fontSizeM
+ color: UIStyle.colorQtGray1
+ }
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ height: 64
+ width: 64
+ source: "images/man-running.png"
+ }
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Time: ")
+ + FitnessData.getTime()
+ + qsTr(" mins")
+ font.pixelSize: UIStyle.fontSizeS
+ font.italic: true
+ color: UIStyle.colorQtGray3
}
}
}
+ }
- QQ2.PageIndicator {
- id: pgFitnessIndicator
+ QQ2.PageIndicator {
+ id: pgFitnessIndicator
- anchors.bottom: svFitnessContainer.bottom
- anchors.bottomMargin: 1
- anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: svFitnessContainer.bottom
+ anchors.bottomMargin: 1
+ anchors.horizontalCenter: parent.horizontalCenter
- count: svFitnessContainer.count
- currentIndex: svFitnessContainer.currentIndex
- }
+ count: svFitnessContainer.count
+ currentIndex: svFitnessContainer.currentIndex
}
}