QGIS API Documentation
3.6.0-Noosa (5873452)
|
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. More... | |
~QgsReadWriteContext () | |
MAYBE_UNUSED NODISCARD QgsReadWriteContextCategoryPopper | enterCategory (const QString &category, const QString &details=QString()) |
Push a category to the stack. More... | |
const QgsPathResolver & | pathResolver () const |
Returns path resolver for conversion between relative and absolute paths. More... | |
const QgsProjectTranslator * | projectTranslator () const |
Returns the project translator. More... | |
void | pushMessage (const QString &message, Qgis::MessageLevel level=Qgis::Warning) |
Append a message to the context. More... | |
void | setPathResolver (const QgsPathResolver &resolver) |
Sets up path resolver for conversion between relative and absolute paths. More... | |
void | setProjectTranslator (QgsProjectTranslator *projectTranslator) |
Sets the project translator. More... | |
QList< QgsReadWriteContext::ReadWriteMessage > | takeMessages () |
Returns the stored messages and remove them. More... | |
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.
QgsReadWriteContext::QgsReadWriteContext | ( | ) |
Constructor for QgsReadWriteContext.
Definition at line 17 of file qgsreadwritecontext.cpp.
QgsReadWriteContext::~QgsReadWriteContext | ( | ) |
Definition at line 23 of file qgsreadwritecontext.cpp.
QgsReadWriteContextCategoryPopper QgsReadWriteContext::enterCategory | ( | const QString & | category, |
const QString & | details = QString() |
||
) |
Push a category to the stack.
Definition at line 44 of file qgsreadwritecontext.cpp.
const QgsPathResolver & QgsReadWriteContext::pathResolver | ( | ) | const |
Returns path resolver for conversion between relative and absolute paths.
Definition at line 29 of file qgsreadwritecontext.cpp.
|
inline |
void QgsReadWriteContext::pushMessage | ( | const QString & | message, |
Qgis::MessageLevel | level = Qgis::Warning |
||
) |
Append a message to the context.
Definition at line 39 of file qgsreadwritecontext.cpp.
void QgsReadWriteContext::setPathResolver | ( | const QgsPathResolver & | resolver | ) |
Sets up path resolver for conversion between relative and absolute paths.
Definition at line 34 of file qgsreadwritecontext.cpp.
void QgsReadWriteContext::setProjectTranslator | ( | QgsProjectTranslator * | projectTranslator | ) |
Sets the project translator.
Means it shouldn't conform mDefaultTranslator anymore. It's usually the QgsProject where the function with the context is made and won't be changed anymore.
Definition at line 59 of file qgsreadwritecontext.cpp.
QList< QgsReadWriteContext::ReadWriteMessage > QgsReadWriteContext::takeMessages | ( | ) |
Returns the stored messages and remove them.
Definition at line 64 of file qgsreadwritecontext.cpp.
|
friend |
Definition at line 133 of file qgsreadwritecontext.h.