Class: QgsFormAnnotation¶
- class qgis.gui.QgsFormAnnotation¶
Bases:
QgsAnnotation
An annotation item that embeds a designer form showing the feature attribute
Added in version 3.0.
QgsFormAnnotation(parent: Optional[QObject] = None) Constructor for QgsFormAnnotation.
Methods
- rtype:
Optional[QgsFormAnnotation]
Copies common annotation properties to the
targe
annotation.Returns a new
QgsFormAnnotation
object.Returns the path to the Qt Designer UI file to show in the annotation.
- rtype:
QSizeF
Returns the optimal frame size
- param itemElem:
- param context:
- param feature:
Sets the path to the Qt Designer UI file to show in the annotation.
- param elem:
- childEvent(self, a0: QChildEvent | None)¶
- clone(self) QgsFormAnnotation | None ¶
- Return type:
Optional[QgsFormAnnotation]
- connectNotify(self, signal: QMetaMethod)¶
- copyCommonProperties(self, target: QgsAnnotation | None)¶
Copies common annotation properties to the
targe
annotation. Can be used withinQgsAnnotation.clone()
implementations to assist with creating copies.
- create() QgsFormAnnotation | None ¶
Returns a new
QgsFormAnnotation
object.- Return type:
Optional[QgsFormAnnotation]
- customEvent(self, a0: QEvent | None)¶
- designerForm(self) str ¶
Returns the path to the Qt Designer UI file to show in the annotation.
See also
- Return type:
str
- disconnectNotify(self, signal: QMetaMethod)¶
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- minimumFrameSize(self) QSizeF ¶
- Return type:
QSizeF
- preferredFrameSize(self) QSizeF ¶
Returns the optimal frame size
- Return type:
QSizeF
- readXml(self, itemElem: QDomElement, context: QgsReadWriteContext)¶
- Parameters:
itemElem (QDomElement)
context (QgsReadWriteContext)
- receivers(self, signal: PYQT_SIGNAL) int ¶
- renderAnnotation(self, context: QgsRenderContext, size: QSizeF)¶
- Parameters:
context (QgsRenderContext)
size (QSizeF)
- sender(self) QObject | None ¶
- senderSignalIndex(self) int ¶
- setAssociatedFeature(self, feature: QgsFeature)¶
- Parameters:
feature (QgsFeature)
- setDesignerForm(self, uiFile: str | None)¶
Sets the path to the Qt Designer UI file to show in the annotation.
See also
- Parameters:
uiFile (Optional[str])
- timerEvent(self, a0: QTimerEvent | None)¶
- writeXml(self, elem: QDomElement, doc: QDomDocument, context: QgsReadWriteContext)¶
- Parameters:
elem (QDomElement)
doc (QDomDocument)
context (QgsReadWriteContext)