Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

OmgOmLogCallback Class Reference

#include <omgomlogcallback.h>

Inheritance diagram for OmgOmLogCallback:

Inheritance graph
[legend]
Collaboration diagram for OmgOmLogCallback:

Collaboration graph
[legend]
List of all members.

Detailed Description

OmgLogCallback is a special purpose class to proved a Qt signal style interface to the openModeller Log callback mechanism.

Author:
Tim Sutton 2005

Definition at line 39 of file omgomlogcallback.h.

Signals

void omLogMessage (QString theModelGuid, QString theLogMessage)
void omLogError (QString theModelGuid, QString theLogMessage)

Public Member Functions

 OmgOmLogCallback ()
 OmgOmLogCallback (QObject *parent)
virtual ~OmgOmLogCallback ()
 OmgOmLogCallback (QTextStream &theTextStream)
void operator() (Log::Level theLevel, const std::string &theMessage)
void setModelGuid (QString theModelGuid)
 OmgOmLogCallback ()
 ~OmgOmLogCallback ()
 OmgOmLogCallback (QTextStream &theTextStream)
void operator() (Log::Level theLevel, const std::string &theLogMessage)

Private Attributes

QString mModelGuid


Constructor & Destructor Documentation

OmgOmLogCallback::OmgOmLogCallback  ) 
 

Definition at line 23 of file omgomlogcallback.cpp.

OmgOmLogCallback::OmgOmLogCallback QObject parent  ) 
 

Definition at line 30 of file omgomlogcallback.cpp.

OmgOmLogCallback::~OmgOmLogCallback  )  [virtual]
 

Definition at line 37 of file omgomlogcallback.cpp.

OmgOmLogCallback::OmgOmLogCallback QTextStream &  theTextStream  ) 
 

Constructor for log call back required to fit the om callback pattern.

Note:
Although the call back needs a text stream in the ctor, all we want is to get the msg.c_str() from the logger, so having the textstream is just so that we fit the g_log callback model, but its not actually used anywhere
Parameters:
QTextStream a text stream - not actually used anywhere!

Definition at line 44 of file omgomlogcallback.cpp.

OmgOmLogCallback::OmgOmLogCallback  )  [inline]
 

Definition at line 35 of file openmodellerlogtest.cpp.

OmgOmLogCallback::~OmgOmLogCallback  )  [inline]
 

Definition at line 42 of file openmodellerlogtest.cpp.

OmgOmLogCallback::OmgOmLogCallback QTextStream &  theTextStream  )  [inline]
 

Definition at line 48 of file openmodellerlogtest.cpp.


Member Function Documentation

void OmgOmLogCallback::omLogError QString  theModelGuid,
QString  theLogMessage
[signal]
 

Signal passed on from here to other qt derived classes with the log ERROR message from om

Parameters:
theModelGuid - guid of the model that this message is associated with
theLogMessage - the message from the log callback

Referenced by operator()().

void OmgOmLogCallback::omLogMessage QString  theModelGuid,
QString  theLogMessage
[signal]
 

Signal passed on from here to other qt derived classes with the log message from om

Parameters:
theModelGuid - guid of the model that this message is associated with
theLogMessage - the message from the log callback

Referenced by operator()().

void OmgOmLogCallback::operator() Log::Level  theLevel,
const std::string &  theLogMessage
[inline]
 

Definition at line 56 of file openmodellerlogtest.cpp.

void OmgOmLogCallback::operator() Log::Level  theLevel,
const std::string &  theMessage
 

Overloading the () operator is required because om uses this approach to push out log messages. We will simplyg capture the passed in message and emit it as a QString that any connected classes can then use.

Note:
the log level parameter passed in by om is ignored at this time.
Parameters:
Log::Level the log level (ie urgency) of the message
string the message passed to us from om
Returns:
void

Definition at line 52 of file omgomlogcallback.cpp.

References mModelGuid, omLogError(), and omLogMessage().

void OmgOmLogCallback::setModelGuid QString  theModelGuid  ) 
 

Set the globally unique identifier for the model that is associated with this callback

Definition at line 66 of file omgomlogcallback.cpp.

References mModelGuid.

Referenced by OmgModellerLocalPlugin::createModel(), and OmgModellerLocalPlugin::projectModel().


Member Data Documentation

QString OmgOmLogCallback::mModelGuid [private]
 

The globally unique identifier for the model that this callback wrapper is associated with

Definition at line 82 of file omgomlogcallback.h.

Referenced by operator()(), and setModelGuid().


The documentation for this class was generated from the following files:
Generated on Mon Apr 28 15:13:52 2008 for openModellerDesktop by  doxygen 1.4.1-20050210