Class: QgsSvgAnnotation¶
- class qgis.core.QgsSvgAnnotation¶
Bases:
QgsAnnotation
An annotation which renders the contents of an SVG file.
QgsSvgAnnotation(parent: Optional[QObject] = None) Constructor for QgsSvgAnnotation.
Methods
- rtype:
Optional[QgsSvgAnnotation]
Copies common annotation properties to the
targe
annotation.Returns a new
QgsSvgAnnotation
object.Returns the file path for the source SVG file.
Returns the minimum frame size for the annotation.
- param itemElem:
- param context:
Sets the file path for the source SVG file.
- param elem:
- childEvent(self, a0: QChildEvent | None)¶
- clone(self) QgsSvgAnnotation | None ¶
- Return type:
Optional[QgsSvgAnnotation]
- connectNotify(self, signal: QMetaMethod)¶
- copyCommonProperties(self, target: QgsAnnotation | None)¶
Copies common annotation properties to the
targe
annotation. Can be used withinQgsAnnotation.clone()
implementations to assist with creating copies.
- create() QgsSvgAnnotation | None ¶
Returns a new
QgsSvgAnnotation
object.- Return type:
Optional[QgsSvgAnnotation]
- customEvent(self, a0: QEvent | None)¶
- disconnectNotify(self, signal: QMetaMethod)¶
- filePath(self) str ¶
Returns the file path for the source SVG file.
See also
- Return type:
str
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- minimumFrameSize(self) QSizeF ¶
Returns the minimum frame size for the annotation. Subclasses should implement this if they cannot be resized smaller than a certain minimum size.
- readXml(self, itemElem: QDomElement, context: QgsReadWriteContext)¶
- Parameters:
itemElem (QDomElement)
context (QgsReadWriteContext)
- receivers(self, signal: PYQT_SIGNAL) int ¶
- renderAnnotation(self, context: QgsRenderContext, size: QSizeF)¶
- Parameters:
context (QgsRenderContext)
size (QSizeF)
- sender(self) QObject | None ¶
- senderSignalIndex(self) int ¶
- setFilePath(self, file: str | None)¶
Sets the file path for the source SVG file.
See also
- Parameters:
file (Optional[str])
- timerEvent(self, a0: QTimerEvent | None)¶
- writeXml(self, elem: QDomElement, doc: QDomDocument, context: QgsReadWriteContext)¶
- Parameters:
elem (QDomElement)
doc (QDomDocument)
context (QgsReadWriteContext)