Mercurial > ~darius > hgwebdir.cgi > OverviewJD
comparison OverviewMobile-to-JD.diff @ 0:57ffb39f29d4
First commit of new carousel page to allow battery charging current to
be adjusted.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 13 Dec 2021 23:05:38 +1030 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:57ffb39f29d4 |
---|---|
1 --- OverviewMobile.qml 2021-12-13 22:43:39.000000000 +1030 | |
2 +++ OverviewJD.qml 2021-12-13 22:43:19.000000000 +1030 | |
3 @@ -1,3 +1,4 @@ | |
4 +// Modified version of OverviewMobile.qml | |
5 import QtQuick 1.1 | |
6 import com.victron.velib 1.0 | |
7 import "utils.js" as Utils | |
8 @@ -26,7 +27,7 @@ | |
9 // Keeps track of which button on the bottom row is active | |
10 property int buttonIndex: 0 | |
11 | |
12 - title: qsTr("Mobile") | |
13 + title: qsTr("Java Drive") | |
14 | |
15 Component.onCompleted: discoverMulti() | |
16 | |
17 @@ -54,9 +55,23 @@ | |
18 values: [ | |
19 TileText { | |
20 text: sys.acInput.power.uiText | |
21 - font.pixelSize: 30 | |
22 + font.pixelSize: 25 | |
23 + }, | |
24 + TileText { | |
25 + property VBusItem inV1: VBusItem { bind: Utils.path(sys.vebusPrefix, "/Ac/ActiveIn/L1/V"); unit: "V" } | |
26 + text: inV1.format(1) | |
27 + font.pixelSize: 15 | |
28 + }, | |
29 + TileText { | |
30 + property VBusItem inI1: VBusItem { bind: Utils.path(sys.vebusPrefix, "/Ac/ActiveIn/L1/I"); unit: "A" } | |
31 + text: inI1.format(1) | |
32 + font.pixelSize: 15 | |
33 + }, | |
34 + TileText { | |
35 + property VBusItem inF1: VBusItem { bind: Utils.path(sys.vebusPrefix, "/Ac/ActiveIn/L1/F"); unit: "Hz" } | |
36 + text: inF1.format(0) | |
37 + font.pixelSize: 15 | |
38 } | |
39 - | |
40 ] | |
41 } | |
42 | |
43 @@ -68,7 +83,22 @@ | |
44 values: [ | |
45 TileText { | |
46 text: sys.acLoad.power.uiText | |
47 - font.pixelSize: 30 | |
48 + font.pixelSize: 25 | |
49 + }, | |
50 + TileText { | |
51 + property VBusItem outV1: VBusItem { bind: Utils.path(sys.vebusPrefix, "/Ac/Out/L1/V"); unit: "V" } | |
52 + text: outV1.format(1) | |
53 + font.pixelSize: 15 | |
54 + }, | |
55 + TileText { | |
56 + property VBusItem outI1: VBusItem { bind: Utils.path(sys.vebusPrefix, "/Ac/Out/L1/I"); unit: "A" } | |
57 + text: outI1.format(1) | |
58 + font.pixelSize: 15 | |
59 + }, | |
60 + TileText { | |
61 + property VBusItem outF1: VBusItem { bind: Utils.path(sys.vebusPrefix, "/Ac/Out/L1/F"); unit: "Hz" } | |
62 + text: outF1.format(0) | |
63 + font.pixelSize: 15 | |
64 } | |
65 ] | |
66 } | |
67 @@ -297,7 +327,7 @@ | |
68 } | |
69 | |
70 Keys.onRightPressed: { | |
71 - if (buttonIndex < (pumpButton.pumpEnabled ? 2 : 1)) | |
72 + if (buttonIndex < (pumpButton.pumpEnabled ? 3 : 2)) | |
73 buttonIndex++ | |
74 | |
75 event.accepted = true | |
76 @@ -486,10 +516,36 @@ | |
77 } | |
78 } | |
79 | |
80 + TileSpinBox { | |
81 + id: battCurrentButton | |
82 + | |
83 + anchors.bottom: parent.bottom | |
84 + anchors.left: acModeButton.right | |
85 + isCurrentItem: (buttonIndex == 2) | |
86 + focus: root.active && isCurrentItem | |
87 + | |
88 + bind: Utils.path(vebusPrefix, "/Dc/0/MaxChargeCurrent") | |
89 + title: qsTr("BAT CURR LIMIT") | |
90 + color: containsMouse && !editMode ? "#d3d3d3" : "#A8A8A8" | |
91 + width: 134 | |
92 + fontPixelSize: 14 | |
93 + unit: "A" | |
94 + readOnly: false | |
95 + editable: true | |
96 + buttonColor: "#979797" | |
97 + | |
98 + Keys.onSpacePressed: showErrorToast(event) | |
99 + | |
100 + function showErrorToast(event) { | |
101 + editIsAllowed() | |
102 + event.accepted = true | |
103 + } | |
104 + } | |
105 + | |
106 Tile { | |
107 id: pumpButton | |
108 | |
109 - anchors.left: acModeButton.right | |
110 + anchors.left: battCurrentButton.right | |
111 anchors.bottom: parent.bottom | |
112 | |
113 property variant texts: [ qsTr("AUTO"), qsTr("ON"), qsTr("OFF")] | |
114 @@ -498,7 +554,7 @@ | |
115 property bool pumpEnabled: pumpRelay.value === 3 | |
116 | |
117 show: pumpEnabled | |
118 - isCurrentItem: (buttonIndex == 2) | |
119 + isCurrentItem: (buttonIndex == 3) | |
120 focus: root.active && isCurrentItem | |
121 | |
122 title: qsTr("PUMP") |