diff options
| author | Philip Kaufmann <[email protected]> | 2015-06-26 14:58:15 +0200 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2015-09-16 16:50:19 +0200 |
| commit | 65abe91ce4c3c9b26afa5d1af38bd1bfe81546c4 (patch) | |
| tree | 24de51e29dabd14f819f6476d4b29655b62d3397 /src/qt/bantablemodel.h | |
| parent | [Qt] bantable polish (diff) | |
| download | discoin-65abe91ce4c3c9b26afa5d1af38bd1bfe81546c4.tar.xz discoin-65abe91ce4c3c9b26afa5d1af38bd1bfe81546c4.zip | |
[Qt] add sorting for bantable
Diffstat (limited to 'src/qt/bantablemodel.h')
| -rw-r--r-- | src/qt/bantablemodel.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/qt/bantablemodel.h b/src/qt/bantablemodel.h index c0f0813f2..ec93ed101 100644 --- a/src/qt/bantablemodel.h +++ b/src/qt/bantablemodel.h @@ -18,6 +18,18 @@ struct CCombinedBan { int64_t bantil; }; +class BannedNodeLessThan +{ +public: + BannedNodeLessThan(int nColumn, Qt::SortOrder fOrder) : + column(nColumn), order(fOrder) {} + bool operator()(const CCombinedBan& left, const CCombinedBan& right) const; + +private: + int column; + Qt::SortOrder order; +}; + /** Qt model providing information about connected peers, similar to the "getpeerinfo" RPC call. Used by the rpc console UI. @@ -33,7 +45,7 @@ public: enum ColumnIndex { Address = 0, - Bantime = 1, + Bantime = 1 }; /** @name Methods overridden from QAbstractTableModel |