Loading...
Searching...
No Matches
score-plugin-packagemanager/PackageManager/Model.hpp
1#pragma once
2#include <score/plugins/settingsdelegate/SettingsDelegateModel.hpp>
3
4#include <QItemSelectionModel>
5#include <QNetworkAccessManager>
6
7#include <PackageManager/PluginItemModel.hpp>
8
9#include <score_plugin_packagemanager_export.h>
10
11namespace PM
12{
13class BlacklistCommand;
14
15class SCORE_PLUGIN_PACKAGEMANAGER_EXPORT PluginSettingsModel
17{
18 W_OBJECT(PluginSettingsModel)
19
20public:
21 PluginSettingsModel(QSettings& set, const score::ApplicationContext& ctx);
23
24 void refresh();
25 void requestInformation(QUrl url);
26
27 void installAddon(const Package& addon);
28 void installLibrary(const Package& addon);
29 void installSDK();
30
31 void handleAddonList(const QJsonObject&);
32 void handleAddon(const QJsonObject&);
33 void on_message(QNetworkReply* rep);
34 void firstTimeLibraryDownload();
35 void checkAll();
36
37 void show_progress() W_SIGNAL(show_progress);
38 void update_progress(double v) W_SIGNAL(update_progress, v);
39 void reset_progress() W_SIGNAL(reset_progress);
40 void set_info() W_SIGNAL(set_info);
41 void progress_from_bytes(qint64 received, qint64 total)
42 W_SIGNAL(progress_from_bytes, received, total);
43 void information(QString title, QString description)
44 W_SIGNAL(information, title, description);
45 void warning(QString title, QString description) W_SIGNAL(warning, title, description);
46
47 void on_packageInstallSuccess(
48 const Package& addon, const QDir& destination, const std::vector<QString>& res);
49 void on_packageInstallFailure(const Package& addon);
50
51 LocalPackagesModel localPlugins;
52 RemotePackagesModel remotePlugins;
53 QItemSelectionModel remoteSelection;
54
55 QNetworkAccessManager mgr;
56 int m_addonsToRetrieve = 0;
57 bool m_firstTimeCheck{false};
58};
59}
Definition score-plugin-packagemanager/PackageManager/Model.hpp:17
Definition PluginItemModel.hpp:91
Definition SettingsDelegateModel.hpp:16
Definition PluginItemModel.hpp:84
Definition PluginItemModel.hpp:24
Used to access all the application-wide state and structures.
Definition ApplicationContext.hpp:24