Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

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 BITCOIN_QT_TRANSACTIONFILTERPROXY_H
6 #define BITCOIN_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;
28  static const quint32 COMMON_TYPES = 4223;
29 
30  static quint32 TYPE(int type) { return 1<<type; }
31 
33  {
37  };
38 
39  void setDateRange(const QDateTime &from, const QDateTime &to);
40  void setSearchString(const QString &);
44  void setTypeFilter(quint32 modes);
45  void setMinAmount(const CAmount& minimum);
47 
49  void setLimit(int limit);
50 
52  void setShowInactive(bool showInactive);
53 
54  int rowCount(const QModelIndex &parent = QModelIndex()) const;
55 
56 protected:
57  bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const;
58 
59 private:
60  qint64 dateFrom;
61  qint64 dateTo;
62  QString m_search_string;
63  quint32 typeFilter;
66  int limitRows;
68 };
69 
70 #endif // BITCOIN_QT_TRANSACTIONFILTERPROXY_H
void setTypeFilter(quint32 modes)
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
int rowCount(const QModelIndex &parent=QModelIndex()) const
TransactionFilterProxy(QObject *parent=0)
static quint32 TYPE(int type)
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
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)
static const quint32 COMMON_TYPES
Type filter bit field (all types but Darksend-SPAM)
void setLimit(int limit)
Set maximum number of rows returned, -1 if unlimited.
void setShowInactive(bool showInactive)
Set whether to show conflicted transactions.
Filter the transaction list according to pre-specified rules.
static const quint32 ALL_TYPES
Type filter bit field (all types)
void setSearchString(const QString &)
Released under the MIT license