Merge branch 'serializers'

This commit is contained in:
itsmattkc
2022-01-12 16:35:25 -08:00
42 changed files with 3255 additions and 1523 deletions
+32 -8
View File
@@ -50,10 +50,6 @@ class Project : public NodeGraph
public:
Project();
void Load(QXmlStreamReader* reader, MainWindowLayoutInfo *layout, uint version, const QAtomicInt* cancelled);
void Save(QXmlStreamWriter* writer) const;
Folder* root();
QString name() const;
@@ -81,13 +77,37 @@ public:
return uuid_;
}
void SetUuid(const QUuid &uuid)
{
uuid_ = uuid;
}
void RegenerateUuid();
static bool LoadPosition(QXmlStreamReader *reader, quintptr *node_ptr, Node::Position *pos);
static void SavePosition(QXmlStreamWriter *writer, Node *node, const Node::Position &pos);
const MainWindowLayoutInfo &GetLayoutInfo() const
{
return layout_info_;
}
static const uint kProjectVersion;
static const uint kProjectMinimumVersion;
void SetLayoutInfo(const MainWindowLayoutInfo &info)
{
layout_info_ = info;
}
/**
* @brief Returns the filename the project was saved as, but not necessarily where it is now
*
* May help for resolving relative paths.
*/
const QString &GetSavedURL() const
{
return saved_url_;
}
void SetSavedURL(const QString &url)
{
saved_url_ = url;
}
signals:
void NameChanged();
@@ -101,6 +121,8 @@ private:
QString filename_;
QString saved_url_;
ColorManager* color_manager_;
ProjectSettingsNode* settings_;
@@ -109,6 +131,8 @@ private:
bool autorecovery_saved_;
MainWindowLayoutInfo layout_info_;
private slots:
void ColorManagerValueChanged(const NodeInput& input, const TimeRange& range);