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