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
1d0a02d2
Commit
1d0a02d2
authored
Apr 23, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert old style overlay dialogs in Offline Maps to QtQuick 2.4 controls (Popup)
parent
c0aec101
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
220 additions
and
319 deletions
+220
-319
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+0
-1
OfflineMapButton.qml
src/QmlControls/OfflineMapButton.qml
+16
-87
QGCToolBarButton.qml
src/QmlControls/QGCToolBarButton.qml
+0
-2
OfflineMap.qml
src/QtLocationPlugin/QMLControl/OfflineMap.qml
+203
-229
MainRootWindow.qml
src/ui/MainRootWindow.qml
+1
-0
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
1d0a02d2
...
...
@@ -680,7 +680,6 @@ Item {
/// Close all dialogs
function
closeAll
()
{
rootLoader
.
sourceComponent
=
null
guidedActionConfirm
.
visible
=
false
guidedActionList
.
visible
=
false
altitudeSlider
.
visible
=
false
...
...
src/QmlControls/OfflineMapButton.qml
View file @
1d0a02d2
...
...
@@ -8,23 +8,26 @@
****************************************************************************/
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
2.4
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
ScreenTools
1.0
Rectangle
{
id
:
mapButton
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
color
:
_showHighlight
?
qgcPal
.
buttonHighlight
:
qgcPal
.
button
border.width
:
_showBorder
?
1
:
0
border.color
:
qgcPal
.
buttonText
Button
{
id
:
mapButton
height
:
ScreenTools
.
defaultFontPixelHeight
*
4
autoExclusive
:
true
background
:
Rectangle
{
anchors.fill
:
parent
color
:
_showHighlight
?
qgcPal
.
buttonHighlight
:
qgcPal
.
button
border.width
:
_showBorder
?
1
:
0
border.color
:
qgcPal
.
buttonText
}
property
var
tileSet
:
null
property
var
currentSet
:
null
property
bool
checked
:
false
property
bool
complete
:
false
property
alias
text
:
nameLabel
.
text
property
int
tiles
:
0
property
string
size
:
""
...
...
@@ -37,27 +40,11 @@ Rectangle {
property
bool
_pressed
:
false
property
bool
_hovered
:
false
signal
clicked
()
property
ExclusiveGroup
exclusiveGroup
:
null
onExclusiveGroupChanged
:
{
if
(
exclusiveGroup
)
{
checked
=
false
exclusiveGroup
.
bindCheckable
(
mapButton
)
}
}
onCheckedChanged
:
{
if
(
checked
)
{
currentSet
=
tileSet
}
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
Row
{
anchors.centerIn
:
parent
contentItem
:
Row
{
anchors.centerIn
:
parent
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
id
:
nameLabel
text
:
mapButton
.
text
width
:
mapButton
.
width
*
0.4
color
:
_showHighlight
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
anchors.verticalCenter
:
parent
.
verticalCenter
...
...
@@ -97,62 +84,4 @@ Rectangle {
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
MouseArea
{
anchors.fill
:
parent
hoverEnabled
:
!
ScreenTools
.
isMobile
onMouseXChanged
:
{
if
(
!
ScreenTools
.
isMobile
)
{
_lastGlobalMouseX
=
ScreenTools
.
mouseX
()
_lastGlobalMouseY
=
ScreenTools
.
mouseY
()
}
}
onMouseYChanged
:
{
if
(
!
ScreenTools
.
isMobile
)
{
_lastGlobalMouseX
=
ScreenTools
.
mouseX
()
_lastGlobalMouseY
=
ScreenTools
.
mouseY
()
}
}
onEntered
:
{
if
(
!
ScreenTools
.
isMobile
)
{
_hovered
=
true
_forceHoverOff
=
false
hoverTimer
.
start
()
}
}
onExited
:
{
if
(
!
ScreenTools
.
isMobile
)
{
_hovered
=
false
_forceHoverOff
=
false
hoverTimer
.
stop
()
}
}
onPressed
:
{
if
(
!
ScreenTools
.
isMobile
)
{
_pressed
=
true
}
}
onReleased
:
{
if
(
!
ScreenTools
.
isMobile
)
{
_pressed
=
false
}
}
onClicked
:
{
checked
=
true
mapButton
.
clicked
()
}
}
Timer
{
id
:
hoverTimer
interval
:
250
repeat
:
!
ScreenTools
.
isMobile
onTriggered
:
{
if
(
_lastGlobalMouseX
!==
ScreenTools
.
mouseX
()
||
_lastGlobalMouseY
!==
ScreenTools
.
mouseY
())
{
_forceHoverOff
=
true
}
else
{
_forceHoverOff
=
false
}
}
}
}
src/QmlControls/QGCToolBarButton.qml
View file @
1d0a02d2
...
...
@@ -22,8 +22,6 @@ Button {
property
bool
logo
:
false
QGCPalette
{
id
:
qgcPal
}
background
:
Rectangle
{
anchors.fill
:
parent
color
:
logo
?
qgcPal
.
brandingPurple
:
(
checked
?
qgcPal
.
buttonHighlight
:
Qt
.
rgba
(
0
,
0
,
0
,
0
))
...
...
src/QtLocationPlugin/QMLControl/OfflineMap.qml
View file @
1d0a02d2
This diff is collapsed.
Click to expand it.
src/ui/MainRootWindow.qml
View file @
1d0a02d2
...
...
@@ -309,6 +309,7 @@ ApplicationWindow {
//-------------------------------------------------------------------------
//-- Loader helper for any child, no matter how deep, to display elements
// on top of the main window.
// This is DEPRECATED. Use Popup instead.
Loader
{
id
:
rootLoader
anchors.centerIn
:
parent
...
...
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