QgsMessageOutput Class Reference
[QGIS core library]

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

#include <qgsmessageoutput.h>

Inheritance diagram for QgsMessageOutput:

Inheritance graph
[legend]

List of all members.

Public Types

enum  MessageType { MessageText, MessageHtml }
 message can be in plain text or in html format More...

Public Member Functions

virtual ~QgsMessageOutput ()
 virtual destructor
virtual void setMessage (const QString &message, MessageType msgType)=0
 set message, it won't be displayed until
virtual void appendMessage (const QString &message)=0
 message to be appended to the current text
virtual void setTitle (const QString &title)=0
 set title for the messages
virtual void showMessage (bool blocking=true)=0
 display the message to the user

Static Public Member Functions

static void setMessageOutputCreator (MESSAGE_OUTPUT_CREATOR f)
 sets function that will be used to create message output
static QgsMessageOutputcreateMessageOutput ()
 function that returns new class derived from QgsMessageOutput (don't forget to delete it then)

Static Private Attributes

static MESSAGE_OUTPUT_CREATOR mMessageOutputCreator = messageOutputConsole_
 Pointer to the function which creates the class for output.


Detailed Description

Interface for showing messages from QGIS in GUI independent way.

This class provides abstraction of a dialog for showing output to the user. By default QgsMessageConsoleOutput will be used if not overridden with other message output creator function.

QGIS application uses QgsMessageView class for displaying a dialog to the user.

Object deletes itself when it's not needed anymore. Children should use signal destroyed() to notify the deletion

Definition at line 39 of file qgsmessageoutput.h.


Member Enumeration Documentation

message can be in plain text or in html format

Enumerator:
MessageText 
MessageHtml 

Definition at line 44 of file qgsmessageoutput.h.


Constructor & Destructor Documentation

QgsMessageOutput::~QgsMessageOutput (  )  [virtual]

virtual destructor

Definition at line 39 of file qgsmessageoutput.cpp.


Member Function Documentation

virtual void QgsMessageOutput::setMessage ( const QString &  message,
MessageType  msgType 
) [pure virtual]

virtual void QgsMessageOutput::appendMessage ( const QString &  message  )  [pure virtual]

message to be appended to the current text

Implemented in QgsMessageOutputConsole, and QgsMessageViewer.

Referenced by QgsRunProcess::processExit(), QgsRunProcess::stderrAvailable(), and QgsRunProcess::stdoutAvailable().

virtual void QgsMessageOutput::setTitle ( const QString &  title  )  [pure virtual]

virtual void QgsMessageOutput::showMessage ( bool  blocking = true  )  [pure virtual]

void QgsMessageOutput::setMessageOutputCreator ( MESSAGE_OUTPUT_CREATOR  f  )  [static]

sets function that will be used to create message output

Definition at line 29 of file qgsmessageoutput.cpp.

References mMessageOutputCreator.

QgsMessageOutput * QgsMessageOutput::createMessageOutput (  )  [static]

function that returns new class derived from QgsMessageOutput (don't forget to delete it then)

Definition at line 34 of file qgsmessageoutput.cpp.

References mMessageOutputCreator.

Referenced by QgsCoordinateReferenceSystem::openDb(), QgsRunProcess::processError(), QgsProviderRegistry::QgsProviderRegistry(), and QgsRunProcess::QgsRunProcess().


Member Data Documentation

MESSAGE_OUTPUT_CREATOR QgsMessageOutput::mMessageOutputCreator = messageOutputConsole_ [static, private]

Pointer to the function which creates the class for output.

Definition at line 71 of file qgsmessageoutput.h.

Referenced by createMessageOutput(), and setMessageOutputCreator().


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

Generated on Sat Feb 4 19:17:41 2012 for Quantum GIS API Documentation by  doxygen 1.5.6