2#include <score/plugins/ProjectSettings/ProjectSettingsFactory.hpp>
3#include <score/plugins/ProjectSettings/ProjectSettingsModel.hpp>
4#include <score/plugins/ProjectSettings/ProjectSettingsPresenter.hpp>
5#include <score/plugins/ProjectSettings/ProjectSettingsView.hpp>
6#include <score/plugins/settingsdelegate/SettingsDelegateModel.hpp>
7#include <score/plugins/settingsdelegate/SettingsDelegatePresenter.hpp>
8#include <score/plugins/settingsdelegate/SettingsDelegateView.hpp>
16#include <score_lib_base_export.h>
52 "aac1402f-6851-4a1a-ab50-5f213acd1262")
54namespace
score::ProjectInfo
57inline constexpr const char* uuid_string =
"aac1402f-6851-4a1a-ab50-5f213acd1262";
62 SCORE_SERIALIZE_FRIENDS
63 MODEL_METADATA_IMPL(Model)
67 QString m_Description;
71 QDateTime m_LastSaved;
72 QByteArray m_Thumbnail;
73 bool m_AutomaticThumbnail{
true};
79 template <
typename Impl>
81 :
score::ProjectSettingsModel{ctx, vis, parent}
87 static constexpr QSize thumbnailSize{480, 300};
90 static QByteArray encodeThumbnail(
const QImage& img);
92 QImage thumbnailImage()
const;
94 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QString, Name)
95 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QString, Author)
96 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QString, Description)
97 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QString, Url)
98 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QString, Platforms)
99 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QDateTime, Created)
100 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QDateTime, LastSaved)
101 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QByteArray, Thumbnail)
102 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT,
bool, AutomaticThumbnail)
105SCORE_SETTINGS_PARAMETER(Model, Name)
106SCORE_SETTINGS_PARAMETER(Model, Author)
107SCORE_SETTINGS_PARAMETER(Model, Description)
108SCORE_SETTINGS_PARAMETER(Model, Url)
109SCORE_SETTINGS_PARAMETER(Model, Platforms)
110SCORE_SETTINGS_PARAMETER(Model, Thumbnail)
111SCORE_SETTINGS_PARAMETER(Model, AutomaticThumbnail)
119 void setName(QString);
120 void NameChanged(QString arg) W_SIGNAL(NameChanged, arg)
121 void setAuthor(QString);
122 void AuthorChanged(QString arg) W_SIGNAL(AuthorChanged, arg)
123 void setDescription(QString);
124 void DescriptionChanged(QString arg) W_SIGNAL(DescriptionChanged, arg)
125 void setUrl(QString);
126 void UrlChanged(QString arg) W_SIGNAL(UrlChanged, arg)
127 void setPlatforms(QString);
128 QString currentPlatformSelection()
const;
129 void PlatformsChanged(QString arg) W_SIGNAL(PlatformsChanged, arg)
130 void setThumbnail(QByteArray);
131 void ThumbnailChanged(QByteArray arg) W_SIGNAL(ThumbnailChanged, arg)
133 void setCreated(QDateTime);
134 void setLastSaved(QDateTime);
136 SETTINGS_UI_TOGGLE_HPP(AutomaticThumbnail)
139 QWidget* getWidget()
override;
140 void chooseThumbnail();
144 QLineEdit* m_author{};
145 QPlainTextEdit* m_description{};
147 std::vector<QCheckBox*> m_platforms;
149 QLabel* m_lastSaved{};
150 QLabel* m_thumbnailPreview{};
151 QByteArray m_thumbnail;
157 using model_type = Model;
158 using view_type = View;
159 Presenter(Model&, View&, QObject* parent);
162 QString settingsName()
override;
163 QIcon settingsIcon()
override;
166SCORE_DECLARE_PROJECTSETTINGS_FACTORY(
167 Factory, Model, Presenter, View,
"aac1402f-6851-4a1a-ab50-5f213acd1262")
172struct SCORE_LIB_BASE_EXPORT Info
191std::optional<Info> peek(
const QString& path);
Reimplement to instantiate document plug-ins.
Definition DocumentPluginCreator.hpp:25
Definition ProjectSettingsModel.hpp:9
Definition SettingsDelegatePresenter.hpp:17
Definition SettingsDelegateView.hpp:18
Definition ProjectInfo.cpp:33
Base toolkit upon which the software is built.
Definition Application.cpp:83
Definition DocumentContext.hpp:18