Class: QgsFormAnnotation

class qgis.gui.QgsFormAnnotation

Bases: QgsAnnotation

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

New in version 3.0.

QgsFormAnnotation(parent: QObject = None) Constructor for QgsFormAnnotation.

Methods

childEvent

clone

rtype

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, QChildEvent)
clone(self)QgsFormAnnotation
Return type

QgsFormAnnotation

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()QgsFormAnnotation

Returns a new QgsFormAnnotation object.

Return type

QgsFormAnnotation

customEvent(self, QEvent)
designerForm(self)str

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

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

designerForm()

Parameters

uiFile (str) –

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