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/LightDevicePage.qml</file>
|
||||||
<file>ui/devicepages/FingerprintReaderDevicePage.qml</file>
|
<file>ui/devicepages/FingerprintReaderDevicePage.qml</file>
|
||||||
<file>ui/devicelistpages/GenericDeviceListPage.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/LightsDeviceListPage.qml</file>
|
||||||
<file>ui/devicelistpages/SensorsDeviceListPage.qml</file>
|
<file>ui/devicelistpages/SensorsDeviceListPage.qml</file>
|
||||||
<file>ui/devicelistpages/WeatherDeviceListPage.qml</file>
|
<file>ui/devicelistpages/WeatherDeviceListPage.qml</file>
|
||||||
@ -138,6 +143,5 @@
|
|||||||
<file>ui/system/MqttPolicyPage.qml</file>
|
<file>ui/system/MqttPolicyPage.qml</file>
|
||||||
<file>ui/devicepages/DeviceLogPage.qml</file>
|
<file>ui/devicepages/DeviceLogPage.qml</file>
|
||||||
<file>ui/components/Led.qml</file>
|
<file>ui/components/Led.qml</file>
|
||||||
<file>ui/devicelistpages/ClosablesDeviceListPage.qml</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@ -175,6 +175,7 @@ ApplicationWindow {
|
|||||||
return Qt.resolvedUrl("images/DeviceIconBlind.svg")
|
return Qt.resolvedUrl("images/DeviceIconBlind.svg")
|
||||||
case "garagegate":
|
case "garagegate":
|
||||||
return Qt.resolvedUrl("images/shutter/shutter-100.svg")
|
return Qt.resolvedUrl("images/shutter/shutter-100.svg")
|
||||||
|
case "awning":
|
||||||
case "extendedawning":
|
case "extendedawning":
|
||||||
return Qt.resolvedUrl("images/awning/awning-100.svg")
|
return Qt.resolvedUrl("images/awning/awning-100.svg")
|
||||||
case "battery":
|
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 {
|
DeviceListPageBase {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property string iconBasename
|
||||||
|
|
||||||
|
property bool invertControls: false
|
||||||
|
|
||||||
header: GuhHeader {
|
header: GuhHeader {
|
||||||
id: header
|
id: header
|
||||||
onBackPressed: pageStack.pop()
|
onBackPressed: pageStack.pop()
|
||||||
@ -82,8 +86,8 @@ DeviceListPageBase {
|
|||||||
? app.accentColor
|
? app.accentColor
|
||||||
: keyColor
|
: keyColor
|
||||||
name: itemDelegate.percentageStateType
|
name: itemDelegate.percentageStateType
|
||||||
? "../images/shutter/shutter-" + app.pad(Math.round(itemDelegate.percentageState.value / 10) * 10, 3) + ".svg"
|
? root.iconBasename + "-" + app.pad(Math.round(itemDelegate.percentageState.value / 10) * 10, 3) + ".svg"
|
||||||
: "../images/shutter/shutter-050.svg"
|
: root.iconBasename + "-050.svg"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,6 +105,7 @@ DeviceListPageBase {
|
|||||||
id: shutterControls
|
id: shutterControls
|
||||||
height: parent.height
|
height: parent.height
|
||||||
device: itemDelegate.device
|
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":
|
case "smartmeter":
|
||||||
page ="SmartMeterDeviceListPage.qml";
|
page ="SmartMeterDeviceListPage.qml";
|
||||||
break;
|
break;
|
||||||
case "awning":
|
|
||||||
case "blind":
|
|
||||||
case "shutter":
|
|
||||||
case "garagegate":
|
case "garagegate":
|
||||||
|
page = "GarageDeviceListPage.qml";
|
||||||
|
break;
|
||||||
|
case "awning":
|
||||||
case "extendedAwning":
|
case "extendedAwning":
|
||||||
|
page = "AwningDeviceListPage.qml";
|
||||||
|
break;
|
||||||
|
case "blind":
|
||||||
case "extendedBlind":
|
case "extendedBlind":
|
||||||
|
page = "ShutterDeviceListPage.qml";
|
||||||
|
break;
|
||||||
|
case "shutter":
|
||||||
case "extendedShutter":
|
case "extendedShutter":
|
||||||
page = "ClosablesDeviceListPage.qml";
|
page = "ShutterDeviceListPage.qml";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
page = "GenericDeviceListPage.qml"
|
page = "GenericDeviceListPage.qml"
|
||||||
|
|||||||
Reference in New Issue
Block a user