use user roles instead of hidden columns for model sort/filter keys

This commit is contained in:
Wladimir J. van der Laan
2011-05-22 19:32:37 +02:00
parent 858ff187f5
commit 8968bf2e36
6 changed files with 21 additions and 21 deletions

View File

@@ -10,11 +10,14 @@ public:
explicit AddressTableModel(QObject *parent = 0);
enum {
Label = 0, /* User specified label */
Address = 1, /* Bitcoin address */
Type = 2 /* Send/Receive, used for filter */
Label = 0, /* User specified label */
Address = 1 /* Bitcoin address */
} ColumnIndex;
enum {
TypeRole = Qt::UserRole
} RoleIndex;
static const QString Send; /* Send addres */
static const QString Receive; /* Receive address */

View File

@@ -15,10 +15,13 @@ public:
Date = 1,
Description = 2,
Debit = 3,
Credit = 4,
Type = 5
Credit = 4
} ColumnIndex;
enum {
TypeRole = Qt::UserRole
} RoleIndex;
/* Transaction type */
static const QString Sent;
static const QString Received;