diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-12-24 12:15:57 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-12-30 20:54:47 +0200 |
commit | 35007edf9c0f592303f0cbda3ade776c87fd80b1 (patch) | |
tree | abf43a4913cb6e4e34032c59900e8e209654b2f0 /src/qt/peertablemodel.h | |
parent | f1f26b8d5baec4a45a3a9ba0440cd4eff7af8407 (diff) | |
download | bitcoin-35007edf9c0f592303f0cbda3ade776c87fd80b1.tar.xz |
qt: Add PeerTableModel::StatsRole
This change allows access to CNodeCombinedStats instance directly from
any view object.
Diffstat (limited to 'src/qt/peertablemodel.h')
-rw-r--r-- | src/qt/peertablemodel.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h index 61a0132e00..f70b7aeaa6 100644 --- a/src/qt/peertablemodel.h +++ b/src/qt/peertablemodel.h @@ -28,6 +28,7 @@ struct CNodeCombinedStats { CNodeStateStats nodeStateStats; bool fNodeStateStatsAvailable; }; +Q_DECLARE_METATYPE(CNodeCombinedStats*) class NodeLessThan { @@ -67,6 +68,10 @@ public: Subversion = 6 }; + enum { + StatsRole = Qt::UserRole, + }; + /** @name Methods overridden from QAbstractTableModel @{*/ int rowCount(const QModelIndex &parent) const override; |