Skip to content
Permalink
Browse files

Add method to retrieve QgsVertexMarker center point in map coordinates

  • Loading branch information
nyalldawson committed Jan 8, 2021
1 parent 2ffc306 commit 0d785c8a84cda8aad9d107157c32aebd8501181c
Showing with 27 additions and 0 deletions.
  1. +14 −0 python/gui/auto_generated/qgsvertexmarker.sip.in
  2. +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 );

0 comments on commit 0d785c8

Please sign in to comment.
You can’t perform that action at this time.