Skip to content

Commit

Permalink
[qml] Expose QgsLocatorContext's transformContext as property
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Nov 22, 2024
1 parent 4d3c0f4 commit 700a197
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Constructor for QgsCoordinateTransformContext.
QgsCoordinateTransformContext( const QgsCoordinateTransformContext &rhs );

bool operator==( const QgsCoordinateTransformContext &rhs ) const;
bool operator!=( const QgsCoordinateTransformContext &rhs ) const;

void clear();
%Docstring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Constructor for QgsCoordinateTransformContext.
QgsCoordinateTransformContext( const QgsCoordinateTransformContext &rhs );

bool operator==( const QgsCoordinateTransformContext &rhs ) const;
bool operator!=( const QgsCoordinateTransformContext &rhs ) const;

void clear();
%Docstring
Expand Down
1 change: 1 addition & 0 deletions src/core/geometry/qgsrectangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "qgsbox3d.h"
#include "qgspolygon.h"
#include "qgslinestring.h"
#include "moc_qgsrectangle.cpp"

#include <QString>
#include <QTextStream>
Expand Down
1 change: 1 addition & 0 deletions src/core/locator/qgslocatorcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class CORE_EXPORT QgsLocatorContext

Q_PROPERTY( QgsRectangle targetExtent MEMBER targetExtent )
Q_PROPERTY( QgsCoordinateReferenceSystem targetExtentCrs MEMBER targetExtentCrs )
Q_PROPERTY( QgsCoordinateTransformContext transformContext MEMBER transformContext )
Q_PROPERTY( bool usingPrefix MEMBER usingPrefix )

public:
Expand Down
5 changes: 5 additions & 0 deletions src/core/proj/qgscoordinatetransformcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ bool QgsCoordinateTransformContext::operator==( const QgsCoordinateTransformCont
return equal;
}

bool QgsCoordinateTransformContext::operator!=( const QgsCoordinateTransformContext &rhs ) const
{
return !( *this == rhs );
}

void QgsCoordinateTransformContext::clear()
{
d.detach();
Expand Down
3 changes: 2 additions & 1 deletion src/core/proj/qgscoordinatetransformcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ class CORE_EXPORT QgsCoordinateTransformContext
QgsCoordinateTransformContext( const QgsCoordinateTransformContext &rhs );
QgsCoordinateTransformContext &operator=( const QgsCoordinateTransformContext &rhs ) SIP_SKIP;

bool operator==( const QgsCoordinateTransformContext &rhs ) const ;
bool operator==( const QgsCoordinateTransformContext &rhs ) const;
bool operator!=( const QgsCoordinateTransformContext &rhs ) const;

/**
* Clears all stored transform information from the context.
Expand Down

0 comments on commit 700a197

Please sign in to comment.