explicit MessageEvent(Message::Type msgType,
Network *network,
const QString &msg,
- const QString &target = QString(),
const QString &sender = QString(),
- Message::Flags msgFlags = Message::None
+ const QString &target = QString(),
+ Message::Flags msgFlags = Message::None,
+ const QDateTime ×tamp = QDateTime()
);
inline Message::Type msgType() const { return _msgType; }
inline void setMsgFlag(Message::Flag flag) { _msgFlags |= flag; }
inline void setMsgFlags(Message::Flags flags) { _msgFlags = flags; }
+protected:
+ virtual inline QString className() const { return "MessageEvent"; }
+ virtual inline void debugInfo(QDebug &dbg) const {
+ NetworkEvent::debugInfo(dbg);
+ dbg.nospace() << ", sender = " << qPrintable(sender())
+ << ", target = " << qPrintable(target())
+ << ", text = " << text()
+ << ", msgtype = " << qPrintable(QString::number(msgType(), 16))
+ << ", buffertype = " << qPrintable(QString::number(bufferType(), 16))
+ << ", msgflags = " << qPrintable(QString::number(msgFlags(), 16));
+ }
+
private:
BufferInfo::Type bufferTypeByTarget(const QString &target) const;
Message::Type _msgType;
BufferInfo::Type _bufferType;
- QString _text, _target, _sender;
+ QString _text, _sender, _target;
Message::Flags _msgFlags;
};