// Copyright 2019-2022 The Hush developers // Released under the GPLv3 #ifndef PEERSTABLEMODEL_H #define PEERSTABLEMODEL_H #include "precompiled.h" struct PeerItem; class PeersTableModel: public QAbstractTableModel { public: PeersTableModel(QObject* parent); ~PeersTableModel(); QString getPeerId(int row) const; QString getAddress(int row) const; QString getType(int row) const; qint64 getConntime(int row) const; qint64 getASN(int row) const; QString getSubver(int row) const; QString getTLSCipher(int row) const; bool getTLSVerified(int row) const; QString getPingtime(int row) const; unsigned int getBanscore(int row) const; unsigned int getProtocolVersion(int row) const; int rowCount(const QModelIndex &parent) const; int columnCount(const QModelIndex &parent) const; QVariant data(const QModelIndex &index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role) const; void addData (const QList& data); private: void updateAllData(); QList* peers = nullptr; QList* modeldata = nullptr; QList headers; }; #endif // PEERSTABLEMODEL_H