diff --git a/src/core/locator/activelayerfeatureslocatorfilter.cpp b/src/core/locator/activelayerfeatureslocatorfilter.cpp index d4ca06ec38..c3f86bbd3f 100644 --- a/src/core/locator/activelayerfeatureslocatorfilter.cpp +++ b/src/core/locator/activelayerfeatureslocatorfilter.cpp @@ -436,8 +436,8 @@ void ActiveLayerFeaturesLocatorFilter::triggerResultFromAction( const QgsLocator mLocatorBridge->mapSettings()->setExtent( r, true ); } - mLocatorBridge->locatorHighlightGeometry()->setProperty( "qgsGeometry", geom ); - mLocatorBridge->locatorHighlightGeometry()->setProperty( "crs", layer->crs() ); + mLocatorBridge->geometryHighlighter()->setProperty( "qgsGeometry", geom ); + mLocatorBridge->geometryHighlighter()->setProperty( "crs", layer->crs() ); break; } } diff --git a/src/core/locator/bookmarklocatorfilter.cpp b/src/core/locator/bookmarklocatorfilter.cpp index 7893c750d2..89bb7b7a54 100644 --- a/src/core/locator/bookmarklocatorfilter.cpp +++ b/src/core/locator/bookmarklocatorfilter.cpp @@ -77,6 +77,6 @@ void BookmarkLocatorFilter::triggerResultFromAction( const QgsLocatorResult &res mLocatorBridge->bookmarks()->setExtentFromBookmark( mLocatorBridge->bookmarks()->index( row, 0 ) ); QgsGeometry geom( mLocatorBridge->bookmarks()->data( mLocatorBridge->bookmarks()->index( row, 0 ), BookmarkModel::BookmarkPoint ).value() ); - mLocatorBridge->locatorHighlightGeometry()->setProperty( "qgsGeometry", geom ); - mLocatorBridge->locatorHighlightGeometry()->setProperty( "crs", mLocatorBridge->mapSettings()->mapSettings().destinationCrs() ); + mLocatorBridge->geometryHighlighter()->setProperty( "qgsGeometry", geom ); + mLocatorBridge->geometryHighlighter()->setProperty( "crs", mLocatorBridge->mapSettings()->mapSettings().destinationCrs() ); } diff --git a/src/core/locator/featureslocatorfilter.cpp b/src/core/locator/featureslocatorfilter.cpp index 96774e287a..4f537994c7 100644 --- a/src/core/locator/featureslocatorfilter.cpp +++ b/src/core/locator/featureslocatorfilter.cpp @@ -241,7 +241,7 @@ void FeaturesLocatorFilter::triggerResultFromAction( const QgsLocatorResult &res mLocatorBridge->mapSettings()->setExtent( r, true ); - mLocatorBridge->locatorHighlightGeometry()->setProperty( "qgsGeometry", geom ); - mLocatorBridge->locatorHighlightGeometry()->setProperty( "crs", layer->crs() ); + mLocatorBridge->geometryHighlighter()->setProperty( "qgsGeometry", geom ); + mLocatorBridge->geometryHighlighter()->setProperty( "crs", layer->crs() ); } } diff --git a/src/core/locator/finlandlocatorfilter.cpp b/src/core/locator/finlandlocatorfilter.cpp index 16daa5f8cf..2ae7007687 100644 --- a/src/core/locator/finlandlocatorfilter.cpp +++ b/src/core/locator/finlandlocatorfilter.cpp @@ -61,6 +61,6 @@ void FinlandLocatorFilter::handleGeocodeResult( const QgsGeocoderResult &result mLocatorBridge->mapSettings()->setCenter( transformedGeometry.centroid().vertexAt( 0 ), true ); - mLocatorBridge->locatorHighlightGeometry()->setProperty( "qgsGeometry", result.geometry() ); - mLocatorBridge->locatorHighlightGeometry()->setProperty( "crs", result.crs() ); + mLocatorBridge->geometryHighlighter()->setProperty( "qgsGeometry", result.geometry() ); + mLocatorBridge->geometryHighlighter()->setProperty( "crs", result.crs() ); } diff --git a/src/core/locator/gotolocatorfilter.cpp b/src/core/locator/gotolocatorfilter.cpp index 3de2491c9d..52e71120eb 100644 --- a/src/core/locator/gotolocatorfilter.cpp +++ b/src/core/locator/gotolocatorfilter.cpp @@ -206,7 +206,7 @@ void GotoLocatorFilter::triggerResultFromAction( const QgsLocatorResult &result, { mLocatorBridge->mapSettings()->setCenter( geom.vertexAt( 0 ), true ); - mLocatorBridge->locatorHighlightGeometry()->setProperty( "qgsGeometry", geom ); - mLocatorBridge->locatorHighlightGeometry()->setProperty( "crs", mLocatorBridge->mapSettings()->mapSettings().destinationCrs() ); + mLocatorBridge->geometryHighlighter()->setProperty( "qgsGeometry", geom ); + mLocatorBridge->geometryHighlighter()->setProperty( "crs", mLocatorBridge->mapSettings()->mapSettings().destinationCrs() ); } } diff --git a/src/core/locator/locatormodelsuperbridge.cpp b/src/core/locator/locatormodelsuperbridge.cpp index 7c82562d53..534fadd1b3 100644 --- a/src/core/locator/locatormodelsuperbridge.cpp +++ b/src/core/locator/locatormodelsuperbridge.cpp @@ -113,18 +113,18 @@ void LocatorModelSuperBridge::setMapSettings( QgsQuickMapSettings *mapSettings ) emit mapSettingsChanged(); } -QObject *LocatorModelSuperBridge::locatorHighlightGeometry() const +QObject *LocatorModelSuperBridge::geometryHighlighter() const { - return mLocatorHighlightGeometry; + return mGeometryHighlighter; } -void LocatorModelSuperBridge::setLocatorHighlightGeometry( QObject *locatorHighlightGeometry ) +void LocatorModelSuperBridge::setGeometryHighlighter( QObject *geometryHighlighter ) { - if ( locatorHighlightGeometry == mLocatorHighlightGeometry ) + if ( mGeometryHighlighter == geometryHighlighter ) return; - mLocatorHighlightGeometry = locatorHighlightGeometry; - emit locatorHighlightGeometryChanged(); + mGeometryHighlighter = geometryHighlighter; + emit geometryHighlighterChanged(); } FeatureListExtentController *LocatorModelSuperBridge::featureListController() const diff --git a/src/core/locator/locatormodelsuperbridge.h b/src/core/locator/locatormodelsuperbridge.h index 8448f1ee6b..f7e0f8d797 100644 --- a/src/core/locator/locatormodelsuperbridge.h +++ b/src/core/locator/locatormodelsuperbridge.h @@ -63,7 +63,7 @@ class LocatorModelSuperBridge : public QgsLocatorModelBridge //! The current project's map settings Q_PROPERTY( QgsQuickMapSettings *mapSettings READ mapSettings WRITE setMapSettings NOTIFY mapSettingsChanged ) //! The locator highlight geometry object through which locator actions can highhlight features - Q_PROPERTY( QObject *locatorHighlightGeometry READ locatorHighlightGeometry WRITE setLocatorHighlightGeometry NOTIFY locatorHighlightGeometryChanged ) + Q_PROPERTY( QObject *geometryHighlighter READ geometryHighlighter WRITE setGeometryHighlighter NOTIFY geometryHighlighterChanged ) //! The feature list extent controller Q_PROPERTY( FeatureListExtentController *featureListController READ featureListController WRITE setFeatureListController NOTIFY featureListControllerChanged ) //! The current project's active layer @@ -94,10 +94,10 @@ class LocatorModelSuperBridge : public QgsLocatorModelBridge //! \copydoc LocatorModelSuperBridge::navigation void setNavigation( Navigation *navigation ); - //! \copydoc LocatorModelSuperBridge::locatorHighlightGeometry - QObject *locatorHighlightGeometry() const; - //! \copydoc LocatorModelSuperBridge::locatorHighlightGeometry - void setLocatorHighlightGeometry( QObject *locatorHighlightGeometry ); + //! \copydoc LocatorModelSuperBridge::geometryHighlighter + QObject *geometryHighlighter() const; + //! \copydoc LocatorModelSuperBridge::geometryHighlighter + void setGeometryHighlighter( QObject *geometryHighlighter ); //! \copydoc LocatorModelSuperBridge::featureListController FeatureListExtentController *featureListController() const; @@ -158,7 +158,7 @@ class LocatorModelSuperBridge : public QgsLocatorModelBridge void mapSettingsChanged(); void bookmarksChanged(); void navigationChanged(); - void locatorHighlightGeometryChanged(); + void geometryHighlighterChanged(); void featureListControllerChanged(); void activeLayerChanged(); void messageEmitted( const QString &text ); @@ -172,7 +172,7 @@ class LocatorModelSuperBridge : public QgsLocatorModelBridge private: QgsQuickMapSettings *mMapSettings = nullptr; - QObject *mLocatorHighlightGeometry = nullptr; + QObject *mGeometryHighlighter = nullptr; FeatureListExtentController *mFeatureListController = nullptr; QPointer mActiveLayer; bool mKeepScale = false; diff --git a/src/qml/CodeReader.qml b/src/qml/CodeReader.qml index b6d3786848..4f32fbc6eb 100644 --- a/src/qml/CodeReader.qml +++ b/src/qml/CodeReader.qml @@ -13,7 +13,10 @@ import Theme Popup { id: codeReader + //! Emitted when a QR code or NFC tag has been decoded/received signal decoded(var string) + //! Emitted when a QR code or NFC tag has been accepted + signal accepted(var string) property string decodedString: '' property var barcodeRequestedItem: undefined //