Class: QgsHtmlAnnotation

class qgis.core.QgsHtmlAnnotation

Bases: QgsAnnotation

An annotation item that embeds HTML content.

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

Methods

childEvent

clone

rtype:

Optional[QgsHtmlAnnotation]

connectNotify

copyCommonProperties

Copies common annotation properties to the targe annotation.

create

Returns a new QgsHtmlAnnotation object.

customEvent

disconnectNotify

htmlSource

Returns html source text

isSignalConnected

minimumFrameSize

rtype:

QSizeF

readXml

param itemElem:

receivers

renderAnnotation

param context:

sender

senderSignalIndex

setAssociatedFeature

param feature:

setHtmlSource

Sets the html source directly (not coming from a file)

setSourceFile

Sets the file path for the source HTML file.

sourceFile

Returns the file path for the source HTML file.

timerEvent

writeXml

param elem:

childEvent(self, a0: QChildEvent | None)
clone(self) QgsHtmlAnnotation | None
Return type:

Optional[QgsHtmlAnnotation]

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() QgsHtmlAnnotation | None

Returns a new QgsHtmlAnnotation object.

Return type:

Optional[QgsHtmlAnnotation]

customEvent(self, a0: QEvent | None)
disconnectNotify(self, signal: QMetaMethod)
htmlSource(self) str

Returns html source text

Return type:

str

isSignalConnected(self, signal: QMetaMethod) bool
minimumFrameSize(self) QSizeF
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)

setHtmlSource(self, htmlSource: str | None)

Sets the html source directly (not coming from a file)

Parameters:

htmlSource (Optional[str])

setSourceFile(self, htmlFile: str | None)

Sets the file path for the source HTML file.

See also

sourceFile()

Parameters:

htmlFile (Optional[str])

sourceFile(self) str

Returns the file path for the source HTML file.

See also

setSourceFile()

Return type:

str

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