aboutsummaryrefslogtreecommitdiffstats
path: root/keytablemodel.h
blob: 1f3c35d73808de24830da83b5516b5df0c8bc91b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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