QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
20 #include <QRegularExpression>
33 mMessageOutputCreator = f;
38 return mMessageOutputCreator();
67 mMessage.replace( QLatin1String(
"<br>" ), QLatin1String(
"\n" ) );
68 mMessage.replace( QLatin1String(
" " ), QLatin1String(
" " ) );
69 mMessage.replace( QRegularExpression(
"</?[^>]+>" ), QString() );
virtual void setMessage(const QString &message, MessageType msgType)=0
Sets message, it won't be displayed until.
void destroyed()
signals that object will be destroyed and shouldn't be used anymore
void showMessage(bool blocking=true) override
sends the message to the standard output
Default implementation of message output interface.
virtual void showMessage(bool blocking=true)=0
display the message to the user and deletes itself
Interface for showing messages from QGIS in GUI independent way.
static void setMessageOutputCreator(MESSAGE_OUTPUT_CREATOR f)
sets function that will be used to create message output
void appendMessage(const QString &message) override
message to be appended to the current text
void setMessage(const QString &message, MessageType msgType) override
Sets message, it won't be displayed until.
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::MessageLevel::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
static QgsMessageOutput * createMessageOutput()
function that returns new class derived from QgsMessageOutput (don't forget to delete it then if show...
void setTitle(const QString &title) override
Sets title for the messages.
virtual void setTitle(const QString &title)=0
Sets title for the messages.
MessageType
message can be in plain text or in html format
QgsMessageOutput *(* MESSAGE_OUTPUT_CREATOR)()