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:
22 const UuidKey<score::SettingsDelegateFactory>& k, QSettings& set,
23 const score::ApplicationContext& ctx);
25
26 void refresh();
27 void requestInformation(QUrl url);
28
29 void installAddon(const Package& addon);
30 void installLibrary(const Package& addon);
31 void installSDK();
32
33 void handleAddonList(const QJsonObject&);
34 void handleAddon(const QJsonObject&);
35 void on_message(QNetworkReply* rep);
36 void firstTimeLibraryDownload();
37 void checkAll();
38
39 void show_progress() W_SIGNAL(show_progress);
40 void update_progress(double v) W_SIGNAL(update_progress, v);
41 void reset_progress() W_SIGNAL(reset_progress);
42 void set_info() W_SIGNAL(set_info);
43 void progress_from_bytes(qint64 received, qint64 total)
44 W_SIGNAL(progress_from_bytes, received, total);
45 void information(QString title, QString description)
46 W_SIGNAL(information, title, description);
47 void warning(QString title, QString description) W_SIGNAL(warning, title, description);
48
49 void on_packageInstallSuccess(
50 const Package& addon, const QDir& destination, const std::vector<QString>& res);
51 void on_packageInstallFailure(const Package& addon);
52
53 LocalPackagesModel localPlugins;
54 RemotePackagesModel remotePlugins;
55 QItemSelectionModel remoteSelection;
56
57 QNetworkAccessManager mgr;
58 int m_addonsToRetrieve = 0;
59 bool m_firstTimeCheck{false};
60};
61}
Definition score-plugin-packagemanager/PackageManager/Model.hpp:17
Definition PluginItemModel.hpp:91
Definition UuidKey.hpp:345
Definition SettingsDelegateModel.hpp:18
Definition PluginItemModel.hpp:84
Definition PluginItemModel.hpp:24
Used to access all the application-wide state and structures.
Definition ApplicationContext.hpp:25