Merge pull request #13 from guh/ui-fixes

some ui fixes here and there
This commit is contained in:
Michael Zanetti 2018-05-29 16:16:36 +02:00 committed by GitHub
commit ee5c5d8489
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 428 additions and 272 deletions

View File

@ -48,7 +48,7 @@ int main(int argc, char *argv[])
applicationFont.setWeight(QFont::Normal);
QGuiApplication::setFont(applicationFont);
QTranslator qtTranslator;
QTranslator qtTranslator;
qtTranslator.load("qt_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
application.installTranslator(&qtTranslator);

View File

@ -67,7 +67,6 @@
<file>ui/images/settings.svg</file>
<file>ui/images/stock_link.svg</file>
<file>ui/images/share.svg</file>
<file>ui/SystemInfoPage.qml</file>
<file>ui/devicepages/SensorDevicePage.qml</file>
<file>ui/components/Graph.qml</file>
<file>ui/images/sensors.svg</file>
@ -162,5 +161,8 @@
<file>ui/images/network-vpn.svg</file>
<file>translations/mea-de_DE.qm</file>
<file>translations/mea-en_US.qm</file>
<file>ui/AppSettingsPage.qml</file>
<file>ui/images/stock_application.svg</file>
<file>ui/delegates/ThingDelegate.qml</file>
</qresource>
</RCC>

140
mea/ui/AppSettingsPage.qml Normal file
View File

@ -0,0 +1,140 @@
import QtQuick 2.5
import QtQuick.Controls 2.1
import QtQuick.Controls.Material 2.1
import QtQuick.Layouts 1.1
import Mea 1.0
import "components"
Page {
id: root
header: GuhHeader {
text: qsTr("App Settings")
backButtonVisible: true
onBackPressed: pageStack.pop()
}
ColumnLayout {
anchors { left: parent.left; right: parent.right; top: parent.top }
ColumnLayout {
Layout.fillWidth: true
Layout.margins: app.margins
RowLayout {
Layout.fillWidth: true
Label {
Layout.fillWidth: true
text: qsTr("View mode")
}
ComboBox {
model: [qsTr("Windowed"), qsTr("Maximized"), qsTr("Fullscreen")]
currentIndex: {
switch (settings.viewMode) {
case ApplicationWindow.Windowed:
return 0;
case ApplicationWindow.Maximized:
return 1;
case ApplicationWindow.FullScreen:
return 2;
}
}
onCurrentIndexChanged: {
switch (currentIndex) {
case 0:
settings.viewMode = ApplicationWindow.Windowed;
break;
case 1:
settings.viewMode = ApplicationWindow.Maximized;
break;
case 2:
settings.viewMode = ApplicationWindow.FullScreen;
}
}
}
}
RowLayout {
Layout.fillWidth: true
visible: appBranding.length === 0
Label {
Layout.fillWidth: true
text: "Style"
}
ComboBox {
model: styleController.allStyles
currentIndex: styleController.allStyles.indexOf(styleController.currentStyle)
onActivated: {
styleController.currentStyle = model[index]
}
}
Connections {
target: styleController
onCurrentStyleChanged: {
var popup = styleChangedDialog.createObject(root)
popup.open()
}
}
}
RowLayout {
Layout.fillWidth: true
Label {
Layout.fillWidth: true
text: qsTr("Return to home on idle")
}
CheckBox {
checked: settings.returnToHome
onClicked: settings.returnToHome = checked
}
}
RowLayout {
Layout.fillWidth: true
Label {
Layout.fillWidth: true
text: qsTr("Graph style")
}
RadioButton {
checked: settings.graphStyle === "bars"
text: qsTr("Bars")
onClicked: settings.graphStyle = "bars"
}
RadioButton {
checked: settings.graphStyle === "bezier"
text: qsTr("Lines")
onClicked: settings.graphStyle = "bezier"
}
}
}
}
Component {
id: styleChangedDialog
Dialog {
width: Math.min(parent.width * .8, contentLabel.implicitWidth)
x: (parent.width - width) / 2
y: (parent.height - height) / 2
modal: true
title: qsTr("Style changed")
standardButtons: Dialog.Ok
ColumnLayout {
id: content
anchors { left: parent.left; top: parent.top; right: parent.right }
Label {
id: contentLabel
Layout.fillWidth: true
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: qsTr("The application needs to be restarted for style changes to take effect.")
}
}
}
}
}

View File

@ -61,17 +61,23 @@ Page {
IconMenuItem {
objectName: "manualConnectMenuItem"
iconSource: "../images/network-vpn.svg"
text: qsTr("Manual connect")
text: qsTr("Manual connection")
onTriggered: pageStack.push(manualConnectPage)
}
MenuSeparator {}
IconMenuItem {
iconSource: "../images/bluetooth.svg"
text: qsTr("Wireless setup")
onTriggered: pageStack.push(Qt.resolvedUrl("BluetoothDiscoveryPage.qml"))
}
MenuSeparator {}
IconMenuItem {
iconSource: "../images/stock_application.svg"
text: qsTr("App settings")
onTriggered: pageStack.push(Qt.resolvedUrl("AppSettingsPage.qml"))
}
}
ColumnLayout {

View File

@ -50,7 +50,7 @@ Item {
text: interfaceToString(model.name).toUpperCase()
width: parent.width
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
}
}

View File

@ -2,6 +2,7 @@ import QtQuick 2.4
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.2
import "components"
import "delegates"
import Mea 1.0
Page {
@ -14,22 +15,9 @@ Page {
ListView {
anchors.fill: parent
model: Engine.deviceManager.devices
delegate: ItemDelegate {
width: parent.width
contentItem: RowLayout {
spacing: app.margins
ColorIcon {
height: app.iconSize
width: height
name: app.interfacesToIcon(model.interfaces)
color: app.guhAccent
}
Label {
Layout.fillWidth: true
text: model.name
}
}
delegate: ThingDelegate {
interfaces:model.interfaces
name: model.name
onClicked: {
pageStack.push(Qt.resolvedUrl("devicepages/ConfigureThingPage.qml"), {device: Engine.deviceManager.devices.get(index)})
}

View File

@ -7,7 +7,7 @@ import Mea 1.0
Page {
id: root
header: GuhHeader {
text: "Magic"
text: qsTr("Magic")
onBackPressed: pageStack.pop()
HeaderButton {

View File

@ -4,6 +4,7 @@ import QtQuick.Controls.Material 2.1
import QtQuick.Layouts 1.2
import Mea 1.0
import "components"
import "delegates"
Page {
id: root
@ -17,23 +18,23 @@ Page {
// FIXME: Currently we don't have any feedback for executeAction
// we don't want all the results, e.g. on looped calls like "all off"
// Connections {
// target: Engine.deviceManager
// onExecuteActionReply: {
// var text = params["deviceError"]
// switch(text) {
// case "DeviceErrorNoError":
// return;
// case "DeviceErrorHardwareNotAvailable":
// text = qsTr("Could not execute action. The thing is not available");
// break;
// }
// Connections {
// target: Engine.deviceManager
// onExecuteActionReply: {
// var text = params["deviceError"]
// switch(text) {
// case "DeviceErrorNoError":
// return;
// case "DeviceErrorHardwareNotAvailable":
// text = qsTr("Could not execute action. The thing is not available");
// break;
// }
// var errorDialog = Qt.createComponent(Qt.resolvedUrl("components/ErrorDialog.qml"))
// var popup = errorDialog.createObject(root, {text: text})
// popup.open()
// }
// }
// var errorDialog = Qt.createComponent(Qt.resolvedUrl("components/ErrorDialog.qml"))
// var popup = errorDialog.createObject(root, {text: text})
// popup.open()
// }
// }
Menu {
id: mainMenu
@ -57,14 +58,14 @@ Page {
MenuSeparator {}
IconMenuItem {
iconSource: "../images/settings.svg"
text: qsTr("Settings")
text: qsTr("System settings")
onTriggered: pageStack.push(Qt.resolvedUrl("SettingsPage.qml"))
}
MenuSeparator {}
IconMenuItem {
iconSource: "../images/info.svg"
text: qsTr("System information")
onTriggered: pageStack.push(Qt.resolvedUrl("SystemInfoPage.qml"))
iconSource: "../images/stock_application.svg"
text: qsTr("App settings")
onTriggered: pageStack.push(Qt.resolvedUrl("AppSettingsPage.qml"))
}
}
@ -101,28 +102,9 @@ Page {
id: devicesProxy
devices: Engine.deviceManager.devices
}
delegate: ItemDelegate {
width: parent.width
property string mainInterface: app.interfacesToIcon(model.interfaces)
contentItem: RowLayout {
spacing: app.margins
ColorIcon {
height: app.iconSize
width: height
name: app.interfacesToIcon(model.interfaces)
color: app.guhAccent
}
Label {
Layout.fillWidth: true
text: model.name
}
Image {
source: "images/next.svg"
Layout.preferredHeight: parent.height
Layout.preferredWidth: height
}
}
delegate: ThingDelegate {
interfaces: model.interfaces
name: model.name
onClicked: {
pageStack.push(Qt.resolvedUrl("devicepages/GenericDevicePage.qml"), {device: devicesProxy.get(index)})
}

View File

@ -8,7 +8,7 @@ import "components"
Page {
id: root
header: GuhHeader {
text: qsTr("Settings")
text: qsTr("System settings")
backButtonVisible: true
onBackPressed: pageStack.pop()
}
@ -21,114 +21,29 @@ Page {
Layout.margins: app.margins
Label {
text: qsTr("Application").toUpperCase()
color: app.guhAccent
Layout.fillWidth: true
}
RowLayout {
Layout.fillWidth: true
Label {
Layout.fillWidth: true
text: qsTr("View mode")
}
ComboBox {
model: [qsTr("Windowed"), qsTr("Maximized"), qsTr("Fullscreen")]
currentIndex: {
switch (settings.viewMode) {
case ApplicationWindow.Windowed:
return 0;
case ApplicationWindow.Maximized:
return 1;
case ApplicationWindow.FullScreen:
return 2;
}
}
onCurrentIndexChanged: {
switch (currentIndex) {
case 0:
settings.viewMode = ApplicationWindow.Windowed;
break;
case 1:
settings.viewMode = ApplicationWindow.Maximized;
break;
case 2:
settings.viewMode = ApplicationWindow.FullScreen;
}
}
}
}
RowLayout {
Layout.fillWidth: true
visible: appBranding.length === 0
Label {
Layout.fillWidth: true
text: "Style"
}
ComboBox {
model: styleController.allStyles
currentIndex: styleController.allStyles.indexOf(styleController.currentStyle)
onActivated: {
styleController.currentStyle = model[index]
}
}
Connections {
target: styleController
onCurrentStyleChanged: {
var popup = styleChangedDialog.createObject(root)
popup.open()
}
}
}
RowLayout {
Layout.fillWidth: true
Label {
Layout.fillWidth: true
text: qsTr("Return to home on idle")
}
CheckBox {
checked: settings.returnToHome
onClicked: settings.returnToHome = checked
}
text: qsTr("Connected to:")
color: Material.accent
}
RowLayout {
Layout.fillWidth: true
Label {
Layout.fillWidth: true
text: qsTr("Graph style")
text: Engine.connection.url
}
RadioButton {
checked: settings.graphStyle === "bars"
text: qsTr("Bars")
onClicked: settings.graphStyle = "bars"
Button {
text: qsTr("Disconnect")
onClicked: {
settings.lastConnectedHost = "";
Engine.connection.disconnect();
}
}
RadioButton {
checked: settings.graphStyle === "bezier"
text: qsTr("Lines")
onClicked: settings.graphStyle = "bezier"
}
}
}
ThinDivider {}
Label {
Layout.fillWidth: true
Layout.leftMargin: app.margins
Layout.rightMargin: app.margins
Layout.topMargin: app.margins
text: qsTr("System").toUpperCase()
color: app.guhAccent
}
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: app.margins
@ -191,6 +106,24 @@ Page {
pageStack.push(Qt.resolvedUrl("system/PluginsPage.qml"))
}
}
ItemDelegate {
Layout.fillWidth: true
contentItem: RowLayout {
Label {
text: qsTr("Log viewer")
Layout.fillWidth: true
}
Image {
source: "images/next.svg"
Layout.preferredHeight: parent.height
Layout.preferredWidth: height
}
}
onClicked: pageStack.push(Qt.resolvedUrl("system/LogViewerPage.qml"))
}
}
Component {

View File

@ -1,70 +0,0 @@
import QtQuick 2.8
import QtQuick.Controls 2.1
import QtQuick.Controls.Material 2.1
import QtQuick.Layouts 1.3
import "components"
import Mea 1.0
Page {
id: root
header: GuhHeader {
text: qsTr("System information")
backButtonVisible: true
onBackPressed: pageStack.pop()
}
ColumnLayout {
anchors.fill: parent
ColumnLayout {
Layout.fillWidth: true
Layout.margins: app.margins
Label {
Layout.fillWidth: true
text: qsTr("Connected to:")
color: Material.accent
}
RowLayout {
Layout.fillWidth: true
Label {
Layout.fillWidth: true
text: Engine.connection.url
}
Button {
text: qsTr("Disconnect")
onClicked: {
settings.lastConnectedHost = "";
Engine.connection.disconnect();
}
}
}
}
ThinDivider {}
ItemDelegate {
Layout.fillWidth: true
contentItem: RowLayout {
Label {
text: qsTr("Log viewer")
Layout.fillWidth: true
}
Image {
source: "images/next.svg"
Layout.preferredHeight: parent.height
Layout.preferredWidth: height
}
}
onClicked: pageStack.push(Qt.resolvedUrl("system/LogViewerPage.qml"))
}
Item {
Layout.fillWidth: true
Layout.fillHeight: true
}
}
}

View File

@ -1,6 +1,7 @@
import QtQuick 2.4
import QtQuick.Controls 2.1
import Mea 1.0
import QtQuick.Controls.Material 2.2
Item {
id: root
@ -116,7 +117,7 @@ Item {
function paintGrid(ctx) {
ctx.strokeStyle = canvas.gridColor;
ctx.fillStyle = "black"
ctx.fillStyle = Material.foreground
ctx.lineWidth = 1;
ctx.beginPath();
@ -139,8 +140,8 @@ Item {
ctx.beginPath();
var label = maxTemp - (tempInterval * i).toFixed(0)
var textSize = ctx.measureText(label)
ctx.strokeStyle = "black"
ctx.fillStyle = "black"
ctx.strokeStyle = Material.foreground
ctx.fillStyle = Material.foreground
ctx.lineWidth = 0;
ctx.text(label, -textSize.width - app.margins, i * pps + 5)
// ctx.stroke();
@ -149,8 +150,8 @@ Item {
}
ctx.beginPath();
ctx.strokeStyle = "black"
ctx.fillStyle = "black"
ctx.strokeStyle = Material.foreground
ctx.fillStyle = Material.foreground
ctx.lineWidth = 0;
var label = "°C"
var textSize = ctx.measureText(label)
@ -165,8 +166,8 @@ Item {
// enumate x axis
ctx.beginPath();
ctx.globalAlpha = 1;
ctx.strokeStyle = "black"
ctx.fillStyle = "black"
ctx.strokeStyle = Material.foreground
ctx.fillStyle = Material.foreground
ctx.lineWidth = 0;
// enumerate Y axis

View File

@ -14,9 +14,11 @@ MenuItem {
width: height
}
Label {
id: label
text: root.text
Layout.fillWidth: true
font.pixelSize: app.mediumFont
elide: Text.ElideRight
}
}
}

View File

@ -0,0 +1,32 @@
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.2
import "../components"
ItemDelegate {
id: root
width: parent.width
property var interfaces: []
property var name: ""
contentItem: RowLayout {
spacing: app.margins
ColorIcon {
height: app.iconSize
width: height
name: app.interfacesToIcon(root.interfaces)
color: app.guhAccent
}
Label {
Layout.fillWidth: true
text: root.name
}
Image {
source: "../images/next.svg"
Layout.preferredHeight: parent.height
Layout.preferredWidth: height
}
}
}

View File

@ -25,9 +25,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6568543"
inkscape:cx="115.91572"
inkscape:cy="46.722217"
inkscape:zoom="22.627417"
inkscape:cx="54.176835"
inkscape:cy="72.222857"
inkscape:document-units="px"
inkscape:current-layer="g4780"
showgrid="false"
@ -139,7 +139,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@ -174,24 +174,13 @@
<g
id="g1894"
transform="matrix(0.8660254,0.49980225,-0.50019783,0.8660254,249.00681,-142.21407)">
<rect
style="fill:none;fill-opacity:1;stroke:#808080;stroke-width:3.00153852;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.00094485;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 29.755859,6.5097656 c -0.654123,0.047511 -1.307124,0.2389046 -1.908203,0.5859375 l -5.195312,2.9999999 c -2.13716,1.23389 -2.881855,4.012097 -1.648438,6.148438 l 17.476563,30.271484 c 3.009096,-0.472374 6.067623,-1.095125 9.109375,-1.910156 2.084295,-0.558488 4.092919,-1.18961 6.037109,-1.861328 L 33.996094,8.7421875 C 33.225208,7.4069744 31.85184,6.6144936 30.408203,6.5097656 c -0.216545,-0.015709 -0.434302,-0.015837 -0.652344,0 z m 0.453125,2.9746094 c 0.475623,0.029654 0.919634,0.2958079 1.1875,0.759766 l 5.5,9.52539 -7.792968,4.5 -5.5,-9.527343 C 23.17493,13.999856 23.410844,13.121464 24.152344,12.693359 L 29.349609,9.6933594 C 29.627675,9.5328181 29.923611,9.4665826 30.208984,9.484375 Z m 26.746094,39.025391 c -1.814693,0.583376 -3.660039,1.143112 -5.560547,1.652343 -3.249871,0.870815 -6.450488,1.575325 -9.576172,2.134766 l 20.185547,34.960937 c 1.233417,2.136341 4.011278,2.880375 6.148438,1.646485 l 5.197265,-3 c 2.137169,-1.233895 2.879902,-4.010144 1.646485,-6.146485 z m 9.941406,23.220703 5.5,9.527343 c 0.428586,0.742332 0.194634,1.618765 -0.546875,2.046876 l -5.197265,3 c -0.7415,0.428104 -1.620243,0.195456 -2.048828,-0.546876 l -5.5,-9.527343 z"
transform="matrix(-0.50019783,-0.8660254,-0.86636805,0.5,455.57862,410.93144)"
id="rect1888"
width="12"
height="88.034821"
x="-399.36221"
y="-434.00089"
transform="matrix(0,-1,-1,0,0,0)"
rx="3"
ry="3.0011871" />
<rect
style="fill:#808080;fill-opacity:1;stroke:none;stroke-width:3.00153852;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1890"
width="12"
height="60.023739"
x="-399.36221"
y="-419.99533"
transform="matrix(0,-1,-1,0,0,0)" />
inkscape:connector-curvature="0"
sodipodi:nodetypes="scccccccsssccccccsccccccccccccccc" />
</g>
<path
sodipodi:type="star"
@ -266,14 +255,13 @@
inkscape:transform-center-x="-0.06331877"
inkscape:transform-center-y="-0.61654618" />
<path
style="fill:#808080;fill-opacity:1;stroke:#ffffff;stroke-width:1.50029671;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 422.9456,387.13916 c 0.41673,-4.36096 0.4085,-8.39102 -4.7e-4,-11.88327 -0.81794,-6.98452 -3.23883,-11.8178 -7.06881,-12.84455 -7.66091,-2.05289 -18.05798,11.90079 -23.22212,31.16593 -5.16409,19.26514 -3.45309,39.40357 4.30075,41.07181 5.99681,1.29022 17.70837,-11.65794 19.05693,-14.99875 -0.63403,1.52511 -1.7672,5.36696 -5.55437,10.31771 -5.48611,7.17168 -11.19038,11.06022 -16.10785,9.74286 -9.83518,-2.63379 -12.43389,-24.81834 -5.80431,-49.55007 6.62937,-24.73177 19.97658,-42.64531 29.81151,-40.0106 4.91759,1.31689 8.02607,7.52147 9.07645,16.4883 0.52519,4.48341 0.53585,9.65739 8.7e-4,15.25624 -0.26749,2.79943 -0.67139,5.70507 -1.21559,8.68373"
id="path1945"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccscscccssc" />
style="fill:#808080;fill-opacity:1;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 67.513672 10.917969 C 66.493152 10.917305 65.434004 10.953809 64.369141 10.996094 L 63.826172 12.373047 L 65.064453 14.210938 C 65.438421 14.244894 65.830087 14.264111 66.193359 14.306641 C 69.750679 14.723066 72.787297 15.544697 75.117188 16.794922 C 77.447076 18.045147 79.094458 19.763523 79.673828 21.923828 C 80.253028 24.084403 79.685229 26.394797 78.292969 28.642578 C 76.900689 30.890369 74.681094 33.122225 71.808594 35.261719 C 66.063594 39.540696 57.688946 43.452776 47.978516 46.054688 C 38.262796 48.657997 28.345412 49.532279 20.576172 48.769531 C 16.691562 48.388152 13.343288 47.602974 10.798828 46.375 C 8.2543682 45.147036 6.4596556 43.424899 5.9785156 41.189453 C 5.5911256 39.389645 6.2567856 37.391466 7.3847656 35.351562 C 8.5127356 33.31166 10.146742 31.211204 11.919922 29.259766 C 13.049542 28.016587 14.196023 27.034758 15.345703 25.978516 C 14.198123 26.64999 13.202239 27.096549 11.849609 28.130859 C 8.3114598 30.836369 5.6074594 33.583556 3.9746094 36.195312 C 2.3417594 38.80707 1.78282 41.231781 2.375 43.441406 C 2.96752 45.653121 4.6644394 47.502933 7.3808594 48.960938 C 10.097289 50.418941 13.808222 51.447488 18.226562 51.964844 C 27.063252 52.999564 38.717849 52.005538 51.005859 48.712891 C 63.293889 45.420372 73.884061 40.453139 81.019531 35.138672 C 84.587271 32.481433 87.286616 29.736177 88.910156 27.115234 C 90.533686 24.494281 91.079048 22.043686 90.486328 19.832031 C 89.893818 17.620326 88.196889 15.770503 85.480469 14.3125 C 82.764049 12.854487 79.053106 11.827912 74.634766 11.310547 C 72.425596 11.051864 70.041501 10.919613 67.513672 10.917969 z M 62.724609 11.078125 C 61.674769 11.140476 60.621418 11.20698 59.537109 11.310547 C 56.933931 11.559183 54.230913 11.939605 51.466797 12.429688 L 54.220703 15.048828 L 54.150391 14.304688 C 57.352761 13.998794 60.375476 13.925484 63.158203 14.064453 L 62.142578 12.558594 L 62.724609 11.078125 z "
transform="matrix(0,-1,-1.0003957,0,438.00245,441.36222)"
id="path1945" />
<path
sodipodi:type="star"
style="fill:#808080;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:#808080;fill-opacity:1;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path1970"
sodipodi:sides="5"
sodipodi:cx="46.3125"
@ -286,9 +274,9 @@
inkscape:rounded="0"
inkscape:randomized="0"
d="m 57.687499,11.999999 -8.684017,-0.527665 -5.35778,6.854543 -2.18167,-8.4220481 -8.174703,-2.9773817 7.335671,-4.6774469 0.305536,-8.6946667 6.715363,5.53122727 8.363535,-2.39621797 -3.185348,8.0959334 z"
transform="matrix(0,-1,-1.0003957,0,430.32036,431.20152)"
inkscape:transform-center-x="0.82409001"
inkscape:transform-center-y="0.44110773" />
transform="matrix(0,-0.87442092,-0.87476693,0,429.6294,425.38564)"
inkscape:transform-center-x="0.72060319"
inkscape:transform-center-y="0.38571588" />
</g>
</g>
</g>

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,149 @@
<?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="90"
height="90"
id="svg4874"
version="1.1"
inkscape:version="0.48+devel r"
viewBox="0 0 90 90.000001"
sodipodi:docname="application.svg">
<defs
id="defs4876" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="9.9475982"
inkscape:cx="42.145851"
inkscape:cy="60.924254"
inkscape:document-units="px"
inkscape:current-layer="g1708"
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:grid
type="xygrid"
id="grid5451"
empspacing="6" />
<sodipodi:guide
orientation="1,0"
position="6,77"
id="guide4063" />
<sodipodi:guide
orientation="1,0"
position="3,78"
id="guide4065" />
<sodipodi:guide
orientation="0,1"
position="55,84"
id="guide4067" />
<sodipodi:guide
orientation="0,1"
position="53,87"
id="guide4069" />
<sodipodi:guide
orientation="0,1"
position="20,3"
id="guide4071" />
<sodipodi:guide
orientation="0,1"
position="20,6"
id="guide4073" />
<sodipodi:guide
orientation="1,0"
position="87,7"
id="guide4075" />
<sodipodi:guide
orientation="1,0"
position="84,7"
id="guide4077" />
<sodipodi:guide
orientation="0,1"
position="58,81"
id="guide4074" />
<sodipodi:guide
orientation="1,0"
position="9,74"
id="guide4076" />
<sodipodi:guide
orientation="0,1"
position="21,9"
id="guide4078" />
<sodipodi:guide
orientation="1,0"
position="81,4"
id="guide4080" />
</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,-84.50504)">
<g
transform="matrix(0,-1,-1,0,373.50506,516.50504)"
id="g4845"
style="display:inline">
<g
inkscape:label="Layer 1"
id="g1708"
transform="matrix(0,-1,-1,0,1394.3622,441.36221)"
inkscape:export-filename="add01.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<rect
style="color:#000000;fill:none;stroke:none;stroke-width:7.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect1710"
width="90"
height="90"
x="0"
y="962.36218" />
<path
style="font-size:12.0041132px;font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#808080;fill-opacity:1;stroke:none;display:inline;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Medium"
d="m 37.919531,969.59968 -0.269947,0.57364 c -2.470265,5.23352 -4.819069,10.60749 -7.147958,15.98121 -2.328309,5.37372 -4.750084,11.15825 -7.147959,17.09467 -0.668357,1.7048 -1.347892,3.4814 -2.022724,5.2266 l 15.206987,0 c 1.232517,-3.2534 2.444502,-6.4118 3.573042,-9.37509 1.738852,-4.41419 3.284763,-7.98813 4.686571,-11.29463 1.341537,3.1954 2.699134,6.60886 4.416625,11.02655 1.177794,3.02917 2.379151,6.29727 3.60866,9.64317 l 15.542545,0 c -0.71173,-1.7472 -1.435604,-3.5225 -2.123954,-5.2266 -2.328678,-5.93992 -4.514447,-11.71731 -6.844268,-17.09467 -2.328962,-5.3737 -4.711506,-10.74857 -7.181703,-15.98121 l -0.269946,-0.57364 -14.025971,0 z m -25.288739,42.14542 c -4.7818752,0 -8.6307895,3.8507 -8.6307895,8.6326 0,4.7819 3.8489143,8.6308 8.6307895,8.6308 l 64.738422,0 c 4.781876,0 8.63079,-3.8489 8.63079,-8.6308 0,-4.7819 -3.848914,-8.6326 -8.63079,-8.6326 l -64.738422,0 z m 0,4.3154 37.764392,0 c 2.390962,0 4.315394,1.9263 4.315395,4.3172 0,2.391 -1.924433,4.3154 -4.315395,4.3154 l -37.764392,0 c -2.390961,0 -4.3153944,-1.9244 -4.3153944,-4.3154 0,-2.3909 1.9244334,-4.3172 4.3153944,-4.3172 z m -0.133098,16.2192 c -1.292892,3.6757 -2.6224164,7.4957 -4.0135799,11.4633 l -0.5398931,1.3817 15.94934,0 3.303095,-9.1032 c 0.452661,-1.2399 0.917292,-2.4876 1.349732,-3.7418 l -15.915596,0 c -0.04512,0 -0.08809,5e-4 -0.133098,0 z m 48.314801,0 c 0.427356,1.2706 0.859414,2.522 1.315989,3.7418 1.052685,2.8128 2.052266,5.6803 3.035023,8.5634 l 0.234329,0.5398 0.843583,0 15.98121,0 -0.571764,-1.3817 c -1.393471,-3.9739 -2.769541,-7.7925 -4.114808,-11.4633 -0.05624,8e-4 -0.11044,0 -0.166843,0 l -16.556719,0 z"
id="path2996"
inkscape:connector-curvature="0" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -2,7 +2,7 @@ import QtQuick 2.8
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.2
import "../components"
import "../paramdescriptordelegates"
import "../delegates"
import Mea 1.0
Page {

View File

@ -2,6 +2,7 @@ import QtQuick 2.6
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.1
import "../components"
import "../delegates"
import Mea 1.0
Page {
@ -20,6 +21,8 @@ Page {
RowLayout {
Layout.fillWidth: true
// TODO: unfinished, disabled for now
visible: false
RadioButton {
id: thingButton
text: qsTr("A specific thing")
@ -36,9 +39,9 @@ Page {
Layout.fillHeight: true
model: thingButton.checked ? Engine.deviceManager.devices : Interfaces
clip: true
delegate: ItemDelegate {
text: thingButton.checked ? model.name : model.displayName
width: parent.width
delegate: ThingDelegate {
name: thingButton.checked ? model.name : model.displayName
interfaces: model.interfaces
onClicked: {
if (thingButton.checked) {
root.thingSelected(Engine.deviceManager.devices.get(index))