Update CMakeLists.txt - play with openssl
[novacoin.git] / src / qt / transactionfilterproxy.h
1 #ifndef TRANSACTIONFILTERPROXY_H
2 #define TRANSACTIONFILTERPROXY_H
3
4 #include <QSortFilterProxyModel>
5 #include <QDateTime>
6
7 /** Filter the transaction list according to pre-specified rules. */
8 class TransactionFilterProxy : public QSortFilterProxyModel
9 {
10     Q_OBJECT
11 public:
12     explicit TransactionFilterProxy(QObject *parent = 0);
13
14     /** Earliest date that can be represented (far in the past) */
15     static const QDateTime MIN_DATE;
16     /** Last date that can be represented (far in the future) */
17     static const QDateTime MAX_DATE;
18     /** Type filter bit field (all types) */
19     static const quint32 ALL_TYPES = 0xFFFFFFFF;
20
21     static quint32 TYPE(int type) { return 1<<type; }
22
23     void setDateRange(const QDateTime &from, const QDateTime &to);
24     void setAddressPrefix(const QString &addrPrefix);
25     /**
26       @note Type filter takes a bit field created with TYPE() or ALL_TYPES
27      */
28     void setTypeFilter(quint32 modes);
29     void setMinAmount(qint64 minimum);
30
31     /** Set maximum number of rows returned, -1 if unlimited. */
32     void setLimit(int limit);
33
34     int rowCount(const QModelIndex &parent = QModelIndex()) const;
35 protected:
36     bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const;
37
38 private:
39     QDateTime dateFrom;
40     QDateTime dateTo;
41     QString addrPrefix;
42     quint32 typeFilter;
43     qint64 minAmount;
44     int limitRows;
45
46 signals:
47
48 public slots:
49
50 };
51
52 #endif // TRANSACTIONFILTERPROXY_H