Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bantablemodel.h
Show All 40 Lines | public: | ||||
~BanTableModel(); | ~BanTableModel(); | ||||
void startAutoRefresh(); | void startAutoRefresh(); | ||||
void stopAutoRefresh(); | void stopAutoRefresh(); | ||||
enum ColumnIndex { Address = 0, Bantime = 1 }; | enum ColumnIndex { Address = 0, Bantime = 1 }; | ||||
/** @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; | |||||
bool shouldShow(); | bool shouldShow(); | ||||
/*@}*/ | /*@}*/ | ||||
public Q_SLOTS: | public Q_SLOTS: | ||||
void refresh(); | void refresh(); | ||||
private: | private: | ||||
ClientModel *clientModel; | ClientModel *clientModel; | ||||
QStringList columns; | QStringList columns; | ||||
std::unique_ptr<BanTablePriv> priv; | std::unique_ptr<BanTablePriv> priv; | ||||
}; | }; | ||||
#endif // BITCOIN_QT_BANTABLEMODEL_H | #endif // BITCOIN_QT_BANTABLEMODEL_H |