feature/app-split-tunneling (#702)
App Split Tunneling for Windows and Android
This commit is contained in:
parent
e7bd24f065
commit
adab30fc81
48 changed files with 1225 additions and 98 deletions
38
client/ui/models/installedAppsModel.h
Normal file
38
client/ui/models/installedAppsModel.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#ifndef INSTALLEDAPPSMODEL_H
|
||||
#define INSTALLEDAPPSMODEL_H
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QAbstractListModel>
|
||||
|
||||
class InstalledAppsModel: public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Roles {
|
||||
AppNameRole= Qt::UserRole + 1,
|
||||
PackageNameRole,
|
||||
AppIconRole
|
||||
};
|
||||
|
||||
explicit InstalledAppsModel(QObject *parent = nullptr);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
public slots:
|
||||
void selectedStateChanged(const int index, const bool selected);
|
||||
QVector<QPair<QString, QString>> getSelectedAppsInfo();
|
||||
|
||||
void updateModel();
|
||||
|
||||
protected:
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
private:
|
||||
QJsonArray m_installedApps;
|
||||
QSet<int> m_selectedAppIndexes;
|
||||
};
|
||||
|
||||
#endif // INSTALLEDAPPSMODEL_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue