-
Notifications
You must be signed in to change notification settings - Fork 26
/
main.qml
107 lines (90 loc) · 2.02 KB
/
main.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import QtQuick 2.10
import QtQuick.Controls 2.3
import QtQuick.Controls.Material 2.3
import QtQuick.VirtualKeyboard 2.3
import QtPositioning 5.11
ApplicationWindow {
id: window
visible: true
width: 800
height: 480
title: qsTr("Tabs")
Material.theme: Material.Dark
Material.accent: Material.Indigo
Material.background: "black"
FontLoader
{
id: robotoLight
source: "./fonts/Roboto-Light.ttf"
}
FontLoader
{
id: awesome
source: "./fonts/fontawesome-webfont.ttf"
}
SwipeView {
id: swipeView
anchors.fill: parent
currentIndex: tabBar.currentIndex
onCurrentIndexChanged: {
// disable the swipe on map
if (currentIndex == 3) {
interactive = false
} else {
interactive = true
}
}
PageInfo {
}
PageData {
}
PageCam {
id: pageCam
}
CarMap {
}
}
footer: TabBar {
id: tabBar
currentIndex: swipeView.currentIndex
TabButton {
text: qsTr("Infos")
}
TabButton {
text: qsTr("Data")
}
TabButton {
text: qsTr("Cam")
}
TabButton {
text: qsTr("Map")
}
}
InputPanel {
id: inputPanel
z: 99
x: 0
y: window.height
width: window.width
states: State {
name: "visible"
when: inputPanel.active
PropertyChanges {
target: inputPanel
y: window.height - inputPanel.height
}
}
transitions: Transition {
from: ""
to: "visible"
reversible: true
ParallelAnimation {
NumberAnimation {
properties: "y"
duration: 250
easing.type: Easing.InOutQuad
}
}
}
}
}