hide features which aren't implemented in the core yet
This commit is contained in:
parent
c8c62d89a5
commit
2d41671b2b
@ -134,6 +134,21 @@ bool JsonRpcClient::pushButtonAuthAvailable() const
|
||||
return m_pushButtonAuthAvailable;
|
||||
}
|
||||
|
||||
QString JsonRpcClient::serverVersion() const
|
||||
{
|
||||
return m_serverVersion;
|
||||
}
|
||||
|
||||
QString JsonRpcClient::jsonRpcVersion() const
|
||||
{
|
||||
return m_jsonRpcVersion.toString();
|
||||
}
|
||||
|
||||
QString JsonRpcClient::serverUuid() const
|
||||
{
|
||||
return m_serverUuid;
|
||||
}
|
||||
|
||||
int JsonRpcClient::createUser(const QString &username, const QString &password)
|
||||
{
|
||||
QVariantMap params;
|
||||
@ -168,6 +183,10 @@ int JsonRpcClient::requestPushButtonAuth(const QString &deviceName)
|
||||
return reply->commandId();
|
||||
}
|
||||
|
||||
bool JsonRpcClient::ensureServerVersion(const QString &jsonRpcVersion)
|
||||
{
|
||||
return QVersionNumber(m_jsonRpcVersion) >= QVersionNumber::fromString(jsonRpcVersion);
|
||||
}
|
||||
|
||||
void JsonRpcClient::processAuthenticate(const QVariantMap &data)
|
||||
{
|
||||
@ -274,24 +293,28 @@ void JsonRpcClient::dataReceived(const QByteArray &data)
|
||||
m_initialSetupRequired = dataMap.value("initialSetupRequired").toBool();
|
||||
m_authenticationRequired = dataMap.value("authenticationRequired").toBool();
|
||||
m_pushButtonAuthAvailable = dataMap.value("pushButtonAuthAvailable").toBool();
|
||||
emit pushButtonAuthAvailableChanged();
|
||||
|
||||
qDebug() << "Handshake received" << "initRequired:" << m_initialSetupRequired << "authRequired:" << m_authenticationRequired << "pushButtonAvailable:" << m_pushButtonAuthAvailable;;
|
||||
m_serverUuid = dataMap.value("uuid").toString();
|
||||
emit pushButtonAuthAvailableChanged();
|
||||
m_serverVersion = dataMap.value("version").toString();
|
||||
|
||||
QString protoVersionString = dataMap.value("protocol version").toString();
|
||||
if (!protoVersionString.contains('.')) {
|
||||
protoVersionString.prepend("0.");
|
||||
}
|
||||
m_jsonRpcVersion = QVersionNumber::fromString(protoVersionString);
|
||||
|
||||
QVersionNumber minimumRequiredVersion = QVersionNumber(1, 0);
|
||||
QVersionNumber protocolVersion = QVersionNumber::fromString(protoVersionString);
|
||||
if (protocolVersion < minimumRequiredVersion) {
|
||||
qWarning() << "Nymea box doesn't support minimum required version. Required:" << minimumRequiredVersion << "Found:" << protocolVersion;
|
||||
if (m_jsonRpcVersion < minimumRequiredVersion) {
|
||||
qWarning() << "Nymea box doesn't support minimum required version. Required:" << minimumRequiredVersion << "Found:" << m_jsonRpcVersion;
|
||||
m_connection->disconnect();
|
||||
emit invalidProtocolVersion(protocolVersion.toString(), minimumRequiredVersion.toString());
|
||||
emit invalidProtocolVersion(m_jsonRpcVersion.toString(), minimumRequiredVersion.toString());
|
||||
return;
|
||||
}
|
||||
|
||||
emit handshakeReceived();
|
||||
|
||||
if (m_initialSetupRequired) {
|
||||
emit initialSetupRequiredChanged();
|
||||
return;
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
#include <QObject>
|
||||
#include <QVariantMap>
|
||||
#include <QPointer>
|
||||
#include <QVersionNumber>
|
||||
|
||||
#include "nymeaconnection.h"
|
||||
#include "jsonhandler.h"
|
||||
@ -39,6 +40,9 @@ class JsonRpcClient : public JsonHandler
|
||||
Q_PROPERTY(bool initialSetupRequired READ initialSetupRequired NOTIFY initialSetupRequiredChanged)
|
||||
Q_PROPERTY(bool authenticationRequired READ authenticationRequired NOTIFY authenticationRequiredChanged)
|
||||
Q_PROPERTY(bool pushButtonAuthAvailable READ pushButtonAuthAvailable NOTIFY pushButtonAuthAvailableChanged)
|
||||
Q_PROPERTY(QString serverVersion READ serverVersion NOTIFY handshakeReceived)
|
||||
Q_PROPERTY(QString jsonRpcVersion READ jsonRpcVersion NOTIFY handshakeReceived)
|
||||
Q_PROPERTY(QString serverUuid READ serverUuid NOTIFY handshakeReceived)
|
||||
|
||||
public:
|
||||
explicit JsonRpcClient(NymeaConnection *connection, QObject *parent = 0);
|
||||
@ -56,13 +60,19 @@ public:
|
||||
bool authenticationRequired() const;
|
||||
bool pushButtonAuthAvailable() const;
|
||||
|
||||
QString serverVersion() const;
|
||||
QString jsonRpcVersion() const;
|
||||
QString serverUuid() const;
|
||||
|
||||
// ui methods
|
||||
Q_INVOKABLE int createUser(const QString &username, const QString &password);
|
||||
Q_INVOKABLE int authenticate(const QString &username, const QString &password, const QString &deviceName);
|
||||
Q_INVOKABLE int requestPushButtonAuth(const QString &deviceName);
|
||||
|
||||
Q_INVOKABLE bool ensureServerVersion(const QString &jsonRpcVersion);
|
||||
|
||||
signals:
|
||||
void handshakeReceived();
|
||||
void initialSetupRequiredChanged();
|
||||
void authenticationRequiredChanged();
|
||||
void pushButtonAuthAvailableChanged();
|
||||
@ -94,6 +104,8 @@ private:
|
||||
bool m_pushButtonAuthAvailable = false;
|
||||
int m_pendingPushButtonTransaction = -1;
|
||||
QString m_serverUuid;
|
||||
QVersionNumber m_jsonRpcVersion;
|
||||
QString m_serverVersion;
|
||||
QByteArray m_token;
|
||||
QByteArray m_receiveBuffer;
|
||||
|
||||
|
||||
@ -202,5 +202,8 @@
|
||||
<file>ui/components/MeaListItemDelegate.qml</file>
|
||||
<file>ui/images/state-interface.svg</file>
|
||||
<file>ui/images/action-interface.svg</file>
|
||||
<file>ui/system/AboutNymeaPage.qml</file>
|
||||
<file>ui/images/logs.svg</file>
|
||||
<file>ui/images/plugin.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@ -110,24 +110,11 @@ Page {
|
||||
}
|
||||
}
|
||||
ThinDivider {}
|
||||
ItemDelegate {
|
||||
MeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
|
||||
contentItem: RowLayout {
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("About %1").arg(app.appName)
|
||||
}
|
||||
Image {
|
||||
source: "images/next.svg"
|
||||
Layout.preferredHeight: parent.height
|
||||
Layout.preferredWidth: height
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
pageStack.push(Qt.resolvedUrl("AboutPage.qml"))
|
||||
}
|
||||
text: qsTr("About %1").arg(app.appName)
|
||||
iconName: "../images/info.svg"
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -89,41 +89,25 @@ Page {
|
||||
|
||||
}
|
||||
|
||||
ItemDelegate {
|
||||
MeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
contentItem: RowLayout {
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Plugins")
|
||||
}
|
||||
Image {
|
||||
source: "images/next.svg"
|
||||
Layout.preferredHeight: parent.height
|
||||
Layout.preferredWidth: height
|
||||
}
|
||||
}
|
||||
onClicked: {
|
||||
pageStack.push(Qt.resolvedUrl("system/PluginsPage.qml"))
|
||||
}
|
||||
iconName: "../images/plugin.svg"
|
||||
text: qsTr("Plugins")
|
||||
onClicked:pageStack.push(Qt.resolvedUrl("system/PluginsPage.qml"))
|
||||
}
|
||||
|
||||
ItemDelegate {
|
||||
MeaListItemDelegate {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
iconName: "../images/logs.svg"
|
||||
text: qsTr("Log viewer")
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("system/LogViewerPage.qml"))
|
||||
}
|
||||
|
||||
MeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
iconName: "../images/info.svg"
|
||||
text: qsTr("About nymea")
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("system/AboutNymeaPage.qml"))
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
|
||||
@ -23,6 +23,7 @@ SwipeDelegate {
|
||||
Layout.preferredWidth: height
|
||||
name: root.iconName
|
||||
color: root.iconColor
|
||||
visible: root.iconName
|
||||
}
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
177
mea/ui/images/logs.svg
Normal file
177
mea/ui/images/logs.svg
Normal file
@ -0,0 +1,177 @@
|
||||
<?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="text-x-generic-symbolic.svg">
|
||||
<defs
|
||||
id="defs4876" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="3.259629"
|
||||
inkscape:cx="5.0926006"
|
||||
inkscape:cy="70.49882"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="g5283"
|
||||
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
|
||||
id="g5283"
|
||||
transform="matrix(0,-1,-1,0,-293.63782,2219.3622)">
|
||||
<rect
|
||||
y="-725.63782"
|
||||
x="1778"
|
||||
height="90"
|
||||
width="90"
|
||||
id="rect5285"
|
||||
style="fill:none;stroke:none" />
|
||||
<path
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;enable-background:accumulate"
|
||||
d="m 9,3 0,84 51,0 3,0 18,-18 0,-3 0,-63 z m 6,6 60,0 0,57 -15,0 0,15 -45,0 z"
|
||||
transform="translate(1778,-725.63782)"
|
||||
id="path5289"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect5293"
|
||||
d="m 1802,-707.63781 42,0 0,3.99999 -42,0 z"
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6;marker:none;enable-background:accumulate" />
|
||||
<path
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6;marker:none;enable-background:accumulate"
|
||||
d="m 1802,-699.63781 42,0 0,3.99999 -42,0 z"
|
||||
id="path4615"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4617"
|
||||
d="m 1802,-691.63781 42,0 0,3.99999 -42,0 z"
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6;marker:none;enable-background:accumulate" />
|
||||
<path
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6;marker:none;enable-background:accumulate"
|
||||
d="m 1802,-683.63781 42,0 0,3.99999 -42,0 z"
|
||||
id="path4619"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4621"
|
||||
d="m 1802,-675.63781 21,0 0,3.99999 -21,0 z"
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6;marker:none;enable-background:accumulate" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.0 KiB |
164
mea/ui/images/plugin.svg
Normal file
164
mea/ui/images/plugin.svg
Normal file
@ -0,0 +1,164 @@
|
||||
<?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="package-x-generic-symbolic.svg">
|
||||
<defs
|
||||
id="defs4876" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="4.0745362"
|
||||
inkscape:cx="-10.320196"
|
||||
inkscape:cy="41.857524"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="g5283"
|
||||
showgrid="false"
|
||||
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
|
||||
id="g5283"
|
||||
transform="matrix(0,-1,-1,0,-293.63782,2219.3622)">
|
||||
<rect
|
||||
y="-725.63782"
|
||||
x="1778"
|
||||
height="90"
|
||||
width="90"
|
||||
id="rect5285"
|
||||
style="fill:none;stroke:none" />
|
||||
<path
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
d="m 1823,-639.00386 -38.8426,-19.35382 0,-41.47248 38.8426,19.35383 38.8426,-19.35383 0,41.47248 z"
|
||||
id="path4170"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4174"
|
||||
d="m 1861.8426,-664.67723 0,-38.2407 -38.8426,-19.35382 -38.8426,19.35382 0,38.2407"
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
|
||||
<path
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
d="m 1823,-680.6378 0,41.63394"
|
||||
id="path4176"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<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;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;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;color-interpolation:sRGB;color-interpolation-filters:linearRGB;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:2.00000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 1836.3594,-712.26282 -38.1485,19.01563 0,22.12304 6.4668,3.22461 0,-21.34765 38.9297,-19.4043 z"
|
||||
id="path4178"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.4 KiB |
@ -521,16 +521,19 @@ Page {
|
||||
iconName: "../images/event.svg"
|
||||
text: qsTr("When one of my things triggers an event")
|
||||
method: "addEventDescriptor"
|
||||
minimumJsonRpcVersion: "1.0"
|
||||
}
|
||||
ListElement {
|
||||
iconName: "../images/event-interface.svg"
|
||||
text: qsTr("When a thing of a given type triggers an event")
|
||||
method: "addInterfaceEventDescriptor"
|
||||
minimumJsonRpcVersion: "1.5"
|
||||
}
|
||||
ListElement {
|
||||
iconName: "../images/alarm-clock.svg"
|
||||
text: qsTr("At a particular time or date")
|
||||
method: "addTimeEventItem"
|
||||
minimumJsonRpcVersion: "1.0"
|
||||
}
|
||||
}
|
||||
delegate: MeaListItemDelegate {
|
||||
@ -539,6 +542,7 @@ Page {
|
||||
text: model.text
|
||||
progressive: true
|
||||
iconSize: app.iconSize * 2
|
||||
visible: Engine.jsonRpcClient.ensureServerVersion(model.minimumJsonRpcVersion)
|
||||
|
||||
onClicked: {
|
||||
root[model.method]()
|
||||
@ -567,17 +571,19 @@ Page {
|
||||
iconName: "../images/state.svg"
|
||||
text: qsTr("When one of my things is in a certain state")
|
||||
method: "createStateEvaluator"
|
||||
|
||||
minimumJsonRpcVersion: "1.0"
|
||||
}
|
||||
ListElement {
|
||||
iconName: "../images/state-interface.svg"
|
||||
text: qsTr("When a thing of a given type enters a state")
|
||||
method: "createInterfaceStateEvaluator"
|
||||
minimumJsonRpcVersion: "1.5"
|
||||
}
|
||||
ListElement {
|
||||
iconName: "../images/clock-app-symbolic.svg"
|
||||
text: qsTr("During a given time")
|
||||
method: "addCalendarItem"
|
||||
minimumJsonRpcVersion: "1.0"
|
||||
}
|
||||
}
|
||||
delegate: MeaListItemDelegate {
|
||||
@ -586,6 +592,7 @@ Page {
|
||||
text: model.text
|
||||
progressive: true
|
||||
iconSize: app.iconSize * 2
|
||||
visible: Engine.jsonRpcClient.ensureServerVersion(model.minimumJsonRpcVersion)
|
||||
|
||||
onClicked: {
|
||||
root[model.method]()
|
||||
@ -618,24 +625,28 @@ Page {
|
||||
text: qsTr("Execute an action on of my things")
|
||||
method: "addRuleAction"
|
||||
isExitAction: false
|
||||
minimumJsonRpcVersion: "1.0"
|
||||
}
|
||||
ListElement {
|
||||
iconName: "../images/action-interface.svg"
|
||||
text: qsTr("Execute an action on an entire kind of things")
|
||||
method: "addInterfaceRuleAction"
|
||||
isExitAction: false
|
||||
minimumJsonRpcVersion: "1.5"
|
||||
}
|
||||
ListElement {
|
||||
iconName: "../images/action.svg"
|
||||
text: qsTr("Execute an action on of my things")
|
||||
method: "addRuleExitAction"
|
||||
isExitAction: true
|
||||
minimumJsonRpcVersion: "1.0"
|
||||
}
|
||||
ListElement {
|
||||
iconName: "../images/action-interface.svg"
|
||||
text: qsTr("Execute an action on an entire kind of things")
|
||||
method: "addInterfaceRuleExitAction"
|
||||
isExitAction: true
|
||||
minimumJsonRpcVersion: "1.5"
|
||||
}
|
||||
}
|
||||
delegate: MeaListItemDelegate {
|
||||
@ -644,7 +655,7 @@ Page {
|
||||
text: model.text
|
||||
progressive: true
|
||||
iconSize: app.iconSize * 2
|
||||
visible: ruleActionQuestionPage.exitAction === model.isExitAction
|
||||
visible: ruleActionQuestionPage.exitAction === model.isExitAction && Engine.jsonRpcClient.ensureServerVersion(model.minimumJsonRpcVersion)
|
||||
|
||||
onClicked: {
|
||||
root[model.method]()
|
||||
|
||||
39
mea/ui/system/AboutNymeaPage.qml
Normal file
39
mea/ui/system/AboutNymeaPage.qml
Normal file
@ -0,0 +1,39 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import Mea 1.0
|
||||
import "../components"
|
||||
|
||||
Page {
|
||||
|
||||
id: root
|
||||
header: GuhHeader {
|
||||
text: qsTr("About %1").arg(app.systemName)
|
||||
onBackPressed: pageStack.pop()
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors { left: parent.left; top: parent.top; right: parent.right }
|
||||
|
||||
MeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Server UUID:")
|
||||
subText: Engine.jsonRpcClient.serverUuid
|
||||
progressive: false
|
||||
}
|
||||
|
||||
MeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Server version:")
|
||||
subText: Engine.jsonRpcClient.serverVersion
|
||||
progressive: false
|
||||
}
|
||||
|
||||
MeaListItemDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Protocol version:")
|
||||
subText: Engine.jsonRpcClient.jsonRpcVersion
|
||||
progressive: false
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -18,21 +18,11 @@ Page {
|
||||
model: Engine.deviceManager.plugins
|
||||
clip: true
|
||||
|
||||
delegate: ItemDelegate {
|
||||
delegate: MeaListItemDelegate {
|
||||
width: parent.width
|
||||
contentItem: RowLayout {
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: model.name
|
||||
}
|
||||
Image {
|
||||
source: "../images/next.svg"
|
||||
Layout.preferredHeight: parent.height
|
||||
Layout.preferredWidth: height
|
||||
}
|
||||
}
|
||||
iconName: "../images/plugin.svg"
|
||||
text: model.name
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("PluginParamsPage.qml"), {plugin: Engine.deviceManager.plugins.get(index)})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user