QGIS API Documentation  2.99.0-Master (53aba61)
Public Types | Signals | Public Member Functions | Static Public Member Functions | List of all members
QgsMessageLog Class Reference

Interface for logging messages from QGIS in GUI independent way. More...

#include <qgsmessagelog.h>

Inheritance diagram for QgsMessageLog:
Inheritance graph
[legend]

Public Types

enum  MessageLevel {
  ALL = 0, INFO = 0, WARNING = 1, CRITICAL = 2,
  NONE = 3
}
 

Signals

void messageReceived (const QString &message, const QString &tag, QgsMessageLog::MessageLevel level)
 
void messageReceived (bool received)
 

Public Member Functions

 QgsMessageLog ()
 
 Q_ENUM (MessageLevel)
 

Static Public Member Functions

static void logMessage (const QString &message, const QString &tag=QString(), MessageLevel level=QgsMessageLog::WARNING)
 add a message to the instance (and create it if necessary) More...
 

Detailed Description

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 QgsApplication::messageLog().

Definition at line 36 of file qgsmessagelog.h.

Member Enumeration Documentation

◆ MessageLevel

Enumerator
ALL 
INFO 
WARNING 
CRITICAL 
NONE 

Definition at line 42 of file qgsmessagelog.h.

Constructor & Destructor Documentation

◆ QgsMessageLog()

QgsMessageLog::QgsMessageLog ( )

Definition at line 25 of file qgsmessagelog.cpp.

Member Function Documentation

◆ logMessage()

void QgsMessageLog::logMessage ( const QString &  message,
const QString &  tag = QString(),
QgsMessageLog::MessageLevel  level = QgsMessageLog::WARNING 
)
static

add a message to the instance (and create it if necessary)

Definition at line 30 of file qgsmessagelog.cpp.

◆ messageReceived [1/2]

void QgsMessageLog::messageReceived ( const QString &  message,
const QString &  tag,
QgsMessageLog::MessageLevel  level 
)
signal

◆ messageReceived [2/2]

void QgsMessageLog::messageReceived ( bool  received)
signal

◆ Q_ENUM()

QgsMessageLog::Q_ENUM ( MessageLevel  )

The documentation for this class was generated from the following files: