Fabcoin Core  0.16.2
P2P Digital Currency
transactionfilterproxy.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2014 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef FABCOIN_QT_TRANSACTIONFILTERPROXY_H
6 #define FABCOIN_QT_TRANSACTIONFILTERPROXY_H
7 
8 #include <amount.h>
9 
10 #include <QDateTime>
11 #include <QSortFilterProxyModel>
12 
14 class TransactionFilterProxy : public QSortFilterProxyModel
15 {
16  Q_OBJECT
17 
18 public:
19  explicit TransactionFilterProxy(QObject *parent = 0);
20 
22  static const QDateTime MIN_DATE;
24  static const QDateTime MAX_DATE;
26  static const quint32 ALL_TYPES = 0xFFFFFFFF;
27 
28  static quint32 TYPE(int type) { return 1<<type; }
29 
31  {
35  };
36 
37  void setDateRange(const QDateTime &from, const QDateTime &to);
38  void setAddressPrefix(const QString &addrPrefix);
42  void setTypeFilter(quint32 modes);
43  void setMinAmount(const CAmount& minimum);
45 
47  void setLimit(int limit);
48 
50  void setShowInactive(bool showInactive);
51 
52  int rowCount(const QModelIndex &parent = QModelIndex()) const;
53 
54 protected:
55  bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const;
56 
57 private:
58  QDateTime dateFrom;
59  QDateTime dateTo;
60  QString addrPrefix;
61  quint32 typeFilter;
64  int limitRows;
66 };
67 
68 #endif // FABCOIN_QT_TRANSACTIONFILTERPROXY_H
void setTypeFilter(quint32 modes)
TransactionFilterProxy(QObject *parent=0)
void setAddressPrefix(const QString &addrPrefix)
static quint32 TYPE(int type)
int64_t CAmount
Amount in lius (Can be negative)
Definition: amount.h:15
static const QDateTime MIN_DATE
Earliest date that can be represented (far in the past)
static const QDateTime MAX_DATE
Last date that can be represented (far in the future)
void setDateRange(const QDateTime &from, const QDateTime &to)
void setWatchOnlyFilter(WatchOnlyFilter filter)
void setMinAmount(const CAmount &minimum)
void setLimit(int limit)
Set maximum number of rows returned, -1 if unlimited.
void setShowInactive(bool showInactive)
Set whether to show conflicted transactions.
int rowCount(const QModelIndex &parent=QModelIndex()) const
PlatformStyle::TableColorType type
Definition: rpcconsole.cpp:61
Filter the transaction list according to pre-specified rules.
static const quint32 ALL_TYPES
Type filter bit field (all types)
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const