Subgroup: other

Class: QgsFormAnnotation

class qgis.gui.QgsFormAnnotation

Bases: qgis._core.QgsAnnotation

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

New in version 3.0: Methods

associatedFeature Returns the feature associated with the annotation, or an invalid feature if none has been set.
blockSignals
childEvent
children
clone
connectNotify
contentsMargin Returns the margins (in millimeters) between the outside of the frame and the annotation content.
copyCommonProperties
create Returns a new QgsFormAnnotation object.
customEvent
deleteLater
designerForm Returns the path to the Qt Designer UI file to show in the annotation.
disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
event
eventFilter
fillSymbol Returns the symbol that is used for rendering the annotation frame.
findChild findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
findChildren findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
frameOffsetFromReferencePoint Returns the annotation’s frame’s offset from the mapPosition() reference point.
frameSize Returns the size of the annotation’s frame (the main area in which the annotation’s content is drawn).
hasFixedMapPosition Returns true if the annotation is attached to a fixed map position, or false if the annotation uses a position relative to the current map extent.
inherits
installEventFilter
isSignalConnected
isVisible Returns true if the annotation is visible and should be rendered.
isWidgetType
isWindowType
killTimer
mapLayer Returns the map layer associated with the annotation.
mapPosition Returns the map position of the annotation, if it is attached to a fixed map position.
mapPositionCrs Returns the CRS of the map position, or an invalid CRS if the annotation does not have a fixed map position.
markerSymbol Returns the symbol that is drawn at the annotation’s map position.
metaObject
minimumFrameSize
moveToThread
objectName
parent
preferredFrameSize Returns the optimal frame size
property
pyqtConfigure Each keyword argument is either the name of a Qt property or a Qt signal.
readXml
receivers
relativePosition Returns the relative position of the annotation, if it is not attached to a fixed map position.
removeEventFilter
render Renders the annotation to a target render context.
renderAnnotation
sender
senderSignalIndex
setAssociatedFeature
setContentsMargin Sets the margins (in millimeters) between the outside of the frame and the annotation content.
setDesignerForm Sets the path to the Qt Designer UI file to show in the annotation.
setFillSymbol Sets the fill symbol used for rendering the annotation frame.
setFrameOffsetFromReferencePoint Sets the annotation’s frame’s offset from the mapPosition() reference point.
setFrameSize Sets the size of the annotation’s frame (the main area in which the annotation’s content is drawn).
setHasFixedMapPosition Sets whether the annotation is attached to a fixed map position, or uses a position relative to the current map extent.
setMapLayer Sets the map layer associated with the annotation.
setMapPosition Sets the map position of the annotation, if it is attached to a fixed map position.
setMapPositionCrs Sets the CRS of the map position.
setMarkerSymbol Sets the symbol that is drawn at the annotation’s map position.
setObjectName
setParent
setProperty
setRelativePosition Sets the relative position of the annotation, if it is not attached to a fixed map position.
setVisible Sets whether the annotation is visible and should be rendered.
signalsBlocked
startTimer
thread
timerEvent
tr
writeXml

Attributes

appearanceChanged Emitted whenever the annotation’s appearance changes [signal]
destroyed destroyed(self, QObject = None) [signal]
mapLayerChanged Emitted when the map layer associated with the annotation changes.
moved Emitted when the annotation’s position has changed and items need to be moved to reflect this.
objectNameChanged objectNameChanged(self, str) [signal]
staticMetaObject
childEvent()
clone(self) → QgsFormAnnotation
connectNotify()
copyCommonProperties()
create() → QgsFormAnnotation

Returns a new QgsFormAnnotation object.

customEvent()
designerForm(self) → str

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

disconnectNotify()
isSignalConnected()
minimumFrameSize(self) → QSizeF
preferredFrameSize(self) → QSizeF

Returns the optimal frame size

readXml(self, itemElem: QDomElement, context: QgsReadWriteContext)
receivers()
renderAnnotation(self, context: QgsRenderContext, size: QSizeF)
sender()
senderSignalIndex()
setAssociatedFeature(self, feature: QgsFeature)
setDesignerForm(self, uiFile: str)

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

See also

designerForm()

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