QGIS/python/core/qgsmessagelog.sip
Nyall Dawson c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00

46 lines
956 B
Plaintext

class QgsMessageLog : QObject
{
%TypeHeaderCode
#include <qgsmessagelog.h>
%End
public:
static QgsMessageLog *instance();
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( QString message, QString tag, MessageLevel level );
private:
QgsMessageLog();
};
/**
\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 );
};