Rework main menu
This commit is contained in:
parent
edc1fb357f
commit
7c4c73a9a5
@ -31,7 +31,6 @@
|
||||
<file>ui/components/ErrorDialog.qml</file>
|
||||
<file>ui/components/ShutterControls.qml</file>
|
||||
<file>ui/components/MeaDialog.qml</file>
|
||||
<file>ui/components/NymeaListItemDelegate.qml</file>
|
||||
<file>ui/components/MainPageTabButton.qml</file>
|
||||
<file>ui/components/AutoSizeMenu.qml</file>
|
||||
<file>ui/components/EmptyViewPlaceholder.qml</file>
|
||||
@ -230,5 +229,7 @@
|
||||
<file>ui/system/ZigbeeNetworkPage.qml</file>
|
||||
<file>ui/system/ZigbeeNetworkInfoPage.qml</file>
|
||||
<file>ui/MainMenu.qml</file>
|
||||
<file>ui/components/NymeaItemDelegate.qml</file>
|
||||
<file>ui/components/NymeaSwipeDelegate.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@ -5317,7 +5317,7 @@ Möchtest Du fortfahren?</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>NymeaListItemDelegate</name>
|
||||
<name>NymeaSwipeDelegate</name>
|
||||
<message>
|
||||
<source>Delete</source>
|
||||
<translation>Löschen</translation>
|
||||
|
||||
@ -4121,7 +4121,7 @@ Please try again.</source>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>NymeaListItemDelegate</name>
|
||||
<name>NymeaSwipeDelegate</name>
|
||||
<message>
|
||||
<source>Delete</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@ -4121,7 +4121,7 @@ Please try again.</source>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>NymeaListItemDelegate</name>
|
||||
<name>NymeaSwipeDelegate</name>
|
||||
<message>
|
||||
<source>Delete</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@ -4130,7 +4130,7 @@ Please try again.</source>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>NymeaListItemDelegate</name>
|
||||
<name>NymeaSwipeDelegate</name>
|
||||
<message>
|
||||
<source>Delete</source>
|
||||
<translation></translation>
|
||||
|
||||
@ -4450,7 +4450,7 @@ Please try again.</source>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>NymeaListItemDelegate</name>
|
||||
<name>NymeaSwipeDelegate</name>
|
||||
<message>
|
||||
<source>Delete</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@ -137,7 +137,7 @@ Page {
|
||||
id: rulesProxy
|
||||
rules: engine.ruleManager.rules
|
||||
}
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
id: ruleDelegate
|
||||
width: parent.width
|
||||
iconName: "../images/" + (model.executable ? (iconTag.value.length > 0 ? iconTag.value : "slideshow") : "magic") + ".svg"
|
||||
|
||||
@ -4,10 +4,8 @@ import QtQuick.Layouts 1.1
|
||||
import "components"
|
||||
import Nymea 1.0
|
||||
|
||||
Rectangle {
|
||||
Drawer {
|
||||
id: root
|
||||
visible: !Qt.colorEqual(color, "transparent")
|
||||
property bool shown: false
|
||||
|
||||
property Engine currentEngine: null
|
||||
|
||||
@ -16,156 +14,185 @@ Rectangle {
|
||||
signal openAppSettings();
|
||||
signal openSystemSettings();
|
||||
|
||||
function show() {
|
||||
shown = true;
|
||||
}
|
||||
function hide() {
|
||||
shown = false;
|
||||
signal startWirelessSetup();
|
||||
signal startManualConnection();
|
||||
signal startDemoMode();
|
||||
|
||||
background: Rectangle {
|
||||
color: app.backgroundColor
|
||||
}
|
||||
|
||||
color: root.shown ? "#88000000" : "transparent"
|
||||
Behavior on color { ColorAnimation { duration: 200 } }
|
||||
|
||||
MouseArea {
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
onClicked: root.hide()
|
||||
hoverEnabled: true
|
||||
}
|
||||
spacing: 0
|
||||
|
||||
Pane {
|
||||
anchors { top: parent.top; bottom: parent.bottom; left: parent.left }
|
||||
width: Math.min(root.width, 300)
|
||||
anchors.leftMargin: root.shown ? 0 : -width
|
||||
Behavior on anchors.leftMargin { NumberAnimation { duration: 200; easing.type: Easing.InOutQuad } }
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: topSectionLayout.implicitHeight + app.margins * 2
|
||||
color: Qt.tint(app.backgroundColor, Qt.rgba(app.foregroundColor.r, app.foregroundColor.g, app.foregroundColor.b, 0.05))
|
||||
ColumnLayout {
|
||||
id: topSectionLayout
|
||||
anchors { left: parent.left; top: parent.top; right: parent.right; margins: app.margins }
|
||||
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
rightPadding: 0
|
||||
bottomPadding: 0
|
||||
Image {
|
||||
Layout.preferredHeight: app.hugeIconSize
|
||||
Layout.preferredWidth: height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
source: "qrc:/styles/%1/logo.svg".arg(styleController.currentStyle)
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: Qt.openUrlExternally("https://nymea.io")
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors { left: parent.left; top: parent.top; right: parent.right }
|
||||
spacing: 0
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: topSectionLayout.implicitHeight + app.margins * 2
|
||||
color: Qt.tint(app.backgroundColor, Qt.rgba(app.foregroundColor.r, app.foregroundColor.g, app.foregroundColor.b, 0.05))
|
||||
ColumnLayout {
|
||||
id: topSectionLayout
|
||||
anchors { left: parent.left; top: parent.top; right: parent.right; margins: app.margins }
|
||||
|
||||
RowLayout {
|
||||
Image {
|
||||
Layout.preferredHeight: app.hugeIconSize
|
||||
Layout.preferredWidth: height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
|
||||
source: "qrc:/styles/%1/logo.svg".arg(styleController.currentStyle)
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
RowLayout {
|
||||
ColumnLayout {
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost ? root.currentEngine.jsonRpcClient.currentHost.name : app.systemName
|
||||
}
|
||||
ColorIcon {
|
||||
Layout.preferredHeight: app.iconSize
|
||||
Layout.preferredWidth: app.iconSize
|
||||
name: {
|
||||
if (root.currentEngine === null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
switch (root.currentEngine.jsonRpcClient.currentConnection.bearerType) {
|
||||
case Connection.BearerTypeLan:
|
||||
case Connection.BearerTypeWan:
|
||||
if (root.currentEngine.jsonRpcClient.availableBearerTypes & NymeaConnection.BearerTypeEthernet != NymeaConnection.BearerTypeNone) {
|
||||
return "../images/connections/network-wired.svg"
|
||||
}
|
||||
return "../images/connections/network-wifi.svg";
|
||||
case Connection.BearerTypeBluetooth:
|
||||
return "../images/connections/network-wifi.svg";
|
||||
case Connection.BearerTypeCloud:
|
||||
return "../images/connections/cloud.svg"
|
||||
case Connection.BearerTypeLoopback:
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: root.currentEngine.jsonRpcClient.currentConnection.url
|
||||
font.pixelSize: app.extraSmallFont
|
||||
enabled: false
|
||||
visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: root.currentEngine.jsonRpcClient.currentHost.name
|
||||
ProgressButton {
|
||||
longpressEnabled: false
|
||||
imageSource: "../images/close.svg"
|
||||
visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost
|
||||
onClicked: {
|
||||
root.currentEngine.jsonRpcClient.disconnectFromHost();
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: root.currentEngine.jsonRpcClient.currentConnection.url
|
||||
font.pixelSize: app.smallFont
|
||||
enabled: false
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
SettingsPageSectionHeader {
|
||||
text: qsTr("Configuration")
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Configure things")
|
||||
iconName: "../images/things.svg"
|
||||
visible: root.currentEngine != null
|
||||
progressive: false
|
||||
onClicked: {
|
||||
root.openThingSettings()
|
||||
root.hide();
|
||||
}
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Magic")
|
||||
iconName: "../images/magic.svg"
|
||||
progressive: false
|
||||
visible: root.currentEngine != null
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("App settings")
|
||||
iconName: "../images/stock_application.svg"
|
||||
progressive: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("System settings")
|
||||
iconName: "../images/settings.svg"
|
||||
progressive: false
|
||||
visible: root.currentEngine != null
|
||||
}
|
||||
SettingsPageSectionHeader {
|
||||
text: qsTr("Community")
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Forum")
|
||||
iconName: "../images/discourse.svg"
|
||||
progressive: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Telegram")
|
||||
iconName: "../images/telegram.svg"
|
||||
progressive: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Twitter")
|
||||
iconName: "../images/twitter.svg"
|
||||
progressive: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Flickable {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
contentHeight: contentColumn.implicitHeight
|
||||
interactive: contentHeight > height
|
||||
clip: true
|
||||
|
||||
ScrollBar.vertical: ScrollBar {}
|
||||
|
||||
ColumnLayout {
|
||||
id: contentColumn
|
||||
width: parent.width
|
||||
spacing: 0
|
||||
|
||||
NymeaItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Wireless setup")
|
||||
iconName: "../images/connections/bluetooth.svg"
|
||||
progressive: false
|
||||
visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost == null
|
||||
onClicked: {
|
||||
root.startWirelessSetup();
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
NymeaItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Manual connection")
|
||||
iconName: "../images/connections/network-vpn.svg"
|
||||
progressive: false
|
||||
visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost == null
|
||||
onClicked: {
|
||||
root.startManualConnection();
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
NymeaItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Demo mode")
|
||||
iconName: "../images/private-browsing.svg"
|
||||
progressive: false
|
||||
visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost == null
|
||||
onClicked: {
|
||||
root.startDemoMode();
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
|
||||
NymeaItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Configure things")
|
||||
iconName: "../images/things.svg"
|
||||
visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost
|
||||
progressive: false
|
||||
onClicked: {
|
||||
root.openThingSettings()
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
NymeaItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Magic")
|
||||
iconName: "../images/magic.svg"
|
||||
progressive: false
|
||||
visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost
|
||||
onClicked: {
|
||||
root.openMagicSettings();
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
NymeaItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("App settings")
|
||||
iconName: "../images/stock_application.svg"
|
||||
progressive: false
|
||||
onClicked: {
|
||||
root.openAppSettings();
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
NymeaItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("System settings")
|
||||
iconName: "../images/settings.svg"
|
||||
progressive: false
|
||||
visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost
|
||||
onClicked: {
|
||||
root.openSystemSettings();
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
NymeaItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: app.margins
|
||||
text: qsTr("Forum")
|
||||
iconName: "../images/discourse.svg"
|
||||
progressive: false
|
||||
onClicked: Qt.openUrlExternally("https://forum.nymea.io")
|
||||
}
|
||||
NymeaItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Telegram")
|
||||
iconName: "../images/telegram.svg"
|
||||
progressive: false
|
||||
onClicked: Qt.openUrlExternally("https://t.me/nymeacommunity")
|
||||
}
|
||||
NymeaItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Twitter")
|
||||
iconName: "../images/twitter.svg"
|
||||
progressive: false
|
||||
onClicked: Qt.openUrlExternally("https://twitter.com/nymea_io")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -43,53 +43,33 @@ import "mainviews"
|
||||
Page {
|
||||
id: root
|
||||
|
||||
header: FancyHeader {
|
||||
header: ToolBar {
|
||||
id: mainHeader
|
||||
title: d.configOverlay !== null ?
|
||||
qsTr("Configure main view")
|
||||
: swipeView.currentItem.item.title.length > 0 ? swipeView.currentItem.item.title : filteredContentModel.data(swipeView.currentIndex, "displayName")
|
||||
leftButtonVisible: true
|
||||
leftButtonImageSource: {
|
||||
if (app.hasOwnProperty("headerIcon")) {
|
||||
return app.headerIcon
|
||||
}
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
switch (engine.jsonRpcClient.currentConnection.bearerType) {
|
||||
case Connection.BearerTypeLan:
|
||||
case Connection.BearerTypeWan:
|
||||
if (engine.jsonRpcClient.availableBearerTypes & NymeaConnection.BearerTypeEthernet != NymeaConnection.BearerTypeNone) {
|
||||
return "../images/connections/network-wired.svg"
|
||||
HeaderButton {
|
||||
imageSource: "qrc:/styles/%1/logo.svg".arg(styleController.currentStyle)
|
||||
onClicked: {
|
||||
if (d.configOverlay != null) {
|
||||
d.configOverlay.destroy();
|
||||
}
|
||||
app.mainMenu.open()
|
||||
}
|
||||
return "../images/connections/network-wifi.svg";
|
||||
case Connection.BearerTypeBluetooth:
|
||||
return "../images/connections/network-wifi.svg";
|
||||
case Connection.BearerTypeCloud:
|
||||
return "../images/connections/cloud.svg"
|
||||
case Connection.BearerTypeLoopback:
|
||||
return "qrc:/styles/%1/logo.svg".arg(styleController.currentStyle)
|
||||
}
|
||||
return ""
|
||||
}
|
||||
onLeftButtonClicked: {
|
||||
app.mainMenu.show()
|
||||
// var dialog = connectionDialogComponent.createObject(root)
|
||||
// dialog.open();
|
||||
}
|
||||
onMenuOpenChanged: {
|
||||
if (menuOpen && d.configOverlay) {
|
||||
d.configOverlay.destroy()
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: d.configOverlay !== null ?
|
||||
qsTr("Configure main view")
|
||||
: swipeView.currentItem.item.title.length > 0 ? swipeView.currentItem.item.title : filteredContentModel.data(swipeView.currentIndex, "displayName")
|
||||
}
|
||||
}
|
||||
|
||||
model: ListModel {
|
||||
ListElement { iconSource: "../images/things.svg"; text: qsTr("Configure things"); page: "thingconfiguration/EditThingsPage.qml" }
|
||||
ListElement { iconSource: "../images/magic.svg"; text: qsTr("Magic"); page: "MagicPage.qml" }
|
||||
ListElement { iconSource: "../images/stock_application.svg"; text: qsTr("App settings"); page: "appsettings/AppSettingsPage.qml" }
|
||||
ListElement { iconSource: "../images/settings.svg"; text: qsTr("System settings"); page: "SettingsPage.qml" }
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
pageStack.push(model.get(index).page)
|
||||
HeaderButton {
|
||||
imageSource: "../images/settings.svg"
|
||||
visible: d.configOverlay == null
|
||||
onClicked: d.configOverlay = configComponent.createObject(contentContainer)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,7 +295,6 @@ Page {
|
||||
} else {
|
||||
PlatformHelper.vibrate(PlatformHelper.HapticsFeedbackSelection)
|
||||
d.configOverlay = configComponent.createObject(contentContainer)
|
||||
mainHeader.menuOpen = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,10 +101,17 @@ ApplicationWindow {
|
||||
property alias mainMenu: m
|
||||
MainMenu {
|
||||
id: m
|
||||
anchors.fill: parent
|
||||
z: 1000
|
||||
height: app.height
|
||||
width: Math.min(300, app.width)
|
||||
// z: 1000
|
||||
currentEngine: rootItem.currentEngine
|
||||
onOpenThingSettings: rootItem.openThigSettings();
|
||||
onOpenThingSettings: rootItem.openThingSettings();
|
||||
onOpenMagicSettings: rootItem.openMagicSettings();
|
||||
onOpenAppSettings: rootItem.openAppSettings();
|
||||
onOpenSystemSettings: rootItem.openSystemSettings();
|
||||
onStartManualConnection: rootItem.startManualConnection();
|
||||
onStartWirelessSetup: rootItem.startWirelessSetup();
|
||||
onStartDemoMode: rootItem.startDemoMode();
|
||||
}
|
||||
|
||||
RootItem {
|
||||
|
||||
@ -40,15 +40,34 @@ import "connection"
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property Engine currentEngine: swipeView.currentItem.engine
|
||||
readonly property Engine currentEngine: swipeView.currentItem ? swipeView.currentItem.engine : null
|
||||
|
||||
function handleAndroidBackButton() {
|
||||
return swipeView.currentItem.handleAndroidBackButton()
|
||||
}
|
||||
|
||||
function openThigSettings() {
|
||||
function openThingSettings() {
|
||||
swipeView.currentItem.pageStack.push("thingconfiguration/EditThingsPage.qml")
|
||||
}
|
||||
function openMagicSettings() {
|
||||
swipeView.currentItem.pageStack.push("MagicPage.qml")
|
||||
}
|
||||
function openAppSettings() {
|
||||
swipeView.currentItem.pageStack.push("appsettings/AppSettingsPage.qml")
|
||||
}
|
||||
function openSystemSettings() {
|
||||
swipeView.currentItem.pageStack.push("SettingsPage.qml")
|
||||
}
|
||||
function startManualConnection() {
|
||||
swipeView.currentItem.pageStack.push("connection/ManualConnectPage.qml")
|
||||
}
|
||||
function startWirelessSetup() {
|
||||
swipeView.currentItem.pageStack.push("connection/wifisetup/BluetoothDiscoveryPage.qml");
|
||||
}
|
||||
function startDemoMode() {
|
||||
var host = discovery.nymeaHosts.createWanHost("Demo server", "nymea://nymea.nymea.io:2222")
|
||||
root.currentEngine.jsonRpcClient.connectToHost(host)
|
||||
}
|
||||
|
||||
ListModel {
|
||||
id: tabModel
|
||||
|
||||
@ -59,7 +59,7 @@ Page {
|
||||
Layout.fillWidth: true
|
||||
Material.elevation: layout.isGrid ? 1 : 0
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/configure.svg"
|
||||
text: qsTr("General")
|
||||
@ -76,7 +76,7 @@ Page {
|
||||
padding: 0
|
||||
visible: engine.jsonRpcClient.ensureServerVersion("4.2")
|
||||
&& engine.jsonRpcClient.authenticated
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/account.svg"
|
||||
text: qsTr("User settings")
|
||||
@ -92,7 +92,7 @@ Page {
|
||||
Material.elevation: layout.isGrid ? 1 : 0
|
||||
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/connections/network-wifi.svg"
|
||||
text: qsTr("Networking")
|
||||
@ -109,7 +109,7 @@ Page {
|
||||
visible: engine.jsonRpcClient.ensureServerVersion("1.9")
|
||||
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/connections/cloud.svg"
|
||||
text: qsTr("Cloud")
|
||||
@ -125,7 +125,7 @@ Page {
|
||||
Material.elevation: layout.isGrid ? 1 : 0
|
||||
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/connections/network-vpn.svg"
|
||||
text: qsTr("API interfaces")
|
||||
@ -142,7 +142,7 @@ Page {
|
||||
visible: engine.jsonRpcClient.ensureServerVersion("1.11")
|
||||
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/mqtt.svg"
|
||||
text: qsTr("MQTT broker")
|
||||
@ -159,7 +159,7 @@ Page {
|
||||
visible: engine.jsonRpcClient.ensureServerVersion("5.3")
|
||||
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/zigbee.svg"
|
||||
text: qsTr("ZigBee")
|
||||
@ -175,7 +175,7 @@ Page {
|
||||
Material.elevation: layout.isGrid ? 1 : 0
|
||||
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/stock_website.svg"
|
||||
text: qsTr("Web server")
|
||||
@ -192,7 +192,7 @@ Page {
|
||||
Material.elevation: layout.isGrid ? 1 : 0
|
||||
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/plugin.svg"
|
||||
text: qsTr("Plugins")
|
||||
@ -208,7 +208,7 @@ Page {
|
||||
Material.elevation: layout.isGrid ? 1 : 0
|
||||
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/sdk.svg"
|
||||
text: qsTr("Developer tools")
|
||||
@ -225,7 +225,7 @@ Page {
|
||||
visible: engine.jsonRpcClient.ensureServerVersion("2.1") && engine.systemController.updateManagementAvailable
|
||||
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/system-update.svg"
|
||||
text: qsTr("System update")
|
||||
@ -241,7 +241,7 @@ Page {
|
||||
Material.elevation: layout.isGrid ? 1 : 0
|
||||
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/logs.svg"
|
||||
text: qsTr("Log viewer")
|
||||
@ -257,7 +257,7 @@ Page {
|
||||
Material.elevation: layout.isGrid ? 1 : 0
|
||||
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/info.svg"
|
||||
text: qsTr("About %1:core").arg(app.systemName)
|
||||
|
||||
@ -53,14 +53,14 @@ SettingsPageBase {
|
||||
|
||||
githubLink: "https://github.com/nymea/nymea-app"
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("App version:")
|
||||
subText: appVersion
|
||||
progressive: false
|
||||
prominentSubText: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Qt version:")
|
||||
subText: qtVersion + (qtBuildVersion !== qtVersion ? " (" + qsTr("Built with %1").arg(qtBuildVersion) + ")" : "")
|
||||
|
||||
@ -59,7 +59,7 @@ Page {
|
||||
Layout.fillWidth: true
|
||||
Material.elevation: layout.isGrid ? 1 : 0
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: qsTr("Look & feel")
|
||||
subText: qsTr("Customize the app's look and behavior")
|
||||
@ -74,7 +74,7 @@ Page {
|
||||
Layout.fillWidth: true
|
||||
Material.elevation: layout.isGrid ? 1 : 0
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: qsTr("Cloud login")
|
||||
subText: qsTr("Log into %1:cloud and manage connected %1:core systems").arg(app.systemName)
|
||||
@ -88,7 +88,7 @@ Page {
|
||||
Layout.fillWidth: true
|
||||
Material.elevation: layout.isGrid ? 1 : 0
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: qsTr("Developer options")
|
||||
subText: qsTr("Access tools for debugging and error reporting")
|
||||
@ -102,7 +102,7 @@ Page {
|
||||
Layout.fillWidth: true
|
||||
Material.elevation: layout.isGrid ? 1 : 0
|
||||
padding: 0
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: qsTr("About %1").arg(app.appName)
|
||||
subText: qsTr("Find app versions and licence information")
|
||||
|
||||
@ -113,7 +113,7 @@ SettingsPageBase {
|
||||
|
||||
Repeater {
|
||||
model: AWSClient.awsDevices
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: model.name
|
||||
subText: model.id
|
||||
|
||||
@ -50,7 +50,7 @@ SettingsPageBase {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("View log")
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("../appsettings/AppLogPage.qml"))
|
||||
|
||||
@ -59,7 +59,7 @@ MeaDialog {
|
||||
|
||||
interactive: contentHeight > height
|
||||
clip: true
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: actionType.displayName
|
||||
progressive: false
|
||||
|
||||
@ -124,7 +124,7 @@ Item {
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
iconName: "../images/stock_website.svg"
|
||||
text: qsTr("Visit the nymea website")
|
||||
@ -136,7 +136,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
iconName: "../images/stock_website.svg"
|
||||
text: qsTr("Visit GitHub page")
|
||||
@ -148,7 +148,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("View privacy policy")
|
||||
iconName: "../images/stock_website.svg"
|
||||
@ -159,7 +159,7 @@ Item {
|
||||
Qt.openUrlExternally(app.privacyPolicyUrl)
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Software license")
|
||||
iconName: "../images/stock_website.svg"
|
||||
@ -171,7 +171,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Additional software licenses")
|
||||
iconName: "../images/logs.svg"
|
||||
@ -207,7 +207,7 @@ Item {
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
iconName: "../images/stock_website.svg"
|
||||
text: qsTr("Visit the Qt website")
|
||||
@ -236,7 +236,7 @@ Item {
|
||||
Repeater {
|
||||
model: root.additionalLicenses
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: model.component
|
||||
subText: model.infoText
|
||||
|
||||
200
nymea-app/ui/components/NymeaItemDelegate.qml
Normal file
200
nymea-app/ui/components/NymeaItemDelegate.qml
Normal file
@ -0,0 +1,200 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Copyright 2013 - 2020, nymea GmbH
|
||||
* Contact: contact@nymea.io
|
||||
*
|
||||
* This file is part of nymea.
|
||||
* This project including source code and documentation is protected by
|
||||
* copyright law, and remains the property of nymea GmbH. All rights, including
|
||||
* reproduction, publication, editing and translation, are reserved. The use of
|
||||
* this project is subject to the terms of a license agreement to be concluded
|
||||
* with nymea GmbH in accordance with the terms of use of nymea GmbH, available
|
||||
* under https://nymea.io/license
|
||||
*
|
||||
* GNU General Public License Usage
|
||||
* Alternatively, this project may be redistributed and/or modified under the
|
||||
* terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, GNU version 3. This project is distributed in the hope that it
|
||||
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this project. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For any further details and any questions please contact us under
|
||||
* contact@nymea.io or see our FAQ/Licensing Information on
|
||||
* https://nymea.io/license/faq
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Controls.Material 2.2
|
||||
|
||||
// There's a bug in QtQuick.Controls' SwipeDelegate in that it appears with wrong
|
||||
// background when used in Popups/Dialogs So we need a non-swipable one for those cases
|
||||
|
||||
// FIXME: Eventually consoldate this again somehow
|
||||
|
||||
ItemDelegate {
|
||||
id: root
|
||||
implicitWidth: 200
|
||||
|
||||
property string subText
|
||||
property bool progressive: true
|
||||
property bool canDelete: false
|
||||
|
||||
property bool wrapTexts: true
|
||||
property bool prominentSubText: true
|
||||
property int textAlignment: Text.AlignLeft
|
||||
|
||||
property string iconName
|
||||
property string thumbnail
|
||||
property int iconSize: app.iconSize
|
||||
property color iconColor: app.accentColor
|
||||
property alias iconKeyColor: icon.keyColor
|
||||
property alias secondaryIconName: secondaryIcon.name
|
||||
property alias secondaryIconColor: secondaryIcon.color
|
||||
property alias secondaryIconKeyColor: secondaryIcon.keyColor
|
||||
property alias secondaryIconClickable: secondaryIconMouseArea.enabled
|
||||
property alias tertiaryIconName: tertiaryIcon.name
|
||||
property alias tertiaryIconColor: tertiaryIcon.color
|
||||
property alias tertiaryIconKeyColor: tertiaryIcon.keyColor
|
||||
property alias tertiaryIconClickable: tertiaryIconMouseArea.enabled
|
||||
|
||||
property var contextOptions: []
|
||||
|
||||
property alias additionalItem: additionalItemContainer.children
|
||||
|
||||
property alias busy: busyIndicator.running
|
||||
|
||||
signal deleteClicked()
|
||||
signal secondaryIconClicked()
|
||||
|
||||
onPressAndHold: swipe.open(SwipeDelegate.Right)
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
property var deleteContextOption: [{
|
||||
text: qsTr("Delete"),
|
||||
icon: "../images/delete.svg",
|
||||
backgroundColor: "red",
|
||||
foregroundColor: "white",
|
||||
visible: canDelete,
|
||||
callback: function deleteClicked() {
|
||||
root.deleteClicked();
|
||||
swipe.close();
|
||||
}
|
||||
}]
|
||||
|
||||
property var finalContextOptions: root.contextOptions.concat(d.deleteContextOption)
|
||||
}
|
||||
|
||||
contentItem: RowLayout {
|
||||
id: innerLayout
|
||||
spacing: app.margins
|
||||
Item {
|
||||
Layout.preferredHeight: root.iconSize
|
||||
Layout.preferredWidth: height
|
||||
visible: root.iconName.length > 0 || root.thumbnail.length > 0
|
||||
|
||||
ColorIcon {
|
||||
id: icon
|
||||
anchors.fill: parent
|
||||
name: root.iconName
|
||||
color: root.iconColor
|
||||
visible: root.iconName && thumbnailImage.status !== Image.Ready
|
||||
}
|
||||
|
||||
Image {
|
||||
id: thumbnailImage
|
||||
anchors.fill: parent
|
||||
source: root.thumbnail
|
||||
visible: root.thumbnail.length > 0
|
||||
fillMode: Image.PreserveAspectFit
|
||||
horizontalAlignment: Image.AlignHCenter
|
||||
verticalAlignment: Image.AlignVCenter
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
id: busyIndicator
|
||||
anchors.centerIn: parent
|
||||
visible: running
|
||||
running: false
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
text: root.text
|
||||
wrapMode: root.wrapTexts ? Text.WordWrap : Text.NoWrap
|
||||
maximumLineCount: root.wrapTexts ? 2 : 1
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: root.textAlignment
|
||||
}
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
text: root.subText
|
||||
font.pixelSize: root.prominentSubText ? app.smallFont : app.extraSmallFont
|
||||
color: root.prominentSubText ? Material.foreground : Material.color(Material.Grey)
|
||||
wrapMode: root.wrapTexts ? Text.WordWrap : Text.NoWrap
|
||||
maximumLineCount: root.wrapTexts ? 2 : 1
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
visible: root.subText.length > 0
|
||||
}
|
||||
}
|
||||
|
||||
ColorIcon {
|
||||
id: secondaryIcon
|
||||
Layout.preferredHeight: app.smallIconSize
|
||||
Layout.preferredWidth: height
|
||||
visible: name.length > 0
|
||||
MouseArea {
|
||||
id: secondaryIconMouseArea
|
||||
enabled: false
|
||||
anchors.fill: parent
|
||||
anchors.margins: -app.margins
|
||||
onClicked: root.secondaryIconClicked();
|
||||
}
|
||||
}
|
||||
|
||||
ColorIcon {
|
||||
id: tertiaryIcon
|
||||
Layout.preferredHeight: app.smallIconSize
|
||||
Layout.preferredWidth: height
|
||||
visible: name.length > 0
|
||||
MouseArea {
|
||||
id: tertiaryIconMouseArea
|
||||
enabled: false
|
||||
anchors.fill: parent
|
||||
anchors.margins: -app.margins
|
||||
onClicked: root.tertiaryIconClicked();
|
||||
}
|
||||
}
|
||||
|
||||
ColorIcon {
|
||||
id: progressionIcon
|
||||
Layout.preferredHeight: app.smallIconSize
|
||||
Layout.preferredWidth: height
|
||||
name: "../images/next.svg"
|
||||
visible: root.progressive
|
||||
}
|
||||
|
||||
Item {
|
||||
id: additionalItemContainer
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: childrenRect.width
|
||||
visible: children.length > 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,7 @@ Dialog {
|
||||
}
|
||||
ThinDivider {}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Remove all those rules")
|
||||
progressive: false
|
||||
@ -79,7 +79,7 @@ Dialog {
|
||||
}
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
text: qsTr("Update rules, removing this thing")
|
||||
Layout.fillWidth: true
|
||||
progressive: false
|
||||
@ -90,7 +90,7 @@ Dialog {
|
||||
}
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
text: qsTr("Don't remove this thing")
|
||||
Layout.fillWidth: true
|
||||
progressive: false
|
||||
|
||||
@ -38,24 +38,40 @@ import "../components"
|
||||
Page {
|
||||
id: root
|
||||
|
||||
header: FancyHeader {
|
||||
title: qsTr("Connect %1").arg(app.systemName)
|
||||
model: ListModel {
|
||||
ListElement { iconSource: "../images/connections/network-vpn.svg"; text: qsTr("Manual connection"); page: "ManualConnectPage.qml" }
|
||||
ListElement { iconSource: "../images/connections/bluetooth.svg"; text: qsTr("Wireless setup"); page: "wifisetup/BluetoothDiscoveryPage.qml"; }
|
||||
ListElement { iconSource: "../images/private-browsing.svg"; text: qsTr("Demo mode"); page: "" }
|
||||
ListElement { iconSource: "../images/stock_application.svg"; text: qsTr("App settings"); page: "../appsettings/AppSettingsPage.qml" }
|
||||
}
|
||||
onClicked: {
|
||||
if (index === 2) {
|
||||
var host = discovery.nymeaHosts.createWanHost("Demo server", "nymea://nymea.nymea.io:2222")
|
||||
engine.jsonRpcClient.connectToHost(host)
|
||||
} else {
|
||||
pageStack.push(model.get(index).page, {nymeaDiscovery: discovery});
|
||||
header: ToolBar {
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
HeaderButton {
|
||||
imageSource: "../images/navigation-menu.svg"
|
||||
onClicked: app.mainMenu.open()
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Connect %1").arg(app.systemName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// header: FancyHeader {
|
||||
// title: qsTr("Connect %1").arg(app.systemName)
|
||||
// model: ListModel {
|
||||
// ListElement { iconSource: "../images/connections/network-vpn.svg"; text: qsTr("Manual connection"); page: "ManualConnectPage.qml" }
|
||||
// ListElement { iconSource: "../images/connections/bluetooth.svg"; text: qsTr("Wireless setup"); page: "wifisetup/BluetoothDiscoveryPage.qml"; }
|
||||
// ListElement { iconSource: "../images/private-browsing.svg"; text: qsTr("Demo mode"); page: "" }
|
||||
// ListElement { iconSource: "../images/stock_application.svg"; text: qsTr("App settings"); page: "../appsettings/AppSettingsPage.qml" }
|
||||
// }
|
||||
// onClicked: {
|
||||
// if (index === 2) {
|
||||
// var host = discovery.nymeaHosts.createWanHost("Demo server", "nymea://nymea.nymea.io:2222")
|
||||
// engine.jsonRpcClient.connectToHost(host)
|
||||
// } else {
|
||||
// pageStack.push(model.get(index).page, {nymeaDiscovery: discovery});
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
readonly property bool haveHosts: hostsProxy.count > 0
|
||||
|
||||
|
||||
@ -134,7 +150,7 @@ Page {
|
||||
model: hostsProxy
|
||||
clip: true
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
id: nymeaHostDelegate
|
||||
width: parent.width
|
||||
height: app.delegateHeight
|
||||
@ -356,7 +372,7 @@ Page {
|
||||
width: parent.width
|
||||
Repeater {
|
||||
model: dialog.nymeaHost.connections
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
wrapTexts: false
|
||||
progressive: false
|
||||
|
||||
@ -117,7 +117,7 @@ Page {
|
||||
model: bluetoothDiscovery.deviceInfos
|
||||
clip: true
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: Qt.resolvedUrl("../../images/connections/bluetooth.svg")
|
||||
text: model.name
|
||||
|
||||
@ -46,31 +46,31 @@ Page {
|
||||
ColumnLayout {
|
||||
anchors { left: parent.left; top: parent.top; right: parent.right }
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
progressive: false
|
||||
text: qsTr("System UUID")
|
||||
subText: networkManagerController.manager.modelNumber
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
progressive: false
|
||||
text: qsTr("Manufacturer")
|
||||
subText: networkManagerController.manager.manufacturer
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
progressive: false
|
||||
text: qsTr("Software revision")
|
||||
subText: networkManagerController.manager.softwareRevision
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
progressive: false
|
||||
text: qsTr("Firmware revision")
|
||||
subText: networkManagerController.manager.firmwareRevision
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
progressive: false
|
||||
text: qsTr("Hardware revision")
|
||||
|
||||
@ -73,7 +73,7 @@ Page {
|
||||
}
|
||||
clip: true
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: model.ssid !== "" ? model.ssid : qsTr("Hidden Network")
|
||||
enabled: !networkManagerController.manager.working
|
||||
|
||||
@ -61,7 +61,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
id: logEntryDelegate
|
||||
width: parent.width
|
||||
implicitHeight: app.delegateHeight
|
||||
|
||||
@ -35,7 +35,7 @@ import QtQuick.Layouts 1.1
|
||||
import Nymea 1.0
|
||||
import "../components"
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
id: root
|
||||
width: parent.width
|
||||
text: model.displayName
|
||||
|
||||
@ -34,7 +34,7 @@ import QtQuick.Layouts 1.2
|
||||
import "../components"
|
||||
import Nymea 1.0
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
id: root
|
||||
width: parent.width
|
||||
iconName: thing && thing.thingClass ? app.interfacesToIcon(thing.thingClass.interfaces) : ""
|
||||
|
||||
@ -128,7 +128,7 @@ DevicePageBase {
|
||||
deviceId: root.device.id
|
||||
typeIds: [root.doorbellPressedType.id]
|
||||
}
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: Qt.formatDateTime(model.timestamp)
|
||||
progressive: false
|
||||
|
||||
@ -76,7 +76,7 @@ DevicePageBase {
|
||||
typeIds: [root.accessGrantedEventType.id, root.accessDeniedEventType.id];
|
||||
}
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: accessGranted ? "../images/tick.svg" : "../images/dialog-error-symbolic.svg"
|
||||
iconColor: accessGranted ? "green" : "red"
|
||||
@ -125,7 +125,7 @@ DevicePageBase {
|
||||
clip: true
|
||||
model: root.usersState.value
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
text: modelData
|
||||
width: parent.width
|
||||
progressive: false
|
||||
|
||||
@ -51,7 +51,7 @@ DevicePageBase {
|
||||
typeIds: [root.deviceClass.eventTypes.findByName("triggered").id];
|
||||
}
|
||||
|
||||
// delegate: NymeaListItemDelegate {
|
||||
// delegate: NymeaSwipeDelegate {
|
||||
// width: parent.width
|
||||
// iconName: app.interfaceToIcon("inputtrigger")
|
||||
// text: model.value.trim()
|
||||
|
||||
@ -76,7 +76,7 @@ DevicePageBase {
|
||||
typeIds: [root.deviceClass.actionTypes.findByName("notify").id];
|
||||
}
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: app.interfaceToIcon("notifications")
|
||||
text: model.value.trim()
|
||||
|
||||
@ -34,7 +34,7 @@ import QtQuick.Layouts 1.3
|
||||
import Nymea 1.0
|
||||
import "../components"
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
id: root
|
||||
implicitHeight: app.delegateHeight
|
||||
progressive: false
|
||||
|
||||
@ -141,7 +141,7 @@ Page {
|
||||
filterDeviceId: root.device.id
|
||||
}
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/magic.svg"
|
||||
iconColor: !model.enabled ? "red" : (model.active ? app.accentColor : "grey")
|
||||
|
||||
@ -750,7 +750,7 @@ Page {
|
||||
minimumJsonRpcVersion: "1.0"
|
||||
}
|
||||
}
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
iconName: model.iconName
|
||||
text: model.text
|
||||
@ -800,7 +800,7 @@ Page {
|
||||
minimumJsonRpcVersion: "1.0"
|
||||
}
|
||||
}
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
iconName: model.iconName
|
||||
text: model.text
|
||||
@ -863,7 +863,7 @@ Page {
|
||||
minimumJsonRpcVersion: "1.5"
|
||||
}
|
||||
}
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
iconName: model.iconName
|
||||
text: model.text
|
||||
|
||||
@ -34,7 +34,7 @@ import QtQuick.Layouts 1.3
|
||||
import Nymea 1.0
|
||||
import "../components"
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
id: root
|
||||
implicitHeight: app.delegateHeight
|
||||
canDelete: true
|
||||
|
||||
@ -58,7 +58,7 @@ Page {
|
||||
ruleTemplates: ruleTemplates
|
||||
}
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: model.description
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ Page {
|
||||
|
||||
}
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
text: model.description
|
||||
}
|
||||
}
|
||||
|
||||
@ -522,7 +522,7 @@ Page {
|
||||
|
||||
filterInterfaceNames: root.device ? root.device.deviceClass.interfaces : []
|
||||
}
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: model.description
|
||||
iconName: app.interfacesToIcon(model.interfaces)
|
||||
|
||||
@ -34,7 +34,7 @@ import QtQuick.Layouts 1.3
|
||||
import Nymea 1.0
|
||||
import "../components"
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
id: root
|
||||
implicitHeight: app.delegateHeight
|
||||
canDelete: true
|
||||
|
||||
@ -64,7 +64,7 @@ Page {
|
||||
ListView {
|
||||
anchors.fill: parent
|
||||
model: engine.scriptManager.scripts
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: model.name
|
||||
iconName: "../images/script.svg"
|
||||
|
||||
@ -118,7 +118,7 @@ Page {
|
||||
anchors.fill: parent
|
||||
ScrollBar.vertical: ScrollBar {}
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
id: delegate
|
||||
text: model.displayName
|
||||
width: parent.width
|
||||
|
||||
@ -157,7 +157,7 @@ Page {
|
||||
}
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
id: statePickerDelegate
|
||||
Layout.fillWidth: true
|
||||
text: deviceId === null || stateTypeId === null
|
||||
|
||||
@ -51,7 +51,7 @@ Page {
|
||||
|
||||
model: device.deviceClass.stateTypes
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
iconName: "../images/state.svg"
|
||||
text: model.displayName
|
||||
|
||||
@ -88,7 +88,7 @@ Page {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Any %1").arg(app.interfaceToDisplayName(root.shownInterfaces[0]))
|
||||
visible: root.allowSelectAny
|
||||
@ -116,7 +116,7 @@ Page {
|
||||
print("new checked state;", newCache[deviceId])
|
||||
}
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: root.selectInterface ? model.displayName : model.name
|
||||
iconName: root.selectInterface ? app.interfaceToIcon(model.name) : app.interfacesToIcon(model.interfaces)
|
||||
|
||||
@ -153,7 +153,7 @@ ItemDelegate {
|
||||
method: "editInterfaceStateDescriptor"
|
||||
}
|
||||
}
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
iconName: model.iconName
|
||||
text: model.text
|
||||
|
||||
@ -34,7 +34,7 @@ import QtQuick.Layouts 1.3
|
||||
import Nymea 1.0
|
||||
import "../components"
|
||||
|
||||
NymeaListItemDelegate{
|
||||
NymeaSwipeDelegate{
|
||||
id: root
|
||||
implicitHeight: app.delegateHeight
|
||||
progressive: false
|
||||
|
||||
@ -45,35 +45,35 @@ SettingsPageBase {
|
||||
title: qsTr("%1:core").arg(app.systemName)
|
||||
githubLink: "https://github.com/nymea/nymea"
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Connection:")
|
||||
subText: engine.jsonRpcClient.currentConnection.url
|
||||
progressive: false
|
||||
prominentSubText: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Server UUID:")
|
||||
subText: engine.jsonRpcClient.serverUuid
|
||||
progressive: false
|
||||
prominentSubText: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Server version:")
|
||||
subText: engine.jsonRpcClient.serverVersion
|
||||
progressive: false
|
||||
prominentSubText: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("JSON-RPC version:")
|
||||
subText: engine.jsonRpcClient.jsonRpcVersion
|
||||
progressive: false
|
||||
prominentSubText: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Qt version:")
|
||||
visible: engine.jsonRpcClient.ensureServerVersion("4.1")
|
||||
|
||||
@ -163,7 +163,7 @@ SettingsPageBase {
|
||||
text: qsTr("In order to remotely connect to this %1:core, %2 needs to be logged into %1:cloud as well.").arg(app.systemName).arg(app.appName)
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Go to app settings")
|
||||
subText: qsTr("Set up cloud connection for %1").arg(app.appName)
|
||||
|
||||
@ -34,7 +34,7 @@ import QtQuick.Layouts 1.3
|
||||
import Nymea 1.0
|
||||
import "../components"
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
text: qsTr("Interface: %1").arg(model.address === "0.0.0.0" ? qsTr("Any") : model.address === "127.0.0.1" ? qsTr("localhost") : model.address)
|
||||
subText: qsTr("Port: %1").arg(model.port)
|
||||
iconName: "../images/connections/network-vpn.svg"
|
||||
|
||||
@ -91,7 +91,7 @@ SettingsPageBase {
|
||||
|
||||
Repeater {
|
||||
model: engine.nymeaConfiguration.mqttPolicies
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
iconName: "../images/account.svg"
|
||||
text: qsTr("Client ID: %1").arg(model.clientId)
|
||||
|
||||
@ -149,7 +149,7 @@ SettingsPageBase {
|
||||
|
||||
Repeater {
|
||||
model: root.policy.allowedPublishTopicFilters
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: modelData
|
||||
canDelete: true
|
||||
@ -195,7 +195,7 @@ SettingsPageBase {
|
||||
}
|
||||
Repeater {
|
||||
model: root.policy.allowedSubscribeTopicFilters
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: modelData
|
||||
canDelete: true
|
||||
|
||||
@ -154,7 +154,7 @@ SettingsPageBase {
|
||||
visible: networkManager.available
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Current connection state")
|
||||
prominentSubText: false
|
||||
@ -203,7 +203,7 @@ SettingsPageBase {
|
||||
}
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Networking enabled")
|
||||
subText: qsTr("Enable or disable networking altogether")
|
||||
@ -257,7 +257,7 @@ SettingsPageBase {
|
||||
Repeater {
|
||||
model: networkManager.wiredNetworkDevices
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
iconName: model.pluggedIn ? "../images/connections/network-wired.svg" : "../images/connections/network-wired-offline.svg"
|
||||
text: model.interface + " (" + model.macAddress + ")"
|
||||
@ -277,7 +277,7 @@ SettingsPageBase {
|
||||
visible: networkManager.available && networkManager.networkingEnabled
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Enabled")
|
||||
subText: qsTr("Enable or disable WiFi")
|
||||
@ -326,7 +326,7 @@ SettingsPageBase {
|
||||
|
||||
Repeater {
|
||||
model: networkManager.wirelessNetworkDevices
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
visible: networkManager.available && networkManager.networkingEnabled
|
||||
iconName: {
|
||||
@ -430,7 +430,7 @@ SettingsPageBase {
|
||||
Repeater {
|
||||
id: listView
|
||||
model: apProxy
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: model.ssid !== "" ? model.ssid : qsTr("Hidden Network")
|
||||
subText: "%1 (%2)".arg(model.macAddress).arg(model.frequency < 3 ? "2.4GHz" : "5GHz")
|
||||
@ -527,39 +527,39 @@ SettingsPageBase {
|
||||
text: wirelessNetworkDevice.wirelessMode === WirelessNetworkDevice.WirelessModeAccessPoint ? qsTr("Hosting access point") : qsTr("Connected to")
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("SSID")
|
||||
subText: currentApPage.wirelessNetworkDevice.currentAccessPoint.ssid
|
||||
progressive: false
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("IPv4 Address")
|
||||
subText: currentApPage.wirelessNetworkDevice.ipv4Addresses.join(", ")
|
||||
progressive: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("IPv6 Address")
|
||||
subText: currentApPage.wirelessNetworkDevice.ipv6Addresses.join(", ")
|
||||
visible: subText.length > 0
|
||||
progressive: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("MAC Address")
|
||||
subText: currentApPage.wirelessNetworkDevice.currentAccessPoint.macAddress
|
||||
progressive: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Signal strength")
|
||||
subText: currentApPage.wirelessNetworkDevice.currentAccessPoint.signalStrength + " %"
|
||||
progressive: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("WiFi frequency")
|
||||
subText: currentApPage.wirelessNetworkDevice.currentAccessPoint.frequency + " GHz"
|
||||
|
||||
@ -64,7 +64,7 @@ SettingsPageBase {
|
||||
plugins: engine.deviceManager.plugins
|
||||
}
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
property var plugin: pluginsProxy.get(index)
|
||||
iconName: "../images/plugin.svg"
|
||||
|
||||
@ -185,7 +185,7 @@ Page {
|
||||
visible: count > 0
|
||||
model: updatesModel
|
||||
clip: true
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: model.displayName
|
||||
subText: model.candidateVersion
|
||||
@ -205,7 +205,7 @@ Page {
|
||||
|
||||
ThinDivider {}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Install or remove software")
|
||||
onClicked: {
|
||||
@ -276,7 +276,7 @@ Page {
|
||||
id: filterModel
|
||||
packages: packageListPage.packages
|
||||
}
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
text: model.displayName
|
||||
subText: model.candidateVersion
|
||||
@ -337,14 +337,14 @@ Page {
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Installed version:")
|
||||
subText: packageDetailsPage.pkg.installedVersion.length > 0 ? packageDetailsPage.pkg.installedVersion : qsTr("Not installed")
|
||||
progressive: false
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Candidate version:")
|
||||
subText: packageDetailsPage.pkg.candidateVersion
|
||||
|
||||
@ -42,7 +42,7 @@ SettingsPageBase {
|
||||
text: qsTr("User info")
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: userManager.userInfo.username
|
||||
subText: qsTr("Username")
|
||||
@ -51,7 +51,7 @@ SettingsPageBase {
|
||||
iconName: "../images/account.svg"
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Change password")
|
||||
iconName: "../images/key.svg"
|
||||
@ -70,7 +70,7 @@ SettingsPageBase {
|
||||
Repeater {
|
||||
model: userManager.tokenInfos
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: model.deviceName
|
||||
subText: qsTr("Created on %1").arg(Qt.formatDateTime(model.creationTime, Qt.DefaultLocaleShortDate))
|
||||
|
||||
@ -125,7 +125,7 @@ SettingsPageBase {
|
||||
onlyUnused: true
|
||||
}
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
iconName: "../images/zigbee.svg"
|
||||
text: model.backend + " - " + model.description + " - " + model.serialPort
|
||||
@ -155,7 +155,7 @@ SettingsPageBase {
|
||||
onlyUnused: true
|
||||
}
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
property ZigbeeAdapter adapter: root.zigbeeManager.adapters.get(index)
|
||||
iconName: "../images/stock_usb.svg"
|
||||
|
||||
@ -52,7 +52,7 @@ SettingsPageBase {
|
||||
text: qsTr("Hardware information")
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("MAC address:")
|
||||
subText: root.network.macAddress
|
||||
@ -60,7 +60,7 @@ SettingsPageBase {
|
||||
prominentSubText: false
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Serial port")
|
||||
subText: root.network.serialPort
|
||||
@ -68,7 +68,7 @@ SettingsPageBase {
|
||||
prominentSubText: false
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Baud rate")
|
||||
subText: root.network.baudRate
|
||||
@ -76,7 +76,7 @@ SettingsPageBase {
|
||||
prominentSubText: false
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Controller backend")
|
||||
subText: root.network.backend
|
||||
@ -84,7 +84,7 @@ SettingsPageBase {
|
||||
prominentSubText: false
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Controller firmware version")
|
||||
subText: root.network.firmwareVersion
|
||||
|
||||
@ -57,7 +57,7 @@ SettingsPageBase {
|
||||
text: qsTr("Network information")
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Network state")
|
||||
subText: {
|
||||
@ -78,14 +78,14 @@ SettingsPageBase {
|
||||
progressive: false
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Channel")
|
||||
subText: root.network.channel
|
||||
progressive: false
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Network PAN ID")
|
||||
subText: root.network.panId
|
||||
@ -96,7 +96,7 @@ SettingsPageBase {
|
||||
text: qsTr("Network control")
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: root.network.permitJoiningEnabled ? qsTr("The network is open") : qsTr("The network is closed")
|
||||
subText: root.network.permitJoiningEnabled ? qsTr("Devices can join this network") : qsTr("Devices are not allowed to join this network")
|
||||
|
||||
@ -59,7 +59,7 @@ SettingsPageBase {
|
||||
// text: qsTr("General")
|
||||
// }
|
||||
|
||||
// NymeaListItemDelegate {
|
||||
// NymeaSwipeDelegate {
|
||||
// Layout.fillWidth: true
|
||||
// text: qsTr("Zigbee enabled")
|
||||
// subText: qsTr("Enable or disable Zigbee altogether")
|
||||
@ -84,7 +84,7 @@ SettingsPageBase {
|
||||
|
||||
Repeater {
|
||||
model: zigbeeManager.networks
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
property var network: zigbeeManager.networks.get(index)
|
||||
iconName: "../images/zigbee.svg"
|
||||
|
||||
@ -121,20 +121,20 @@ SettingsPageBase {
|
||||
text: qsTr("Information")
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Vendor:")
|
||||
subText: engine.deviceManager.vendors.getVendor(root.deviceClass.vendorId).displayName
|
||||
progressive: false
|
||||
}
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Type:")
|
||||
subText: root.deviceClass.displayName
|
||||
progressive: false
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("ID:")
|
||||
subText: root.device.id.toString().replace(/[{}]/g, "")
|
||||
@ -145,7 +145,7 @@ SettingsPageBase {
|
||||
}
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Thing class")
|
||||
subText: qsTr("View the type definition for this thing")
|
||||
@ -184,7 +184,7 @@ SettingsPageBase {
|
||||
}
|
||||
Repeater {
|
||||
model: ioModel
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
|
||||
iconName: "../images/io-connections.svg"
|
||||
|
||||
@ -158,7 +158,7 @@ Page {
|
||||
groupByInterface: true
|
||||
}
|
||||
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
id: deviceClassDelegate
|
||||
width: parent.width
|
||||
text: model.displayName
|
||||
|
||||
@ -263,7 +263,7 @@ Page {
|
||||
showNew: root.device === null
|
||||
filterDeviceId: root.device ? root.device.id : ""
|
||||
}
|
||||
delegate: NymeaListItemDelegate {
|
||||
delegate: NymeaSwipeDelegate {
|
||||
width: parent.width
|
||||
height: app.delegateHeight
|
||||
text: model.name
|
||||
|
||||
@ -49,7 +49,7 @@ SettingsPageBase {
|
||||
text: qsTr("Type")
|
||||
}
|
||||
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: root.thingClass.displayName
|
||||
subText: root.thingClass.id.toString().replace(/[{}]/g, "")
|
||||
@ -63,7 +63,7 @@ SettingsPageBase {
|
||||
|
||||
Repeater {
|
||||
model: root.thingClass.paramTypes
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: root.thingClass.paramTypes.get(index).displayName
|
||||
subText: root.thingClass.paramTypes.get(index).id.toString().replace(/[{}]/g, "")
|
||||
@ -82,7 +82,7 @@ SettingsPageBase {
|
||||
|
||||
Repeater {
|
||||
model: root.thingClass.settingsTypes
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: root.thingClass.settingsTypes.get(index).displayName
|
||||
subText: root.thingClass.settingsTypes.get(index).id.toString().replace(/[{}]/g, "")
|
||||
@ -101,7 +101,7 @@ SettingsPageBase {
|
||||
|
||||
Repeater {
|
||||
model: root.thingClass.eventTypes
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: root.thingClass.eventTypes.get(index).displayName
|
||||
subText: root.thingClass.eventTypes.get(index).id.toString().replace(/[{}]/g, "")
|
||||
@ -120,7 +120,7 @@ SettingsPageBase {
|
||||
|
||||
Repeater {
|
||||
model: root.thingClass.stateTypes
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: root.thingClass.stateTypes.get(index).displayName
|
||||
subText: root.thingClass.stateTypes.get(index).id.toString().replace(/[{}]/g, "")
|
||||
@ -139,7 +139,7 @@ SettingsPageBase {
|
||||
|
||||
Repeater {
|
||||
model: root.thingClass.actionTypes
|
||||
NymeaListItemDelegate {
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: root.thingClass.actionTypes.get(index).displayName
|
||||
subText: root.thingClass.actionTypes.get(index).id.toString().replace(/[{}]/g, "")
|
||||
|
||||
Reference in New Issue
Block a user