18 #include "boost/shared_ptr.hpp" 23 #include <QTextStream> 30 #include "QApplication" 35 class EventProcessingThread :
public QThread
49 qApp->processEvents();
56 mLogPath = this->getDefaultLogPath();
66 QString isoDateFormat(
"yyyy-MM-dd");
67 QString isoDate = QDateTime::currentDateTime().toString(isoDateFormat);
86 mThread.reset(
new EventProcessingThread());
87 mThread->setObjectName(
"org.custusx.resource.core.logger");
89 mWorker = this->createWorker();
90 mWorker->moveToThread(mThread.get());
91 if (!mLogPath.isEmpty())
92 mWorker->setLoggingFolder(mLogPath);
116 mLogPath = absoluteLoggingFolderPath;
118 mWorker->setLoggingFolder(mLogPath);
119 emit loggingFolderChanged();
130 mWorker->installObserver(observer, resend);
136 mWorker->uninstallObserver(observer);
virtual ~EventProcessingThread()
boost::shared_ptr< class ReporterThread > ReporterThreadPtr
virtual void onEmittedMessage(Message message)
void setLoggingFolder(QString absoluteLoggingFolderPath)
QString getDefaultLogPath() const
static ProfileManager * getInstance(QString defaultProfile=QString("Laboratory"))
returns the only instance of this class
void installObserver(MessageObserverPtr observer, bool resend)
QString getLoggingFolder() const
void emittedMessage(Message message)
emitted for each new message, in addition to writing to observer.
boost::shared_ptr< class MessageObserver > MessageObserverPtr
boost::shared_ptr< class LogThread > LogThreadPtr
QString getSettingsPath()
void uninstallObserver(MessageObserverPtr observer)
Namespace for all CustusX production code.