aboutsummaryrefslogtreecommitdiffstats
path: root/attachmenttablemodel.h
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-05-14 11:22:44 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-05-14 11:22:44 +0000
commit38d40c5aed23ba76add8fc421f26380c9973401e (patch)
tree30b55db0433c14a8a841eb0a49f865f3e2381117 /attachmenttablemodel.h
parentupdate attachment-todo (diff)
downloadgpg4usb-38d40c5aed23ba76add8fc421f26380c9973401e.tar.gz
gpg4usb-38d40c5aed23ba76add8fc421f26380c9973401e.zip
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
Diffstat (limited to 'attachmenttablemodel.h')
-rw-r--r--attachmenttablemodel.h29
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