Class: QgsFormAnnotation¶
- class qgis.gui.QgsFormAnnotation(parent: QObject = None)¶
Bases:
QgsAnnotation
Constructor for QgsFormAnnotation.
An annotation item that embeds a designer form showing the feature attribute
New in version 3.0:
Methods
- rtype
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, QChildEvent)¶
- clone(self) QgsFormAnnotation ¶
- 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() QgsFormAnnotation ¶
Returns a new
QgsFormAnnotation
object.- Return type
- customEvent(self, QEvent)¶
- designerForm(self) str ¶
Returns the path to the Qt Designer UI file to show in the annotation.
See also
- Return type
str
- disconnectNotify(self, QMetaMethod)¶
- isSignalConnected(self, 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, PYQT_SIGNAL) int ¶
- renderAnnotation(self, context: QgsRenderContext, size: QSizeF)¶
- Parameters
context (QgsRenderContext) –
size (QSizeF) –
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setAssociatedFeature(self, feature: QgsFeature)¶
- Parameters
feature (QgsFeature) –
- setDesignerForm(self, uiFile: str)¶
Sets the path to the Qt Designer UI file to show in the annotation.
See also
- Parameters
uiFile (str) –
- timerEvent(self, QTimerEvent)¶
- writeXml(self, elem: QDomElement, doc: QDomDocument, context: QgsReadWriteContext)¶
- Parameters
elem (QDomElement) –
doc (QDomDocument) –
context (QgsReadWriteContext) –