peertablesortproxy.h raw

   1  // Copyright (c) 2020-present 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_PEERTABLESORTPROXY_H
   6  #define BITCOIN_QT_PEERTABLESORTPROXY_H
   7  
   8  #include <QSortFilterProxyModel>
   9  
  10  QT_BEGIN_NAMESPACE
  11  class QModelIndex;
  12  QT_END_NAMESPACE
  13  
  14  class PeerTableSortProxy : public QSortFilterProxyModel
  15  {
  16      Q_OBJECT
  17  
  18  public:
  19      explicit PeerTableSortProxy(QObject* parent = nullptr);
  20  
  21  protected:
  22      bool lessThan(const QModelIndex& left_index, const QModelIndex& right_index) const override;
  23  };
  24  
  25  #endif // BITCOIN_QT_PEERTABLESORTPROXY_H
  26