Class: QgsTextAnnotation¶
-
class
qgis.core.
QgsTextAnnotation
(parent: QObject = None)¶ Bases:
QgsAnnotation
Constructor for QgsTextAnnotation.
An annotation item that displays formatted text from a QTextDocument document.
New in version 3.0.
- Parameters
parent –
-
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 within QgsAnnotation.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) –