Changeset View
Changeset View
Standalone View
Standalone View
src/qt/peertablemodel.h
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | public: | ||||
int getRowByNodeId(NodeId nodeid); | int getRowByNodeId(NodeId nodeid); | ||||
void startAutoRefresh(); | void startAutoRefresh(); | ||||
void stopAutoRefresh(); | void stopAutoRefresh(); | ||||
enum ColumnIndex { NetNodeId = 0, Address = 1, Subversion = 2, Ping = 3 }; | enum ColumnIndex { NetNodeId = 0, Address = 1, Subversion = 2, Ping = 3 }; | ||||
/** @name Methods overridden from QAbstractTableModel | /** @name Methods overridden from QAbstractTableModel | ||||
@{*/ | @{*/ | ||||
int rowCount(const QModelIndex &parent) const; | int rowCount(const QModelIndex &parent) const override; | ||||
int columnCount(const QModelIndex &parent) const; | int columnCount(const QModelIndex &parent) const override; | ||||
QVariant data(const QModelIndex &index, int role) const; | QVariant data(const QModelIndex &index, int role) const override; | ||||
QVariant headerData(int section, Qt::Orientation orientation, | QVariant headerData(int section, Qt::Orientation orientation, | ||||
int role) const; | int role) const override; | ||||
QModelIndex index(int row, int column, const QModelIndex &parent) const; | QModelIndex index(int row, int column, | ||||
Qt::ItemFlags flags(const QModelIndex &index) const; | const QModelIndex &parent) const override; | ||||
void sort(int column, Qt::SortOrder order); | Qt::ItemFlags flags(const QModelIndex &index) const override; | ||||
void sort(int column, Qt::SortOrder order) override; | |||||
/*@}*/ | /*@}*/ | ||||
public Q_SLOTS: | public Q_SLOTS: | ||||
void refresh(); | void refresh(); | ||||
private: | private: | ||||
ClientModel *clientModel; | ClientModel *clientModel; | ||||
QStringList columns; | QStringList columns; | ||||
std::unique_ptr<PeerTablePriv> priv; | std::unique_ptr<PeerTablePriv> priv; | ||||
QTimer *timer; | QTimer *timer; | ||||
}; | }; | ||||
#endif // BITCOIN_QT_PEERTABLEMODEL_H | #endif // BITCOIN_QT_PEERTABLEMODEL_H |