diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-02-22 09:50:09 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-03-07 16:57:11 +0200 |
commit | df2d165ba9e0acc53f36a326f68f57ad9c297872 (patch) | |
tree | 88e629023ce8fd4e31b32a1b5e4755b665a9ef7c /src/qt/peertablesortproxy.h | |
parent | 8c049fe9afcb749e0b80bb318641aee87c800bc5 (diff) | |
download | bitcoin-df2d165ba9e0acc53f36a326f68f57ad9c297872.tar.xz |
qt: Add peertablesortproxy module
Diffstat (limited to 'src/qt/peertablesortproxy.h')
-rw-r--r-- | src/qt/peertablesortproxy.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/qt/peertablesortproxy.h b/src/qt/peertablesortproxy.h new file mode 100644 index 0000000000..1879f6b400 --- /dev/null +++ b/src/qt/peertablesortproxy.h @@ -0,0 +1,25 @@ +// Copyright (c) 2020 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef BITCOIN_QT_PEERTABLESORTPROXY_H +#define BITCOIN_QT_PEERTABLESORTPROXY_H + +#include <QSortFilterProxyModel> + +QT_BEGIN_NAMESPACE +class QModelIndex; +QT_END_NAMESPACE + +class PeerTableSortProxy : public QSortFilterProxyModel +{ + Q_OBJECT + +public: + explicit PeerTableSortProxy(QObject* parent = nullptr); + +protected: + bool lessThan(const QModelIndex& left_index, const QModelIndex& right_index) const override; +}; + +#endif // BITCOIN_QT_PEERTABLESORTPROXY_H |