Skip to content

Commit

Permalink
close shape icon, new buttons for measure drawer, new connections
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorVieiraZ committed Aug 15, 2024
1 parent e5db92a commit 72ceeb6
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 21 deletions.
7 changes: 7 additions & 0 deletions app/icons/CloseShape.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/icons/icons.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,6 @@
<file>StakeOut.svg</file>
<file>Student.svg</file>
<file>Measure.svg</file>
<file>CloseShape.svg</file>
</qresource>
</RCC>
2 changes: 2 additions & 0 deletions app/mmstyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down Expand Up @@ -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" );}
Expand Down
1 change: 1 addition & 0 deletions app/qml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/qml/components/MMDrawerHeader.qml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Rectangle {
iconSourceLeft: root.leftButtonIcon
bgndColor: __style.lightGreenColor

visible: true //root.leftButtonIcon
visible: root.leftButtonIcon

anchors {
left: parent.left
Expand Down
52 changes: 32 additions & 20 deletions app/qml/gps/MMMeasureDrawer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -80,7 +74,7 @@ MMDrawer {
id: mainColumn

width: parent.width
spacing: __style.margin12
spacing: __style.margin40

Row {
width: parent.width
Expand All @@ -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()
}
}
}
}
5 changes: 5 additions & 0 deletions app/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ ApplicationWindow {

mapCanvas: map

onMeasureDone: finishMeasurementDialog.open()
}
}

Expand Down Expand Up @@ -770,6 +771,10 @@ ApplicationWindow {
}
}

MMFinishMeasurementDialog {
id: finishMeasurementDialog
}

MMNotificationView {}

MMListDrawer {
Expand Down
1 change: 1 addition & 0 deletions gallery/qml/pages/IconsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 72ceeb6

Please sign in to comment.