Subgroup: Read

Class: QgsReadWriteContext

class qgis.core.QgsReadWriteContext

Bases: sip.wrapper

Constructor for QgsReadWriteContext.

QgsReadWriteContext(QgsReadWriteContext)

The class is used as a container of context for various read/write operations on other objects.

New in version 3.0: Methods

pathResolver Returns path resolver for conversion between relative and absolute paths
pushMessage Append a message to the context
setPathResolver Sets up path resolver for conversion between relative and absolute paths
takeMessages Return the stored messages and remove them

Signals

Attributes

class ReadWriteMessage(message: str, level: Qgis.MessageLevel = Qgis.Warning, categories: Iterable[str] = [])

Bases: sip.wrapper

Construct a container for QgsReadWriteContext error or warning messages

QgsReadWriteContext.ReadWriteMessage(QgsReadWriteContext.ReadWriteMessage)

categories(self) → List[str]

Return the stack of categories of the message

level(self) → Qgis.MessageLevel

Return the message level

message(self) → str

Return the message string

enterCategory

alias of qgis.core.ReadWriteContextEnterCategory

pathResolver(self) → QgsPathResolver

Returns path resolver for conversion between relative and absolute paths

pushMessage(self, message: str, level: Qgis.MessageLevel = Qgis.Warning)

Append a message to the context

New in version 3.2.

setPathResolver(self, resolver: QgsPathResolver)

Sets up path resolver for conversion between relative and absolute paths

takeMessages(self) → object

Return the stored messages and remove them

New in version 3.2.