QGIS API Documentation 3.38.0-Grenoble (exported)
|
The class is used as a container of context for various read/write operations on other objects. More...
#include <qgsreadwritecontext.h>
Classes | |
struct | ReadWriteMessage |
Struct for QgsReadWriteContext error or warning messages. More... | |
Public Member Functions | |
QgsReadWriteContext () | |
Constructor for QgsReadWriteContext. | |
~QgsReadWriteContext () | |
MAYBE_UNUSED NODISCARD QgsReadWriteContextCategoryPopper | enterCategory (const QString &category, const QString &details=QString()) const |
Push a category to the stack. | |
const QgsPathResolver & | pathResolver () const |
Returns path resolver for conversion between relative and absolute paths. | |
const QgsProjectTranslator * | projectTranslator () const |
Returns the project translator. | |
void | pushMessage (const QString &message, Qgis::MessageLevel level=Qgis::MessageLevel::Warning) const |
Append a message to the context. | |
void | setPathResolver (const QgsPathResolver &resolver) |
Sets up path resolver for conversion between relative and absolute paths. | |
void | setProjectTranslator (QgsProjectTranslator *projectTranslator) |
Sets the project translator. | |
void | setTransformContext (const QgsCoordinateTransformContext &transformContext) |
Sets data coordinate transform context to transformContext. | |
QList< QgsReadWriteContext::ReadWriteMessage > | takeMessages () |
Returns the stored messages and remove them. | |
QgsCoordinateTransformContext | transformContext () const |
Returns data provider coordinate transform context. | |
Friends | |
class | QgsReadWriteContextCategoryPopper |
The class is used as a container of context for various read/write operations on other objects.
Definition at line 33 of file qgsreadwritecontext.h.
PRIVATE QgsReadWriteContext::QgsReadWriteContext | ( | ) |
Constructor for QgsReadWriteContext.
Definition at line 35 of file qgsreadwritecontext.cpp.
QgsReadWriteContext::~QgsReadWriteContext | ( | ) |
Definition at line 41 of file qgsreadwritecontext.cpp.
QgsReadWriteContextCategoryPopper QgsReadWriteContext::enterCategory | ( | const QString & | category, |
const QString & | details = QString() |
||
) | const |
Push a category to the stack.
Definition at line 62 of file qgsreadwritecontext.cpp.
const QgsPathResolver & QgsReadWriteContext::pathResolver | ( | ) | const |
Returns path resolver for conversion between relative and absolute paths.
Definition at line 47 of file qgsreadwritecontext.cpp.
|
inline |
void QgsReadWriteContext::pushMessage | ( | const QString & | message, |
Qgis::MessageLevel | level = Qgis::MessageLevel::Warning |
||
) | const |
Append a message to the context.
Definition at line 57 of file qgsreadwritecontext.cpp.
void QgsReadWriteContext::setPathResolver | ( | const QgsPathResolver & | resolver | ) |
Sets up path resolver for conversion between relative and absolute paths.
Definition at line 52 of file qgsreadwritecontext.cpp.
void QgsReadWriteContext::setProjectTranslator | ( | QgsProjectTranslator * | projectTranslator | ) |
Sets the project translator.
It's usually the QgsProject where the function with the context is made and won't be changed anymore.
Definition at line 87 of file qgsreadwritecontext.cpp.
void QgsReadWriteContext::setTransformContext | ( | const QgsCoordinateTransformContext & | transformContext | ) |
Sets data coordinate transform context to transformContext.
Definition at line 82 of file qgsreadwritecontext.cpp.
QList< QgsReadWriteContext::ReadWriteMessage > QgsReadWriteContext::takeMessages | ( | ) |
Returns the stored messages and remove them.
Definition at line 93 of file qgsreadwritecontext.cpp.
QgsCoordinateTransformContext QgsReadWriteContext::transformContext | ( | ) | const |
Returns data provider coordinate transform context.
Definition at line 77 of file qgsreadwritecontext.cpp.
|
friend |
Definition at line 164 of file qgsreadwritecontext.h.