aboutsummaryrefslogtreecommitdiff
path: root/src/qt/peertablemodel.h
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-12-24 12:15:57 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-12-30 20:54:47 +0200
commit35007edf9c0f592303f0cbda3ade776c87fd80b1 (patch)
treeabf43a4913cb6e4e34032c59900e8e209654b2f0 /src/qt/peertablemodel.h
parentf1f26b8d5baec4a45a3a9ba0440cd4eff7af8407 (diff)
downloadbitcoin-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.h5
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;