-
- public:
-
- //! Creates a MessageModelItem from a Message object.
- /** This baseclass implementation takes care of all Message data *except* the stylable strings.
- * Subclasses need to provide Qt::DisplayRole at least, which should describe the plaintext
- * strings without formattings (e.g. for searching purposes).
- */
- MessageModelItem(const Message &);
- virtual ~MessageModelItem();
-
- virtual QVariant data(int column, int role) const;
- virtual bool setData(int column, const QVariant &value, int role) = 0;
-
- private:
- QDateTime _timestamp;
- MsgId _msgId;
- BufferId _bufferId;
- Message::Type _type;
- Message::Flags _flags;
+public:
+ //! Creates a MessageModelItem from a Message object.
+ /** This baseclass implementation takes care of all Message data *except* the stylable strings.
+ * Subclasses need to provide Qt::DisplayRole at least, which should describe the plaintext
+ * strings without formattings (e.g. for searching purposes).
+ */
+ MessageModelItem(const Message &);
+ inline virtual ~MessageModelItem() {}
+
+ virtual QVariant data(int column, int role) const;
+ virtual bool setData(int column, const QVariant &value, int role) = 0;
+
+ inline const QDateTime &timeStamp() const { return _timestamp; }
+ inline MsgId msgId() const { return _msgId; }
+ inline BufferId bufferId() const { return _bufferId; }
+ inline Message::Type msgType() const { return _type; }
+ inline Message::Flags msgFlags() const { return _flags; }
+
+private:
+ QDateTime _timestamp;
+ MsgId _msgId;
+ BufferId _bufferId;
+ Message::Type _type;
+ Message::Flags _flags;