QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Signals | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
QgsMessageLog Class Reference

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

#include <qgsmessagelog.h>

Collaboration diagram for QgsMessageLog:
Collaboration graph
[legend]

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

QgsMessageLog::QgsMessageLog ( )
private

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().

QgsMessageLog * QgsMessageLog::instance ( )
static
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::avoidIntersections(), QgsGeometry::closestVertexWithContext(), QgsVectorLayer::commitChanges(), QgsGeometry::contains(), QgsVectorFileWriter::createFeature(), createGeosCollection(), createGeosCoordSequence(), createGeosLinearRing(), createGeosLineString(), createGeosPolygon(), QgsRasterLayer::draw(), QgsVectorLayer::draw(), QgsContextHelp::error(), QgsGeometry::fromMultiPoint(), QgsGeometry::fromMultiPolygon(), QgsGeometry::fromMultiPolyline(), QgsGeometry::fromWkt(), QgsGml::getFeatures(), 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(), QgsVectorFileWriter::QgsVectorFileWriter(), 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
staticprivate

Definition at line 58 of file qgsmessagelog.h.

Referenced by instance(), and QgsMessageLog().


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