Commit 3b802c0c authored by Daniel Agar's avatar Daniel Agar

reboot vehicle from param menu

parent a8240d22
......@@ -118,6 +118,11 @@ QGCView {
onTriggered: controller.clearRCToParam()
visible: _showRCToParam
}
MenuSeparator { }
MenuItem {
text: qsTr("Reboot Vehicle")
onTriggered: showDialog(rebootVehicleConfirmComponent, qsTr("Reboot Vehicle"), qgcView.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok)
}
}
}
......@@ -294,4 +299,21 @@ QGCView {
}
}
}
Component {
id: rebootVehicleConfirmComponent
QGCViewDialog {
function accept() {
QGroundControl.multiVehicleManager.activeVehicle.rebootVehicle()
hideDialog()
}
QGCLabel {
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("Select Ok to reboot vehicle.")
}
}
}
} // QGCView
......@@ -36,20 +36,20 @@ public:
Q_PROPERTY(QmlObjectListModel* parameters MEMBER _parameters CONSTANT)
Q_PROPERTY(QVariantList componentIds MEMBER _componentIds CONSTANT)
Q_INVOKABLE QStringList getGroupsForComponent(int componentId);
Q_INVOKABLE QStringList getParametersForGroup(int componentId, QString group);
Q_INVOKABLE QStringList getGroupsForComponent(int componentId);
Q_INVOKABLE QStringList getParametersForGroup(int componentId, QString group);
Q_INVOKABLE QStringList searchParametersForComponent(int componentId, const QString& searchText, bool searchInName=true, bool searchInDescriptions=true);
Q_INVOKABLE void clearRCToParam(void);
Q_INVOKABLE void clearRCToParam(void);
Q_INVOKABLE void saveToFilePicker(void);
Q_INVOKABLE void loadFromFilePicker(void);
Q_INVOKABLE void saveToFile(const QString& filename);
Q_INVOKABLE void loadFromFile(const QString& filename);
Q_INVOKABLE void refresh(void);
Q_INVOKABLE void resetAllToDefaults(void);
Q_INVOKABLE void setRCToParam(const QString& paramName);
Q_INVOKABLE void setRCToParam(const QString& paramName);
QList<QObject*> model(void);
QList<QObject*> model(void);
signals:
void searchTextChanged(QString searchText);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment