Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1// Copyright (c) 2011-present The Bitcoin Core developers2// Distributed under the MIT software license, see the accompanying3// file COPYING or http://www.opensource.org/licenses/mit-license.php.5#ifndef BITCOIN_QT_TRANSACTIONFILTERPROXY_H6#define BITCOIN_QT_TRANSACTIONFILTERPROXY_H8#include <consensus/amount.h>10#include <QDateTime>11#include <QSortFilterProxyModel>13#include <optional>15/** Filter the transaction list according to pre-specified rules. */16class TransactionFilterProxy : public QSortFilterProxyModel17{18Q_OBJECT20public:21explicit TransactionFilterProxy(QObject *parent = nullptr);23/** Type filter bit field (all types) */24static constexpr quint32 ALL_TYPES{0xFFFFFFFF};26static quint32 TYPE(int type) { return 1<<type; }28/** Filter transactions between date range. Use std::nullopt for open range. */29void setDateRange(const std::optional<QDateTime>& from, const std::optional<QDateTime>& to);30void setSearchString(const QString &);31/**32@note Type filter takes a bit field created with TYPE() or ALL_TYPES33*/34void setTypeFilter(quint32 modes);35void setMinAmount(const CAmount& minimum);37/** Set whether to show conflicted transactions. */38void setShowInactive(bool showInactive);40protected:41bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const override;43private:44std::optional<QDateTime> dateFrom;45std::optional<QDateTime> dateTo;46QString m_search_string;47quint32 typeFilter{ALL_TYPES};48CAmount minAmount{0};49bool showInactive{true};50};52#endif // BITCOIN_QT_TRANSACTIONFILTERPROXY_H
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.