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

Revert "[qml] Upgrade QgsRectangle to Q_GADGET and expose QgsLocatorContext transformContext as property" #59567

Merged
merged 2 commits into from
Nov 22, 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
3 changes: 0 additions & 3 deletions python/PyQt6/core/auto_generated/geometry/qgsrectangle.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ Examples are storing a layer extent or the current view extent of a map
%TypeHeaderCode
#include "qgsrectangle.h"
%End
public:
static const QMetaObject staticMetaObject;

public:

QgsRectangle(); // optimised constructor for null rectangle - no need to call normalize here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Constructor for QgsCoordinateTransformContext.
QgsCoordinateTransformContext( const QgsCoordinateTransformContext &rhs );

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

void clear();
%Docstring
Expand Down
3 changes: 0 additions & 3 deletions python/core/auto_generated/geometry/qgsrectangle.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ Examples are storing a layer extent or the current view extent of a map
%TypeHeaderCode
#include "qgsrectangle.h"
%End
public:
static const QMetaObject staticMetaObject;

public:

QgsRectangle(); // optimised constructor for null rectangle - no need to call normalize here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ 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: 0 additions & 1 deletion src/core/geometry/qgsrectangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "qgsbox3d.h"
#include "qgspolygon.h"
#include "qgslinestring.h"
#include "moc_qgsrectangle.cpp"

#include <QString>
#include <QTextStream>
Expand Down
20 changes: 3 additions & 17 deletions src/core/geometry/qgsrectangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,6 @@ class QgsBox3D;
*/
class CORE_EXPORT QgsRectangle
{
Q_GADGET

Q_PROPERTY( double xMinimum READ xMinimum WRITE setXMinimum )
Q_PROPERTY( double xMaximum READ xMaximum WRITE setXMaximum )
Q_PROPERTY( double yMinimum READ yMinimum WRITE setYMinimum )
Q_PROPERTY( double yMaximum READ yMaximum WRITE setYMaximum )
Q_PROPERTY( double width READ width )
Q_PROPERTY( double height READ height )
Q_PROPERTY( double area READ area )
Q_PROPERTY( double perimeter READ perimeter )
Q_PROPERTY( QgsPointXY center READ center )
Q_PROPERTY( bool isEmpty READ isEmpty )
Q_PROPERTY( bool isNull READ isNull )

public:

//! Constructor for a null rectangle
Expand Down Expand Up @@ -532,12 +518,12 @@ class CORE_EXPORT QgsRectangle
/**
* Returns a string representation of the rectangle in WKT format.
*/
Q_INVOKABLE QString asWktCoordinates() const;
QString asWktCoordinates() const;

/**
* Returns a string representation of the rectangle as a WKT Polygon.
*/
Q_INVOKABLE QString asWktPolygon() const;
QString asWktPolygon() const;

/**
* Returns a QRectF with same coordinates as the rectangle.
Expand All @@ -552,7 +538,7 @@ class CORE_EXPORT QgsRectangle
* Coordinates will be truncated to the specified precision.
* If the specified precision is less than 0, a suitable minimum precision is used.
*/
Q_INVOKABLE QString toString( int precision = 16 ) const;
QString toString( int precision = 16 ) const;

/**
* Returns the rectangle as a polygon.
Expand Down
1 change: 0 additions & 1 deletion src/core/locator/qgslocatorcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ 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: 0 additions & 5 deletions src/core/proj/qgscoordinatetransformcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ 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: 1 addition & 2 deletions src/core/proj/qgscoordinatetransformcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ 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