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
1edf5b83
Commit
1edf5b83
authored
Apr 07, 2017
by
Don Gagne
Committed by
GitHub
Apr 07, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4912 from NaterGator/analyzectl
Make AnalyzeView controllers persistent
parents
2e7364da
b71cf9ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
49 deletions
+52
-49
AnalyzeView.qml
src/AnalyzeView/AnalyzeView.qml
+8
-0
GeoTagPage.qml
src/AnalyzeView/GeoTagPage.qml
+13
-17
LogDownloadPage.qml
src/AnalyzeView/LogDownloadPage.qml
+31
-32
No files found.
src/AnalyzeView/AnalyzeView.qml
View file @
1edf5b83
...
...
@@ -36,6 +36,14 @@ Rectangle {
readonly
property
real
_verticalMargin
:
_defaultTextHeight
/
2
readonly
property
real
_buttonWidth
:
_defaultTextWidth
*
18
GeoTagController
{
id
:
geoController
}
LogDownloadController
{
id
:
logController
}
MavlinkConsoleController
{
id
:
conController
}
...
...
src/AnalyzeView/GeoTagPage.qml
View file @
1edf5b83
...
...
@@ -27,10 +27,6 @@ AnalyzePage {
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
*
2
GeoTagController
{
id
:
controller
}
Component
{
id
:
pageComponent
...
...
@@ -46,18 +42,18 @@ AnalyzePage {
id
:
progressBar
width
:
qgcView
.
width
-
_margin
*
5
maximumValue
:
100
value
:
c
ontroller
.
progress
value
:
geoC
ontroller
.
progress
}
BusyIndicator
{
running
:
controller
.
progress
>
0
&&
controller
.
progress
<
100
&&
c
ontroller
.
errorMessage
===
""
running
:
geoController
.
progress
>
0
&&
geoController
.
progress
<
100
&&
geoC
ontroller
.
errorMessage
===
""
width
:
progressBar
.
height
height
:
progressBar
.
height
}
}
QGCLabel
{
text
:
c
ontroller
.
errorMessage
text
:
geoC
ontroller
.
errorMessage
font.bold
:
true
font.pointSize
:
ScreenTools
.
largeFontPointSize
color
:
"
red
"
...
...
@@ -77,12 +73,12 @@ AnalyzePage {
QGCButton
{
text
:
qsTr
(
"
Select log file
"
)
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
onClicked
:
c
ontroller
.
pickLogFile
()
onClicked
:
geoC
ontroller
.
pickLogFile
()
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
text
:
c
ontroller
.
logFile
text
:
geoC
ontroller
.
logFile
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
...
@@ -93,12 +89,12 @@ AnalyzePage {
QGCButton
{
text
:
qsTr
(
"
Select image directory
"
)
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
onClicked
:
c
ontroller
.
pickImageDirectory
()
onClicked
:
geoC
ontroller
.
pickImageDirectory
()
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
text
:
c
ontroller
.
imageDirectory
text
:
geoC
ontroller
.
imageDirectory
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
...
@@ -109,12 +105,12 @@ AnalyzePage {
QGCButton
{
text
:
qsTr
(
"
(Optionally) Select save directory
"
)
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
onClicked
:
c
ontroller
.
pickSaveDirectory
()
onClicked
:
geoC
ontroller
.
pickSaveDirectory
()
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
text
:
controller
.
saveDirectory
!=
""
?
c
ontroller
.
saveDirectory
:
"
/TAGGED folder in your image folder
"
text
:
geoController
.
saveDirectory
!=
""
?
geoC
ontroller
.
saveDirectory
:
"
/TAGGED folder in your image folder
"
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
...
@@ -128,13 +124,13 @@ AnalyzePage {
}
QGCButton
{
text
:
c
ontroller
.
inProgress
?
qsTr
(
"
Cancel Tagging
"
)
:
qsTr
(
"
Start Tagging
"
)
text
:
geoC
ontroller
.
inProgress
?
qsTr
(
"
Cancel Tagging
"
)
:
qsTr
(
"
Start Tagging
"
)
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
onClicked
:
{
if
(
c
ontroller
.
inProgress
)
{
c
ontroller
.
cancelTagging
()
if
(
geoC
ontroller
.
inProgress
)
{
geoC
ontroller
.
cancelTagging
()
}
else
{
c
ontroller
.
startTagging
()
geoC
ontroller
.
startTagging
()
}
}
}
...
...
src/AnalyzeView/LogDownloadPage.qml
View file @
1edf5b83
...
...
@@ -27,20 +27,6 @@ AnalyzePage {
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
{
...
...
@@ -50,11 +36,24 @@ AnalyzePage {
width
:
availableWidth
height
:
availableHeight
Connections
{
target
:
logController
onSelectionChanged
:
{
tableView
.
selection
.
clear
()
for
(
var
i
=
0
;
i
<
logController
.
model
.
count
;
i
++
)
{
var
o
=
logController
.
model
.
get
(
i
)
if
(
o
&&
o
.
selected
)
{
tableView
.
selection
.
select
(
i
,
i
)
}
}
}
}
TableView
{
id
:
tableView
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
model
:
c
ontroller
.
model
model
:
logC
ontroller
.
model
selectionMode
:
SelectionMode
.
MultiSelection
Layout.fillWidth
:
true
...
...
@@ -65,7 +64,7 @@ AnalyzePage {
delegate
:
Text
{
horizontalAlignment
:
Text
.
AlignHCenter
text
:
{
var
o
=
c
ontroller
.
model
.
get
(
styleData
.
row
)
var
o
=
logC
ontroller
.
model
.
get
(
styleData
.
row
)
return
o
?
o
.
id
:
""
}
}
...
...
@@ -77,11 +76,11 @@ AnalyzePage {
horizontalAlignment
:
Text
.
AlignHCenter
delegate
:
Text
{
text
:
{
var
o
=
c
ontroller
.
model
.
get
(
styleData
.
row
)
var
o
=
logC
ontroller
.
model
.
get
(
styleData
.
row
)
if
(
o
)
{
//-- Have we received this entry already?
if
(
c
ontroller
.
model
.
get
(
styleData
.
row
).
received
)
{
var
d
=
c
ontroller
.
model
.
get
(
styleData
.
row
).
time
if
(
logC
ontroller
.
model
.
get
(
styleData
.
row
).
received
)
{
var
d
=
logC
ontroller
.
model
.
get
(
styleData
.
row
).
time
if
(
d
.
getUTCFullYear
()
<
2010
)
return
qsTr
(
"
Date Unknown
"
)
else
...
...
@@ -100,7 +99,7 @@ AnalyzePage {
delegate
:
Text
{
horizontalAlignment
:
Text
.
AlignRight
text
:
{
var
o
=
c
ontroller
.
model
.
get
(
styleData
.
row
)
var
o
=
logC
ontroller
.
model
.
get
(
styleData
.
row
)
return
o
?
o
.
sizeStr
:
""
}
}
...
...
@@ -113,7 +112,7 @@ AnalyzePage {
delegate
:
Text
{
horizontalAlignment
:
Text
.
AlignHCenter
text
:
{
var
o
=
c
ontroller
.
model
.
get
(
styleData
.
row
)
var
o
=
logC
ontroller
.
model
.
get
(
styleData
.
row
)
return
o
?
o
.
status
:
""
}
}
...
...
@@ -125,7 +124,7 @@ AnalyzePage {
Layout.alignment
:
Qt
.
AlignTop
|
Qt
.
AlignLeft
QGCButton
{
enabled
:
!
controller
.
requestingList
&&
!
c
ontroller
.
downloadingLogs
enabled
:
!
logController
.
requestingList
&&
!
logC
ontroller
.
downloadingLogs
text
:
qsTr
(
"
Refresh
"
)
width
:
_butttonWidth
...
...
@@ -133,33 +132,33 @@ AnalyzePage {
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
{
c
ontroller
.
refresh
()
logC
ontroller
.
refresh
()
}
}
}
QGCButton
{
enabled
:
!
controller
.
requestingList
&&
!
c
ontroller
.
downloadingLogs
&&
tableView
.
selection
.
count
>
0
enabled
:
!
logController
.
requestingList
&&
!
logC
ontroller
.
downloadingLogs
&&
tableView
.
selection
.
count
>
0
text
:
qsTr
(
"
Download
"
)
width
:
_butttonWidth
onClicked
:
{
//-- Clear selection
for
(
var
i
=
0
;
i
<
c
ontroller
.
model
.
count
;
i
++
)
{
var
o
=
c
ontroller
.
model
.
get
(
i
)
for
(
var
i
=
0
;
i
<
logC
ontroller
.
model
.
count
;
i
++
)
{
var
o
=
logC
ontroller
.
model
.
get
(
i
)
if
(
o
)
o
.
selected
=
false
}
//-- Flag selected log files
tableView
.
selection
.
forEach
(
function
(
rowIndex
){
var
o
=
c
ontroller
.
model
.
get
(
rowIndex
)
var
o
=
logC
ontroller
.
model
.
get
(
rowIndex
)
if
(
o
)
o
.
selected
=
true
})
//-- Download them
c
ontroller
.
download
()
logC
ontroller
.
download
()
}
}
QGCButton
{
enabled
:
!
controller
.
requestingList
&&
!
controller
.
downloadingLogs
&&
c
ontroller
.
model
.
count
>
0
enabled
:
!
logController
.
requestingList
&&
!
logController
.
downloadingLogs
&&
logC
ontroller
.
model
.
count
>
0
text
:
qsTr
(
"
Erase All
"
)
width
:
_butttonWidth
onClicked
:
logDownloadPage
.
showDialog
(
eraseAllMessage
,
...
...
@@ -175,7 +174,7 @@ AnalyzePage {
function
accept
()
{
logDownloadPage
.
hideDialog
()
c
ontroller
.
eraseAll
()
logC
ontroller
.
eraseAll
()
}
}
}
...
...
@@ -184,8 +183,8 @@ AnalyzePage {
QGCButton
{
text
:
qsTr
(
"
Cancel
"
)
width
:
_butttonWidth
enabled
:
controller
.
requestingList
||
c
ontroller
.
downloadingLogs
onClicked
:
c
ontroller
.
cancel
()
enabled
:
logController
.
requestingList
||
logC
ontroller
.
downloadingLogs
onClicked
:
logC
ontroller
.
cancel
()
}
}
// Column - Buttons
}
// RowLayout
...
...
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