Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add method to retrieve QgsVertexMarker center point in map coordinates
- Loading branch information
Showing
with
27 additions
and
0 deletions.
-
+14
−0
python/gui/auto_generated/qgsvertexmarker.sip.in
-
+13
−0
src/gui/qgsvertexmarker.h
|
@@ -46,6 +46,20 @@ A class for marking vertices of features using e.g. circles or 'x'. |
|
|
QgsVertexMarker( QgsMapCanvas *mapCanvas /TransferThis/ ); |
|
|
|
|
|
void setCenter( const QgsPointXY &point ); |
|
|
%Docstring |
|
|
Sets the center ``point`` of the marker, in map coordinates. |
|
|
|
|
|
.. seealso:: :py:func:`center` |
|
|
%End |
|
|
|
|
|
QgsPointXY center() const; |
|
|
%Docstring |
|
|
Returns the center point of the marker, in map coordinates. |
|
|
|
|
|
.. seealso:: :py:func:`setCenter` |
|
|
|
|
|
.. versionadded:: 3.18 |
|
|
%End |
|
|
|
|
|
void setIconType( int iconType ); |
|
|
|
|
|
|
@@ -61,8 +61,21 @@ class GUI_EXPORT QgsVertexMarker : public QgsMapCanvasItem |
|
|
|
|
|
QgsVertexMarker( QgsMapCanvas *mapCanvas SIP_TRANSFERTHIS ); |
|
|
|
|
|
/** |
|
|
* Sets the center \a point of the marker, in map coordinates. |
|
|
* |
|
|
* \see center() |
|
|
*/ |
|
|
void setCenter( const QgsPointXY &point ); |
|
|
|
|
|
/** |
|
|
* Returns the center point of the marker, in map coordinates. |
|
|
* |
|
|
* \see setCenter() |
|
|
* \since QGIS 3.18 |
|
|
*/ |
|
|
QgsPointXY center() const { return mCenter; } |
|
|
|
|
|
void setIconType( int iconType ); |
|
|
|
|
|
void setIconSize( int iconSize ); |
|
|