18#ifndef QGSREADWRITECONTEXT_H
19#define QGSREADWRITECONTEXT_H
48 , mCategories( categories )
52 QString
message()
const {
return mMessage;}
64 return mMessage == other.mMessage && mLevel == other.mLevel && mCategories == other.mCategories;
69 return !( *
this == other );
73 SIP_PYOBJECT __repr__();
75 QString
str = QStringLiteral(
"<QgsReadWriteContext.ReadWriteMessage: %1>" ).arg( sipCpp->message() );
76 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
83 QStringList mCategories;
103 void pushMessage(
const QString &message,
Qgis::MessageLevel level = Qgis::MessageLevel::Warning )
const;
159 void leaveCategory()
const;
162 mutable QList<ReadWriteMessage> mMessages;
163 mutable QStringList mCategories = QStringList();
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Contains information about the context in which a coordinate transform is executed.
Resolves relative paths into absolute paths and vice versa.
Wherever an object of this class is available, the derived translate function can be called from.
Allows entering a context category and takes care of leaving this category on deletion of the class.
~QgsReadWriteContextCategoryPopper()
QgsReadWriteContextCategoryPopper(const QgsReadWriteContext &context)
Creates a popper.
The class is used as a container of context for various read/write operations on other objects.
Struct for QgsReadWriteContext error or warning messages.
Qgis::MessageLevel level() const
Returns the message level.
ReadWriteMessage(const QString &message=QString(), Qgis::MessageLevel level=Qgis::MessageLevel::Warning, const QStringList &categories=QStringList())
Construct a container for QgsReadWriteContext error or warning messages.
QString message() const
Returns the message string.
bool operator!=(const QgsReadWriteContext::ReadWriteMessage &other) const
bool operator==(const QgsReadWriteContext::ReadWriteMessage &other) const
QStringList categories() const
Returns the stack of categories of the message.