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>
51 "aac1402f-6851-4a1a-ab50-5f213acd1262")
53namespace
score::ProjectInfo
56inline constexpr const char* uuid_string =
"aac1402f-6851-4a1a-ab50-5f213acd1262";
61 SCORE_SERIALIZE_FRIENDS
62 MODEL_METADATA_IMPL(Model)
66 QString m_Description;
69 QDateTime m_LastSaved;
70 QByteArray m_Thumbnail;
71 bool m_AutomaticThumbnail{
true};
77 template <
typename Impl>
79 :
score::ProjectSettingsModel{ctx, vis, parent}
85 static constexpr QSize thumbnailSize{480, 300};
88 static QByteArray encodeThumbnail(
const QImage& img);
90 QImage thumbnailImage()
const;
92 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QString, Name)
93 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QString, Author)
94 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QString, Description)
95 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QString, Url)
96 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QDateTime, Created)
97 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QDateTime, LastSaved)
98 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT, QByteArray, Thumbnail)
99 SCORE_SETTINGS_PARAMETER_HPP(SCORE_LIB_BASE_EXPORT,
bool, AutomaticThumbnail)
102SCORE_SETTINGS_PARAMETER(Model, Name)
103SCORE_SETTINGS_PARAMETER(Model, Author)
104SCORE_SETTINGS_PARAMETER(Model, Description)
105SCORE_SETTINGS_PARAMETER(Model, Url)
106SCORE_SETTINGS_PARAMETER(Model, Thumbnail)
107SCORE_SETTINGS_PARAMETER(Model, AutomaticThumbnail)
115 void setName(QString);
116 void NameChanged(QString arg) W_SIGNAL(NameChanged, arg)
117 void setAuthor(QString);
118 void AuthorChanged(QString arg) W_SIGNAL(AuthorChanged, arg)
119 void setDescription(QString);
120 void DescriptionChanged(QString arg) W_SIGNAL(DescriptionChanged, arg)
121 void setUrl(QString);
122 void UrlChanged(QString arg) W_SIGNAL(UrlChanged, arg)
123 void setThumbnail(QByteArray);
124 void ThumbnailChanged(QByteArray arg) W_SIGNAL(ThumbnailChanged, arg)
126 void setCreated(QDateTime);
127 void setLastSaved(QDateTime);
129 SETTINGS_UI_TOGGLE_HPP(AutomaticThumbnail)
132 QWidget* getWidget()
override;
133 void chooseThumbnail();
137 QLineEdit* m_author{};
138 QPlainTextEdit* m_description{};
141 QLabel* m_lastSaved{};
142 QLabel* m_thumbnailPreview{};
143 QByteArray m_thumbnail;
149 using model_type = Model;
150 using view_type = View;
151 Presenter(Model&, View&, QObject* parent);
154 QString settingsName()
override;
155 QIcon settingsIcon()
override;
158SCORE_DECLARE_PROJECTSETTINGS_FACTORY(
159 Factory, Model, Presenter, View,
"aac1402f-6851-4a1a-ab50-5f213acd1262")
164struct SCORE_LIB_BASE_EXPORT Info
182std::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:31
Base toolkit upon which the software is built.
Definition Application.cpp:117
Definition DocumentContext.hpp:18