diff --git a/AboutPage.qml b/AboutPage.qml index ea8ad82..001c0ce 100644 --- a/AboutPage.qml +++ b/AboutPage.qml @@ -8,16 +8,25 @@ NavigationPage { NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Firmware") - component: "FirmwarePage.qml" + component: Component { + FirmwarePage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Hardware information") - component: "HardwareInformationPage.qml" + component: Component { + HardwareInformationPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Licenses") - component: "LicensesPage.qml" + component: Component { + LicensesPage { + } + } } } diff --git a/ChargerTabPage.qml b/ChargerTabPage.qml index cdc765e..a2c0fad 100644 --- a/ChargerTabPage.qml +++ b/ChargerTabPage.qml @@ -201,7 +201,10 @@ AnimatedStackView { iconSource: "material-icons/grid_guides.svg" title: qsTr("Price limit") description: qsTr("%0 ct/kWh").arg(Qt.locale().toString(priceLimitHelper.value, 'f', 1)) - component: "SetPriceLimitPage.qml" + component: Component { + SetPriceLimitPage { + } + } } NavigationItem { @@ -209,7 +212,10 @@ AnimatedStackView { 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" + component: Component { + DailyTripPage { + } + } } ApiKeyValueHelper { @@ -238,7 +244,10 @@ AnimatedStackView { case 3: return qsTr("Unknown phase selection (%0)").arg(phaseSwitchMode.value); } })()) - component: "ChargingSpeedPage.qml" + component: Component { + ChargingSpeedPage { + } + } } } } diff --git a/ChargingConfigurationPage.qml b/ChargingConfigurationPage.qml index 0f2d624..3102525 100644 --- a/ChargingConfigurationPage.qml +++ b/ChargingConfigurationPage.qml @@ -8,46 +8,73 @@ NavigationPage { NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Charging Speed") - component: "ChargingSpeedPage.qml" + component: Component { + ChargingSpeedPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("kWh Limit") - component: "KwhLimitPage.qml" + component: Component { + KwhLimitPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Daily Trip") - component: "DailyTripPage.qml" + component: Component { + DailyTripPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Flexible energy tariff") - component: "FlexibleEnergyTariffPage.qml" + component: Component { + FlexibleEnergyTariffPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("PV Surplus") - component: "PvSurplusPage.qml" + component: Component { + PvSurplusPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Load Balancing") - component: "LoadBalancingPage.qml" + component: Component { + LoadBalancingPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Scheduler") - component: "SchedulerPage.qml" + component: Component { + SchedulerPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Current Levels") - component: "CurrentLevelsPage.qml" + component: Component { + CurrentLevelsPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Car") - component: "CarPage.qml" + component: Component { + CarPage { + } + } } } diff --git a/ConnectionPage.qml b/ConnectionPage.qml index fae20a9..52f9b36 100644 --- a/ConnectionPage.qml +++ b/ConnectionPage.qml @@ -9,55 +9,79 @@ NavigationPage { NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Wi-Fi") - component: "WiFiPage.qml" + component: Component { + WiFiPage { + } + } visible: wifiStaApiKeyValueHelper.exists } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Cellular") - component: "CellularPage.qml" + component: Component { + CellularPage { + } + } visible: cellularApiKeyValueHelper.exists } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Hotspot") - component: "HotspotPage.qml" + component: Component { + HotspotPage { + } + } visible: wifiApApiKeyValueHelper.exists } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Ethernet") - component: "EthernetPage.qml" + component: Component { + EthernetPage { + } + } visible: ethernetApiKeyValueHelper.exists } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Cloud") - component: "CloudPage.qml" + component: Component { + CloudPage { + } + } visible: cloudApiKeyValueHelper.exists } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("OCPP") - component: "OcppPage.qml" + component: Component { + OcppPage { + } + } visible: ocppApiKeyValueHelper.exists } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("MQTT") - component: "MqttPage.qml" + component: Component { + MqttPage { + } + } visible: mqttApiKeyValueHelper.exists } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("API Settings") - component: "ApiSettingsPage.qml" + component: Component { + ApiSettingsPage { + } + } } } diff --git a/EcoTabPage.qml b/EcoTabPage.qml index 7107eef..b640ada 100644 --- a/EcoTabPage.qml +++ b/EcoTabPage.qml @@ -21,13 +21,19 @@ AnimatedStackView { NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Flexible energy tariff") // TODO show On Off - component: "FlexibleEnergyTariffPage.qml" + component: Component { + FlexibleEnergyTariffPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("PV Surplus") // TODO show On Off - component: "PvSurplusPage.qml" + component: Component { + PvSurplusPage { + } + } } WhiteBox { diff --git a/FlexibleEnergyTariffPage.qml b/FlexibleEnergyTariffPage.qml index 638cef3..bb4dd11 100644 --- a/FlexibleEnergyTariffPage.qml +++ b/FlexibleEnergyTariffPage.qml @@ -27,6 +27,9 @@ NavigationPage { iconSource: "material-icons/grid_guides.svg" title: qsTr("Price limit") description: qsTr("%0 ct/kWh").arg(Qt.locale().toString(priceLimitHelper.value, 'f', 1)) - component: "SetPriceLimitPage.qml" + component: Component { + SetPriceLimitPage { + } + } } } diff --git a/GeneralPage.qml b/GeneralPage.qml index cb48029..aac1da1 100644 --- a/GeneralPage.qml +++ b/GeneralPage.qml @@ -8,44 +8,68 @@ NavigationPage { NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Name") - component: "NamePage.qml" + component: Component { + NamePage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Switch Language") - component: "SwitchLanguagePage.qml" + component: Component { + SwitchLanguagePage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Notifications") - component: "NotificationsPage.qml" + component: Component { + NotificationsPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Date and time") - component: "DateAndTimePage.qml" + component: Component { + DateAndTimePage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("LED") - component: "LedPage.qml" + component: Component { + LedPage { + } + } visible: ledApiKeyValueHelper.exists } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Controller") - component: "ControllerPage.qml" + component: Component { + ControllerPage { + } + } visible: controllerApiKeyValueHelper.exists } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Display settings") - component: "DisplaySettingsPage.qml" + component: Component { + DisplaySettingsPage { + } + } visible: displayApiKeyValueHelper.exists } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Reboot") - component: "RebootPage.qml" + component: Component { + RebootPage { + } + } } } diff --git a/NavigationItem.qml b/NavigationItem.qml index 933dc83..9870045 100644 --- a/NavigationItem.qml +++ b/NavigationItem.qml @@ -8,7 +8,7 @@ WhiteItemDelegate { property alias iconSource: icon.source property alias title: titleText.text property string description - property string component + property Component component Layout.fillWidth: true diff --git a/SchedulerDayPage.qml b/SchedulerDayPage.qml index 27d9274..621af6c 100644 --- a/SchedulerDayPage.qml +++ b/SchedulerDayPage.qml @@ -5,6 +5,8 @@ import QtQuick.Layouts NavigationPage { title: qsTr("Scheduler day") + property int day + TimeComponentLabel { id: openDialogLabel width: parent.width - 80 diff --git a/SchedulerPage.qml b/SchedulerPage.qml index 43b4f73..479ecef 100644 --- a/SchedulerPage.qml +++ b/SchedulerPage.qml @@ -108,8 +108,11 @@ NavigationPage { SimpleNavigationItem { text: qsTr("Create workdays schedule") color: "blue" - component: "SchedulerDayPage.qml" - componentArgs: { day: 0 } + component: Component { + SchedulerDayPage { + day: 0 + } + } } Text { @@ -122,8 +125,11 @@ NavigationPage { SimpleNavigationItem { text: qsTr("Create saturdays schedule") color: "blue" - component: "SchedulerDayPage.qml" - componentArgs: { day: 1 } + component: Component { + SchedulerDayPage { + day: 1 + } + } } Text { @@ -136,7 +142,10 @@ NavigationPage { SimpleNavigationItem { text: qsTr("Create sundays schedule") color: "blue" - component: "SchedulerDayPage.qml" - componentArgs: { day: 2 } + component: Component { + SchedulerDayPage { + day: 2 + } + } } } diff --git a/SecurityPage.qml b/SecurityPage.qml index 260731f..5d8001b 100644 --- a/SecurityPage.qml +++ b/SecurityPage.qml @@ -8,26 +8,41 @@ NavigationPage { NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Cable") - component: "CablePage.qml" + component: Component { + CablePage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Access") - component: "AccessPage.qml" + component: Component { + AccessPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Password") - component: "PasswordPage.qml" + component: Component { + PasswordPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Grid") - component: "GridPage.qml" + component: Component { + GridPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" title: qsTr("Ground check") - component: "GroundCheckPage.qml" + component: Component { + GroundCheckPage { + } + } } } diff --git a/SettingsTabPage.qml b/SettingsTabPage.qml index 4496dbf..3eb8663 100644 --- a/SettingsTabPage.qml +++ b/SettingsTabPage.qml @@ -28,7 +28,10 @@ AnimatedStackView { qsTr("Flexible energy tariff"), qsTr("PV Surplus") ].join(" • ") - component: "ChargingConfigurationPage.qml" + component: Component { + ChargingConfigurationPage { + } + } visible: carApiKeyHelper.exists } NavigationItem { @@ -41,7 +44,10 @@ AnimatedStackView { qsTr("Grid"), qsTr("Ground check") ].join(" • ") - component: "SecurityPage.qml" + component: Component { + SecurityPage { + } + } visible: carApiKeyHelper.exists } NavigationItem { @@ -51,7 +57,10 @@ AnimatedStackView { qsTr("Sensors"), qsTr("Categories") ].join(" • ") - component: "SensorsConfigurationPage.qml" + component: Component { + SensorsConfigurationPage { + } + } visible: controllerApiKeyHelper.exists } NavigationItem { @@ -103,7 +112,10 @@ AnimatedStackView { mqttApiKeyValueHelper.exists ? qsTr("MQTT") : null, qsTr("API Settings") ].filter(Boolean).join(" • ") - component: "ConnectionPage.qml" + component: Component { + ConnectionPage { + } + } } NavigationItem { ApiKeyValueHelper { @@ -133,7 +145,10 @@ AnimatedStackView { controllerApiKeyValueHelper.exists ? qsTr("Controller") : null, displayApiKeyValueHelper.exists ? qsTr("Display settings") : null ].filter(Boolean).join(" • ") - component: "GeneralPage.qml" + component: Component { + GeneralPage { + } + } } NavigationItem { iconSource: "material-icons/grid_guides.svg" @@ -143,7 +158,10 @@ AnimatedStackView { qsTr("Hardware information"), qsTr("Licenses") ].join(" • ") - component: "AboutPage.qml" + component: Component { + AboutPage { + } + } } } } diff --git a/SimpleNavigationItem.qml b/SimpleNavigationItem.qml index d24f12f..720ed45 100644 --- a/SimpleNavigationItem.qml +++ b/SimpleNavigationItem.qml @@ -6,7 +6,7 @@ WhiteItemDelegate { id: navigationItem property color color - property string component + property Component component property var componentArgs: undefined Layout.fillWidth: true @@ -15,5 +15,5 @@ WhiteItemDelegate { contentItem.children[0].color = navigationItem.color } - onClicked: stackView.push(navigationItem.component, navigationItem.componentArgs) + onClicked: stackView.push(navigationItem.component) } diff --git a/i18n/qml_de.ts b/i18n/qml_de.ts index ef1b107..724a625 100644 --- a/i18n/qml_de.ts +++ b/i18n/qml_de.ts @@ -16,14 +16,14 @@ Firmware - - + + Hardware information Hardwareinformationen - - + + Licenses Lizenzen @@ -503,56 +503,56 @@ %0 ct/kWh - - + + By %0 with %1 Bis %0 mit %1 - - + + %0 km %0 km - - + + Charging speed Ladegeschwindigkeit - - + + %0 & %1 %0 & %1 - - + + %0 Ampere %0 Ampere - - + + Automatic phase selection Automatische Phasenwahl - - + + 1-phase 1-phasig - - + + 3-phase 3-phasig - - + + Unknown phase selection (%0) Unbekannte Phasen Selektion (%0) @@ -569,8 +569,8 @@ Start - - + + Daily trip Daily trip @@ -590,50 +590,50 @@ Ladegeschwindigkeit - - + + kWh Limit kWh Limit - - + + Daily Trip Daily Trip - - + + Flexible energy tariff Flexibler Energietarif - - + + PV Surplus PV-Überschuss - - + + Load Balancing Lastmanagement - - + + Scheduler Ladetimer - - + + Current Levels Strompegel - - + + Car Auto @@ -794,44 +794,44 @@ WLAN - - + + Cellular Mobilfunk - - + + Hotspot Hotspot - - + + Ethernet Ethernet - - + + OCPP OCPP - - + + Cloud Cloud - - + + MQTT MQTT - - + + API Settings API Einstellungen @@ -1324,39 +1324,39 @@ - + - + Flexible energy tariff Flexibler Energietarif - - + + PV Surplus PV-Überschuss - - + + About eco Über Eco - - + + We offer to charge your car during periods of low electricity price, If you have an electricity contract based on flexible energy tariffs. Du kannst dein Auto in Zeiten niedriger Strompreise aufladen, sofern du einen Stromvertrag mit flexiblen Tarifen hast. - - + + PV surplus energy PV-Überschuss - - + + 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. Wenn du eine PV-Anlage und einen Controller an deinen Charger anschließt, kannst du dein Elektroauto besonders günstig aufladen und gleichzeitig grüne Energie nutzen. @@ -1511,44 +1511,44 @@ Name - - + + Switch Language Sprache ändern - - + + Notifications Benachrichtigungen - - + + Date and time Datum und Uhrzeit - - + + LED LED - - + + Controller Controller - - + + Display settings Display - - + + Reboot Neustart @@ -2118,8 +2118,8 @@ Ladetimer Tag - - + + 24 Hour 24 Stunden @@ -2181,26 +2181,26 @@ Wochentags-Ladetimer erstellen - - + + Saturdays Samstags - - + + Create saturdays schedule Samstags-Ladetimer erstellen - - + + Sundays Sonntags - - + + Create sundays schedule Sonntags-Ladetimer erstellen @@ -2240,26 +2240,26 @@ Kabel - - + + Access Zugangskontrolle - - + + Password Passwort - - + + Grid Netz - - + + Ground check Erdungsprüfung @@ -2419,152 +2419,152 @@ PV-Überschuss - - + + Cable Kabel - - + + Access Zugangskontrolle - - + + Password Passwort - - + + Grid Netz - - + + Ground check Erdungsprüfung - - + + Sensors Sensoren - - + + Categories Kategorien - - + + Wi-Fi WLAN - - + + Cellular Mobilfunk - - + + Hotspot Hotspot - - + + Ethernet Ethernet - - + + OCPP OCPP - - + + Cloud Cloud - - + + MQTT MQTT - - + + API Settings API Einstellungen - - + + Name Name - - + + Switch Language Sprache ändern - - + + Notifications Benachrichtigungen - - + + Date and time Datum und Uhrzeit - - + + LED LED - - + + Controller Controller - - + + Display settings Display - - + + Firmware Firmware - - + + Hardware information Hardwareinformationen - - + + Licenses Lizenzen @@ -2573,8 +2573,8 @@ Ladegeschwindigkeit • kWh Limit • Daily Trip • Flexibler Energietraif • PV Überschussladen - - + + Security Sicherheit @@ -2583,8 +2583,8 @@ Kabel • Zugangskontrolle • Passwort • Netz • Erdungsprüfung - - + + Sensors Configuration Sensorkonfiguration @@ -2593,8 +2593,8 @@ Sensoren • Kategorien - - + + Connection Verbindung @@ -2603,8 +2603,8 @@ WLAN • Hotspot • OCPP • API Einstellungen - - + + General Allgemein @@ -2613,8 +2613,8 @@ Name • Sprache ändern • Benachrichtigungen • Datum und Uhrzeit • LED • Controller - - + + About Über