21#include <QRegularExpression>
24#include "moc_qgsmessageoutput.cpp"
26using namespace Qt::StringLiterals;
39 mMessageOutputCreator = f;
44 return mMessageOutputCreator();
73 mMessage.replace(
"<br>"_L1,
"\n"_L1 );
74 mMessage.replace(
" "_L1,
" "_L1 );
75 const thread_local QRegularExpression tagRX( u
"</?[^>]+>"_s );
76 mMessage.replace( tagRX, QString() );
StringFormat
Format of log message.
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::MessageLevel::Warning, bool notifyUser=true, const char *file=__builtin_FILE(), const char *function=__builtin_FUNCTION(), int line=__builtin_LINE(), Qgis::StringFormat format=Qgis::StringFormat::PlainText)
Adds a message to the log instance (and creates it if necessary).
Default implementation of message output interface.
void setTitle(const QString &title) override
Sets title for the messages.
void destroyed()
signals that object will be destroyed and shouldn't be used anymore
void appendMessage(const QString &message) override
message to be appended to the current text
void setMessage(const QString &message, Qgis::StringFormat format) override
Sets message, it won't be displayed until.
void showMessage(bool blocking=true) override
sends the message to the standard output
Interface for showing messages from QGIS in GUI independent way.
virtual void showMessage(bool blocking=true)=0
display the message to the user and deletes itself
static QgsMessageOutput * createMessageOutput()
function that returns new class derived from QgsMessageOutput (don't forget to delete it then if show...
static void setMessageOutputCreator(MESSAGE_OUTPUT_CREATOR f)
sets function that will be used to create message output
virtual void setMessage(const QString &message, Qgis::StringFormat format)=0
Sets message, it won't be displayed until.
virtual void setTitle(const QString &title)=0
Sets title for the messages.
QgsMessageOutput *(* MESSAGE_OUTPUT_CREATOR)()