QGIS API Documentation  master-3f58142
QgsMessageLog Class Reference

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

#include <qgsmessagelog.h>

+ Collaboration diagram for QgsMessageLog:

List of all members.

Public Types

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

Signals

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

Static Public Member Functions

static QgsMessageLoginstance ()
static void logMessage (QString message, QString tag=QString::null, MessageLevel level=WARNING)
 add a message to the instance (and create it if necessary)

Private Member Functions

 QgsMessageLog ()
void emitMessage (QString message, QString tag, QgsMessageLog::MessageLevel level)

Static Private Attributes

static QgsMessageLogsInstance = 0

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.

Note:
added in 1.9

Definition at line 33 of file qgsmessagelog.h.


Member Enumeration Documentation

Enumerator:
INFO 
WARNING 
CRITICAL 

Definition at line 40 of file qgsmessagelog.h.


Constructor & Destructor Documentation

Definition at line 26 of file qgsmessagelog.cpp.

References sInstance.

Referenced by instance().


Member Function Documentation

void QgsMessageLog::emitMessage ( QString  message,
QString  tag,
QgsMessageLog::MessageLevel  level 
) [private]

Definition at line 50 of file qgsmessagelog.cpp.

References messageReceived().

Referenced by logMessage().

void QgsMessageLog::logMessage ( QString  message,
QString  tag = QString::null,
QgsMessageLog::MessageLevel  level = WARNING 
) [static]

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

Definition at line 43 of file qgsmessagelog.cpp.

References emitMessage(), instance(), and QgsDebugMsg.

Referenced by QgsNetworkAccessManager::abortRequest(), QgsGeometry::addPart(), QgsGeometry::addRing(), QgsGeometry::closestVertexWithContext(), QgsVectorLayer::commitChanges(), QgsGeometry::contains(), QgsVectorFileWriter::createFeature(), createGeosCollection(), createGeosCoordSequence(), createGeosLinearRing(), createGeosLineString(), createGeosPolygon(), QgsRasterLayer::draw(), QgsGeometry::fromMultiPoint(), QgsGeometry::fromMultiPolygon(), QgsGeometry::fromMultiPolyline(), QgsGeometry::fromWkt(), QgsSvgCache::getImageData(), QgsVectorLayerImport::importLayer(), QgsGeometry::interpolate(), QgsGeometry::isGeosEmpty(), QgsGeometry::isGeosValid(), QgsMapRenderer::layerExtentToOutputExtent(), QgsMapRenderer::layerToMapCoordinates(), QgsMapRenderer::mapToLayerCoordinates(), QgsDistanceArea::measureLine(), QgsDistanceArea::measurePolygon(), QgsCoordinateReferenceSystem::openDb(), QgsMapRenderer::outputExtentToLayerExtent(), QgsProviderRegistry::provider(), QgsMapCanvas::refresh(), QgsGeometry::reshapeLine(), QgsGeometry::reshapePolygon(), QgsCoordinateReferenceSystem::saveAsUserCRS(), QgsFeature::setAttribute(), QgsDistanceArea::setEllipsoid(), QgsVectorDataProvider::setEncoding(), QgsMessageOutputConsole::showMessage(), QgsCoordinateTransform::transformCoords(), QgsVectorFileWriter::writeFeature(), and QgsRasterLayer::writeXml().

void QgsMessageLog::messageReceived ( QString  message,
QString  tag,
QgsMessageLog::MessageLevel  level 
) [signal]

Referenced by emitMessage().


Member Data Documentation

QgsMessageLog * QgsMessageLog::sInstance = 0 [static, private]

Definition at line 58 of file qgsmessagelog.h.

Referenced by instance(), and QgsMessageLog().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines