QGIS/python/core/qgsmessagelog.sip
Nyall Dawson 9d4adc1c70 Remove some singletons by moving instances to QgsApplication
- QgsColorSchemeRegistry
- QgsDataItemProviderRegistry
- QgsGPSConnectionRegistry
- QgsMessageLog
- QgsPaintEffectRegistry
- QgsPluginLayerRegistry
- QgsRasterRendererRegistry
- QgsRendererRegistry
- QgsSvgCache
- QgsSymbolLayerRegistry
2016-12-28 16:59:03 +10:00

44 lines
921 B
Plaintext

class QgsMessageLog : QObject
{
%TypeHeaderCode
#include <qgsmessagelog.h>
%End
public:
QgsMessageLog();
enum MessageLevel
{
INFO,
WARNING,
CRITICAL,
};
//! add a message to the instance (and create it if necessary)
static void logMessage( const QString& message, const QString& tag = QString::null, MessageLevel level = WARNING );
signals:
void messageReceived( const QString& message, const QString& tag, MessageLevel level );
};
/**
\brief 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.
*/
class QgsMessageLogConsole : QObject
{
%TypeHeaderCode
#include <qgsmessagelog.h>
%End
public:
QgsMessageLogConsole();
public slots:
void logMessage( const QString& message, const QString& tag, QgsMessageLog::MessageLevel level );
};