Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing more to plugins #5339

Merged
merged 2 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/core/utils/geometryutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,7 @@ QgsPoint GeometryUtils::reprojectPoint( const QgsPoint &point, const QgsCoordina
point.is3D() ? point.z() : std::numeric_limits<double>::quiet_NaN(),
point.isMeasure() ? point.m() : std::numeric_limits<double>::quiet_NaN() );
}
QgsGeometry GeometryUtils::createGeometryFromWkt( const QString &wkt )
{
return QgsGeometry::fromWkt( wkt );
}
3 changes: 3 additions & 0 deletions src/core/utils/geometryutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ class QFIELD_CORE_EXPORT GeometryUtils : public QObject

//! Creates a point from \a x and \a y.
static Q_INVOKABLE QgsPoint point( double x, double y ) { return QgsPoint( x, y ); }

//! Creates a geometry from a WKT string.
static Q_INVOKABLE QgsGeometry createGeometryFromWkt( const QString &wkt );
};

#endif // GEOMETRYUTILS_H
3 changes: 0 additions & 3 deletions src/qml/OverlayFeatureFormDrawer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ Drawer {

property bool isSaved: false

digitizingToolbar: overlayFeatureFormDrawer.digitizingToolbar
m-kuhn marked this conversation as resolved.
Show resolved Hide resolved
codeReader: overlayFeatureFormDrawer.codeReader

model: AttributeFormModel {
id: attributeFormModel
featureModel: FeatureModel {
Expand Down
2 changes: 2 additions & 0 deletions src/qml/qgismobileapp.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2132,6 +2132,7 @@ ApplicationWindow {

DashBoard {
id: dashBoard
objectName: "dashBoard"
allowActiveLayerChange: !digitizingToolbar.isDigitizing
mapSettings: mapCanvas.mapSettings
interactive: !welcomeScreen.visible
Expand Down Expand Up @@ -3309,6 +3310,7 @@ ApplicationWindow {

OverlayFeatureFormDrawer {
id: overlayFeatureFormDrawer
objectName: "overlayFeatureFormDrawer"
digitizingToolbar: digitizingToolbar
codeReader: codeReader
featureModel.currentLayer: dashBoard.activeLayer
Expand Down
Loading