From 38d40c5aed23ba76add8fc421f26380c9973401e Mon Sep 17 00:00:00 2001 From: ubbo Date: Fri, 14 May 2010 11:22:44 +0000 Subject: start of using own model for attachment-table-view, not all functionality (saving / icons) back in place git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@328 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- attachmenttablemodel.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 attachmenttablemodel.h (limited to 'attachmenttablemodel.h') 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 + + +class AttachmentTableModel : public QAbstractTableModel +{ + Q_OBJECT + +public: + AttachmentTableModel(QObject *parent = 0); + AttachmentTableModel(QList 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 listOfMimeparts; + +}; + +#endif // ATTACHMENTTABLEMODEL_H -- cgit v1.2.3