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
Show 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 {
...
@@ -36,6 +36,14 @@ Rectangle {
readonly
property
real
_verticalMargin
:
_defaultTextHeight
/
2
readonly
property
real
_verticalMargin
:
_defaultTextHeight
/
2
readonly
property
real
_buttonWidth
:
_defaultTextWidth
*
18
readonly
property
real
_buttonWidth
:
_defaultTextWidth
*
18
GeoTagController
{
id
:
geoController
}
LogDownloadController
{
id
:
logController
}
MavlinkConsoleController
{
MavlinkConsoleController
{
id
:
conController
id
:
conController
}
}
...
...
src/AnalyzeView/GeoTagPage.qml
View file @
1edf5b83
...
@@ -27,10 +27,6 @@ AnalyzePage {
...
@@ -27,10 +27,6 @@ AnalyzePage {
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
*
2
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
*
2
GeoTagController
{
id
:
controller
}
Component
{
Component
{
id
:
pageComponent
id
:
pageComponent
...
@@ -46,18 +42,18 @@ AnalyzePage {
...
@@ -46,18 +42,18 @@ AnalyzePage {
id
:
progressBar
id
:
progressBar
width
:
qgcView
.
width
-
_margin
*
5
width
:
qgcView
.
width
-
_margin
*
5
maximumValue
:
100
maximumValue
:
100
value
:
c
ontroller
.
progress
value
:
geoC
ontroller
.
progress
}
}
BusyIndicator
{
BusyIndicator
{
running
:
controller
.
progress
>
0
&&
controller
.
progress
<
100
&&
c
ontroller
.
errorMessage
===
""
running
:
geoController
.
progress
>
0
&&
geoController
.
progress
<
100
&&
geoC
ontroller
.
errorMessage
===
""
width
:
progressBar
.
height
width
:
progressBar
.
height
height
:
progressBar
.
height
height
:
progressBar
.
height
}
}
}
}
QGCLabel
{
QGCLabel
{
text
:
c
ontroller
.
errorMessage
text
:
geoC
ontroller
.
errorMessage
font.bold
:
true
font.bold
:
true
font.pointSize
:
ScreenTools
.
largeFontPointSize
font.pointSize
:
ScreenTools
.
largeFontPointSize
color
:
"
red
"
color
:
"
red
"
...
@@ -77,12 +73,12 @@ AnalyzePage {
...
@@ -77,12 +73,12 @@ AnalyzePage {
QGCButton
{
QGCButton
{
text
:
qsTr
(
"
Select log file
"
)
text
:
qsTr
(
"
Select log file
"
)
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
onClicked
:
c
ontroller
.
pickLogFile
()
onClicked
:
geoC
ontroller
.
pickLogFile
()
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
QGCLabel
{
QGCLabel
{
text
:
c
ontroller
.
logFile
text
:
geoC
ontroller
.
logFile
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
}
}
...
@@ -93,12 +89,12 @@ AnalyzePage {
...
@@ -93,12 +89,12 @@ AnalyzePage {
QGCButton
{
QGCButton
{
text
:
qsTr
(
"
Select image directory
"
)
text
:
qsTr
(
"
Select image directory
"
)
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
onClicked
:
c
ontroller
.
pickImageDirectory
()
onClicked
:
geoC
ontroller
.
pickImageDirectory
()
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
QGCLabel
{
QGCLabel
{
text
:
c
ontroller
.
imageDirectory
text
:
geoC
ontroller
.
imageDirectory
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
}
}
...
@@ -109,12 +105,12 @@ AnalyzePage {
...
@@ -109,12 +105,12 @@ AnalyzePage {
QGCButton
{
QGCButton
{
text
:
qsTr
(
"
(Optionally) Select save directory
"
)
text
:
qsTr
(
"
(Optionally) Select save directory
"
)
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
onClicked
:
c
ontroller
.
pickSaveDirectory
()
onClicked
:
geoC
ontroller
.
pickSaveDirectory
()
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
QGCLabel
{
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
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
}
}
...
@@ -128,13 +124,13 @@ AnalyzePage {
...
@@ -128,13 +124,13 @@ AnalyzePage {
}
}
QGCButton
{
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
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
onClicked
:
{
onClicked
:
{
if
(
c
ontroller
.
inProgress
)
{
if
(
geoC
ontroller
.
inProgress
)
{
c
ontroller
.
cancelTagging
()
geoC
ontroller
.
cancelTagging
()
}
else
{
}
else
{
c
ontroller
.
startTagging
()
geoC
ontroller
.
startTagging
()
}
}
}
}
}
}
...
...
src/AnalyzeView/LogDownloadPage.qml
View file @
1edf5b83
...
@@ -27,13 +27,21 @@ AnalyzePage {
...
@@ -27,13 +27,21 @@ AnalyzePage {
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
property
real
_butttonWidth
:
ScreenTools
.
defaultFontPixelWidth
*
10
property
real
_butttonWidth
:
ScreenTools
.
defaultFontPixelWidth
*
10
LogDownloadController
{
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
enabled
}
id
:
controller
Component
{
id
:
pageComponent
RowLayout
{
width
:
availableWidth
height
:
availableHeight
Connections
{
target
:
logController
onSelectionChanged
:
{
onSelectionChanged
:
{
tableView
.
selection
.
clear
()
tableView
.
selection
.
clear
()
for
(
var
i
=
0
;
i
<
c
ontroller
.
model
.
count
;
i
++
)
{
for
(
var
i
=
0
;
i
<
logC
ontroller
.
model
.
count
;
i
++
)
{
var
o
=
c
ontroller
.
model
.
get
(
i
)
var
o
=
logC
ontroller
.
model
.
get
(
i
)
if
(
o
&&
o
.
selected
)
{
if
(
o
&&
o
.
selected
)
{
tableView
.
selection
.
select
(
i
,
i
)
tableView
.
selection
.
select
(
i
,
i
)
}
}
...
@@ -41,20 +49,11 @@ AnalyzePage {
...
@@ -41,20 +49,11 @@ AnalyzePage {
}
}
}
}
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
enabled
}
Component
{
id
:
pageComponent
RowLayout
{
width
:
availableWidth
height
:
availableHeight
TableView
{
TableView
{
id
:
tableView
id
:
tableView
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
model
:
c
ontroller
.
model
model
:
logC
ontroller
.
model
selectionMode
:
SelectionMode
.
MultiSelection
selectionMode
:
SelectionMode
.
MultiSelection
Layout.fillWidth
:
true
Layout.fillWidth
:
true
...
@@ -65,7 +64,7 @@ AnalyzePage {
...
@@ -65,7 +64,7 @@ AnalyzePage {
delegate
:
Text
{
delegate
:
Text
{
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
text
:
{
text
:
{
var
o
=
c
ontroller
.
model
.
get
(
styleData
.
row
)
var
o
=
logC
ontroller
.
model
.
get
(
styleData
.
row
)
return
o
?
o
.
id
:
""
return
o
?
o
.
id
:
""
}
}
}
}
...
@@ -77,11 +76,11 @@ AnalyzePage {
...
@@ -77,11 +76,11 @@ AnalyzePage {
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
delegate
:
Text
{
delegate
:
Text
{
text
:
{
text
:
{
var
o
=
c
ontroller
.
model
.
get
(
styleData
.
row
)
var
o
=
logC
ontroller
.
model
.
get
(
styleData
.
row
)
if
(
o
)
{
if
(
o
)
{
//-- Have we received this entry already?
//-- Have we received this entry already?
if
(
c
ontroller
.
model
.
get
(
styleData
.
row
).
received
)
{
if
(
logC
ontroller
.
model
.
get
(
styleData
.
row
).
received
)
{
var
d
=
c
ontroller
.
model
.
get
(
styleData
.
row
).
time
var
d
=
logC
ontroller
.
model
.
get
(
styleData
.
row
).
time
if
(
d
.
getUTCFullYear
()
<
2010
)
if
(
d
.
getUTCFullYear
()
<
2010
)
return
qsTr
(
"
Date Unknown
"
)
return
qsTr
(
"
Date Unknown
"
)
else
else
...
@@ -100,7 +99,7 @@ AnalyzePage {
...
@@ -100,7 +99,7 @@ AnalyzePage {
delegate
:
Text
{
delegate
:
Text
{
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
text
:
{
text
:
{
var
o
=
c
ontroller
.
model
.
get
(
styleData
.
row
)
var
o
=
logC
ontroller
.
model
.
get
(
styleData
.
row
)
return
o
?
o
.
sizeStr
:
""
return
o
?
o
.
sizeStr
:
""
}
}
}
}
...
@@ -113,7 +112,7 @@ AnalyzePage {
...
@@ -113,7 +112,7 @@ AnalyzePage {
delegate
:
Text
{
delegate
:
Text
{
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
text
:
{
text
:
{
var
o
=
c
ontroller
.
model
.
get
(
styleData
.
row
)
var
o
=
logC
ontroller
.
model
.
get
(
styleData
.
row
)
return
o
?
o
.
status
:
""
return
o
?
o
.
status
:
""
}
}
}
}
...
@@ -125,7 +124,7 @@ AnalyzePage {
...
@@ -125,7 +124,7 @@ AnalyzePage {
Layout.alignment
:
Qt
.
AlignTop
|
Qt
.
AlignLeft
Layout.alignment
:
Qt
.
AlignTop
|
Qt
.
AlignLeft
QGCButton
{
QGCButton
{
enabled
:
!
controller
.
requestingList
&&
!
c
ontroller
.
downloadingLogs
enabled
:
!
logController
.
requestingList
&&
!
logC
ontroller
.
downloadingLogs
text
:
qsTr
(
"
Refresh
"
)
text
:
qsTr
(
"
Refresh
"
)
width
:
_butttonWidth
width
:
_butttonWidth
...
@@ -133,33 +132,33 @@ AnalyzePage {
...
@@ -133,33 +132,33 @@ AnalyzePage {
if
(
!
QGroundControl
.
multiVehicleManager
.
activeVehicle
||
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
isOfflineEditingVehicle
)
{
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
)
logDownloadPage
.
showMessage
(
qsTr
(
"
Log Refresh
"
),
qsTr
(
"
You must be connected to a vehicle in order to download logs.
"
),
StandardButton
.
Ok
)
}
else
{
}
else
{
c
ontroller
.
refresh
()
logC
ontroller
.
refresh
()
}
}
}
}
}
}
QGCButton
{
QGCButton
{
enabled
:
!
controller
.
requestingList
&&
!
c
ontroller
.
downloadingLogs
&&
tableView
.
selection
.
count
>
0
enabled
:
!
logController
.
requestingList
&&
!
logC
ontroller
.
downloadingLogs
&&
tableView
.
selection
.
count
>
0
text
:
qsTr
(
"
Download
"
)
text
:
qsTr
(
"
Download
"
)
width
:
_butttonWidth
width
:
_butttonWidth
onClicked
:
{
onClicked
:
{
//-- Clear selection
//-- Clear selection
for
(
var
i
=
0
;
i
<
c
ontroller
.
model
.
count
;
i
++
)
{
for
(
var
i
=
0
;
i
<
logC
ontroller
.
model
.
count
;
i
++
)
{
var
o
=
c
ontroller
.
model
.
get
(
i
)
var
o
=
logC
ontroller
.
model
.
get
(
i
)
if
(
o
)
o
.
selected
=
false
if
(
o
)
o
.
selected
=
false
}
}
//-- Flag selected log files
//-- Flag selected log files
tableView
.
selection
.
forEach
(
function
(
rowIndex
){
tableView
.
selection
.
forEach
(
function
(
rowIndex
){
var
o
=
c
ontroller
.
model
.
get
(
rowIndex
)
var
o
=
logC
ontroller
.
model
.
get
(
rowIndex
)
if
(
o
)
o
.
selected
=
true
if
(
o
)
o
.
selected
=
true
})
})
//-- Download them
//-- Download them
c
ontroller
.
download
()
logC
ontroller
.
download
()
}
}
}
}
QGCButton
{
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
"
)
text
:
qsTr
(
"
Erase All
"
)
width
:
_butttonWidth
width
:
_butttonWidth
onClicked
:
logDownloadPage
.
showDialog
(
eraseAllMessage
,
onClicked
:
logDownloadPage
.
showDialog
(
eraseAllMessage
,
...
@@ -175,7 +174,7 @@ AnalyzePage {
...
@@ -175,7 +174,7 @@ AnalyzePage {
function
accept
()
{
function
accept
()
{
logDownloadPage
.
hideDialog
()
logDownloadPage
.
hideDialog
()
c
ontroller
.
eraseAll
()
logC
ontroller
.
eraseAll
()
}
}
}
}
}
}
...
@@ -184,8 +183,8 @@ AnalyzePage {
...
@@ -184,8 +183,8 @@ AnalyzePage {
QGCButton
{
QGCButton
{
text
:
qsTr
(
"
Cancel
"
)
text
:
qsTr
(
"
Cancel
"
)
width
:
_butttonWidth
width
:
_butttonWidth
enabled
:
controller
.
requestingList
||
c
ontroller
.
downloadingLogs
enabled
:
logController
.
requestingList
||
logC
ontroller
.
downloadingLogs
onClicked
:
c
ontroller
.
cancel
()
onClicked
:
logC
ontroller
.
cancel
()
}
}
}
// Column - Buttons
}
// Column - Buttons
}
// RowLayout
}
// 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