Implement filter row instead of tabs, allows for more expressive filters

This commit is contained in:
Wladimir J. van der Laan
2011-06-28 21:41:56 +02:00
parent 19a5975d5a
commit ceb6d4e11d
13 changed files with 444 additions and 110 deletions

View File

@@ -23,9 +23,20 @@ public:
Amount = 4
} ColumnIndex;
// Roles to get specific information from a transaction row
enum {
// Type of transaction
TypeRole = Qt::UserRole,
LongDescriptionRole = Qt::UserRole+1
// Date and time this transaction was created
DateRole,
// Long description (HTML format)
LongDescriptionRole,
// Address of transaction
AddressRole,
// Label of address related to transaction
LabelRole,
// Absolute net amount of transaction
AbsoluteAmountRole
} RoleIndex;
/* TypeRole values */
@@ -44,7 +55,8 @@ private:
QStringList columns;
TransactionTablePriv *priv;
std::string lookupAddress(const std::string &address) const;
QString labelForAddress(const std::string &address) const;
QString lookupAddress(const std::string &address) const;
QVariant formatTxStatus(const TransactionRecord *wtx) const;
QVariant formatTxDate(const TransactionRecord *wtx) const;
QVariant formatTxType(const TransactionRecord *wtx) const;