-
Notifications
You must be signed in to change notification settings - Fork 4
/
SolarPanelTodayScreen.qml
82 lines (68 loc) · 1.87 KB
/
SolarPanelTodayScreen.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
import QtQuick 2.1
import BasicUIControls 1.0
import qb.components 1.0
Screen {
id: solarPanelTodayScreen
property bool yesterday : false
onShown: {
}
////////////////////////////////////////////////////DAY//////////////////////////////////////////////
SolarBarGraph {
id: todaybarGraph
anchors {
bottom: parent.bottom
bottomMargin: isNxt? 40:32
left : parent.left
leftMargin : isNxt? 10:8
}
height: isNxt? parent.height-50 : parent.height-40
width: isNxt? parent.width - 40 : parent.width - 32
isAreaGraph : true
hourGridColor: "red"
titleText: yesterday? "Gisteren in Watt" : "Vandaag in Watt"
titleFont: qfont.bold.name
titleSize: isNxt ? 20 : 16
showTitle: true
backgroundcolor : "lightgrey"
axisColor : "black"
barColor : "blue"
lineXaxisvisible : true
textXaxisColor : "red"
stepXtext: 3
valueFont: qfont.regular.name
valueSize: isNxt ? 16 : 12
valueTextColor : "black"
showValuesOnBar : false
levelColor :"red"
levelTextColor : "blue"
showLevels : true
showValuesOnLevel : true
showSpecialBar : false
dataValues: yesterday? app.yesterday : app.fiveminuteValues
isStacked : true
specialBarColor2 :"green"
specialBarIndex2 : 0
showSpecialBar2 : false
barColor2 : "yellow"
dataValues2: yesterday? app.yesterdayProd : app.fiveminuteValuesProd
}
NewTextLabel {
id: selText
width: isNxt ? 120 : 96
height: isNxt ? 40:32
buttonActiveColor: "lightgreen"
buttonHoverColor: "blue"
enabled : true
textColor : "black"
buttonText: yesterday? "Vandaag" : "Gisteren"
anchors {
bottom: todaybarGraph.top
bottomMargin: isNxt? -30:-25
left : todaybarGraph.left
leftMargin : yesterday? todaybarGraph.width - width : isNxt ? 30 : 25
}
onClicked: {
yesterday = !yesterday
}
}
}