diff --git a/QGCInstaller.pri b/QGCInstaller.pri
index a9ffb6656a4e1ecef425bd97b5b4e492f14867db..cce214a04f7878e4b56723650b7c0b622fd0ceb7 100644
--- a/QGCInstaller.pri
+++ b/QGCInstaller.pri
@@ -29,7 +29,7 @@ installer {
QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt QGroundControl.app -appstore-compliant -verbose=2 -qmldir=$${BASEDIR}/src
QMAKE_POST_LINK += && cd $${OUT_PWD}
- QMAKE_POST_LINK += && hdiutil create -verbose -stretch 1g -layout SPUD -srcfolder $${DESTDIR}/QGroundControl.app -volname QGroundControl $${DESTDIR}/package/QGroundControl.dmg
+ QMAKE_POST_LINK += && hdiutil create -verbose -stretch 2g -layout SPUD -srcfolder $${DESTDIR}/QGroundControl.app -volname QGroundControl $${DESTDIR}/package/QGroundControl.dmg
}
WindowsBuild {
# The pdb moving command are commented out for now since we are including the .pdb in the installer. This makes it much
diff --git a/qgcresources.qrc b/qgcresources.qrc
index 418f773e97bbe6a4387317c4fce3b50b5c9778c3..74f875dc0c78335868a8aa1497484fb08f2b3d3b 100644
--- a/qgcresources.qrc
+++ b/qgcresources.qrc
@@ -54,9 +54,10 @@
src/AutoPilotPlugins/PX4/Images/DatalinkLossLight.svg
src/AutoPilotPlugins/PX4/Images/GeoFence.svg
src/AutoPilotPlugins/PX4/Images/GeoFenceLight.svg
- src/AnalyzeView/GeoTagIcon.png
+ src/AnalyzeView/GeoTagIcon.png
src/AutoPilotPlugins/PX4/Images/LandMode.svg
src/AutoPilotPlugins/PX4/Images/LandModeCopter.svg
+ src/AnalyzeView/LogDownloadIcon.png
src/AutoPilotPlugins/PX4/Images/LowBattery.svg
src/AutoPilotPlugins/PX4/Images/LowBatteryLight.svg
src/AutoPilotPlugins/Common/Images/MotorComponentIcon.svg
diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro
index 1b93afc209f3f676afef5c95797a7ad3c3a5411f..28bb36268f78f4d731dd220217a32f23c5ed2d27 100644
--- a/qgroundcontrol.pro
+++ b/qgroundcontrol.pro
@@ -373,6 +373,7 @@ HEADERS += \
!MobileBuild {
HEADERS += \
src/AnalyzeView/GeoTagController.h \
+ src/AnalyzeView/LogDownloadController.h \
src/comm/LogReplayLink.h \
src/comm/QGCFlightGearLink.h \
src/comm/QGCHilLink.h \
@@ -422,8 +423,6 @@ HEADERS += \
src/GPS/GPSProvider.h \
src/ViewWidgets/CustomCommandWidget.h \
src/ViewWidgets/CustomCommandWidgetController.h \
- src/ViewWidgets/LogDownload.h \
- src/ViewWidgets/LogDownloadController.h \
src/ViewWidgets/ViewWidgetController.h \
}
@@ -528,6 +527,7 @@ contains(DEFINES, QGC_ENABLE_BLUETOOTH) {
!MobileBuild {
SOURCES += \
src/AnalyzeView/GeoTagController.cc \
+ src/AnalyzeView/LogDownloadController.cc \
src/ui/uas/UASMessageView.cc \
src/uas/FileManager.cc \
src/ui/uas/QGCUnconnectedInfoWidget.cc \
@@ -571,8 +571,6 @@ SOURCES += \
src/GPS/GPSProvider.cc \
src/ViewWidgets/CustomCommandWidget.cc \
src/ViewWidgets/CustomCommandWidgetController.cc \
- src/ViewWidgets/LogDownload.cc \
- src/ViewWidgets/LogDownloadController.cc \
src/ViewWidgets/ViewWidgetController.cc
}
@@ -591,6 +589,7 @@ INCLUDEPATH += \
src/qgcunittest
HEADERS += \
+ src/AnalyzeView/LogDownloadTest.h \
src/FactSystem/FactSystemTestBase.h \
src/FactSystem/FactSystemTestGeneric.h \
src/FactSystem/FactSystemTestPX4.h \
@@ -615,9 +614,9 @@ HEADERS += \
src/qgcunittest/TCPLinkTest.h \
src/qgcunittest/TCPLoopBackServer.h \
src/qgcunittest/UnitTest.h \
- src/ViewWidgets/LogDownloadTest.h \
SOURCES += \
+ src/AnalyzeView/LogDownloadTest.cc \
src/FactSystem/FactSystemTestBase.cc \
src/FactSystem/FactSystemTestGeneric.cc \
src/FactSystem/FactSystemTestPX4.cc \
@@ -643,7 +642,6 @@ SOURCES += \
src/qgcunittest/TCPLoopBackServer.cc \
src/qgcunittest/UnitTest.cc \
src/qgcunittest/UnitTestList.cc \
- src/ViewWidgets/LogDownloadTest.cc \
} # !MobileBuild
} # DebugBuild
diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc
index cf6bec3436e3deef9d8626e01593d7e091ce08fe..5a9a2a37e3a81eb4ccf3236464164bd3c9fb4732 100644
--- a/qgroundcontrol.qrc
+++ b/qgroundcontrol.qrc
@@ -12,7 +12,6 @@
src/AutoPilotPlugins/APM/APMAirframeComponent.qml
src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml
src/ViewWidgets/CustomCommandWidget.qml
- src/ViewWidgets/LogDownload.qml
src/VehicleSetup/FirmwareUpgrade.qml
src/FlightDisplay/FlightDisplayView.qml
src/FlightDisplay/FlightDisplayViewUVC.qml
@@ -169,8 +168,9 @@
src/VehicleSetup/VehicleSummary.qml
src/QmlControls/OfflineMapButton.qml
src/AutoPilotPlugins/PX4/PX4TuningComponentVTOL.qml
- src/AnalyzeView/GeoTagPage.qml
src/AnalyzeView/AnalyzeView.qml
+ src/AnalyzeView/GeoTagPage.qml
+ src/AnalyzeView/LogDownloadPage.qml
src/MissionManager/MavCmdInfoCommon.json
diff --git a/src/AnalyzeView/AnalyzeView.qml b/src/AnalyzeView/AnalyzeView.qml
index 103c41d8610d792034a8ab7a6ea09766dee565d1..33545d0f97c0afb42e10e37e120dd6617b9f1975 100644
--- a/src/AnalyzeView/AnalyzeView.qml
+++ b/src/AnalyzeView/AnalyzeView.qml
@@ -29,17 +29,11 @@ Rectangle {
ExclusiveGroup { id: setupButtonGroup }
- readonly property real _defaultTextHeight: ScreenTools.defaultFontPixelHeight
- readonly property real _defaultTextWidth: ScreenTools.defaultFontPixelWidth
- readonly property real _horizontalMargin: _defaultTextWidth / 2
- readonly property real _verticalMargin: _defaultTextHeight / 2
- readonly property real _buttonWidth: _defaultTextWidth * 18
-
- function showGeoTagPanel() {
- panelLoader.source = "GeoTagPage.qml"
- }
-
- Component.onCompleted: showGeoTagPanel()
+ readonly property real _defaultTextHeight: ScreenTools.defaultFontPixelHeight
+ readonly property real _defaultTextWidth: ScreenTools.defaultFontPixelWidth
+ readonly property real _horizontalMargin: _defaultTextWidth / 2
+ readonly property real _verticalMargin: _defaultTextHeight / 2
+ readonly property real _buttonWidth: _defaultTextWidth * 18
QGCFlickable {
id: buttonScroll
@@ -87,15 +81,31 @@ Rectangle {
visible: !ScreenTools.isShortScreen
}
- SubMenuButton {
- id: summaryButton
- imageResource: "/qmlimages/GeoTagIcon.png"
- setupIndicator: false
- checked: true
- exclusiveGroup: setupButtonGroup
- text: "GeoTag Images"
+ Repeater {
+ id: buttonRepeater
+
+ model: ListModel {
+ ListElement {
+ buttonImage: "/qmlimages/LogDownloadIcon"
+ buttonText: qsTr("Log Download")
+ pageSource: "LogDownloadPage.qml"
+ }
+ ListElement {
+ buttonImage: "/qmlimages/GeoTagIcon"
+ buttonText: qsTr("GeoTag Images")
+ pageSource: "GeoTagPage.qml"
+ }
+ }
- onClicked: showGeoTagPanel()
+ Component.onCompleted: itemAt(0).checked = true
+
+ SubMenuButton {
+ imageResource: buttonImage
+ setupIndicator: false
+ exclusiveGroup: setupButtonGroup
+ text: buttonText
+ onClicked: panelLoader.source = pageSource
+ }
}
}
}
@@ -122,5 +132,6 @@ Rectangle {
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
+ source: "LogDownloadPage.qml"
}
}
diff --git a/src/ViewWidgets/LogDownloadController.cc b/src/AnalyzeView/LogDownloadController.cc
similarity index 99%
rename from src/ViewWidgets/LogDownloadController.cc
rename to src/AnalyzeView/LogDownloadController.cc
index e003472093351aabe9b9a2edd700e14a94fa785b..38cf2c4b85a3fde05d20f87349a5d3eab275cc00 100644
--- a/src/ViewWidgets/LogDownloadController.cc
+++ b/src/AnalyzeView/LogDownloadController.cc
@@ -103,9 +103,8 @@ QGCLogEntry::sizeStr() const
}
//----------------------------------------------------------------------------------------
-LogDownloadController::LogDownloadController(bool standaloneUnitTesting)
- : FactPanelController(standaloneUnitTesting)
- , _uas(NULL)
+LogDownloadController::LogDownloadController(void)
+ : _uas(NULL)
, _downloadData(NULL)
, _vehicle(NULL)
, _requestingLogEntries(false)
diff --git a/src/ViewWidgets/LogDownloadController.h b/src/AnalyzeView/LogDownloadController.h
similarity index 95%
rename from src/ViewWidgets/LogDownloadController.h
rename to src/AnalyzeView/LogDownloadController.h
index a98a9452333a877ca7f54cf120d99716617e38ce..75bde2db1abc4f5f691ca6f402bdcc870fa3abb2 100644
--- a/src/ViewWidgets/LogDownloadController.h
+++ b/src/AnalyzeView/LogDownloadController.h
@@ -21,7 +21,6 @@
#include "UASInterface.h"
#include "AutoPilotPlugin.h"
-#include "FactPanelController.h"
class MultiVehicleManager;
class UASInterface;
@@ -110,13 +109,12 @@ private:
};
//-----------------------------------------------------------------------------
-class LogDownloadController : public FactPanelController
+class LogDownloadController : public QObject
{
Q_OBJECT
-public:
- /// @param standaloneUnitTesting true: being run without factPanel, false: normal operation, factPanel is required
- LogDownloadController(bool standaloneUnitTesting = false);
+public:
+ LogDownloadController(void);
Q_PROPERTY(QGCLogModel* model READ model NOTIFY modelChanged)
Q_PROPERTY(bool requestingList READ requestingList NOTIFY requestingListChanged)
diff --git a/src/AnalyzeView/LogDownloadIcon.png b/src/AnalyzeView/LogDownloadIcon.png
new file mode 100644
index 0000000000000000000000000000000000000000..6aa8343a341df18048e0c9feeeb9491e2c63aaa8
Binary files /dev/null and b/src/AnalyzeView/LogDownloadIcon.png differ
diff --git a/src/AnalyzeView/LogDownloadPage.qml b/src/AnalyzeView/LogDownloadPage.qml
new file mode 100644
index 0000000000000000000000000000000000000000..8baf6532ed15bcc1f235e4c664498c2a15b5ea4e
--- /dev/null
+++ b/src/AnalyzeView/LogDownloadPage.qml
@@ -0,0 +1,193 @@
+/****************************************************************************
+ *
+ * (c) 2009-2016 QGROUNDCONTROL PROJECT
+ *
+ * QGroundControl is licensed according to the terms in the file
+ * COPYING.md in the root of the source code directory.
+ *
+ ****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 1.2
+import QtQuick.Dialogs 1.2
+import QtQuick.Layouts 1.2
+
+import QGroundControl 1.0
+import QGroundControl.Palette 1.0
+import QGroundControl.Controls 1.0
+import QGroundControl.Controllers 1.0
+import QGroundControl.ScreenTools 1.0
+
+AnalyzePage {
+ id: logDownloadPage
+ pageComponent: pageComponent
+ pageName: qsTr("Log Download")
+ pageDescription: qsTr("Log Download allows you to download binary log files from your vehicle. Click Refresh to get list of available logs.")
+
+ property real _margin: ScreenTools.defaultFontPixelWidth
+ property real _butttonWidth: ScreenTools.defaultFontPixelWidth * 10
+
+ LogDownloadController {
+ id: controller
+
+ onSelectionChanged: {
+ tableView.selection.clear()
+ for(var i = 0; i < controller.model.count; i++) {
+ var o = controller.model.get(i)
+ if (o && o.selected) {
+ tableView.selection.select(i, i)
+ }
+ }
+ }
+ }
+
+ QGCPalette { id: palette; colorGroupEnabled: enabled }
+
+ Component {
+ id: pageComponent
+
+ RowLayout {
+ width: availableWidth
+ height: availableHeight
+
+ TableView {
+ id: tableView
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ model: controller.model
+ selectionMode: SelectionMode.MultiSelection
+ Layout.fillWidth: true
+
+ TableViewColumn {
+ title: qsTr("Id")
+ width: ScreenTools.defaultFontPixelWidth * 6
+ horizontalAlignment: Text.AlignHCenter
+ delegate : Text {
+ horizontalAlignment: Text.AlignHCenter
+ text: {
+ var o = controller.model.get(styleData.row)
+ return o ? o.id : ""
+ }
+ }
+ }
+
+ TableViewColumn {
+ title: qsTr("Date")
+ width: ScreenTools.defaultFontPixelWidth * 34
+ horizontalAlignment: Text.AlignHCenter
+ delegate : Text {
+ text: {
+ var o = controller.model.get(styleData.row)
+ if (o) {
+ //-- Have we received this entry already?
+ if(controller.model.get(styleData.row).received) {
+ var d = controller.model.get(styleData.row).time
+ if(d.getUTCFullYear() < 2010)
+ return qsTr("Date Unknown")
+ else
+ return d.toLocaleString()
+ }
+ }
+ return ""
+ }
+ }
+ }
+
+ TableViewColumn {
+ title: qsTr("Size")
+ width: ScreenTools.defaultFontPixelWidth * 18
+ horizontalAlignment: Text.AlignHCenter
+ delegate : Text {
+ horizontalAlignment: Text.AlignRight
+ text: {
+ var o = controller.model.get(styleData.row)
+ return o ? o.sizeStr : ""
+ }
+ }
+ }
+
+ TableViewColumn {
+ title: qsTr("Status")
+ width: ScreenTools.defaultFontPixelWidth * 22
+ horizontalAlignment: Text.AlignHCenter
+ delegate : Text {
+ horizontalAlignment: Text.AlignHCenter
+ text: {
+ var o = controller.model.get(styleData.row)
+ return o ? o.status : ""
+ }
+ }
+ }
+ }
+
+ Column {
+ spacing: _margin
+ Layout.alignment: Qt.AlignTop | Qt.AlignLeft
+
+ QGCButton {
+ enabled: !controller.requestingList && !controller.downloadingLogs
+ text: qsTr("Refresh")
+ width: _butttonWidth
+
+ onClicked: {
+ if (!QGroundControl.multiVehicleManager.activeVehicle || QGroundControl.multiVehicleManager.activeVehicle.isOfflineEditingVehicle) {
+ logDownloadPage.showMessage(qsTr("Log Refresh"), qsTr("You must be connected to a vehicle in order to download logs."), StandardButton.Ok)
+ } else {
+ controller.refresh()
+ }
+ }
+ }
+
+ QGCButton {
+ enabled: !controller.requestingList && !controller.downloadingLogs && tableView.selection.count > 0
+ text: qsTr("Download")
+ width: _butttonWidth
+ onClicked: {
+ //-- Clear selection
+ for(var i = 0; i < controller.model.count; i++) {
+ var o = controller.model.get(i)
+ if (o) o.selected = false
+ }
+ //-- Flag selected log files
+ tableView.selection.forEach(function(rowIndex){
+ var o = controller.model.get(rowIndex)
+ if (o) o.selected = true
+ })
+ //-- Download them
+ controller.download()
+ }
+ }
+
+ QGCButton {
+ enabled: !controller.requestingList && !controller.downloadingLogs && controller.model.count > 0
+ text: qsTr("Erase All")
+ width: _butttonWidth
+ onClicked: logDownloadPage.showDialog(eraseAllMessage,
+ qsTr("Delete All Log Files"),
+ logDownloadPage.showDialogDefaultWidth,
+ StandardButton.Yes | StandardButton.No)
+
+ Component {
+ id: eraseAllMessage
+
+ QGCViewMessage {
+ message: qsTr("All log files will be erased permanently. Is this really what you want?")
+
+ function accept() {
+ logDownloadPage.hideDialog()
+ controller.eraseAll()
+ }
+ }
+ }
+ }
+
+ QGCButton {
+ text: qsTr("Cancel")
+ width: _butttonWidth
+ enabled: controller.requestingList || controller.downloadingLogs
+ onClicked: controller.cancel()
+ }
+ } // Column - Buttons
+ } // RowLayout
+ } // Component
+} // AnalyzePage
diff --git a/src/ViewWidgets/LogDownloadTest.cc b/src/AnalyzeView/LogDownloadTest.cc
similarity index 99%
rename from src/ViewWidgets/LogDownloadTest.cc
rename to src/AnalyzeView/LogDownloadTest.cc
index 6637722696b20e2c2e8eef6bca2edb2e163f6a48..364fa740f14be774c9c4a8c89fec9000b1fd321c 100644
--- a/src/ViewWidgets/LogDownloadTest.cc
+++ b/src/AnalyzeView/LogDownloadTest.cc
@@ -23,7 +23,7 @@ void LogDownloadTest::downloadTest(void)
_connectMockLink(MAV_AUTOPILOT_PX4);
- LogDownloadController* controller = new LogDownloadController(true);
+ LogDownloadController* controller = new LogDownloadController();
_rgLogDownloadControllerSignals[requestingListChangedSignalIndex] = SIGNAL(requestingListChanged());
_rgLogDownloadControllerSignals[downloadingLogsChangedSignalIndex] = SIGNAL(downloadingLogsChanged());
diff --git a/src/ViewWidgets/LogDownloadTest.h b/src/AnalyzeView/LogDownloadTest.h
similarity index 100%
rename from src/ViewWidgets/LogDownloadTest.h
rename to src/AnalyzeView/LogDownloadTest.h
diff --git a/src/ViewWidgets/LogDownload.cc b/src/ViewWidgets/LogDownload.cc
deleted file mode 100644
index 8f6b3f9250f0b5a53aeccb89c1c0c810c75d2588..0000000000000000000000000000000000000000
--- a/src/ViewWidgets/LogDownload.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-/****************************************************************************
- *
- * (c) 2009-2016 QGROUNDCONTROL PROJECT
- *
- * QGroundControl is licensed according to the terms in the file
- * COPYING.md in the root of the source code directory.
- *
- ****************************************************************************/
-
-
-#include "LogDownload.h"
-
-LogDownload::LogDownload(const QString& title, QAction* action, QWidget *parent) :
- QGCQmlWidgetHolder(title, action, parent)
-{
- Q_UNUSED(title);
- Q_UNUSED(action);
- resize(800, 600);
- setSource(QUrl::fromUserInput("qrc:/qml/LogDownload.qml"));
- loadSettings();
-}
diff --git a/src/ViewWidgets/LogDownload.h b/src/ViewWidgets/LogDownload.h
deleted file mode 100644
index 1eb7d2e5098c2a97dd44e64e4dcfef791021e70f..0000000000000000000000000000000000000000
--- a/src/ViewWidgets/LogDownload.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************************
- *
- * (c) 2009-2016 QGROUNDCONTROL PROJECT
- *
- * QGroundControl is licensed according to the terms in the file
- * COPYING.md in the root of the source code directory.
- *
- ****************************************************************************/
-
-
-#ifndef LogDownload_H
-#define LogDownload_H
-
-#include "QGCQmlWidgetHolder.h"
-
-class LogDownload : public QGCQmlWidgetHolder
-{
- Q_OBJECT
-
-public:
- LogDownload(const QString& title, QAction* action, QWidget *parent = 0);
-};
-
-#endif
diff --git a/src/ViewWidgets/LogDownload.qml b/src/ViewWidgets/LogDownload.qml
deleted file mode 100644
index ce04013e4568e8ae9bddb1de48a3d86ac3a9ec64..0000000000000000000000000000000000000000
--- a/src/ViewWidgets/LogDownload.qml
+++ /dev/null
@@ -1,198 +0,0 @@
-/****************************************************************************
- *
- * (c) 2009-2016 QGROUNDCONTROL PROJECT
- *
- * QGroundControl is licensed according to the terms in the file
- * COPYING.md in the root of the source code directory.
- *
- ****************************************************************************/
-
-
-import QtQuick 2.5
-import QtQuick.Controls 1.2
-import QtQuick.Controls.Styles 1.2
-import QtQuick.Dialogs 1.2
-
-import QGroundControl.Palette 1.0
-import QGroundControl.Controls 1.0
-import QGroundControl.Controllers 1.0
-import QGroundControl.ScreenTools 1.0
-
-QGCView {
- viewPanel: panel
-
- property real _margins: ScreenTools.defaultFontPixelHeight
- property real _butttonWidth: ScreenTools.defaultFontPixelWidth * 10
-
- LogDownloadController {
- id: controller
- factPanel: panel
- onSelectionChanged: {
- tableView.selection.clear()
- for(var i = 0; i < controller.model.count; i++) {
- var o = controller.model.get(i)
- if (o && o.selected) {
- tableView.selection.select(i, i)
- }
- }
- }
- }
-
- QGCPalette { id: palette; colorGroupEnabled: enabled }
-
- QGCViewPanel {
- id: panel
- anchors.fill: parent
-
- TableView {
- id: tableView
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.right: refreshButton.left
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- model: controller.model
- selectionMode: SelectionMode.MultiSelection
-
- TableViewColumn {
- title: qsTr("Id")
- width: ScreenTools.defaultFontPixelWidth * 6
- horizontalAlignment: Text.AlignHCenter
- delegate : Text {
- horizontalAlignment: Text.AlignHCenter
- text: {
- var o = controller.model.get(styleData.row)
- return o ? o.id : ""
- }
- }
- }
-
- TableViewColumn {
- title: qsTr("Date")
- width: ScreenTools.defaultFontPixelWidth * 34
- horizontalAlignment: Text.AlignHCenter
- delegate : Text {
- text: {
- var o = controller.model.get(styleData.row)
- if (o) {
- //-- Have we received this entry already?
- if(controller.model.get(styleData.row).received) {
- var d = controller.model.get(styleData.row).time
- if(d.getUTCFullYear() < 2010)
- return qsTr("Date Unknown")
- else
- return d.toLocaleString()
- }
- }
- return ""
- }
- }
- }
-
- TableViewColumn {
- title: qsTr("Size")
- width: ScreenTools.defaultFontPixelWidth * 18
- horizontalAlignment: Text.AlignHCenter
- delegate : Text {
- horizontalAlignment: Text.AlignRight
- text: {
- var o = controller.model.get(styleData.row)
- return o ? o.sizeStr : ""
- }
- }
- }
-
- TableViewColumn {
- title: qsTr("Status")
- width: ScreenTools.defaultFontPixelWidth * 22
- horizontalAlignment: Text.AlignHCenter
- delegate : Text {
- horizontalAlignment: Text.AlignHCenter
- text: {
- var o = controller.model.get(styleData.row)
- return o ? o.status : ""
- }
- }
- }
-
- }
-
- QGCButton {
- id: refreshButton
- anchors.margins: _margins
- anchors.top: parent.top
- anchors.right: parent.right
- enabled: !controller.requestingList && !controller.downloadingLogs
- text: qsTr("Refresh")
- width: _butttonWidth
- onClicked: {
- controller.refresh()
- }
- }
-
- QGCButton {
- id: downloadButton
- anchors.margins: _margins
- anchors.top: refreshButton.bottom
- anchors.right: parent.right
- enabled: !controller.requestingList && !controller.downloadingLogs && tableView.selection.count > 0
- text: qsTr("Download")
- width: _butttonWidth
- onClicked: {
- //-- Clear selection
- for(var i = 0; i < controller.model.count; i++) {
- var o = controller.model.get(i)
- if (o) o.selected = false
- }
- //-- Flag selected log files
- tableView.selection.forEach(function(rowIndex){
- var o = controller.model.get(rowIndex)
- if (o) o.selected = true
- })
- //-- Download them
- controller.download()
- }
- }
-
- QGCButton {
- id: eraseAllButton
- anchors.margins: _margins
- anchors.top: downloadButton.bottom
- anchors.right: parent.right
- enabled: !controller.requestingList && !controller.downloadingLogs && controller.model.count > 0
- text: qsTr("Erase All")
- width: _butttonWidth
- onClicked: {
- eraseAllDialog.visible = true
- }
- MessageDialog {
- id: eraseAllDialog
- visible: false
- icon: StandardIcon.Warning
- standardButtons: StandardButton.Yes | StandardButton.No
- title: qsTr("Delete All Log Files")
- text: qsTr("All log files will be erased permanently. Is this really what you want?")
- onYes: {
- controller.eraseAll()
- eraseAllDialog.visible = false
- }
- onNo: {
- eraseAllDialog.visible = false
- }
- }
- }
-
- QGCButton {
- id: cancelButton
- anchors.margins: _margins
- anchors.top: eraseAllButton.bottom
- anchors.right: parent.right
- text: qsTr("Cancel")
- width: _butttonWidth
- enabled: controller.requestingList || controller.downloadingLogs
- onClicked: {
- controller.cancel()
- }
- }
- }
-}
diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc
index 98bd3b6bd5df6e9574e948625091cf118fb2ed0e..c753209ffc57e2235a1e4dae77ee925ca48d5639 100644
--- a/src/ui/MainWindow.cc
+++ b/src/ui/MainWindow.cc
@@ -51,7 +51,6 @@
#include "CustomCommandWidget.h"
#include "QGCDockWidget.h"
#include "HILDockWidget.h"
-#include "LogDownload.h"
#include "AppMessages.h"
#endif
@@ -73,8 +72,7 @@ enum DockWidgetTypes {
ONBOARD_FILES,
INFO_VIEW,
HIL_CONFIG,
- ANALYZE,
- LOG_DOWNLOAD
+ ANALYZE
};
static const char *rgDockWidgetNames[] = {
@@ -83,8 +81,7 @@ static const char *rgDockWidgetNames[] = {
"Onboard Files",
"Info View",
"HIL Config",
- "Analyze",
- "Log Download"
+ "Analyze"
};
#define ARRAY_SIZE(ARRAY) (sizeof(ARRAY) / sizeof(ARRAY[0]))
@@ -352,9 +349,6 @@ bool MainWindow::_createInnerDockWidget(const QString& widgetName)
case ONBOARD_FILES:
widget = new QGCUASFileViewMulti(widgetName, action, this);
break;
- case LOG_DOWNLOAD:
- widget = new LogDownload(widgetName, action, this);
- break;
case HIL_CONFIG:
widget = new HILDockWidget(widgetName, action, this);
break;