summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/MapWidget.qml33
1 files changed, 33 insertions, 0 deletions
diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml
index 685bc0dc6..cfd309841 100644
--- a/mobile-widgets/qml/MapWidget.qml
+++ b/mobile-widgets/qml/MapWidget.qml
@@ -15,10 +15,12 @@ Item {
MapWidgetHelper {
id: mapHelper
map: map
+ editMode: false
onSelectedDivesChanged: {
// 'list' contains a list of dive list indexes
nSelectedDives = list.length
}
+ onEditModeChanged: editMessage.isVisible = editMode === true ? 1 : 0
}
Map {
@@ -163,6 +165,37 @@ Item {
}
}
+ Rectangle {
+ id: editMessage
+ radius: padding
+ color: "#b08000"
+ border.color: "white"
+ x: (map.width - width) * 0.5; y: padding
+ width: editMessageText.width + padding * 2.0
+ height: editMessageText.height + padding * 2.0
+ visible: false
+ opacity: 0.0
+ property int isVisible: -1
+ property real padding: 10.0
+
+ onOpacityChanged: visible = opacity != 0.0
+ states: [
+ State { when: editMessage.isVisible === 1; PropertyChanges { target: editMessage; opacity: 1.0 }},
+ State { when: editMessage.isVisible === 0; PropertyChanges { target: editMessage; opacity: 0.0 }}
+ ]
+ transitions: Transition {
+ NumberAnimation { properties: "opacity"; easing.type: Easing.InOutQuad }
+ }
+ Text {
+ id: editMessageText
+ y: editMessage.padding; x: editMessage.padding
+ verticalAlignment: Text.AlignVCenter
+ color: "white"
+ font.pointSize: 11.0
+ text: qsTr("Drag the selected dive location")
+ }
+ }
+
Image {
id: toggleImage
x: 10; y: x