Some fixes for Z-Wave
This commit is contained in:
parent
cfbf1cb61f
commit
38c964cedb
@ -78,10 +78,10 @@ int ZWaveManager::removeNetwork(const QUuid &networkUuid)
|
||||
return m_engine->jsonRpcClient()->sendCommand("ZWave.RemoveNetwork", params, this, "removeNetworkResponse");
|
||||
}
|
||||
|
||||
void ZWaveManager::addNode(const QUuid &networkUuid)
|
||||
int ZWaveManager::addNode(const QUuid &networkUuid)
|
||||
{
|
||||
QVariantMap params = {{"networkUuid", networkUuid}};
|
||||
m_engine->jsonRpcClient()->sendCommand("ZWave.AddNode", params, this, "addNodeResponse");
|
||||
return m_engine->jsonRpcClient()->sendCommand("ZWave.AddNode", params, this, "addNodeResponse");
|
||||
}
|
||||
|
||||
void ZWaveManager::cancelPendingOperation(const QUuid &networkUuid)
|
||||
|
||||
@ -76,7 +76,7 @@ public:
|
||||
|
||||
Q_INVOKABLE int addNetwork(const QString &serialPort);
|
||||
Q_INVOKABLE int removeNetwork(const QUuid &networkUuid);
|
||||
Q_INVOKABLE void addNode(const QUuid &networkUuid);
|
||||
Q_INVOKABLE int addNode(const QUuid &networkUuid);
|
||||
Q_INVOKABLE void cancelPendingOperation(const QUuid &networkUuid);
|
||||
Q_INVOKABLE int factoryResetNetwork(const QUuid &networkUuid);
|
||||
// Q_INVOKABLE void getNodes(const QUuid &networkUuid);
|
||||
|
||||
@ -165,11 +165,11 @@ SettingsPageBase {
|
||||
Layout.rightMargin: app.margins
|
||||
text: qsTr("Remove network")
|
||||
onClicked: {
|
||||
var dialog = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml"));
|
||||
var dialog = Qt.createComponent(Qt.resolvedUrl("/ui/components/MeaDialog.qml"));
|
||||
var text = qsTr("Are you sure you want to remove the network and all associated devices from the system?")
|
||||
var popup = dialog.createObject(app,
|
||||
{
|
||||
headerIcon: "../images/dialog-warning-symbolic.svg",
|
||||
headerIcon: "/ui/images/dialog-warning-symbolic.svg",
|
||||
title: qsTr("Remove network"),
|
||||
text: text,
|
||||
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||
@ -187,11 +187,11 @@ SettingsPageBase {
|
||||
Layout.rightMargin: app.margins
|
||||
text: qsTr("Factory reset controller")
|
||||
onClicked: {
|
||||
var dialog = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml"));
|
||||
var dialog = Qt.createComponent(Qt.resolvedUrl("/ui/components/MeaDialog.qml"));
|
||||
var text = qsTr("Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.")
|
||||
var popup = dialog.createObject(app,
|
||||
{
|
||||
headerIcon: "../images/dialog-warning-symbolic.svg",
|
||||
headerIcon: "/ui/images/dialog-warning-symbolic.svg",
|
||||
title: qsTr("Reset controller"),
|
||||
text: text,
|
||||
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||
|
||||
@ -65,7 +65,7 @@ SettingsPageBase {
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: root.height - root.header.height - Style.margins
|
||||
visible: !zwaveManager.fetchingData || !zwaveManager.zwaveAvailable || zwaveManager.networks.count == 0
|
||||
visible: !zwaveManager.fetchingData && (!zwaveManager.zwaveAvailable || zwaveManager.networks.count == 0)
|
||||
|
||||
BusyIndicator {
|
||||
anchors.centerIn: parent
|
||||
|
||||
Reference in New Issue
Block a user