mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-15 21:22:40 +00:00
WIP Quick GUI work
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#include "backend/computermanager.h"
|
||||
|
||||
#include <QAbstractListModel>
|
||||
|
||||
class ComputerModel : public QAbstractListModel
|
||||
{
|
||||
enum Roles
|
||||
{
|
||||
NameRole = Qt::UserRole,
|
||||
OnlineRole,
|
||||
PairedRole,
|
||||
BusyRole,
|
||||
AddPcRole
|
||||
};
|
||||
|
||||
public:
|
||||
ComputerModel(QObject* object = nullptr);
|
||||
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
|
||||
int rowCount(const QModelIndex &parent) const override;
|
||||
|
||||
virtual QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
private slots:
|
||||
void handleComputerStateChanged(NvComputer* computer);
|
||||
|
||||
private:
|
||||
QVector<NvComputer*> m_Computers;
|
||||
ComputerManager m_ComputerManager;
|
||||
};
|
||||
Reference in New Issue
Block a user