diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-02-22 09:51:21 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-03-07 16:57:17 +0200 |
commit | 778a64af209e4fa692a3aca8376ba1bd5e1af881 (patch) | |
tree | e4a8cc1e5698a61368aa10b0f3fea4305894f664 /src/qt/clientmodel.cpp | |
parent | df2d165ba9e0acc53f36a326f68f57ad9c297872 (diff) |
qt: Use PeerTableSortProxy for sorting peer table
Diffstat (limited to 'src/qt/clientmodel.cpp')
-rw-r--r-- | src/qt/clientmodel.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index b244bc94f2..efe657516a 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -8,6 +8,7 @@ #include <qt/guiconstants.h> #include <qt/guiutil.h> #include <qt/peertablemodel.h> +#include <qt/peertablesortproxy.h> #include <clientversion.h> #include <interfaces/handler.h> @@ -38,7 +39,11 @@ ClientModel::ClientModel(interfaces::Node& node, OptionsModel *_optionsModel, QO { cachedBestHeaderHeight = -1; cachedBestHeaderTime = -1; + peerTableModel = new PeerTableModel(m_node, this); + m_peer_table_sort_proxy = new PeerTableSortProxy(this); + m_peer_table_sort_proxy->setSourceModel(peerTableModel); + banTableModel = new BanTableModel(m_node, this); QTimer* timer = new QTimer; @@ -184,6 +189,11 @@ PeerTableModel *ClientModel::getPeerTableModel() return peerTableModel; } +PeerTableSortProxy* ClientModel::peerTableSortProxy() +{ + return m_peer_table_sort_proxy; +} + BanTableModel *ClientModel::getBanTableModel() { return banTableModel; |