Skip to content

Commit

Permalink
styling new tool
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorVieiraZ committed Aug 13, 2024
1 parent 19cba1a commit 25c9921
Show file tree
Hide file tree
Showing 12 changed files with 99 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/icons/Measure.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 @@ -97,5 +97,6 @@
<file>ZoomToProject.svg</file>
<file>StakeOut.svg</file>
<file>Student.svg</file>
<file>Measure.svg</file>
</qresource>
</RCC>
23 changes: 23 additions & 0 deletions app/images/NeutralMMSymbol.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/images/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<file>ExternalGpsGreen.svg</file>
<file>NegativeMMSymbol.svg</file>
<file>PositiveMMSymbol.svg</file>
<file>NeutralMMSymbol.svg</file>
<file>CloseAccount.svg</file>
<file>Attention.svg</file>
<file>Bubble.svg</file>
Expand Down
4 changes: 4 additions & 0 deletions app/mmstyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ class MMStyle: public QObject
Q_PROPERTY( QUrl streamingIcon READ streamingIcon CONSTANT )
Q_PROPERTY( QUrl redrawGeometryIcon READ redrawGeometryIcon CONSTANT )
Q_PROPERTY( QUrl cloudIcon READ cloudIcon CONSTANT )
Q_PROPERTY( QUrl measurementToolIcon READ measurementToolIcon CONSTANT )

// Filled Icons - for visualizing of selected item in toolbar
Q_PROPERTY( QUrl projectsFilledIcon READ projectsFilledIcon CONSTANT )
Expand Down Expand Up @@ -215,6 +216,7 @@ class MMStyle: public QObject
Q_PROPERTY( QUrl externalGpsRedImage READ externalGpsRedImage CONSTANT )
Q_PROPERTY( QUrl negativeMMSymbolImage READ negativeMMSymbolImage CONSTANT )
Q_PROPERTY( QUrl positiveMMSymbolImage READ positiveMMSymbolImage CONSTANT )
Q_PROPERTY( QUrl neutralMMSymbolImage READ neutralMMSymbolImage CONSTANT )
Q_PROPERTY( QUrl closeAccountImage READ closeAccountImage CONSTANT )
Q_PROPERTY( QUrl attentionImage READ attentionImage CONSTANT )
Q_PROPERTY( QUrl blueInfoImage READ blueInfoImage CONSTANT )
Expand Down Expand Up @@ -422,6 +424,7 @@ class MMStyle: public QObject
QUrl moreVerticalIcon() {return QUrl( "qrc:/MoreVertical.svg" );}
QUrl morePhotosIcon() {return QUrl( "qrc:/MorePhotos.svg" );}
QUrl mouthIcon() {return QUrl( "qrc:/Mouth.svg" );}
QUrl measurementToolIcon() {return QUrl( "qrc:/Measure.svg" );}
QUrl naturalResourcesIcon() {return QUrl( "qrc:/NaturalResources.svg" );}
QUrl nextIcon() {return QUrl( "qrc:/Next.svg" );}
QUrl otherIcon() {return QUrl( "qrc:/Other.svg" );}
Expand Down Expand Up @@ -498,6 +501,7 @@ class MMStyle: public QObject
QUrl externalGpsRedImage() {return QUrl( "qrc:/images/ExternalGpsRed.svg" );}
QUrl negativeMMSymbolImage() {return QUrl( "qrc:/images/NegativeMMSymbol.svg" );}
QUrl positiveMMSymbolImage() {return QUrl( "qrc:/images/PositiveMMSymbol.svg" );}
QUrl neutralMMSymbolImage() {return QUrl( "qrc:/images/NeutralMMSymbol.svg" );}
QUrl closeAccountImage() {return QUrl( "qrc:/images/CloseAccount.svg" );}
QUrl attentionImage() {return QUrl( "qrc:/images/Attention.svg" );}
QUrl blueInfoImage() {return QUrl( "qrc:/images/BlueInfo.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 @@ -135,6 +135,7 @@ set(MM_QML
map/MMSplittingTools.qml
map/MMStakeoutTools.qml
map/MMRecordingTools.qml
map/MMMeasurementTools.qml
map/components/MMHidingBox.qml
map/components/MMCrosshair.qml
map/components/MMMapHidingLabel.qml
Expand Down
35 changes: 35 additions & 0 deletions app/qml/dialogs/MMFinishMeasurementDialog.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

import QtQuick

import "../components"

MMDrawerDialog {
id: root

signal finishMeasurementRequested()

imageSource: __style.neutralMMSymbolImage
title: qsTr( "Do you wish to finish the measurement?" )
description: qsTr( "Your measured segment will be lost." )
primaryButton.text: qsTr( "Yes" )
secondaryButton.text: qsTr( "No" )

onPrimaryButtonClicked: {
console.log(" Measurement : Finish YES")
root.finishMeasurementRequested()
close()
}

onSecondaryButtonClicked: {
console.log(" Measurement : Finish NO")
close()
}
}
8 changes: 8 additions & 0 deletions app/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,14 @@ ApplicationWindow {
}
}

MMToolbarButton {
text: qsTr("Measure")
iconSource: __style.measurementToolIcon
onClicked: {
console.log(" Measurement tool")
}
}

MMToolbarButton {
text: qsTr("Local changes")
iconSource: __style.localChangesIcon
Expand Down
5 changes: 5 additions & 0 deletions app/qml/map/MMMeasurementTools.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import QtQuick

Item {

}
1 change: 1 addition & 0 deletions gallery/qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,6 @@
<file>../app/qml/dialogs/MMDiscardGeometryChangesDialog.qml</file>
<file>../app/qml/dialogs/MMProviderRemoveReceiverDialog.qml</file>
<file>../app/qml/dialogs/components/MMDialogAdditionalText.qml</file>
<file>../app/qml/dialogs/MMFinishMeasurementDialog.qml</file>
</qresource>
</RCC>
12 changes: 12 additions & 0 deletions gallery/qml/pages/DrawerPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,14 @@ Page {
welcomeToNewDesignDialog.open()
}
}

Button {
text: "finishMeasurementDialog"

onClicked: {
finishMeasurementDialog.open()
}
}
}
}

Expand Down Expand Up @@ -367,4 +375,8 @@ Page {
MMWelcomeToNewDesignDialog {
id: welcomeToNewDesignDialog
}

MMFinishMeasurementDialog {
id: finishMeasurementDialog
}
}
1 change: 1 addition & 0 deletions gallery/qml/pages/IconsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ ScrollView {
GalleryComponents.IconLine { name: "morePhotosIcon"; source: __style.morePhotosIcon; showRect: checkboxBorder.checked; invertColors: checkboxColor.checked }
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: "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 25c9921

Please sign in to comment.