18 #include "boost/shared_ptr.hpp" 23 #include <QTextStream> 25 #include <QApplication> 35 mMessageLevel(messageLevel),
36 mTimeoutTime(timeoutTime),
37 mTimeStamp(QDateTime::currentDateTime()),
50 void Message::setThreadName()
52 if (QApplication::instance()->thread() == QThread::currentThread())
56 mThread = QThread::currentThread()->objectName();
58 mThread =
"0x"+QString::number(reinterpret_cast<long>(QThread::currentThreadId()), 16);
66 QString printableMessage;
68 printableMessage =
mText;
70 printableMessage = QString(
"[%1][%2] %3")
81 return printableMessage;
QString qstring_cast(const T &val)
Message(QString text="", MESSAGE_LEVEL messageLevel=mlDEBUG, int timeoutTime=-1)
QString getPrintableMessage() const
Text containing information appropriate to display.
QString getText() const
The raw message.
int getTimeout() const
Timout tells the statusbar how long it should be displayed, this depends on the message level...
QDateTime getTimeStamp() const
The time at which the message was created.
MESSAGE_LEVEL mMessageLevel
QString getSourceLocation() const
MESSAGE_LEVEL getMessageLevel() const
The category of the message.
Namespace for all CustusX production code.