NorMIT-nav  2023.01.05-dev+develop.0da12
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)
 
void stopQtMessages ()
 
void startQtMessages ()
 

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

◆ ~Reporter()

cx::Reporter::~Reporter ( )
virtual

Definition at line 45 of file cxReporter.cpp.

Member Function Documentation

◆ createWorker()

LogThreadPtr cx::Reporter::createWorker ( )
protectedvirtual

Implements cx::Log.

Definition at line 68 of file cxReporter.cpp.

◆ getInstance()

ReporterPtr cx::Reporter::getInstance ( )
static

Returns a reference to the only Reporter that exists.

Definition at line 49 of file cxReporter.cpp.

◆ initialize()

void cx::Reporter::initialize ( )
static

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

Definition at line 60 of file cxReporter.cpp.

◆ playCancelSound()

void cx::Reporter::playCancelSound ( )

plays a sound signaling that something has been canceled

Definition at line 178 of file cxReporter.cpp.

◆ playErrorSound()

void cx::Reporter::playErrorSound ( )

automatically called by sendError if not muted

Definition at line 196 of file cxReporter.cpp.

◆ playSampleSound()

void cx::Reporter::playSampleSound ( )

plays a sound signaling that something has been sampled

Definition at line 208 of file cxReporter.cpp.

◆ playScreenShotSound()

void cx::Reporter::playScreenShotSound ( )

plays a sound signaling that a screen shot has been taken

Definition at line 202 of file cxReporter.cpp.

◆ playStartSound()

void cx::Reporter::playStartSound ( )

plays a sound signaling that something has started

Definition at line 166 of file cxReporter.cpp.

◆ playStopSound()

void cx::Reporter::playStopSound ( )

plays a sound signaling that something has stopped

Definition at line 172 of file cxReporter.cpp.

◆ playSuccessSound()

void cx::Reporter::playSuccessSound ( )

automatically called by sendSuccess if not muted

Definition at line 184 of file cxReporter.cpp.

◆ playWarningSound()

void cx::Reporter::playWarningSound ( )

automatically called by sendWarning if not muted

Definition at line 190 of file cxReporter.cpp.

◆ sendDebug()

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

Used to output debug info, no sound associated.

Definition at line 114 of file cxReporter.cpp.

◆ sendError()

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

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

Definition at line 109 of file cxReporter.cpp.

◆ sendInfo()

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

Used to report normal interesting activity, no sound associated.

Definition at line 94 of file cxReporter.cpp.

◆ sendMessage() [1/2]

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

Definition at line 136 of file cxReporter.cpp.

◆ sendMessage() [2/2]

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

Definition at line 129 of file cxReporter.cpp.

◆ sendRaw()

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 124 of file cxReporter.cpp.

◆ sendSuccess()

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

Used to report larger successful operations, default not muted.

Definition at line 99 of file cxReporter.cpp.

◆ sendVolatile()

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

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

Definition at line 119 of file cxReporter.cpp.

◆ sendWarning()

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 104 of file cxReporter.cpp.

◆ setAudioSource()

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

define sounds to go with the messages.

Definition at line 84 of file cxReporter.cpp.

◆ shutdown()

void cx::Reporter::shutdown ( )
static

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

Definition at line 73 of file cxReporter.cpp.


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