Improve closable list pages
This commit is contained in:
parent
85d68b562d
commit
c5703bb10b
@ -78,6 +78,11 @@
|
||||
<file>ui/devicepages/LightDevicePage.qml</file>
|
||||
<file>ui/devicepages/FingerprintReaderDevicePage.qml</file>
|
||||
<file>ui/devicelistpages/GenericDeviceListPage.qml</file>
|
||||
<file>ui/devicelistpages/ClosablesDeviceListPage.qml</file>
|
||||
<file>ui/devicelistpages/GarageDeviceListPage.qml</file>
|
||||
<file>ui/devicelistpages/AwningDeviceListPage.qml</file>
|
||||
<file>ui/devicelistpages/ShutterDeviceListPage.qml</file>
|
||||
<file>ui/devicelistpages/BlindDeviceListPage.qml</file>
|
||||
<file>ui/devicelistpages/LightsDeviceListPage.qml</file>
|
||||
<file>ui/devicelistpages/SensorsDeviceListPage.qml</file>
|
||||
<file>ui/devicelistpages/WeatherDeviceListPage.qml</file>
|
||||
@ -138,6 +143,5 @@
|
||||
<file>ui/system/MqttPolicyPage.qml</file>
|
||||
<file>ui/devicepages/DeviceLogPage.qml</file>
|
||||
<file>ui/components/Led.qml</file>
|
||||
<file>ui/devicelistpages/ClosablesDeviceListPage.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@ -175,6 +175,7 @@ ApplicationWindow {
|
||||
return Qt.resolvedUrl("images/DeviceIconBlind.svg")
|
||||
case "garagegate":
|
||||
return Qt.resolvedUrl("images/shutter/shutter-100.svg")
|
||||
case "awning":
|
||||
case "extendedawning":
|
||||
return Qt.resolvedUrl("images/awning/awning-100.svg")
|
||||
case "battery":
|
||||
|
||||
7
nymea-app/ui/devicelistpages/AwningDeviceListPage.qml
Normal file
7
nymea-app/ui/devicelistpages/AwningDeviceListPage.qml
Normal file
@ -0,0 +1,7 @@
|
||||
import QtQuick 2.9
|
||||
|
||||
ClosablesDeviceListPage {
|
||||
title: qsTr("Awnings")
|
||||
iconBasename: "../images/awning/awning"
|
||||
invertControls: true
|
||||
}
|
||||
6
nymea-app/ui/devicelistpages/BlindDeviceListPage.qml
Normal file
6
nymea-app/ui/devicelistpages/BlindDeviceListPage.qml
Normal file
@ -0,0 +1,6 @@
|
||||
import QtQuick 2.9
|
||||
|
||||
ClosablesDeviceListPage {
|
||||
title: qsTr("Blinds")
|
||||
iconBasename: "../images/shutter/shutter"
|
||||
}
|
||||
@ -9,6 +9,10 @@ import "../components"
|
||||
DeviceListPageBase {
|
||||
id: root
|
||||
|
||||
property string iconBasename
|
||||
|
||||
property bool invertControls: false
|
||||
|
||||
header: GuhHeader {
|
||||
id: header
|
||||
onBackPressed: pageStack.pop()
|
||||
@ -82,8 +86,8 @@ DeviceListPageBase {
|
||||
? app.accentColor
|
||||
: keyColor
|
||||
name: itemDelegate.percentageStateType
|
||||
? "../images/shutter/shutter-" + app.pad(Math.round(itemDelegate.percentageState.value / 10) * 10, 3) + ".svg"
|
||||
: "../images/shutter/shutter-050.svg"
|
||||
? root.iconBasename + "-" + app.pad(Math.round(itemDelegate.percentageState.value / 10) * 10, 3) + ".svg"
|
||||
: root.iconBasename + "-050.svg"
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,6 +105,7 @@ DeviceListPageBase {
|
||||
id: shutterControls
|
||||
height: parent.height
|
||||
device: itemDelegate.device
|
||||
invert: root.invertControls
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
6
nymea-app/ui/devicelistpages/GarageDeviceListPage.qml
Normal file
6
nymea-app/ui/devicelistpages/GarageDeviceListPage.qml
Normal file
@ -0,0 +1,6 @@
|
||||
import QtQuick 2.9
|
||||
|
||||
ClosablesDeviceListPage {
|
||||
title: qsTr("Garage gates")
|
||||
iconBasename: "../images/shutter/shutter"
|
||||
}
|
||||
6
nymea-app/ui/devicelistpages/ShutterDeviceListPage.qml
Normal file
6
nymea-app/ui/devicelistpages/ShutterDeviceListPage.qml
Normal file
@ -0,0 +1,6 @@
|
||||
import QtQuick 2.9
|
||||
|
||||
ClosablesDeviceListPage {
|
||||
title: qsTr("Shutters")
|
||||
iconBasename: "../images/shutter/shutter"
|
||||
}
|
||||
@ -28,14 +28,20 @@ MainPageTile {
|
||||
case "smartmeter":
|
||||
page ="SmartMeterDeviceListPage.qml";
|
||||
break;
|
||||
case "awning":
|
||||
case "blind":
|
||||
case "shutter":
|
||||
case "garagegate":
|
||||
page = "GarageDeviceListPage.qml";
|
||||
break;
|
||||
case "awning":
|
||||
case "extendedAwning":
|
||||
page = "AwningDeviceListPage.qml";
|
||||
break;
|
||||
case "blind":
|
||||
case "extendedBlind":
|
||||
page = "ShutterDeviceListPage.qml";
|
||||
break;
|
||||
case "shutter":
|
||||
case "extendedShutter":
|
||||
page = "ClosablesDeviceListPage.qml";
|
||||
page = "ShutterDeviceListPage.qml";
|
||||
break;
|
||||
default:
|
||||
page = "GenericDeviceListPage.qml"
|
||||
|
||||
Reference in New Issue
Block a user