QGIS API Documentation  2.5.0-Master
 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>

Inheritance diagram for QgsMessageLog:
Inheritance graph
[legend]
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) More...
 

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(), QgsDistanceArea::computeDistance(), QgsGeometry::contains(), QgsNetworkContentFetcher::contentLoaded(), QgsVectorFileWriter::createFeature(), createGeosCollection(), createGeosCoordSequence(), createGeosLinearRing(), createGeosLineString(), createGeosPolygon(), QgsContextHelp::error(), QgsAtlasComposition::evalFeatureFilename(), QgsGeometry::fromMultiPoint(), QgsGeometry::fromMultiPolygon(), QgsGeometry::fromMultiPolyline(), QgsGeometry::fromWkt(), QgsGml::getFeatures(), QgsSvgCache::getImageData(), QgsVectorLayerImport::importLayer(), QgsDateTimeEditWrapper::initWidget(), QgsGeometry::interpolate(), QgsGeometry::isGeosEmpty(), QgsGeometry::isGeosValid(), QgsMapSettings::layerExtentToOutputExtent(), QgsMapRenderer::layerExtentToOutputExtent(), QgsMapSettings::layerToMapCoordinates(), QgsMapRenderer::layerToMapCoordinates(), QgsMapSettings::mapToLayerCoordinates(), QgsMapRenderer::mapToLayerCoordinates(), QgsDistanceArea::measureLine(), QgsDistanceArea::measurePolygon(), QgsCoordinateReferenceSystem::openDb(), QgsMapSettings::outputExtentToLayerExtent(), QgsMapRenderer::outputExtentToLayerExtent(), QgsProviderRegistry::provider(), QgsRasterLayerRenderer::QgsRasterLayerRenderer(), QgsVectorFileWriter::QgsVectorFileWriter(), QgsEditorWidgetRegistry::readMapLayer(), QgsComposerPicture::refreshPicture(), QgsEditorWidgetRegistry::registerWidget(), QgsVectorLayerRenderer::render(), QgsMapCanvas::rendererJobFinished(), QgsGeometry::reshapeLine(), QgsGeometry::reshapePolygon(), QgsCoordinateReferenceSystem::saveAsUserCRS(), QgsFeature::setAttribute(), QgsDistanceArea::setEllipsoid(), QgsVectorDataProvider::setEncoding(), QgsMessageOutputConsole::showMessage(), QgsCoordinateTransform::transformCoords(), QgsAtlasComposition::updateFeatures(), QgsVectorFileWriter::writeFeature(), QgsEditorWidgetRegistry::writeMapLayer(), 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: