-
Notifications
You must be signed in to change notification settings - Fork 4
/
SolarPanelMonthScreen.qml
77 lines (65 loc) · 1.77 KB
/
SolarPanelMonthScreen.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
import QtQuick 2.1
import BasicUIControls 1.0
import qb.components 1.0
Screen {
id: solarPanelMonthScreen
property int monthnumber
property bool prevYear : false
onShown: {
var d = new Date()
monthnumber = parseInt(Qt.formatDate (d,"M"))
}
////////////////////////////////////////////////////DAY//////////////////////////////////////////////
SolarBarGraph {
id: monthbarGraph
anchors {
bottom: parent.bottom
bottomMargin: isNxt? 40:32
left : parent.left
leftMargin : isNxt? 10:8
}
height: isNxt? parent.height-50:parent.height-50
width: isNxt? parent.width - 40:parent.width - 40
titleText: prevYear? "Vorig jaar in kWh" : "Dit jaar in kWh"
titleFont: qfont.bold.name
titleSize: isNxt ? 20 : 16
showTitle: true
backgroundcolor : "lightgrey"
axisColor : "black"
barColor : "blue"
lineXaxisvisible : true
textXaxisColor : "red"
stepXtext: 1
valueFont: qfont.regular.name
valueSize: isNxt ? 16 : 12
valueTextColor : "black"
showValuesOnBar : true
levelColor :"red"
levelTextColor : "blue"
showLevels : true
showValuesOnLevel : true
specialBarColor :"red"
specialBarIndex : monthnumber
showSpecialBar : true
dataValues: prevYear? app.prevYearMonthValues: app.monthValues
}
NewTextLabel {
id: selText
width: isNxt ? 200 : 160
height: isNxt ? 40:32
buttonActiveColor: "lightgreen"
buttonHoverColor: "blue"
enabled : true
textColor : "black"
buttonText: prevYear? "Dit jaar" : "Vorig jaar"
anchors {
bottom: monthbarGraph.top
bottomMargin: isNxt? -30:-25
left : monthbarGraph.left
leftMargin : prevYear? monthbarGraph.width - width : isNxt ? 30 : 25
}
onClicked: {
prevYear = !prevYear
}
}
}