CustusX  18.04-rc6
An IGT application
cx::Reporter Class Reference

#include <cxReporter.h>

Inheritance diagram for cx::Reporter:
cx::Log

Public Member Functions

virtual ~Reporter ()
 
void setAudioSource (AudioPtr audioSource)
 define sounds to go with the messages. More...
 
void sendInfo (QString info)
 Used to report normal interesting activity, no sound associated. More...
 
void sendSuccess (QString success)
 Used to report larger successful operations, default not muted. More...
 
void sendWarning (QString warning)
 The program does not need to terminate, but the user might need to do something, default not muted. More...
 
void sendError (QString error)
 The program (might) need to terminate, default not muted. More...
 
void sendDebug (QString debug)
 Used to output debug info, no sound associated. More...
 
void sendVolatile (QString volatile_msg)
 Used to output volatile info that changes rapidly, not suited for logging. More...
 
void sendRaw (QString raw)
 Used to output messages without adding anything to them, can be used as cout when mangling needs to be avoided. More...
 
void sendMessage (QString text, MESSAGE_LEVEL messageLevel=mlDEBUG, int timeout=-1, bool mute=false)
 
void sendMessage (Message msg)
 
void playStartSound ()
 plays a sound signaling that something has started More...
 
void playStopSound ()
 plays a sound signaling that something has stopped More...
 
void playCancelSound ()
 plays a sound signaling that something has been canceled More...
 
void playSuccessSound ()
 automatically called by sendSuccess if not muted More...
 
void playWarningSound ()
 automatically called by sendWarning if not muted More...
 
void playErrorSound ()
 automatically called by sendError if not muted More...
 
void playScreenShotSound ()
 plays a sound signaling that a screen shot has been taken More...
 
void playSampleSound ()
 plays a sound signaling that something has been sampled More...
 
- Public Member Functions inherited from cx::Log
virtual ~Log ()
 
QString getLoggingFolder () const
 
void setLoggingFolder (QString absoluteLoggingFolderPath)
 
void installObserver (MessageObserverPtr observer, bool resend)
 
void uninstallObserver (MessageObserverPtr observer)
 

Static Public Member Functions

static void initialize ()
 Initialize logging, static object is guaranteed to exist at least until shutdown. More...
 
static void shutdown ()
 shutdown service, destroy static object if none holds a reference. More...
 
static ReporterPtr getInstance ()
 Returns a reference to the only Reporter that exists. More...
 

Protected Member Functions

virtual LogThreadPtr createWorker ()
 
- Protected Member Functions inherited from cx::Log
 Log ()
 
void initializeObject ()
 
void startThread ()
 
void stopThread ()
 
QString getDefaultLogPath () const
 

Additional Inherited Members

- Signals inherited from cx::Log
void loggingFolderChanged ()
 
- Protected Slots inherited from cx::Log
virtual void onEmittedMessage (Message message)
 
- Protected Attributes inherited from cx::Log
QString mLogPath
 
boost::shared_ptr< class QThread > mThread
 
LogThreadPtr mWorker
 

Detailed Description

Definition at line 63 of file cxReporter.h.

Constructor & Destructor Documentation

cx::Reporter::~Reporter ( )
virtual

Definition at line 47 of file cxReporter.cpp.

Member Function Documentation

LogThreadPtr cx::Reporter::createWorker ( )
protectedvirtual

Implements cx::Log.

Definition at line 70 of file cxReporter.cpp.

ReporterPtr cx::Reporter::getInstance ( )
static

Returns a reference to the only Reporter that exists.

Definition at line 51 of file cxReporter.cpp.

void cx::Reporter::initialize ( )
static

Initialize logging, static object is guaranteed to exist at least until shutdown.

Definition at line 62 of file cxReporter.cpp.

void cx::Reporter::playCancelSound ( )

plays a sound signaling that something has been canceled

Definition at line 180 of file cxReporter.cpp.

void cx::Reporter::playErrorSound ( )

automatically called by sendError if not muted

Definition at line 198 of file cxReporter.cpp.

void cx::Reporter::playSampleSound ( )

plays a sound signaling that something has been sampled

Definition at line 210 of file cxReporter.cpp.

void cx::Reporter::playScreenShotSound ( )

plays a sound signaling that a screen shot has been taken

Definition at line 204 of file cxReporter.cpp.

void cx::Reporter::playStartSound ( )

plays a sound signaling that something has started

Definition at line 168 of file cxReporter.cpp.

void cx::Reporter::playStopSound ( )

plays a sound signaling that something has stopped

Definition at line 174 of file cxReporter.cpp.

void cx::Reporter::playSuccessSound ( )

automatically called by sendSuccess if not muted

Definition at line 186 of file cxReporter.cpp.

void cx::Reporter::playWarningSound ( )

automatically called by sendWarning if not muted

Definition at line 192 of file cxReporter.cpp.

void cx::Reporter::sendDebug ( QString  debug)

Used to output debug info, no sound associated.

Definition at line 116 of file cxReporter.cpp.

void cx::Reporter::sendError ( QString  error)

The program (might) need to terminate, default not muted.

Definition at line 111 of file cxReporter.cpp.

void cx::Reporter::sendInfo ( QString  info)

Used to report normal interesting activity, no sound associated.

Definition at line 96 of file cxReporter.cpp.

void cx::Reporter::sendMessage ( QString  text,
MESSAGE_LEVEL  messageLevel = mlDEBUG,
int  timeout = -1,
bool  mute = false 
)

Definition at line 131 of file cxReporter.cpp.

void cx::Reporter::sendMessage ( Message  msg)

Definition at line 138 of file cxReporter.cpp.

void cx::Reporter::sendRaw ( QString  raw)

Used to output messages without adding anything to them, can be used as cout when mangling needs to be avoided.

Definition at line 126 of file cxReporter.cpp.

void cx::Reporter::sendSuccess ( QString  success)

Used to report larger successful operations, default not muted.

Definition at line 101 of file cxReporter.cpp.

void cx::Reporter::sendVolatile ( QString  volatile_msg)

Used to output volatile info that changes rapidly, not suited for logging.

Definition at line 121 of file cxReporter.cpp.

void cx::Reporter::sendWarning ( QString  warning)

The program does not need to terminate, but the user might need to do something, default not muted.

Definition at line 106 of file cxReporter.cpp.

void cx::Reporter::setAudioSource ( AudioPtr  audioSource)

define sounds to go with the messages.

Definition at line 86 of file cxReporter.cpp.

void cx::Reporter::shutdown ( )
static

shutdown service, destroy static object if none holds a reference.

Definition at line 75 of file cxReporter.cpp.


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