diff --git a/app/icons/CloseShape.svg b/app/icons/CloseShape.svg
new file mode 100644
index 0000000000..594a3a78eb
--- /dev/null
+++ b/app/icons/CloseShape.svg
@@ -0,0 +1,7 @@
+
diff --git a/app/icons/icons.qrc b/app/icons/icons.qrc
index 4166c8ae7e..3f88e0ec63 100644
--- a/app/icons/icons.qrc
+++ b/app/icons/icons.qrc
@@ -98,5 +98,6 @@
StakeOut.svg
Student.svg
Measure.svg
+ CloseShape.svg
diff --git a/app/mmstyle.h b/app/mmstyle.h
index 98096c3fc4..7529e9670a 100644
--- a/app/mmstyle.h
+++ b/app/mmstyle.h
@@ -169,6 +169,7 @@ class MMStyle: public QObject
Q_PROPERTY( QUrl redrawGeometryIcon READ redrawGeometryIcon CONSTANT )
Q_PROPERTY( QUrl cloudIcon READ cloudIcon CONSTANT )
Q_PROPERTY( QUrl measurementToolIcon READ measurementToolIcon CONSTANT )
+ Q_PROPERTY( QUrl closeShapeIcon READ closeShapeIcon CONSTANT )
// Filled Icons - for visualizing of selected item in toolbar
Q_PROPERTY( QUrl projectsFilledIcon READ projectsFilledIcon CONSTANT )
@@ -425,6 +426,7 @@ class MMStyle: public QObject
QUrl morePhotosIcon() {return QUrl( "qrc:/MorePhotos.svg" );}
QUrl mouthIcon() {return QUrl( "qrc:/Mouth.svg" );}
QUrl measurementToolIcon() {return QUrl( "qrc:/Measure.svg" );}
+ QUrl closeShapeIcon() {return QUrl( "qrc:/CloseShape.svg" );}
QUrl naturalResourcesIcon() {return QUrl( "qrc:/NaturalResources.svg" );}
QUrl nextIcon() {return QUrl( "qrc:/Next.svg" );}
QUrl otherIcon() {return QUrl( "qrc:/Other.svg" );}
diff --git a/app/qml/CMakeLists.txt b/app/qml/CMakeLists.txt
index 7f8ab23495..dc11cf9a42 100644
--- a/app/qml/CMakeLists.txt
+++ b/app/qml/CMakeLists.txt
@@ -77,6 +77,7 @@ set(MM_QML
dialogs/MMDiscardGeometryChangesDialog.qml
dialogs/MMProjectLoadErrorDialog.qml
dialogs/MMProviderRemoveReceiverDialog.qml
+ dialogs/MMFinishMeasurementDialog.qml
dialogs/components/MMDialogAdditionalText.qml
form/MMFormPage.qml
form/MMFormStackController.qml
diff --git a/app/qml/components/MMDrawerHeader.qml b/app/qml/components/MMDrawerHeader.qml
index 20c8aea36f..bf930a1fe8 100644
--- a/app/qml/components/MMDrawerHeader.qml
+++ b/app/qml/components/MMDrawerHeader.qml
@@ -58,7 +58,7 @@ Rectangle {
iconSourceLeft: root.leftButtonIcon
bgndColor: __style.lightGreenColor
- visible: true //root.leftButtonIcon
+ visible: root.leftButtonIcon
anchors {
left: parent.left
diff --git a/app/qml/gps/MMMeasureDrawer.qml b/app/qml/gps/MMMeasureDrawer.qml
index 01614d0bd1..c53541eaa3 100644
--- a/app/qml/gps/MMMeasureDrawer.qml
+++ b/app/qml/gps/MMMeasureDrawer.qml
@@ -34,33 +34,27 @@ MMDrawer {
readonly property alias panelHeight: root.height
signal panelHeightUpdated()
- signal stakeoutFinished()
+ signal measureFinished()
+ signal measureDone()
Component.onCompleted: {
root.open()
}
- // function endStakeout() {
- // if ( mapCanvas.state !== "stakeout" )
- // return;
+ function endMeasurement() {
+ if ( mapCanvas.state !== "measure" )
+ return;
- // stakeoutFinished()
- // }
-
- // function hide() {
- // root.close()
- // }
+ measureFinished()
+ }
- // function restore() {
- // root.open()
- // }
+ function hide() {
+ root.close()
+ }
- // Behavior on height {
- // SequentialAnimation {
- // PropertyAnimation { properties: "height"; easing.type: Easing.InOutQuad }
- // ScriptAction { script: root.panelHeightUpdated() }
- // }
- // }
+ function restore() {
+ root.open()
+ }
modal: false
@@ -80,7 +74,7 @@ MMDrawer {
id: mainColumn
width: parent.width
- spacing: __style.margin12
+ spacing: __style.margin40
Row {
width: parent.width
@@ -101,5 +95,23 @@ MMDrawer {
visible: closeShapeActive
}
}
+
+ Row {
+ width: parent.width
+ spacing: __style.margin12
+
+ MMButton {
+ text: closeShapeActive ? qsTr( "Close shape" ) : qsTr( "Add point" )
+ iconSourceLeft: closeShapeActive ? __style.closeShapeIcon : __style.plusIcon
+ onClicked: console.log(" Add point or Close Shape")
+ }
+
+ MMButton {
+ type: MMButton.Types.Secondary
+ text: qsTr( "Done" )
+ iconSourceLeft: __style.doneCircleIcon
+ onClicked: root.measureDone()
+ }
+ }
}
}
diff --git a/app/qml/main.qml b/app/qml/main.qml
index cb6dc998db..144aefd971 100644
--- a/app/qml/main.qml
+++ b/app/qml/main.qml
@@ -636,6 +636,7 @@ ApplicationWindow {
mapCanvas: map
+ onMeasureDone: finishMeasurementDialog.open()
}
}
@@ -770,6 +771,10 @@ ApplicationWindow {
}
}
+ MMFinishMeasurementDialog {
+ id: finishMeasurementDialog
+ }
+
MMNotificationView {}
MMListDrawer {
diff --git a/gallery/qml/pages/IconsPage.qml b/gallery/qml/pages/IconsPage.qml
index 5a89348a0d..999d34c268 100644
--- a/gallery/qml/pages/IconsPage.qml
+++ b/gallery/qml/pages/IconsPage.qml
@@ -77,6 +77,7 @@ ScrollView {
GalleryComponents.IconLine { name: "plusIcon"; source: __style.plusIcon; showRect: checkboxBorder.checked; invertColors: checkboxColor.checked }
GalleryComponents.IconLine { name: "positionTrackingIcon"; source: __style.positionTrackingIcon; showRect: checkboxBorder.checked; invertColors: checkboxColor.checked }
GalleryComponents.IconLine { name: "measurementToolIcon"; source: __style.measurementToolIcon; showRect: checkboxBorder.checked; invertColors: checkboxColor.checked }
+ GalleryComponents.IconLine { name: "closeShapeIcon"; source: __style.closeShapeIcon; showRect: checkboxBorder.checked; invertColors: checkboxColor.checked }
GalleryComponents.IconLine { name: "qrCodeIcon"; source: __style.qrCodeIcon; showRect: checkboxBorder.checked; invertColors: checkboxColor.checked }
GalleryComponents.IconLine { name: "satelliteIcon"; source: __style.satelliteIcon; showRect: checkboxBorder.checked; invertColors: checkboxColor.checked }
GalleryComponents.IconLine { name: "searchIcon"; source: __style.searchIcon; showRect: checkboxBorder.checked; invertColors: checkboxColor.checked }