21 #ifndef ICEMON_HOSTLISTMODEL_H
22 #define ICEMON_HOSTLISTMODEL_H
24 #include <QAbstractItemModel>
33 :
public QAbstractListModel
56 HostIdRole = Qt::UserRole
61 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
62 QVariant data(
const QModelIndex &index,
int role)
const override;
63 int columnCount(
const QModelIndex &parent)
const override;
64 int rowCount(
const QModelIndex &parent)
const override;
65 QModelIndex parent(
const QModelIndex &child)
const override;
68 void setMonitor(
Monitor *monitor);
70 HostInfo hostInfoForIndex(
const QModelIndex &index)
const;
71 QModelIndex indexForHostInfo(
const HostInfo &info,
int column)
const;
74 void checkNode(HostId hostId);
75 void removeNodeById(HostId hostId);
80 QPointer<Monitor> m_monitor;
81 QVector<HostInfo> m_hostInfos;
84 #endif // ICEMON_HOSTLISTMODEL_H
Definition: hostlistmodel.h:32
Definition: hostinfo.h:29