diff options
Diffstat (limited to 'attachmenttablemodel.h')
-rw-r--r-- | attachmenttablemodel.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/attachmenttablemodel.h b/attachmenttablemodel.h new file mode 100644 index 0000000..0200656 --- /dev/null +++ b/attachmenttablemodel.h @@ -0,0 +1,29 @@ +#ifndef ATTACHMENTTABLEMODEL_H +#define ATTACHMENTTABLEMODEL_H + +#include "mime.h" + +#include <QAbstractTableModel> + + +class AttachmentTableModel : public QAbstractTableModel +{ + Q_OBJECT + +public: + AttachmentTableModel(QObject *parent = 0); + AttachmentTableModel(QList<MimePart> mimeparts, QObject *parent = 0); + + int rowCount(const QModelIndex &parent) const; + int columnCount(const QModelIndex &parent) const; + QVariant data(const QModelIndex &index, int role) const; + QVariant headerData(int section, Qt::Orientation orientation, int role) const; + + void add(MimePart mp); + +private: + QList<MimePart> listOfMimeparts; + +}; + +#endif // ATTACHMENTTABLEMODEL_H |