2017-04-07 08:50:57 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsmessagelog.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-13 10:28:05 +02:00
|
|
|
class QgsMessageLog : QObject
|
2011-11-18 23:05:48 +01:00
|
|
|
{
|
2017-04-07 08:50:57 +02:00
|
|
|
%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.
|
2017-04-20 13:48:50 +02:00
|
|
|
|
2017-04-07 08:50:57 +02:00
|
|
|
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
|
|
|
|
QgsApplication.messageLog().
|
2011-11-18 23:05:48 +01:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-04-07 08:50:57 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmessagelog.h"
|
|
|
|
%End
|
2011-11-18 23:05:48 +01:00
|
|
|
public:
|
2012-01-18 19:21:42 +01:00
|
|
|
|
2013-01-26 14:16:39 +01:00
|
|
|
enum MessageLevel
|
|
|
|
{
|
2017-04-07 08:50:57 +02:00
|
|
|
ALL,
|
2014-06-02 21:00:51 +02:00
|
|
|
INFO,
|
|
|
|
WARNING,
|
|
|
|
CRITICAL,
|
2017-04-20 13:48:50 +02:00
|
|
|
NONE
|
|
|
|
};
|
2013-01-26 14:16:39 +01:00
|
|
|
|
2017-04-07 08:50:57 +02:00
|
|
|
QgsMessageLog();
|
2012-01-18 19:21:42 +01:00
|
|
|
|
2017-04-07 08:50:57 +02:00
|
|
|
static void logMessage( const QString &message, const QString &tag = QString(), MessageLevel level = QgsMessageLog::WARNING );
|
|
|
|
%Docstring
|
|
|
|
add a message to the instance (and create it if necessary)
|
|
|
|
%End
|
2012-01-18 19:21:42 +01:00
|
|
|
|
2017-04-07 08:50:57 +02:00
|
|
|
signals:
|
|
|
|
void messageReceived( const QString &message, const QString &tag, QgsMessageLog::MessageLevel level );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-04-07 08:50:57 +02:00
|
|
|
void messageReceived( bool received );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-04-07 08:50:57 +02:00
|
|
|
};
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
class QgsMessageLogConsole : QObject
|
|
|
|
{
|
2017-04-07 08:50:57 +02:00
|
|
|
%Docstring
|
|
|
|
Default implementation of message logging interface
|
2017-04-20 13:48:50 +02:00
|
|
|
|
2017-04-07 08:50:57 +02:00
|
|
|
This class outputs log messages to the standard output. Therefore it might
|
|
|
|
be the right choice for apps without GUI.
|
2012-09-24 02:28:15 +02:00
|
|
|
%End
|
|
|
|
|
2017-04-07 08:50:57 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmessagelog.h"
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
public:
|
|
|
|
QgsMessageLogConsole();
|
|
|
|
|
|
|
|
public slots:
|
2017-04-07 08:50:57 +02:00
|
|
|
void logMessage( const QString &message, const QString &tag, QgsMessageLog::MessageLevel level );
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|
2017-04-07 08:50:57 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsmessagelog.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|