improve address book, add less conspicious toolbar icon
[novacoin.git] / transactiontablemodel.h
1 #ifndef TRANSACTIONTABLEMODEL_H
2 #define TRANSACTIONTABLEMODEL_H
3
4 #include <QAbstractTableModel>
5 #include <QStringList>
6
7 class TransactionTableModel : public QAbstractTableModel
8 {
9     Q_OBJECT
10 public:
11     explicit TransactionTableModel(QObject *parent = 0);
12
13     enum {
14         Status = 0,
15         Date = 1,
16         Description = 2,
17         Debit = 3,
18         Credit = 4,
19         Type = 5
20     } ColumnIndex;
21
22     /* Transaction type */
23     static const QString Sent;
24     static const QString Received;
25     static const QString Generated;
26
27     int rowCount(const QModelIndex &parent) const;
28     int columnCount(const QModelIndex &parent) const;
29     QVariant data(const QModelIndex &index, int role) const;
30     QVariant headerData(int section, Qt::Orientation orientation, int role) const;
31     Qt::ItemFlags flags(const QModelIndex &index) const;
32 private:
33     QStringList columns;
34 };
35
36 #endif
37