From 168c54db76bad4fb2a89196636edd90b6f1da7e7 Mon Sep 17 00:00:00 2001 From: ubbo Date: Sat, 15 May 2010 15:44:24 +0000 Subject: use own tablemodel instead of qtablewidget for keylist git-svn-id: http://cpunk.de/svn/src/gpg4usb/branches/keylist-rewrite@337 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- keytablemodel.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 keytablemodel.h (limited to 'keytablemodel.h') 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 + +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 -- cgit v1.2.3