Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
7976617e
Commit
7976617e
authored
Oct 04, 2016
by
Don Gagne
Committed by
GitHub
Oct 04, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4107 from DonLakeFlyer/LogDownload
Move LogDownload to Analyze View
parents
11a86919
0a57838a
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
240 additions
and
289 deletions
+240
-289
QGCInstaller.pri
QGCInstaller.pri
+1
-1
qgcresources.qrc
qgcresources.qrc
+2
-1
qgroundcontrol.pro
qgroundcontrol.pro
+4
-6
qgroundcontrol.qrc
qgroundcontrol.qrc
+2
-2
AnalyzeView.qml
src/AnalyzeView/AnalyzeView.qml
+30
-19
LogDownloadController.cc
src/AnalyzeView/LogDownloadController.cc
+2
-3
LogDownloadController.h
src/AnalyzeView/LogDownloadController.h
+3
-5
LogDownloadIcon.png
src/AnalyzeView/LogDownloadIcon.png
+0
-0
LogDownloadPage.qml
src/AnalyzeView/LogDownloadPage.qml
+193
-0
LogDownloadTest.cc
src/AnalyzeView/LogDownloadTest.cc
+1
-1
LogDownloadTest.h
src/AnalyzeView/LogDownloadTest.h
+0
-0
LogDownload.cc
src/ViewWidgets/LogDownload.cc
+0
-21
LogDownload.h
src/ViewWidgets/LogDownload.h
+0
-24
LogDownload.qml
src/ViewWidgets/LogDownload.qml
+0
-198
MainWindow.cc
src/ui/MainWindow.cc
+2
-8
No files found.
QGCInstaller.pri
View file @
7976617e
...
...
@@ -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
1
g -layout SPUD -srcfolder $${DESTDIR}/QGroundControl.app -volname QGroundControl $${DESTDIR}/package/QGroundControl.dmg
QMAKE_POST_LINK += && hdiutil create -verbose -stretch
2
g -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
...
...
qgcresources.qrc
View file @
7976617e
...
...
@@ -54,9 +54,10 @@
<file alias="DatalinkLossLight.svg">src/AutoPilotPlugins/PX4/Images/DatalinkLossLight.svg</file>
<file alias="GeoFence.svg">src/AutoPilotPlugins/PX4/Images/GeoFence.svg</file>
<file alias="GeoFenceLight.svg">src/AutoPilotPlugins/PX4/Images/GeoFenceLight.svg</file>
<file alias="GeoTagIcon
.png
">src/AnalyzeView/GeoTagIcon.png</file>
<file alias="GeoTagIcon">src/AnalyzeView/GeoTagIcon.png</file>
<file alias="LandMode.svg">src/AutoPilotPlugins/PX4/Images/LandMode.svg</file>
<file alias="LandModeCopter.svg">src/AutoPilotPlugins/PX4/Images/LandModeCopter.svg</file>
<file alias="LogDownloadIcon">src/AnalyzeView/LogDownloadIcon.png</file>
<file alias="LowBattery.svg">src/AutoPilotPlugins/PX4/Images/LowBattery.svg</file>
<file alias="LowBatteryLight.svg">src/AutoPilotPlugins/PX4/Images/LowBatteryLight.svg</file>
<file alias="MotorComponentIcon.svg">src/AutoPilotPlugins/Common/Images/MotorComponentIcon.svg</file>
...
...
qgroundcontrol.pro
View file @
7976617e
...
...
@@ -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
...
...
qgroundcontrol.qrc
View file @
7976617e
...
...
@@ -12,7 +12,6 @@
<file alias="APMAirframeComponent.qml">src/AutoPilotPlugins/APM/APMAirframeComponent.qml</file>
<file alias="APMAirframeComponentSummary.qml">src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml</file>
<file alias="CustomCommandWidget.qml">src/ViewWidgets/CustomCommandWidget.qml</file>
<file alias="LogDownload.qml">src/ViewWidgets/LogDownload.qml</file>
<file alias="FirmwareUpgrade.qml">src/VehicleSetup/FirmwareUpgrade.qml</file>
<file alias="FlightDisplayView.qml">src/FlightDisplay/FlightDisplayView.qml</file>
<file alias="FlightDisplayViewUVC.qml">src/FlightDisplay/FlightDisplayViewUVC.qml</file>
...
...
@@ -169,8 +168,9 @@
<file alias="VehicleSummary.qml">src/VehicleSetup/VehicleSummary.qml</file>
<file alias="QGroundControl/Controls/OfflineMapButton.qml">src/QmlControls/OfflineMapButton.qml</file>
<file alias="PX4TuningComponentVTOL.qml">src/AutoPilotPlugins/PX4/PX4TuningComponentVTOL.qml</file>
<file alias="GeoTagPage.qml">src/AnalyzeView/GeoTagPage.qml</file>
<file alias="AnalyzeView.qml">src/AnalyzeView/AnalyzeView.qml</file>
<file alias="GeoTagPage.qml">src/AnalyzeView/GeoTagPage.qml</file>
<file alias="LogDownloadPage.qml">src/AnalyzeView/LogDownloadPage.qml</file>
</qresource>
<qresource prefix="/json">
<file alias="MavCmdInfoCommon.json">src/MissionManager/MavCmdInfoCommon.json</file>
...
...
src/AnalyzeView/AnalyzeView.qml
View file @
7976617e
...
...
@@ -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
"
}
}
src/
ViewWidgets
/LogDownloadController.cc
→
src/
AnalyzeView
/LogDownloadController.cc
View file @
7976617e
...
...
@@ -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
)
...
...
src/
ViewWidgets
/LogDownloadController.h
→
src/
AnalyzeView
/LogDownloadController.h
View file @
7976617e
...
...
@@ -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
)
...
...
src/AnalyzeView/LogDownloadIcon.png
0 → 100644
View file @
7976617e
502 Bytes
src/AnalyzeView/LogDownloadPage.qml
0 → 100644
View file @
7976617e
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* 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
src/
ViewWidgets
/LogDownloadTest.cc
→
src/
AnalyzeView
/LogDownloadTest.cc
View file @
7976617e
...
...
@@ -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
());
...
...
src/
ViewWidgets
/LogDownloadTest.h
→
src/
AnalyzeView
/LogDownloadTest.h
View file @
7976617e
File moved
src/ViewWidgets/LogDownload.cc
deleted
100644 → 0
View file @
11a86919
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* 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
();
}
src/ViewWidgets/LogDownload.h
deleted
100644 → 0
View file @
11a86919
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* 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
src/ViewWidgets/LogDownload.qml
deleted
100644 → 0
View file @
11a86919
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* 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
()
}
}
}
}
src/ui/MainWindow.cc
View file @
7976617e
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment