...
 
Commits (2)
......@@ -36,8 +36,7 @@
import QtQuick 2.9
import ebike 1.0
//import DataStore 1.0
//import "./BikeStyle"
import EbikeData 1.0
Rectangle {
id: speedViewItem
......@@ -53,6 +52,9 @@ Rectangle {
horizontalCenter: parent.horizontalCenter
}
property alias speed: datastore.speed
property alias battery: datastore.batterylevel
QtObject {
id: datastore
......
......@@ -3,7 +3,7 @@
import QmlProject 1.1
Project {
mainFile: "ebike.qml"
//mainFile: "ebike.qml"
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
......
......@@ -35,6 +35,8 @@
****************************************************************************/
import QtQuick 2.7
import ebike 1.0
import EbikeData 1.0
Rectangle {
visible: true
......@@ -46,10 +48,9 @@ Rectangle {
// The always-visible speed view
GaugeCode {
id: speedView
onShowMain: swipeView.currentIndex = 1
showZero: naviPage.targetEdit.activeFocus
property real enlargedMultiplier: 1.19
property real corneredMultiplier: 0.25
battery: Backend.battery
speed: Backend.speed
}
}
......@@ -35,6 +35,8 @@
****************************************************************************/
import QtQuick 2.7
import ebike 1.0
import EbikeData 1.0
Rectangle {
visible: true
......@@ -47,6 +49,8 @@ Rectangle {
SpeedoMeter {
id: speedView
x: 93
battery: Backend.battery
speed: Backend.speed
y: 20
scale: 0.55
}
......
......@@ -35,11 +35,13 @@
import QtQuick 2.9
import gauge 1.0
import QtQuick.Studio.Components 1.0
import QtQuick.Timeline 1.0
Item {
id: root
width: 400
height: width
property alias value: timeline.currentFrame
//visual components
Image {
......@@ -110,11 +112,33 @@ Item {
visible: true
source: "assets/dial-inner-circle_shadow.png"
}
Timeline {
id: timeline
endFrame: 240
enabled: true
startFrame: 0
KeyframeGroup {
target: arc
property: "end"
Keyframe {
value: 0
frame: 0
}
Keyframe {
value: 240
frame: 240
}
}
}
}
/*##^##
Designer {
D{i:0;height:560;width:560}D{i:2;flowX:"-224";flowY:259}D{i:5;flowX:"-224";flowY:259}
D{i:0;height:560;width:560}D{i:2;flowX:"-224";flowY:259}D{i:5;flowX:"-224";flowY:259;timeline_expanded:true}
D{i:8}
}
##^##*/
......@@ -239,9 +239,32 @@ Item {
id: dialFrame
width: Sizes.dp(560)
height: width
highLightAng: 0
SequentialAnimation {
loops: -1
running: true
NumberAnimation {
target: dialFrame
property: "highLightAng"
duration: 2000
easing.type: Easing.InOutQuad
from: -90
to: 0
}
NumberAnimation {
target: dialFrame
property: "highLightAng"
duration: 2000
easing.type: Easing.InOutQuad
from: 0
to: -90
}
}
anchors.centerIn: parent
state: parent.state
minAng: -210
maxAng: 0
zeroAng: -180
positiveColor: Style.accentColor
......
......@@ -2,6 +2,7 @@ import QtQuick 2.12
import gauge 1.0
import QtQuick.Controls 2.5
import QtQuick.Studio.Components 1.0
import QtQuick.Timeline 1.0
Item {
id: root
......@@ -144,12 +145,55 @@ Item {
horizontalAlignment: Text.AlignRight
}
}
Timeline {
id: timeline
animations: [
TimelineAnimation {
id: timelineAnimation
pingPong: true
loops: -1
running: true
to: 1000
duration: 3000
from: 0
}
]
endFrame: 1000
enabled: true
startFrame: 0
KeyframeGroup {
target: dialFrame
property: "value"
Keyframe {
value: 100
frame: 0
}
Keyframe {
value: 80
frame: 600
}
Keyframe {
value: 200
frame: 865
}
Keyframe {
value: 180
frame: 1000
}
}
}
}
/*##^##
Designer {
D{i:0;formeditorColor:"#4c4e50"}D{i:1;anchors_height:200;anchors_width:200;anchors_x:-74;anchors_y:82;flowX:-213;flowY:177}
D{i:8;flowX:"-224";flowY:259}D{i:9;flowX:"-224";flowY:259}
D{i:0;formeditorColor:"#4c4e50"}D{i:1;anchors_height:200;anchors_width:200;anchors_x:"-74";anchors_y:82;flowX:"-213";flowY:177}
D{i:8;flowX:"-224";flowY:259;timeline_expanded:true}D{i:9;flowX:"-224";flowY:259}
D{i:15}
}
##^##*/