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