Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[api] Add text-along-line annotation item type
This annotation item renders curved text along a linestring
- Loading branch information
1 parent
b9c0fc4
commit cd3a1bf
Showing
19 changed files
with
810 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
python/core/auto_generated/annotations/qgsannotationlinetextitem.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/annotations/qgsannotationlinetextitem.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class QgsAnnotationLineTextItem : QgsAnnotationItem | ||
{ | ||
%Docstring(signature="appended") | ||
An annotation item which renders text along a line geometry. | ||
|
||
.. versionadded:: 3.32 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsannotationlinetextitem.h" | ||
%End | ||
public: | ||
|
||
QgsAnnotationLineTextItem( const QString &text, QgsCurve *curve /Transfer/ ); | ||
%Docstring | ||
Constructor for QgsAnnotationLineTextItem, with the specified ``curve`` and ``text``. | ||
%End | ||
~QgsAnnotationLineTextItem(); | ||
|
||
virtual Qgis::AnnotationItemFlags flags() const; | ||
|
||
virtual QString type() const; | ||
|
||
virtual void render( QgsRenderContext &context, QgsFeedback *feedback ); | ||
|
||
virtual bool writeXml( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const; | ||
|
||
virtual QList< QgsAnnotationItemNode > nodes() const; | ||
|
||
virtual Qgis::AnnotationItemEditOperationResult applyEdit( QgsAbstractAnnotationItemEditOperation *operation ); | ||
|
||
virtual QgsAnnotationItemEditOperationTransientResults *transientEditResults( QgsAbstractAnnotationItemEditOperation *operation ) /Factory/; | ||
|
||
|
||
static QgsAnnotationLineTextItem *create() /Factory/; | ||
%Docstring | ||
Creates a new linestring annotation item. | ||
%End | ||
|
||
virtual bool readXml( const QDomElement &element, const QgsReadWriteContext &context ); | ||
|
||
virtual QgsRectangle boundingBox() const; | ||
|
||
virtual QgsRectangle boundingBox( QgsRenderContext &context ) const; | ||
|
||
|
||
virtual QgsAnnotationLineTextItem *clone() /Factory/; | ||
|
||
|
||
const QgsCurve *geometry() const; | ||
%Docstring | ||
Returns the geometry of the item. | ||
|
||
The coordinate reference system for the line will be the parent layer's :py:func:`QgsAnnotationLayer.crs()`. | ||
|
||
.. seealso:: :py:func:`setGeometry` | ||
%End | ||
|
||
void setGeometry( QgsCurve *geometry /Transfer/ ); | ||
%Docstring | ||
Sets the ``geometry`` of the item. Ownership of ``geometry`` is transferred. | ||
|
||
The coordinate reference system for the line will be the parent layer's :py:func:`QgsAnnotationLayer.crs()`. | ||
|
||
.. seealso:: :py:func:`geometry` | ||
%End | ||
|
||
QString text() const; | ||
%Docstring | ||
Returns the text rendered by the item. | ||
|
||
.. seealso:: :py:func:`setText` | ||
%End | ||
|
||
void setText( const QString &text ); | ||
%Docstring | ||
Sets the ``text`` rendered by the item. | ||
|
||
.. seealso:: :py:func:`text` | ||
%End | ||
|
||
QgsTextFormat format() const; | ||
%Docstring | ||
Returns the text format used to render the text. | ||
|
||
.. seealso:: :py:func:`setFormat` | ||
%End | ||
|
||
void setFormat( const QgsTextFormat &format ); | ||
%Docstring | ||
Sets the text ``format`` used to render the text. | ||
|
||
.. seealso:: :py:func:`format` | ||
%End | ||
|
||
private: | ||
QgsAnnotationLineTextItem( const QgsAnnotationLineTextItem &other ); | ||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/annotations/qgsannotationlinetextitem.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.