Implement a few more pages with dummies

This commit is contained in:
2024-07-07 22:19:11 +02:00
parent 1eeddb111c
commit 39fc8e5b7c
7 changed files with 641 additions and 266 deletions

View File

@@ -106,6 +106,7 @@ qt_add_qml_module(evcharger-app
SecurityPage.qml
SelectLogicModeItem.qml
SensorsConfigurationPage.qml
SetPriceLimitPage.qml
SettingsTabPage.qml
SwitchLanguagePage.qml
VerticalTabButton.qml

View File

@@ -16,10 +16,6 @@ StackView {
}
initialItem: ColumnLayout {
function backPressed() {
return false
}
ToolBar {
id: toolBar
@@ -159,9 +155,38 @@ StackView {
text: qsTr("Start")
}
ApiKeyValueHelper {
id: logicMode
deviceConnection: mainScreen.deviceConnection
apiKey: "lmo"
}
SelectLogicModeItem {
Layout.fillWidth: true
}
NavigationItem {
visible: logicMode.value == 4
iconSource: "material-icons/grid_guides.svg"
title: qsTr("Price limit")
description: qsTr("%0 ct/kWh").arg(0)
component: "SetPriceLimitPage.qml"
}
NavigationItem {
visible: logicMode.value == 5
iconSource: "material-icons/grid_guides.svg"
title: qsTr("Daily trip")
description: qsTr("By %0 with %1").arg("08:00").arg(qsTr("%0 km").arg(100))
component: "DailyTripPage.qml"
}
NavigationItem {
iconSource: "material-icons/grid_guides.svg"
title: qsTr("Charging speed")
description: qsTr("%0 Ampere & %1-phase").arg(0).arg(0)
component: "ChargingSpeedPage.qml"
}
}
}
}

View File

@@ -1,7 +1,118 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import EVChargerApp
StackView {
id: stackView
Item {
function backPressed() {
if (depth > 1) {
pop()
return true
}
return false
}
initialItem: NavigationPage {
title: qsTr("Eco")
NavigationItem {
iconSource: "material-icons/grid_guides.svg"
title: qsTr("Flexible energy tariff") // TODO show On Off
component: "FlexibleEnergyTariffPage.qml"
}
NavigationItem {
iconSource: "material-icons/grid_guides.svg"
title: qsTr("PV Surplus") // TODO show On Off
component: "PvSurplusPage.qml"
}
WhiteBox {
Layout.fillWidth: true
ColumnLayout {
anchors.fill: parent
Image {
Layout.fillWidth: true
Layout.preferredHeight: 50
source: "material-icons/grid_guides.svg"
fillMode: Image.PreserveAspectFit
}
Label {
Layout.fillWidth: true
font.pointSize: 20
font.bold: true
text: qsTr("About eco")
verticalAlignment: Text.AlignVCenter
}
RowLayout {
Layout.fillWidth: true
Image {
Layout.preferredWidth: 50
Layout.fillHeight: true
source: "material-icons/grid_guides.svg"
fillMode: Image.PreserveAspectFit
}
ColumnLayout {
Layout.fillWidth: true
Text {
Layout.fillWidth: true
font.bold: true
text: qsTr("Flexible energy tariff")
wrapMode: Text.Wrap
}
Text {
Layout.fillWidth: true
Layout.fillHeight: true
text: qsTr("We offer to charge your car during periods of low electricity price, If you have an electricity contract based on flexible energy tariffs.")
wrapMode: Text.Wrap
}
}
}
RowLayout {
Layout.fillWidth: true
Image {
Layout.preferredWidth: 50
Layout.fillHeight: true
source: "material-icons/grid_guides.svg"
fillMode: Image.PreserveAspectFit
}
ColumnLayout {
Layout.fillWidth: true
Text {
Layout.fillWidth: true
font.bold: true
text: qsTr("PV surplus energy")
wrapMode: Text.Wrap
}
Text {
Layout.fillWidth: true
Layout.fillHeight: true
text: qsTr("By connecting a PV system and a controller to your charger, you can charge your EV particularly cheaply and use clean energy at the same time.")
wrapMode: Text.Wrap
}
}
}
}
}
}
}

View File

@@ -9,12 +9,6 @@ WhiteBox {
RowLayout {
anchors.fill: parent
ApiKeyValueHelper {
id: logicMode
deviceConnection: mainScreen.deviceConnection
apiKey: "lmo"
}
SendMessageHelper {
id: valueChanger
deviceConnection: mainScreen.deviceConnection

42
SetPriceLimitPage.qml Normal file
View File

@@ -0,0 +1,42 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
NavigationPage {
title: qsTr("Set price limit")
Text {
Layout.fillWidth: true
text: qsTr("Set a proper price limit for charging, so charging starts when the electricity price is below this limit. Also, you can see the charging forecast chart below based on the limit that you define.")
wrapMode: Text.Wrap
}
ItemDelegate {
Layout.fillWidth: true
Component.onCompleted: {
background.color = "white"
background.radius = 5
}
contentItem: RowLayout {
Text {
text: qsTr("Price limit")
wrapMode: Text.Wrap
Layout.fillWidth: true
font.bold: true
}
Text {
text: qsTr("%0 ct/kWh").arg(0)
}
Text {
text: '>'
}
}
}
Item {
Layout.fillHeight: true
}
}

File diff suppressed because it is too large Load Diff

1
qmldir
View File

@@ -56,6 +56,7 @@ EVChargerApp 1.0 SchedulerPage.qml
EVChargerApp 1.0 SecurityPage.qml
EVChargerApp 1.0 SelectLogicModeItem.qml
EVChargerApp 1.0 SensorsConfigurationPage.qml
EVChargerApp 1.0 SetPriceLimitPage.qml
EVChargerApp 1.0 SettingsTabPage.qml
EVChargerApp 1.0 SwitchLanguagePage.qml
EVChargerApp 1.0 VerticalTabButton.qml