forked from mavlink/qgroundcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Download Speed Tweaks (+2 squashed commits) Squashed commits: [ff0ef7e] Cleanup (remove OpenStreetMap) [370fa1d] Done (+25 squashed commits) Squashed commits: [9f3368f] Need to check how many instances of MapEngine are active. [d557eac] Download Optimization [392f50a] Almost there. Trying to optimize download. [a49d1d2] Settings [a94be97] Mostly there. Needs to finish options and map thumbnail. [38d5a0b] Downloading tiles and deleting sets [81101b9] More UI Work [c597d4b] Downloading tiles [a815e35] Get rid of OpenMaps [7e177ea] More reorg [fa6b671] Start handling create tile set Fix signal order when creating fetch tile task [2a31f4d] Refactoring [268b906] Renaming things [947d66e] Fix resource load error. [19e2de8] Adding MapBox [c73e627] Preparing download [87bbf22] UI Tweaks [3c32a86] A lot of UI code done. [ece8ce2] Starting to deal with tiles [7f387bc] Save tile set [f66f343] Adding more code [4de3418] Working [f0cc25d] Done for the night. [2d1d86e] Added SQL database for holding out own tile cache. [d405a87] Convert to camel case as this has been driving me nuts.
- Loading branch information
1 parent
7891f53
commit 8624fb7
Showing
44 changed files
with
5,136 additions
and
1,278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import QtQuick 2.5 | ||
import QtQuick.Controls 1.2 | ||
|
||
import QGroundControl.Palette 1.0 | ||
import QGroundControl.ScreenTools 1.0 | ||
|
||
Rectangle | ||
{ | ||
id: __mapButton | ||
|
||
property var __qgcPal: QGCPalette { colorGroupEnabled: enabled } | ||
property bool __showHighlight: (__pressed | __hovered | checked) && !__forceHoverOff | ||
|
||
property bool __forceHoverOff: false | ||
property int __lastGlobalMouseX: 0 | ||
property int __lastGlobalMouseY: 0 | ||
property bool __pressed: false | ||
property bool __hovered: false | ||
|
||
property bool checked: false | ||
property bool complete: false | ||
property alias text: nameLabel.text | ||
property alias size: sizeLabel.text | ||
|
||
signal clicked() | ||
|
||
color: __showHighlight ? __qgcPal.buttonHighlight : __qgcPal.button | ||
anchors.margins: ScreenTools.defaultFontPixelWidth | ||
Row { | ||
anchors.centerIn: parent | ||
QGCLabel { | ||
id: nameLabel | ||
width: __mapButton.width * 0.4 | ||
color: __showHighlight ? __qgcPal.buttonHighlightText : __qgcPal.buttonText | ||
anchors.verticalCenter: parent.verticalCenter | ||
} | ||
QGCLabel { | ||
id: sizeLabel | ||
width: __mapButton.width * 0.4 | ||
horizontalAlignment: Text.AlignRight | ||
anchors.verticalCenter: parent.verticalCenter | ||
color: __showHighlight ? __qgcPal.buttonHighlightText : __qgcPal.buttonText | ||
} | ||
Item { | ||
width: ScreenTools.defaultFontPixelWidth * 2 | ||
height: 1 | ||
} | ||
Rectangle { | ||
width: sizeLabel.height * 0.5 | ||
height: sizeLabel.height * 0.5 | ||
radius: width / 2 | ||
color: complete ? "#31f55b" : "#fc5656" | ||
opacity: sizeLabel.text.length > 0 ? 1 : 0 | ||
anchors.verticalCenter: parent.verticalCenter | ||
} | ||
Item { | ||
width: ScreenTools.defaultFontPixelWidth * 2 | ||
height: 1 | ||
} | ||
QGCColoredImage { | ||
width: sizeLabel.height * 0.8 | ||
height: sizeLabel.height * 0.8 | ||
source: "/res/buttonRight.svg" | ||
mipmap: true | ||
fillMode: Image.PreserveAspectFit | ||
color: __showHighlight ? __qgcPal.buttonHighlightText : __qgcPal.buttonText | ||
anchors.verticalCenter: parent.verticalCenter | ||
} | ||
} | ||
|
||
MouseArea { | ||
anchors.fill: parent | ||
hoverEnabled: true | ||
onMouseXChanged: { | ||
__lastGlobalMouseX = ScreenTools.mouseX() | ||
__lastGlobalMouseY = ScreenTools.mouseY() | ||
} | ||
onMouseYChanged: { | ||
__lastGlobalMouseX = ScreenTools.mouseX() | ||
__lastGlobalMouseY = ScreenTools.mouseY() | ||
} | ||
onEntered: { __hovered = true; __forceHoverOff = false; hoverTimer.start() } | ||
onExited: { __hovered = false; __forceHoverOff = false; hoverTimer.stop() } | ||
onPressed: { __pressed = true; } | ||
onReleased: { __pressed = false; } | ||
onClicked: { | ||
__mapButton.clicked() | ||
} | ||
} | ||
|
||
Timer { | ||
id: hoverTimer | ||
interval: 250 | ||
repeat: true | ||
onTriggered: { | ||
if (__lastGlobalMouseX !== ScreenTools.mouseX() || __lastGlobalMouseY !== ScreenTools.mouseY()) { | ||
__forceHoverOff = true | ||
} else { | ||
__forceHoverOff = false | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.