Commit 8f6a4a95 authored by Valentin Platzgummer's avatar Valentin Platzgummer

AppImage added

parent 588989a0
......@@ -94,6 +94,21 @@ void WimaController::addVehicleCorridor()
emit visualItemsChanged();
}
void WimaController::removeAllAreas()
{
bool changesApplied = false;
while (_visualItems->count() > 0) {
_visualItems->removeAt(0);
changesApplied = true;
}
_currentFile = "";
emit currentFileChanged();
if ( changesApplied )
emit visualItemsChanged();
}
void WimaController::startMission()
{
......@@ -233,7 +248,7 @@ bool WimaController::updateMission()
void WimaController::saveToCurrent()
{
saveToFile(_currentFile);
}
void WimaController::saveToFile(const QString& filename)
......
......@@ -59,6 +59,7 @@ public:
Q_INVOKABLE void addServiceArea();
/// @return true if a vehicle corridor was added sucessfully and false otherwise.
Q_INVOKABLE void addVehicleCorridor();
Q_INVOKABLE void removeAllAreas();
Q_INVOKABLE void startMission();
Q_INVOKABLE void abortMission();
......
......@@ -1006,6 +1006,17 @@ QGCView {
}
}
Component {
id: wimaRemoveAllPromptDialog
QGCViewMessage {
message: qsTr("Are you sure you want to remove all items and create a Wima mission? ")
function accept() {
wimaController.removeAllAreas();
hideDialog()
}
}
}
Component {
id: clearVehicleMissionDialog
QGCViewMessage {
......@@ -1058,12 +1069,12 @@ QGCView {
columnSpacing: ScreenTools.defaultFontPixelWidth
QGCButton {
text: qsTr("New...ToDo")
text: qsTr("New...Testing")
Layout.fillWidth: true
enabled: _wimaVisualItems.count > 1
onClicked: {
dropPanel.hide()
_qgcView.showDialog(removeAllPromptDialog, qsTr("New Plan"), _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.No)
_qgcView.showDialog(wimaRemoveAllPromptDialog, qsTr("New Plan"), _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.No)
}
}
......@@ -1084,6 +1095,7 @@ QGCView {
onClicked: {
dropPanel.hide()
wimaController.saveToCurrent()
console.log("saveing to: ", wimaController.currentFile)
}
}
......@@ -1093,7 +1105,7 @@ QGCView {
enabled: _wimaVisualItems.count > 1
onClicked: {
dropPanel.hide()
masterController.saveToSelectedFile()
wimaController.saveToSelectedFile()
}
}
......
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