Class: QgsTextAnnotation¶
- class qgis.core.QgsTextAnnotation¶
Bases:
QgsAnnotation
An annotation item that displays formatted text from a QTextDocument document.
New in version 3.0.
QgsTextAnnotation(parent: QObject = None) Constructor for QgsTextAnnotation.
Methods
- rtype:
QgsTextAnnotation
Copies common annotation properties to the
targe
annotation.Returns a new
QgsTextAnnotation
object.Returns the text document which will be rendered within the annotation.
Returns the minimum frame size for the annotation.
- param itemElem:
- param context:
Sets the text document which will be rendered within the annotation.
- param elem:
- childEvent(self, QChildEvent)¶
- clone(self) QgsTextAnnotation ¶
- Return type:
- connectNotify(self, QMetaMethod)¶
- copyCommonProperties(self, target: QgsAnnotation)¶
Copies common annotation properties to the
targe
annotation. Can be used withinQgsAnnotation.clone()
implementations to assist with creating copies.
- create() QgsTextAnnotation ¶
Returns a new
QgsTextAnnotation
object.- Return type:
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- document(self) QTextDocument ¶
Returns the text document which will be rendered within the annotation.
See also
- Return type:
QTextDocument
- isSignalConnected(self, QMetaMethod) bool ¶
- minimumFrameSize(self) QSizeF ¶
Returns the minimum frame size for the annotation. Subclasses should implement this if they cannot be resized smaller than a certain minimum size.
- readXml(self, itemElem: QDomElement, context: QgsReadWriteContext)¶
- Parameters:
itemElem (QDomElement) –
context (QgsReadWriteContext) –
- receivers(self, PYQT_SIGNAL) int ¶
- renderAnnotation(self, context: QgsRenderContext, size: QSizeF)¶
- Parameters:
context (QgsRenderContext) –
size (QSizeF) –
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setDocument(self, doc: QTextDocument)¶
Sets the text document which will be rendered within the annotation. Ownership is not transferred.
See also
- Parameters:
doc (QTextDocument) –
- timerEvent(self, QTimerEvent)¶
- writeXml(self, elem: QDomElement, doc: QDomDocument, context: QgsReadWriteContext)¶
- Parameters:
elem (QDomElement) –
doc (QDomDocument) –
context (QgsReadWriteContext) –