/************************************************************************ * This file has been generated automatically from * * * * src/core/qgsmessagelog.h * * * * Do not edit manually ! Edit header and run scripts/sipify.pl again * ************************************************************************/ class QgsMessageLog : QObject { %Docstring Interface for logging messages from QGIS in GUI independent way. This class provides abstraction of a tabbed window for showing messages to the user. By default QgsMessageLogOutput will be used if not overridden with another message log creator function. QGIS application uses QgsMessageLog class for logging messages in a dockable window for the user. QgsMessageLog is not usually directly created, but rather accessed through :py:func:`QgsApplication.messageLog()` %End %TypeHeaderCode #include "qgsmessagelog.h" %End public: QgsMessageLog(); %Docstring Constructor for QgsMessageLog. %End static void logMessage( const QString &message, const QString &tag = QString(), Qgis::MessageLevel level = Qgis::Warning, bool notifyUser = true ); %Docstring Adds a ``message`` to the log instance (and creates it if necessary). If ``notifyUser`` is true, then the message should be brought to the user's attention by various UI hints. If it is false, the message should appear in logs silently. Note that log viewer implementations may only respect notification hints for certain message levels. %End signals: void messageReceived( const QString &message, const QString &tag, Qgis::MessageLevel level ); %Docstring Emitted whenever the log receives a ``message``. This signal is emitted for all messages received by the log, regardless of the ``notifyUser`` flag's value for the message. %End void messageReceived( bool received ); %Docstring Emitted whenever the log receives a message which is not a Qgis.Info level message and which has the ``notifyUser`` flag as true. If QgsMessageLogNotifyBlocker objects have been created then this signal may be temporarily suppressed. .. seealso:: :py:class:`QgsMessageLogNotifyBlocker` %End }; class QgsMessageLogNotifyBlocker { %Docstring Temporarily blocks the application QgsMessageLog (see QgsApplication.messageLog()) from emitting the messageReceived( bool ) signal for the lifetime of the object. Using this blocker allows messages to be logged without causing user interface hints flagging message log errors to be created. QgsMessageLogNotifyBlocker supports "stacked" blocking, so two QgsMessageLogNotifyBlocker created will both need to be destroyed before the messageReceived( bool ) signal is emitted again. .. versionadded:: 3.2 %End %TypeHeaderCode #include "qgsmessagelog.h" %End public: QgsMessageLogNotifyBlocker(); %Docstring Constructor for QgsMessageLogNotifyBlocker. This will block the log from emitting the messageReceived( bool ) signal for the lifetime of this object. %End ~QgsMessageLogNotifyBlocker(); private: QgsMessageLogNotifyBlocker( const QgsMessageLogNotifyBlocker &other ); }; class QgsMessageLogConsole : QObject { %Docstring Default implementation of message logging interface This class outputs log messages to the standard output. Therefore it might be the right choice for apps without GUI. %End %TypeHeaderCode #include "qgsmessagelog.h" %End public: QgsMessageLogConsole(); public slots: void logMessage( const QString &message, const QString &tag, Qgis::MessageLevel level ); }; /************************************************************************ * This file has been generated automatically from * * * * src/core/qgsmessagelog.h * * * * Do not edit manually ! Edit header and run scripts/sipify.pl again * ************************************************************************/