aboutsummaryrefslogtreecommitdiffstats
path: root/keytablemodel.h
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-05-15 15:44:24 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-05-15 15:44:24 +0000
commit168c54db76bad4fb2a89196636edd90b6f1da7e7 (patch)
treef3008c7f9d896d6331359b1be9d79c297bad253f /keytablemodel.h
parentastyle code beautyfying (diff)
downloadgpg4usb-keylist-rewrite.tar.gz
gpg4usb-keylist-rewrite.zip
use own tablemodel instead of qtablewidget for keylistkeylist-rewrite
git-svn-id: http://cpunk.de/svn/src/gpg4usb/branches/keylist-rewrite@337 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'keytablemodel.h')
-rw-r--r--keytablemodel.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/keytablemodel.h b/keytablemodel.h
new file mode 100644
index 0000000..1f3c35d
--- /dev/null
+++ b/keytablemodel.h
@@ -0,0 +1,26 @@
+#ifndef KEYTABLEMODEL_H
+#define KEYTABLEMODEL_H
+
+#include "context.h"
+#include <QAbstractTableModel>
+
+class KeyTableModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ KeyTableModel(GpgME::Context *ctx, QString iconpath, 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;
+
+private:
+ GpgKeyList keys;
+ QString iconPath;
+ GpgME::Context *mCtx;
+
+};
+
+#endif // KEYTABLEMODEL_H