#include <QAbstractItemModel>
+class Message;
class MessageItem;
+class MsgId;
class MessageModel : public QAbstractItemModel {
Q_OBJECT
MessageModel(QObject *parent);
virtual ~MessageModel();
- inline QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const { return createIndex(row, column); }
- inline QModelIndex parent(const QModelIndex &index) const { return QModelIndex(); }
- inline int rowCount(const QModelIndex &parent = QModelIndex()) const { return _messageList.count(); }
- inline int columnCount(const QModelIndex &parent = QModelIndex()) const { return 3; }
+ inline QModelIndex index(int row, int column, const QModelIndex &/*parent*/ = QModelIndex()) const { return createIndex(row, column); }
+ inline QModelIndex parent(const QModelIndex &) const { return QModelIndex(); }
+ inline int rowCount(const QModelIndex &/*parent*/ = QModelIndex()) const { return _messageList.count(); }
+ inline int columnCount(const QModelIndex &/*parent*/ = QModelIndex()) const { return 3; }
virtual QVariant data(const QModelIndex &index, int role) const;
virtual bool setData(const QModelIndex &index, const QVariant &value, int role);
private:
QList<MessageItem *> _messageList;
+ int indexForId(MsgId);
+
};
class MessageItem {