some work to improve lighting stuff
This commit is contained in:
parent
4584791a62
commit
1b62117779
@ -303,7 +303,7 @@ void JsonRpcClient::sendRequest(const QVariantMap &request)
|
||||
{
|
||||
QVariantMap newRequest = request;
|
||||
newRequest.insert("token", m_token);
|
||||
// qDebug() << "Sending request" << qUtf8Printable(QJsonDocument::fromVariant(newRequest).toJson());
|
||||
qDebug() << "Sending request" << qUtf8Printable(QJsonDocument::fromVariant(newRequest).toJson());
|
||||
m_connection->sendData(QJsonDocument::fromVariant(newRequest).toJson(QJsonDocument::Compact) + "\n");
|
||||
}
|
||||
|
||||
|
||||
@ -173,6 +173,14 @@ QVariant LogsModelNg::maxValue() const
|
||||
return m_maxValue;
|
||||
}
|
||||
|
||||
LogEntry *LogsModelNg::get(int index) const
|
||||
{
|
||||
if (index >= 0 && index < m_list.count()) {
|
||||
return m_list.at(index);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void LogsModelNg::logsReply(const QVariantMap &data)
|
||||
{
|
||||
// qDebug() << "logs reply" << data;
|
||||
|
||||
@ -71,6 +71,8 @@ public:
|
||||
QVariant minValue() const;
|
||||
QVariant maxValue() const;
|
||||
|
||||
Q_INVOKABLE LogEntry *get(int index) const;
|
||||
|
||||
protected:
|
||||
virtual void fetchMore(const QModelIndex &parent = QModelIndex()) override;
|
||||
virtual bool canFetchMore(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
||||
@ -40,7 +40,7 @@ public:
|
||||
RoleDisplayName
|
||||
};
|
||||
|
||||
EventTypes(QObject *parent = 0);
|
||||
EventTypes(QObject *parent = nullptr);
|
||||
|
||||
QList<EventType *> eventTypes();
|
||||
|
||||
|
||||
@ -31,11 +31,11 @@ class Vendor : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString name READ name CONSTANT)
|
||||
Q_PROPERTY(QString displayName READ displayName)
|
||||
Q_PROPERTY(QString displayName READ displayName CONSTANT)
|
||||
Q_PROPERTY(QUuid id READ id CONSTANT)
|
||||
|
||||
public:
|
||||
Vendor(const QUuid &id = QUuid(), const QString &name = QString(), QObject *parent = 0);
|
||||
Vendor(const QUuid &id = QUuid(), const QString &name = QString(), QObject *parent = nullptr);
|
||||
|
||||
QUuid id() const;
|
||||
void setId(const QUuid &id);
|
||||
|
||||
@ -153,5 +153,9 @@
|
||||
<file>ui/images/smartmeter.svg</file>
|
||||
<file>ui/images/radiator.svg</file>
|
||||
<file>ui/images/ev-charger.svg</file>
|
||||
<file>ui/images/lighting/activate.svg</file>
|
||||
<file>ui/images/lighting/concentrate.svg</file>
|
||||
<file>ui/images/lighting/reading.svg</file>
|
||||
<file>ui/images/lighting/relax.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@ -81,10 +81,11 @@ Page {
|
||||
device: deviceProxy.get(index)
|
||||
canDelete: true
|
||||
onClicked: {
|
||||
pageStack.push(Qt.resolvedUrl("devicepages/ConfigureThingPage.qml"), {device: deviceProxy.get(index)})
|
||||
print("clicked:", model.id)
|
||||
pageStack.push(Qt.resolvedUrl("devicepages/ConfigureThingPage.qml"), {device: device})
|
||||
}
|
||||
onDeleteClicked: {
|
||||
d.deviceToRemove = deviceProxy.get(index);
|
||||
d.deviceToRemove = device;
|
||||
engine.deviceManager.removeDevice(d.deviceToRemove.id)
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ import "../components"
|
||||
Item {
|
||||
id: root
|
||||
|
||||
signal addRuleClicked(var value)
|
||||
signal addRuleClicked(int index)
|
||||
|
||||
property var logsModel: null
|
||||
|
||||
@ -66,7 +66,7 @@ Item {
|
||||
anchors.margins: app.margins
|
||||
name: "../images/magic.svg"
|
||||
}
|
||||
onClicked: root.addRuleClicked(model.value)
|
||||
onClicked: root.addRuleClicked(index)
|
||||
}
|
||||
onClicked: {
|
||||
if (swipe.complete) {
|
||||
|
||||
@ -46,7 +46,7 @@ DeviceListPageBase {
|
||||
property var deviceClass: engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId);
|
||||
|
||||
property var connectedStateType: deviceClass.stateTypes.findByName("connected");
|
||||
property var connectedState: device.states.getState(connectedStateType.id)
|
||||
property var connectedState: connectedStateType ? device.states.getState(connectedStateType.id) : null
|
||||
|
||||
property var powerStateType: deviceClass.stateTypes.findByName("power");
|
||||
property var powerActionType: deviceClass.actionTypes.findByName("power");
|
||||
@ -66,7 +66,7 @@ DeviceListPageBase {
|
||||
rightPadding: 0
|
||||
contentItem: ItemDelegate {
|
||||
id: contentItem
|
||||
implicitHeight: itemDelegate.brightnessStateType && !itemDelegate.inline && nameRow.enabled ? nameRow.implicitHeight + sliderRow.implicitHeight : nameRow.implicitHeight
|
||||
implicitHeight: nameRow.implicitHeight
|
||||
// gradient: Gradient {
|
||||
// GradientStop { position: 0.0; color: "transparent" }
|
||||
// GradientStop { position: 1.0; color: Qt.rgba(app.foregroundColor.r, app.foregroundColor.g, app.foregroundColor.b, 0.05) }
|
||||
@ -75,6 +75,14 @@ DeviceListPageBase {
|
||||
|
||||
topPadding: 0
|
||||
|
||||
Rectangle {
|
||||
anchors { left: parent.left; top: parent.top; bottom: parent.bottom }
|
||||
width: app.margins / 2
|
||||
color: itemDelegate.connectedState !== null && itemDelegate.connectedState.value === false ?
|
||||
"red"
|
||||
: itemDelegate.colorStateType ? itemDelegate.colorState.value : "#00000000"
|
||||
}
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
spacing: 0
|
||||
RowLayout {
|
||||
@ -101,16 +109,18 @@ DeviceListPageBase {
|
||||
anchors.fill: icon
|
||||
radius: 1
|
||||
samples: 17
|
||||
color: app.foregroundColor
|
||||
color: app.backgroundColor
|
||||
source: icon
|
||||
}
|
||||
|
||||
ColorIcon {
|
||||
id: icon
|
||||
anchors.fill: parent
|
||||
color: itemDelegate.connectedState !== null && itemDelegate.connectedState.value === false ?
|
||||
"red"
|
||||
: itemDelegate.colorStateType ? itemDelegate.colorState.value : "#00000000"
|
||||
color: app.accentColor
|
||||
// anchors.margins: app.margins / 4
|
||||
// color: itemDelegate.connectedState !== null && itemDelegate.connectedState.value === false ?
|
||||
// "red"
|
||||
// : itemDelegate.colorStateType ? itemDelegate.colorState.value : "#00000000"
|
||||
name: itemDelegate.connectedState !== null && itemDelegate.connectedState.value === false ?
|
||||
"../images/dialog-warning-symbolic.svg"
|
||||
: itemDelegate.powerState.value === true ? "../images/light-on.svg" : "../images/light-off.svg"
|
||||
@ -149,28 +159,6 @@ DeviceListPageBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
Item {
|
||||
id: sliderRow
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: outlineSlider.implicitHeight * .6
|
||||
Layout.preferredHeight: implicitHeight
|
||||
|
||||
ThrottledSlider {
|
||||
id: outlineSlider
|
||||
anchors { left: parent.left; right: parent.right; verticalCenter: parent.verticalCenter }
|
||||
visible: nameRow.enabled && itemDelegate.brightnessStateType && !inlineSlider.visible
|
||||
from: 0; to: 100
|
||||
value: itemDelegate.brightnessState ? itemDelegate.brightnessState.value : 0
|
||||
onMoved: {
|
||||
var params = [];
|
||||
var param1 = {};
|
||||
param1["paramTypeId"] = itemDelegate.brightnessActionType.paramTypes.get(0).id;
|
||||
param1["value"] = value;
|
||||
params.push(param1)
|
||||
engine.deviceManager.executeAction(itemDelegate.device.id, itemDelegate.brightnessActionType.id, params)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
onClicked: {
|
||||
enterPage(index, false)
|
||||
|
||||
@ -10,6 +10,7 @@ DevicePageBase {
|
||||
|
||||
GenericTypeLogView {
|
||||
anchors.fill: parent
|
||||
id: logView
|
||||
|
||||
logsModel: engine.jsonRpcClient.ensureServerVersion("1.10") ? logsModelNg : logsModel
|
||||
LogsModelNg {
|
||||
@ -43,10 +44,12 @@ DevicePageBase {
|
||||
}
|
||||
|
||||
onAddRuleClicked: {
|
||||
var value = logView.logsModel.get(index).value
|
||||
var typeId = logView.logsModel.get(index).typeId
|
||||
var rule = engine.ruleManager.createNewRule();
|
||||
var eventDescriptor = rule.eventDescriptors.createNewEventDescriptor();
|
||||
eventDescriptor.deviceId = device.id;
|
||||
var eventType = root.deviceClass.eventTypes.findByName("pressed");
|
||||
var eventType = root.deviceClass.eventTypes.getEventType(typeId);
|
||||
eventDescriptor.eventTypeId = eventType.id;
|
||||
rule.name = root.device.name + " - " + eventType.displayName;
|
||||
if (eventType.paramTypes.count === 1) {
|
||||
|
||||
@ -29,10 +29,12 @@ DevicePageBase {
|
||||
}
|
||||
|
||||
onAddRuleClicked: {
|
||||
var value = logView.logsModel.get(index).value
|
||||
var typeId = logView.logsModel.get(index).typeId
|
||||
var rule = engine.ruleManager.createNewRule();
|
||||
var eventDescriptor = rule.eventDescriptors.createNewEventDescriptor();
|
||||
eventDescriptor.deviceId = device.id;
|
||||
var eventType = root.deviceClass.eventTypes.findByName("triggered");
|
||||
var eventType = root.deviceClass.eventTypes.getEventType(typeId);
|
||||
eventDescriptor.eventTypeId = eventType.id;
|
||||
rule.name = root.device.name + " - " + eventType.displayName;
|
||||
if (eventType.paramTypes.count === 1) {
|
||||
|
||||
@ -30,7 +30,7 @@ DevicePageBase {
|
||||
columns: app.landscape ? 2 : 1
|
||||
|
||||
AbstractButton {
|
||||
Layout.preferredWidth: app.iconSize * 4
|
||||
Layout.preferredWidth: Math.max(app.iconSize * 4, parent.width / 5)
|
||||
Layout.preferredHeight: width
|
||||
Layout.leftMargin: app.margins
|
||||
Layout.rightMargin: app.landscape ? 0 : app.margins
|
||||
@ -38,8 +38,18 @@ DevicePageBase {
|
||||
Layout.bottomMargin: app.landscape ? app.margins : 0
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
ColorIcon {
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "white"
|
||||
border.color: root.powerState.value === true ? app.accentColor : bulbIcon.keyColor
|
||||
border.width: 4
|
||||
radius: width / 2
|
||||
}
|
||||
|
||||
ColorIcon {
|
||||
id: bulbIcon
|
||||
anchors.fill: parent
|
||||
anchors.margins: app.margins * 1.5
|
||||
name: root.powerState.value === true ? "../images/light-on.svg" : "../images/light-off.svg"
|
||||
color: root.powerState.value === true ? app.accentColor : keyColor
|
||||
}
|
||||
@ -57,99 +67,161 @@ DevicePageBase {
|
||||
Layout.fillWidth: true
|
||||
visible: root.brightnessStateType
|
||||
|
||||
BrightnessSlider {
|
||||
Layout.fillWidth: true
|
||||
RowLayout {
|
||||
Layout.margins: app.margins
|
||||
Layout.preferredHeight: 40
|
||||
brightness: root.brightnessState ? root.brightnessState.value : 0
|
||||
visible: root.brightnessStateType
|
||||
onMoved: {
|
||||
var params = []
|
||||
var param = {}
|
||||
param["paramTypeId"] = root.brightnessActionType.paramTypes.get(0).id;
|
||||
param["value"] = brightness;
|
||||
params.push(param)
|
||||
engine.deviceManager.executeAction(root.device.id, root.brightnessActionType.id, params);
|
||||
}
|
||||
}
|
||||
spacing: app.margins
|
||||
|
||||
ColorPickerCt {
|
||||
id: pickerCt
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
Layout.margins: app.margins
|
||||
ct: root.ctState ? root.ctState.value : 0
|
||||
visible: root.ctStateType
|
||||
minCt: root.ctActionType ? root.ctActionType.paramTypes.findByName("colorTemperature").minValue : 0
|
||||
maxCt: root.ctActionType ? root.ctActionType.paramTypes.findByName("colorTemperature").maxValue : 0
|
||||
Repeater {
|
||||
model: ListModel {
|
||||
ListElement { name: "activate"; ct: "153"; bri: 100 }
|
||||
ListElement { name: "concentrate"; ct: "233"; bri: 100 }
|
||||
ListElement { name: "reading"; ct: "350"; bri: 100 }
|
||||
ListElement { name: "relax"; ct: "480" ; bri: 55}
|
||||
}
|
||||
delegate: Pane {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: width
|
||||
Material.elevation: 1
|
||||
padding: 0
|
||||
Image {
|
||||
source: "../images/lighting/" + model.name + ".svg"
|
||||
anchors.fill: parent
|
||||
ItemDelegate {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
var params = [];
|
||||
var param1 = {};
|
||||
param1["paramTypeId"] = root.ctActionType.paramTypes.get(0).id;
|
||||
param1["value"] = model.ct;
|
||||
params.push(param1)
|
||||
engine.deviceManager.executeAction(root.device.id, root.ctActionType.id, params)
|
||||
params = [];
|
||||
param1 = {};
|
||||
param1["paramTypeId"] = root.brightnessActionType.paramTypes.get(0).id;
|
||||
param1["value"] = model.bri;
|
||||
params.push(param1)
|
||||
engine.deviceManager.executeAction(root.device.id, root.brightnessActionType.id, params)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
touchDelegate: Rectangle {
|
||||
height: pickerCt.height
|
||||
width: 5
|
||||
color: app.foregroundColor
|
||||
}
|
||||
|
||||
property var lastSentTime: new Date()
|
||||
onCtChanged: {
|
||||
var currentTime = new Date();
|
||||
if (pressed && currentTime - lastSentTime > 200) {
|
||||
setColorTemp(ct)
|
||||
lastSentTime = currentTime
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setColorTemp(ct) {
|
||||
var params = []
|
||||
var param = {}
|
||||
param["paramTypeId"] = root.ctActionType.paramTypes.get(0).id;
|
||||
param["value"] = ct;
|
||||
params.push(param)
|
||||
engine.deviceManager.executeAction(root.device.id, root.ctActionType.id, params);
|
||||
Pane {
|
||||
Layout.fillWidth: true
|
||||
Layout.margins: app.margins
|
||||
Layout.preferredHeight: 20
|
||||
Material.elevation: 1
|
||||
padding: 0
|
||||
|
||||
BrightnessSlider {
|
||||
anchors.fill: parent
|
||||
brightness: root.brightnessState ? root.brightnessState.value : 0
|
||||
visible: root.brightnessStateType
|
||||
onMoved: {
|
||||
var params = []
|
||||
var param = {}
|
||||
param["paramTypeId"] = root.brightnessActionType.paramTypes.get(0).id;
|
||||
param["value"] = brightness;
|
||||
params.push(param)
|
||||
engine.deviceManager.executeAction(root.device.id, root.brightnessActionType.id, params);
|
||||
}
|
||||
}
|
||||
}
|
||||
ColorPicker {
|
||||
id: colorPicker
|
||||
|
||||
Pane {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 80
|
||||
Layout.margins: app.margins
|
||||
visible: root.colorStateType
|
||||
Layout.preferredHeight: 20
|
||||
Material.elevation: 1
|
||||
padding: 0
|
||||
|
||||
color: root.colorState ? root.colorState.value : "white"
|
||||
touchDelegate: Rectangle {
|
||||
height: 15
|
||||
width: height
|
||||
radius: height / 2
|
||||
color: app.foregroundColor
|
||||
ColorPickerCt {
|
||||
id: pickerCt
|
||||
anchors.fill: parent
|
||||
ct: root.ctState ? root.ctState.value : 0
|
||||
visible: root.ctStateType
|
||||
minCt: root.ctActionType ? root.ctActionType.paramTypes.findByName("colorTemperature").minValue : 0
|
||||
maxCt: root.ctActionType ? root.ctActionType.paramTypes.findByName("colorTemperature").maxValue : 0
|
||||
|
||||
Rectangle {
|
||||
color: colorPicker.hovered || colorPicker.pressed ? "#11000000" : "transparent"
|
||||
anchors.centerIn: parent
|
||||
height: 30
|
||||
|
||||
touchDelegate: Rectangle {
|
||||
height: pickerCt.height
|
||||
width: 5
|
||||
color: app.foregroundColor
|
||||
}
|
||||
|
||||
property var lastSentTime: new Date()
|
||||
onCtChanged: {
|
||||
var currentTime = new Date();
|
||||
if (pressed && currentTime - lastSentTime > 200) {
|
||||
setColorTemp(ct)
|
||||
lastSentTime = currentTime
|
||||
}
|
||||
}
|
||||
|
||||
function setColorTemp(ct) {
|
||||
var params = []
|
||||
var param = {}
|
||||
param["paramTypeId"] = root.ctActionType.paramTypes.get(0).id;
|
||||
param["value"] = ct;
|
||||
params.push(param)
|
||||
engine.deviceManager.executeAction(root.device.id, root.ctActionType.id, params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Pane {
|
||||
Layout.fillWidth: true
|
||||
Layout.margins: app.margins
|
||||
Layout.preferredHeight: 80
|
||||
Material.elevation: 1
|
||||
padding: 0
|
||||
|
||||
ColorPicker {
|
||||
id: colorPicker
|
||||
anchors.fill: parent
|
||||
visible: root.colorStateType
|
||||
|
||||
color: root.colorState ? root.colorState.value : "white"
|
||||
touchDelegate: Rectangle {
|
||||
height: 15
|
||||
width: height
|
||||
radius: width / 2
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: 200
|
||||
radius: height / 2
|
||||
color: app.foregroundColor
|
||||
|
||||
Rectangle {
|
||||
color: colorPicker.hovered || colorPicker.pressed ? "#11000000" : "transparent"
|
||||
anchors.centerIn: parent
|
||||
height: 30
|
||||
width: height
|
||||
radius: width / 2
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property var lastSentTime: new Date()
|
||||
onColorChanged: {
|
||||
var currentTime = new Date();
|
||||
if (pressed && currentTime - lastSentTime > 200) {
|
||||
var params = [];
|
||||
var param1 = {};
|
||||
param1["paramTypeId"] = root.colorActionType.paramTypes.get(0).id;
|
||||
param1["value"] = color;
|
||||
params.push(param1)
|
||||
engine.deviceManager.executeAction(root.device.id, root.colorActionType.id, params)
|
||||
lastSentTime = currentTime
|
||||
property var lastSentTime: new Date()
|
||||
onColorChanged: {
|
||||
var currentTime = new Date();
|
||||
if (pressed && currentTime - lastSentTime > 200) {
|
||||
var params = [];
|
||||
var param1 = {};
|
||||
param1["paramTypeId"] = root.colorActionType.paramTypes.get(0).id;
|
||||
param1["value"] = color;
|
||||
params.push(param1)
|
||||
engine.deviceManager.executeAction(root.device.id, root.colorActionType.id, params)
|
||||
lastSentTime = currentTime
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,10 +78,12 @@ Page {
|
||||
logsModel: engine.jsonRpcClient.ensureServerVersion("1.10") ? logsModelNg : logsModel
|
||||
|
||||
onAddRuleClicked: {
|
||||
var value = logView.logsModel.get(index).value
|
||||
var typeId = logView.logsModel.get(index).typeId
|
||||
var rule = engine.ruleManager.createNewRule();
|
||||
var stateEvaluator = rule.createStateEvaluator();
|
||||
stateEvaluator.stateDescriptor.deviceId = device.id;
|
||||
stateEvaluator.stateDescriptor.stateTypeId = root.stateType.id;
|
||||
stateEvaluator.stateDescriptor.stateTypeId = typeId;
|
||||
stateEvaluator.stateDescriptor.value = value;
|
||||
stateEvaluator.stateDescriptor.valueOperator = StateDescriptor.ValueOperatorEquals;
|
||||
rule.setStateEvaluator(stateEvaluator);
|
||||
|
||||
81
nymea-app/ui/images/lighting/activate.svg
Normal file
81
nymea-app/ui/images/lighting/activate.svg
Normal file
@ -0,0 +1,81 @@
|
||||
<?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="256"
|
||||
height="256"
|
||||
viewBox="0 0 256 256"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="activate.svg">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="2.8"
|
||||
inkscape:cx="66.409554"
|
||||
inkscape:cy="199.91527"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
units="px"
|
||||
inkscape:window-width="2880"
|
||||
inkscape:window-height="1752"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="48"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4136" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<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(0,-796.36216)">
|
||||
<rect
|
||||
style="opacity:1;fill:#00c5ff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4138"
|
||||
width="256"
|
||||
height="256"
|
||||
x="0"
|
||||
y="796.36218" />
|
||||
<circle
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4140"
|
||||
cx="128"
|
||||
cy="924.36218"
|
||||
r="92.000023" />
|
||||
<path
|
||||
style="opacity:1;fill:#00c5ff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 210.00002,924.36218 c 0,45.28736 -36.71266,82.00002 -82.00002,82.00002 -39.180492,0 -71.94291,-27.47904 -80.066297,-64.21617 C 55,937.36216 130.28569,892.21933 130.28569,892.21933 l -0.14284,40.14283 c 0,0 64.85715,-45 69.81602,-47.35033 6.4013,11.68105 10.04115,25.09063 10.04115,39.35035 z"
|
||||
id="path4202"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ssccccs" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
103
nymea-app/ui/images/lighting/concentrate.svg
Normal file
103
nymea-app/ui/images/lighting/concentrate.svg
Normal file
@ -0,0 +1,103 @@
|
||||
<?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="256"
|
||||
height="256"
|
||||
viewBox="0 0 256 256"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="concentrate.svg">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="11.2"
|
||||
inkscape:cx="128.78304"
|
||||
inkscape:cy="130.74689"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
units="px"
|
||||
inkscape:window-width="2880"
|
||||
inkscape:window-height="1752"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="48"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4136" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<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(0,-796.36216)">
|
||||
<rect
|
||||
style="opacity:1;fill:#3dddff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4138"
|
||||
width="256"
|
||||
height="256"
|
||||
x="0"
|
||||
y="796.36218" />
|
||||
<circle
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4140"
|
||||
cx="128"
|
||||
cy="924.36218"
|
||||
r="92.000023" />
|
||||
<path
|
||||
style="opacity:1;fill:#3dddff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 210.00002,924.36218 A 82.000023,82.000023 0 0 1 128,1006.3622 82.000023,82.000023 0 0 1 45.999977,924.36218 82.000023,82.000023 0 0 1 128,842.36216 a 82.000023,82.000023 0 0 1 82.00002,82.00002 z"
|
||||
id="path4202" />
|
||||
<circle
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4254"
|
||||
cx="128"
|
||||
cy="924.36218"
|
||||
r="70" />
|
||||
<circle
|
||||
style="opacity:1;fill:#3dddff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4256"
|
||||
cx="128"
|
||||
cy="924.36218"
|
||||
r="55.000023" />
|
||||
<circle
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4258"
|
||||
cx="128"
|
||||
cy="924.36218"
|
||||
r="35.000023" />
|
||||
<circle
|
||||
style="opacity:1;fill:#3dddff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4260"
|
||||
cx="128"
|
||||
cy="924.36218"
|
||||
r="20.000023" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
122
nymea-app/ui/images/lighting/reading.svg
Normal file
122
nymea-app/ui/images/lighting/reading.svg
Normal file
@ -0,0 +1,122 @@
|
||||
<?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="256"
|
||||
height="256"
|
||||
viewBox="0 0 256 256"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="reading.svg">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="2.8"
|
||||
inkscape:cx="66.409554"
|
||||
inkscape:cy="199.91527"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
units="px"
|
||||
inkscape:window-width="2880"
|
||||
inkscape:window-height="1752"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="48"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4136" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<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(0,-796.36216)">
|
||||
<rect
|
||||
style="opacity:1;fill:#f4de00;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4138"
|
||||
width="256"
|
||||
height="256"
|
||||
x="0"
|
||||
y="796.36218" />
|
||||
<circle
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4140"
|
||||
cx="128"
|
||||
cy="924.36218"
|
||||
r="92.000023" />
|
||||
<g
|
||||
id="g4156"
|
||||
transform="translate(-2,1.9999774)"
|
||||
style="fill:#f4de00;fill-opacity:1">
|
||||
<rect
|
||||
y="867.36218"
|
||||
x="80"
|
||||
height="10"
|
||||
width="100"
|
||||
id="rect4142"
|
||||
style="opacity:1;fill:#f4de00;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
style="opacity:1;fill:#f4de00;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4144"
|
||||
width="100"
|
||||
height="10"
|
||||
x="80"
|
||||
y="887.36218" />
|
||||
<rect
|
||||
y="907.36218"
|
||||
x="80"
|
||||
height="10"
|
||||
width="100"
|
||||
id="rect4146"
|
||||
style="opacity:1;fill:#f4de00;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
style="opacity:1;fill:#f4de00;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4148"
|
||||
width="100"
|
||||
height="10"
|
||||
x="80"
|
||||
y="927.36218" />
|
||||
<rect
|
||||
y="947.36218"
|
||||
x="80"
|
||||
height="10"
|
||||
width="100"
|
||||
id="rect4150"
|
||||
style="opacity:1;fill:#f4de00;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
style="opacity:1;fill:#f4de00;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4152"
|
||||
width="100"
|
||||
height="10"
|
||||
x="80"
|
||||
y="967.36218" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
81
nymea-app/ui/images/lighting/relax.svg
Normal file
81
nymea-app/ui/images/lighting/relax.svg
Normal file
@ -0,0 +1,81 @@
|
||||
<?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="256"
|
||||
height="256"
|
||||
viewBox="0 0 256 256"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="relax.svg">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="2.8"
|
||||
inkscape:cx="66.409554"
|
||||
inkscape:cy="199.91527"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
units="px"
|
||||
inkscape:window-width="2880"
|
||||
inkscape:window-height="1752"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="48"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4136" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<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(0,-796.36216)">
|
||||
<rect
|
||||
style="opacity:1;fill:#ffaf2a;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4138"
|
||||
width="256"
|
||||
height="256"
|
||||
x="0"
|
||||
y="796.36218" />
|
||||
<circle
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4140"
|
||||
cx="128"
|
||||
cy="924.36218"
|
||||
r="92.000023" />
|
||||
<path
|
||||
id="circle4230"
|
||||
style="opacity:1;fill:#ffaf2a;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 128,1006.3622 c 45.28736,0 82.00002,-36.71266 82.21429,-82.00002 0.21428,22.88037 -18.33392,41.42857 -41.21429,41.42857 -22.88037,0 -41.42857,-18.5482 -41,-41.42857 0.42857,-22.88037 -18.11963,-41.42857 -41,-41.42857 -22.880367,0 -41.42857,18.5482 -41.214297,41.42857 0.214276,45.28736 36.926936,82.00002 82.214297,82.00002 z"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="scscscs" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
@ -46,8 +46,11 @@ Page {
|
||||
return;
|
||||
}
|
||||
rule = engine.ruleManager.createNewRule();
|
||||
d.editRulePage = pageStack.push(Qt.resolvedUrl("EditRulePage.qml"), {rule: rule, initialDeviceToBeAdded: root.device});
|
||||
} else {
|
||||
d.editRulePage = pageStack.push(Qt.resolvedUrl("EditRulePage.qml"), {rule: rule});
|
||||
}
|
||||
d.editRulePage = pageStack.push(Qt.resolvedUrl("EditRulePage.qml"), {rule: rule, initialDeviceToBeAdded: root.device});
|
||||
|
||||
d.editRulePage.StackView.onRemoved.connect(function() {
|
||||
rule.destroy();
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user