Class: QgsFormAnnotation

class qgis.gui.QgsFormAnnotation

Bases: QgsAnnotation

An annotation item that embeds a designer form showing the feature attribute

QgsFormAnnotation(parent: Optional[QObject] = None) Constructor for QgsFormAnnotation.

Methods

childEvent

clone

rtype:

Optional[QgsFormAnnotation]

connectNotify

copyCommonProperties

Copies common annotation properties to the targe annotation.

create

Returns a new QgsFormAnnotation object.

customEvent

designerForm

Returns the path to the Qt Designer UI file to show in the annotation.

disconnectNotify

isSignalConnected

minimumFrameSize

rtype:

QSizeF

preferredFrameSize

Returns the optimal frame size

readXml

param itemElem:

receivers

renderAnnotation

param context:

sender

senderSignalIndex

setAssociatedFeature

param feature:

setDesignerForm

Sets the path to the Qt Designer UI file to show in the annotation.

timerEvent

writeXml

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 within QgsAnnotation.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.

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:
receivers(self, signal: PYQT_SIGNAL) int
renderAnnotation(self, context: QgsRenderContext, size: QSizeF)
Parameters:
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

designerForm()

Parameters:

uiFile (Optional[str])

timerEvent(self, a0: QTimerEvent | None)
writeXml(self, elem: QDomElement, doc: QDomDocument, context: QgsReadWriteContext)
Parameters: