Merge PR #467: Rework main menu

This commit is contained in:
Jenkins nymea 2020-11-29 01:50:03 +01:00
commit cb5c66360d
71 changed files with 1016 additions and 243 deletions

View File

@ -248,6 +248,7 @@ void NymeaConnection::onConnected()
if (!m_currentTransport) {
m_currentTransport = newTransport;
qDebug() << "NymeaConnection: Connected to" << m_currentHost->name() << "via" << m_currentTransport->url();
emit currentConnectionChanged();
emit connectedChanged(true);
return;
}

View File

@ -195,7 +195,7 @@ void DeviceManager::notificationReceived(const QVariantMap &data)
m_devices->addDevice(dev);
} else if (notification == "Devices.DeviceRemoved") {
QUuid deviceId = data.value("params").toMap().value("deviceId").toUuid();
qDebug() << "JsonRpc: Notification: Device removed" << deviceId.toString();
// qDebug() << "JsonRpc: Notification: Device removed" << deviceId.toString();
Device *device = m_devices->getDevice(deviceId);
if (!device) {
qWarning() << "Received a DeviceRemoved notification for a device we don't know!";
@ -205,7 +205,7 @@ void DeviceManager::notificationReceived(const QVariantMap &data)
device->deleteLater();
} else if (notification == "Devices.DeviceChanged") {
QUuid deviceId = data.value("params").toMap().value("device").toMap().value("id").toUuid();
qDebug() << "Device changed notification" << deviceId << data.value("params").toMap();
// qDebug() << "Device changed notification" << deviceId << data.value("params").toMap();
Device *oldDevice = m_devices->getDevice(deviceId);
if (!oldDevice) {
qWarning() << "Received a device changed notification for a device we don't know";
@ -215,12 +215,11 @@ void DeviceManager::notificationReceived(const QVariantMap &data)
qWarning() << "Error parsing device changed notification";
return;
}
qDebug() << "*** device unpacked" << oldDevice->stateValue("98e4476f-e745-4a7f-b795-19269cb70c40");
} else if (notification == "Devices.DeviceSettingChanged") {
QUuid deviceId = data.value("params").toMap().value("deviceId").toUuid();
QString paramTypeId = data.value("params").toMap().value("paramTypeId").toString();
QVariant value = data.value("params").toMap().value("value");
qDebug() << "Device settings changed notification for device" << deviceId << data.value("params").toMap().value("settings").toList();
// qDebug() << "Device settings changed notification for device" << deviceId << data.value("params").toMap().value("settings").toList();
Device *dev = m_devices->getDevice(deviceId);
if (!dev) {
qWarning() << "Device settings changed notification for a device we don't know" << deviceId.toString();

View File

@ -243,5 +243,8 @@
<file>ui/images/like.svg</file>
<file>ui/images/zigbee.svg</file>
<file>ui/images/stock_usb.svg</file>
<file>ui/images/twitter.svg</file>
<file>ui/images/discourse.svg</file>
<file>ui/images/telegram.svg</file>
</qresource>
</RCC>

View File

@ -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>
@ -229,5 +228,8 @@
<file>ui/system/ZigbeeAddNetworkPage.qml</file>
<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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -4130,7 +4130,7 @@ Please try again.</source>
</message>
</context>
<context>
<name>NymeaListItemDelegate</name>
<name>NymeaSwipeDelegate</name>
<message>
<source>Delete</source>
<translation></translation>

View File

@ -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>

View File

@ -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"

198
nymea-app/ui/MainMenu.qml Normal file
View File

@ -0,0 +1,198 @@
import QtQuick 2.9
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.1
import "components"
import Nymea 1.0
Drawer {
id: root
property Engine currentEngine: null
signal openThingSettings();
signal openMagicSettings();
signal openAppSettings();
signal openSystemSettings();
signal startWirelessSetup();
signal startManualConnection();
signal startDemoMode();
background: Rectangle {
color: app.backgroundColor
}
ColumnLayout {
anchors.fill: parent
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 }
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")
}
}
RowLayout {
ColumnLayout {
Label {
Layout.fillWidth: true
text: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost ? root.currentEngine.jsonRpcClient.currentHost.name : app.systemName
}
Label {
Layout.fillWidth: true
text: root.currentEngine.jsonRpcClient.currentConnection.url
font.pixelSize: app.extraSmallFont
enabled: false
visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost
}
}
ProgressButton {
longpressEnabled: false
imageSource: "../images/close.svg"
visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost
onClicked: {
root.currentEngine.jsonRpcClient.disconnectFromHost();
root.close();
}
}
}
}
}
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")
}
}
}
}
}

View File

@ -43,52 +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: {
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)
}
}
}
@ -211,55 +192,6 @@ Page {
}
}
// Pane {
// Layout.fillWidth: true
// Layout.preferredHeight: shownHeight
// property int shownHeight: shown ? contentRow.implicitHeight : 0
// property bool shown: updatesModel.count > 0 || engine.systemController.updateRunning
// visible: shownHeight > 0
// Behavior on shownHeight { NumberAnimation { easing.type: Easing.InOutQuad; duration: 150 } }
// Material.elevation: 2
// padding: 0
// MouseArea {
// anchors.fill: parent
// onClicked: pageStack.push(Qt.resolvedUrl("system/SystemUpdatePage.qml"))
// }
// Rectangle {
// color: app.accentColor
// anchors.fill: parent
// PackagesFilterModel {
// id: updatesModel
// packages: engine.systemController.packages
// updatesOnly: true
// }
// RowLayout {
// id: contentRow
// anchors { left: parent.left; top: parent.top; right: parent.right; leftMargin: app.margins; rightMargin: app.margins }
// Item {
// Layout.fillWidth: true
// height: app.iconSize
// }
// Label {
// text: engine.systemController.updateRunning ? qsTr("System update in progress...") : qsTr("%n system update(s) available", "", updatesModel.count)
// color: "white"
// font.pixelSize: app.smallFont
// }
// ColorIcon {
// height: app.iconSize / 2
// width: height
// color: "white"
// name: "../images/system-update.svg"
// RotationAnimation on rotation { from: 0; to: 360; duration: 2000; loops: Animation.Infinite; running: engine.systemController.updateRunning }
// }
// }
// }
// }
Item {
id: contentContainer
Layout.fillWidth: true
@ -363,7 +295,6 @@ Page {
} else {
PlatformHelper.vibrate(PlatformHelper.HapticsFeedbackSelection)
d.configOverlay = configComponent.createObject(contentContainer)
mainHeader.menuOpen = false;
}
}
}

View File

@ -62,8 +62,8 @@ ApplicationWindow {
property int smallIconSize: 16
property int iconSize: 24
property int largeIconSize: 32
property int hugeIconSize: 40
property int largeIconSize: 40
property int hugeIconSize: 64
property int delegateHeight: 60
property color backgroundColor: Material.background
@ -98,6 +98,22 @@ ApplicationWindow {
value: settings.units === "metric" ? Types.UnitSystemMetric : Types.UnitSystemImperial
}
property alias mainMenu: m
MainMenu {
id: m
height: app.height
width: Math.min(300, app.width)
// z: 1000
currentEngine: rootItem.currentEngine
onOpenThingSettings: rootItem.openThingSettings();
onOpenMagicSettings: rootItem.openMagicSettings();
onOpenAppSettings: rootItem.openAppSettings();
onOpenSystemSettings: rootItem.openSystemSettings();
onStartManualConnection: rootItem.startManualConnection();
onStartWirelessSetup: rootItem.startWirelessSetup();
onStartDemoMode: rootItem.startDemoMode();
}
RootItem {
id: rootItem
anchors.fill: parent

View File

@ -40,10 +40,35 @@ import "connection"
Item {
id: root
readonly property Engine currentEngine: swipeView.currentItem ? swipeView.currentItem.engine : null
function handleAndroidBackButton() {
return swipeView.currentItem.handleAndroidBackButton()
}
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
@ -125,8 +150,9 @@ Item {
value: engine.jsonRpcClient.currentHost === null
}
readonly property alias pageStack: _pageStack
StackView {
id: pageStack
id: _pageStack
objectName: "pageStack"
anchors.fill: parent
initialItem: Page {}

View File

@ -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)

View File

@ -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) + ")" : "")

View File

@ -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")

View File

@ -113,7 +113,7 @@ SettingsPageBase {
Repeater {
model: AWSClient.awsDevices
delegate: NymeaListItemDelegate {
delegate: NymeaSwipeDelegate {
Layout.fillWidth: true
text: model.name
subText: model.id

View File

@ -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"))

View File

@ -59,7 +59,7 @@ MeaDialog {
interactive: contentHeight > height
clip: true
delegate: NymeaListItemDelegate {
delegate: NymeaSwipeDelegate {
width: parent.width
text: actionType.displayName
progressive: false

View File

@ -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

View File

@ -132,7 +132,7 @@ Item {
ColorIcon {
id: colorIcon
anchors.centerIn: parent
height: app.hugeIconSize
height: app.largeIconSize
width: height
ColorIcon {
id: fallbackIcon

View 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
}
}
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -61,7 +61,7 @@ Item {
}
}
delegate: NymeaListItemDelegate {
delegate: NymeaSwipeDelegate {
id: logEntryDelegate
width: parent.width
implicitHeight: app.delegateHeight

View File

@ -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

View File

@ -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) : ""

View File

@ -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

View File

@ -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

View File

@ -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()

View File

@ -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()

View File

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="96"
height="96"
id="svg4874"
version="1.1"
inkscape:version="1.0.1 (1.0.1+r74)"
viewBox="0 0 96 96.000001"
sodipodi:docname="discourse.svg">
<defs
id="defs4876">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath40">
<path
inkscape:connector-curvature="0"
d="M 0,500 1024,500 1024,0 0,0 0,500 Z"
id="path42" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath18">
<path
inkscape:connector-curvature="0"
d="M 0,2743.88 0,0 l 2743.81,0 0,2743.88 -2743.81,0 z"
id="path20" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5147809"
inkscape:cx="39.478049"
inkscape:cy="41.238844"
inkscape:document-units="px"
inkscape:current-layer="g4780"
showgrid="true"
showborder="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="true"
inkscape:object-nodes="true"
inkscape:snap-smooth-nodes="true"
inkscape:snap-midpoints="true"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:snap-global="true"
inkscape:document-rotation="0"
inkscape:window-width="1380"
inkscape:window-height="873"
inkscape:window-x="60"
inkscape:window-y="27"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid5451"
empspacing="8" />
<sodipodi:guide
orientation="1,0"
position="8,-8.0000001"
id="guide4063" />
<sodipodi:guide
orientation="1,0"
position="4,-8.0000001"
id="guide4065" />
<sodipodi:guide
orientation="0,1"
position="-8,88.000001"
id="guide4067" />
<sodipodi:guide
orientation="0,1"
position="-8,92.000001"
id="guide4069" />
<sodipodi:guide
orientation="0,1"
position="104,4"
id="guide4071" />
<sodipodi:guide
orientation="0,1"
position="-5,8.0000001"
id="guide4073" />
<sodipodi:guide
orientation="1,0"
position="88,-8.0000001"
id="guide4077" />
<sodipodi:guide
orientation="0,1"
position="-8,84.000001"
id="guide4074" />
<sodipodi:guide
orientation="1,0"
position="12,-8.0000001"
id="guide4076" />
<sodipodi:guide
orientation="1,0"
position="84,-8.0000001"
id="guide4080" />
<sodipodi:guide
position="48,-8.0000001"
orientation="1,0"
id="guide4170" />
<sodipodi:guide
position="-8,48"
orientation="0,1"
id="guide4172" />
<sodipodi:guide
position="92,-8.0000001"
orientation="1,0"
id="guide4760" />
</sodipodi:namedview>
<metadata
id="metadata4879">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(67.857146,-78.50504)">
<g
transform="matrix(0,-1,-1,0,373.50506,516.50504)"
id="g4845"
style="display:inline">
<g
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="next01.png"
transform="matrix(-0.9996045,0,0,1,575.94296,-611.00001)"
id="g4778"
inkscape:label="Layer 1">
<g
transform="matrix(-1,0,0,1,575.99999,611)"
id="g4780"
style="display:inline">
<rect
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:none;stroke-width:4;marker:none;enable-background:accumulate"
id="rect4782"
width="96.037987"
height="96"
x="-438.00244"
y="345.36221"
transform="scale(-1,1)" />
<path
style="fill:#808080;stroke-width:0.172109;fill-opacity:1"
d="m 370.45327,437.26526 c 22.39272,-0.0517 24.64183,-0.0823 26.29472,-0.35869 9.37948,-1.5685 16.95358,-5.3381 23.56313,-11.72725 2.53558,-2.45102 4.33434,-4.6054 6.25016,-7.48583 3.76874,-5.66634 6.31103,-12.50536 7.22836,-19.44489 0.28495,-2.15583 0.28048,-8.58403 -0.007,-10.66859 -1.63772,-11.85721 -7.7332,-22.25857 -17.23346,-29.40734 -3.33103,-2.50655 -6.41214,-4.24451 -10.27222,-5.79425 -5.43917,-2.18372 -10.15108,-3.07611 -16.24208,-3.07611 -5.08146,0 -8.64807,0.53871 -13.20258,1.99417 -6.90805,2.2076 -12.72997,5.7549 -17.8806,10.89464 -7.62324,7.60713 -11.95008,16.9629 -12.80785,27.69385 -0.10957,1.3707 -0.17737,10.86165 -0.17737,24.82782 v 22.60888 z m -6.38639,-24.97202 1.92129,-8.58311 -0.71661,-2.08549 c -1.25904,-3.66397 -1.47554,-5.00522 -1.47558,-9.14053 -2e-5,-3.1127 0.0542,-3.86398 0.39103,-5.42032 2.35087,-10.86175 10.30404,-18.85762 21.0881,-21.20127 1.47524,-0.32061 2.28218,-0.37964 5.1897,-0.37964 2.92965,0 3.71228,0.0581 5.25033,0.38957 5.15881,1.11189 9.4907,3.40196 13.23214,6.99522 5.54248,5.32298 8.34297,11.90938 8.34071,19.61644 -10e-4,5.027 -1.13392,9.30301 -3.59549,13.57611 -6.9299,12.02983 -21.88973,16.81876 -34.35416,10.99744 l -1.65865,-0.77464 -7.55097,2.36314 c -4.15302,1.29973 -7.64778,2.39959 -7.76613,2.44412 -0.11835,0.0446 -0.21558,0.0146 -0.2161,-0.0665 -5e-4,-0.0811 0.86367,-4.00987 1.92039,-8.73057 z"
id="path847" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg id="svg4874" width="96" height="96" version="1.1" viewBox="0 0 96 96" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata id="metadata4879">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<g id="layer1" transform="translate(67.857 -78.505)">
<g id="g4845" transform="matrix(0 -1 -1 0 373.51 516.51)">
<g id="g4778" transform="matrix(-.9996 0 0 1 575.94 -611)">
<g id="g4780" transform="matrix(-1 0 0 1 576 611)">
<rect id="rect4782" transform="scale(-1,1)" x="-438" y="345.36" width="96.038" height="96" style="color:#000000;fill:none"/>
<path id="path2993" d="m427.74 352.44c-0.0235 0.64229-0.18584 1.3205-0.49593 2.0032l-30.761 79.721c-2.1835 5.4416-5.2211 5.4095-6.5743 0.99147l-6.3844-20.452-23.156-7.038c-2.5539-0.92471-3.5674-0.46828-3.5674-3.1495 0-2.069 0.94403-2.9854 2.0704-4.1373 0.69645-0.71219 5.1114-5.2551 9.6716-9.9442l-15.285-20.681c-2.1008-3.806-1.0138-6.5523 3.5342-7.5005l64.003-13.576c4.5296-1.1294 7.0467 0.97992 6.9449 3.7632zm-18.679 18.657-29.907 33.133a1.6774 1.6767 0 0 1-1.1283 0.55103l-17.42 1.2016c0.13256 0.0451 0.10968 0.0283 0.25258 0.0793l21.928 6.6657 26.275-41.631z" style="fill:#808080"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,178 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="96"
height="96"
id="svg4874"
version="1.1"
inkscape:version="0.91+devel r"
viewBox="0 0 96 96.000001"
sodipodi:docname="twitter-symbolic.svg">
<defs
id="defs4876">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath40">
<path
inkscape:connector-curvature="0"
d="M 0,500 1024,500 1024,0 0,0 0,500 Z"
id="path42" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath18">
<path
inkscape:connector-curvature="0"
d="M 0,2743.88 0,0 l 2743.81,0 0,2743.88 -2743.81,0 z"
id="path20" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="8.7812489"
inkscape:cx="59.308189"
inkscape:cy="66.197859"
inkscape:document-units="px"
inkscape:current-layer="g4780"
showgrid="true"
showborder="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="true"
inkscape:object-nodes="true"
inkscape:snap-smooth-nodes="true"
inkscape:snap-midpoints="true"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:snap-global="true">
<inkscape:grid
type="xygrid"
id="grid5451"
empspacing="8" />
<sodipodi:guide
orientation="1,0"
position="8,-8.0000001"
id="guide4063" />
<sodipodi:guide
orientation="1,0"
position="4,-8.0000001"
id="guide4065" />
<sodipodi:guide
orientation="0,1"
position="-8,88.000001"
id="guide4067" />
<sodipodi:guide
orientation="0,1"
position="-8,92.000001"
id="guide4069" />
<sodipodi:guide
orientation="0,1"
position="104,4"
id="guide4071" />
<sodipodi:guide
orientation="0,1"
position="-5,8.0000001"
id="guide4073" />
<sodipodi:guide
orientation="1,0"
position="88,-8.0000001"
id="guide4077" />
<sodipodi:guide
orientation="0,1"
position="-8,84.000001"
id="guide4074" />
<sodipodi:guide
orientation="1,0"
position="12,-8.0000001"
id="guide4076" />
<sodipodi:guide
orientation="1,0"
position="84,-8.0000001"
id="guide4080" />
<sodipodi:guide
position="48,-8.0000001"
orientation="1,0"
id="guide4170" />
<sodipodi:guide
position="-8,48"
orientation="0,1"
id="guide4172" />
<sodipodi:guide
position="92,-8.0000001"
orientation="1,0"
id="guide4760" />
</sodipodi:namedview>
<metadata
id="metadata4879">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(67.857146,-78.50504)">
<g
transform="matrix(0,-1,-1,0,373.50506,516.50504)"
id="g4845"
style="display:inline">
<g
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="next01.png"
transform="matrix(-0.9996045,0,0,1,575.94296,-611.00001)"
id="g4778"
inkscape:label="Layer 1">
<g
transform="matrix(-1,0,0,1,575.99999,611)"
id="g4780"
style="display:inline">
<rect
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:none;stroke-width:4;marker:none;enable-background:accumulate"
id="rect4782"
width="96.037987"
height="96"
x="-438.00244"
y="345.36221"
transform="scale(-1,1)" />
<path
style="display:inline;fill:#808080;fill-opacity:1;stroke:none;stroke-width:1.00019777"
d="m 424.78996,383.15823 c -2.00259,6.60179 -10.91398,12.9547 -20.99515,10.96184 1.31899,21.91096 13.05475,31.58759 18.67093,37.40634 -10.46434,5.93064 -20.63519,-0.15052 -23.92757,-5.46354 -0.15467,2.80362 1.05732,6.19462 2.11105,7.87784 -9.65399,0.63966 -16.34619,-7.23084 -18.08058,-13.92636 -0.63812,2.14035 -0.72402,4.15778 -0.21117,7.60609 -9.70945,-2.93661 -12.30805,-10.82569 -12.73574,-16.70227 -6.56176,7.56537 -7.99259,16.65074 -7.50998,26.52943 -15.66301,-25.61329 -6.02665,-51.47861 6.26533,-64.06803 10.32206,-10.57157 25.77864,-15.29742 39.60876,-15.46106 1.96541,-2.41955 6.13155,-7.31219 9.39212,-8.64168 -0.74188,1.92958 -2.50704,5.74695 -2.66571,9.73059 2.14854,-3.28069 6.45434,-7.04043 9.82044,-7.43405 -1.97748,3.63242 -3.69088,7.83596 -4.23733,11.43606 6.54884,6.78715 6.54328,13.39587 4.4946,20.1488 z"
id="path6437"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sccccccccscccccs" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -34,7 +34,7 @@ import QtQuick.Layouts 1.3
import Nymea 1.0
import "../components"
NymeaListItemDelegate {
NymeaSwipeDelegate {
id: root
implicitHeight: app.delegateHeight
progressive: false

View File

@ -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")

View File

@ -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

View File

@ -34,7 +34,7 @@ import QtQuick.Layouts 1.3
import Nymea 1.0
import "../components"
NymeaListItemDelegate {
NymeaSwipeDelegate {
id: root
implicitHeight: app.delegateHeight
canDelete: true

View File

@ -58,7 +58,7 @@ Page {
ruleTemplates: ruleTemplates
}
delegate: NymeaListItemDelegate {
delegate: NymeaSwipeDelegate {
width: parent.width
text: model.description
}

View File

@ -56,7 +56,7 @@ Page {
}
delegate: NymeaListItemDelegate {
delegate: NymeaSwipeDelegate {
text: model.description
}
}

View File

@ -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)

View File

@ -34,7 +34,7 @@ import QtQuick.Layouts 1.3
import Nymea 1.0
import "../components"
NymeaListItemDelegate {
NymeaSwipeDelegate {
id: root
implicitHeight: app.delegateHeight
canDelete: true

View File

@ -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"

View File

@ -118,7 +118,7 @@ Page {
anchors.fill: parent
ScrollBar.vertical: ScrollBar {}
delegate: NymeaListItemDelegate {
delegate: NymeaSwipeDelegate {
id: delegate
text: model.displayName
width: parent.width

View File

@ -157,7 +157,7 @@ Page {
}
}
NymeaListItemDelegate {
NymeaSwipeDelegate {
id: statePickerDelegate
Layout.fillWidth: true
text: deviceId === null || stateTypeId === null

View File

@ -51,7 +51,7 @@ Page {
model: device.deviceClass.stateTypes
delegate: NymeaListItemDelegate {
delegate: NymeaSwipeDelegate {
width: parent.width
iconName: "../images/state.svg"
text: model.displayName

View File

@ -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)

View File

@ -153,7 +153,7 @@ ItemDelegate {
method: "editInterfaceStateDescriptor"
}
}
delegate: NymeaListItemDelegate {
delegate: NymeaSwipeDelegate {
Layout.fillWidth: true
iconName: model.iconName
text: model.text

View File

@ -34,7 +34,7 @@ import QtQuick.Layouts 1.3
import Nymea 1.0
import "../components"
NymeaListItemDelegate{
NymeaSwipeDelegate{
id: root
implicitHeight: app.delegateHeight
progressive: false

View File

@ -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")

View File

@ -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)

View File

@ -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"

View File

@ -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)

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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))

View File

@ -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"

View File

@ -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

View File

@ -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")

View File

@ -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"

View File

@ -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"

View File

@ -158,7 +158,7 @@ Page {
groupByInterface: true
}
delegate: NymeaListItemDelegate {
delegate: NymeaSwipeDelegate {
id: deviceClassDelegate
width: parent.width
text: model.displayName

View File

@ -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

View File

@ -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, "")