#include "backend/computermanager.h" #include class ComputerModel : public QAbstractListModel { Q_OBJECT enum Roles { NameRole = Qt::UserRole, OnlineRole, PairedRole, BusyRole, AddPcRole }; public: explicit ComputerModel(QObject* object = nullptr); QVariant data(const QModelIndex &index, int role) const override; int rowCount(const QModelIndex &parent) const override; virtual QHash roleNames() const override; private slots: void handleComputerStateChanged(NvComputer* computer); private: QVector m_Computers; ComputerManager m_ComputerManager; };