Class: QgsHtmlAnnotation¶
- class qgis.core.QgsHtmlAnnotation¶
Bases:
QgsAnnotation
An annotation item that embeds HTML content.
New in version 3.0.
QgsHtmlAnnotation(parent: QObject = None) Constructor for QgsHtmlAnnotation.
Methods
- rtype
QgsHtmlAnnotation
Copies common annotation properties to the
targe
annotation.Returns a new
QgsHtmlAnnotation
object.Returns html source text
- rtype
QSizeF
- param itemElem
- param context
- param feature
Sets the html source directly (not coming from a file)
Sets the file path for the source HTML file.
Returns the file path for the source HTML file.
- param elem
- childEvent(self, QChildEvent)¶
- clone(self) QgsHtmlAnnotation ¶
- 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() QgsHtmlAnnotation ¶
Returns a new
QgsHtmlAnnotation
object.- Return type
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- htmlSource(self) str ¶
Returns html source text
- Return type
str
- isSignalConnected(self, QMetaMethod) bool ¶
- minimumFrameSize(self) QSizeF ¶
- 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) –
- setHtmlSource(self, htmlSource: str)¶
Sets the html source directly (not coming from a file)
- Parameters
htmlSource (str) –
- setSourceFile(self, htmlFile: str)¶
Sets the file path for the source HTML file.
See also
- Parameters
htmlFile (str) –
- sourceFile(self) str ¶
Returns the file path for the source HTML file.
See also
- Return type
str
- timerEvent(self, QTimerEvent)¶
- writeXml(self, elem: QDomElement, doc: QDomDocument, context: QgsReadWriteContext)¶
- Parameters
elem (QDomElement) –
doc (QDomDocument) –
context (QgsReadWriteContext) –