start implementing serializers
This commit is contained in:
@@ -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;
|
||||
@@ -80,13 +76,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();
|
||||
@@ -100,6 +120,8 @@ private:
|
||||
|
||||
QString filename_;
|
||||
|
||||
QString saved_url_;
|
||||
|
||||
ColorManager* color_manager_;
|
||||
|
||||
ProjectSettingsNode* settings_;
|
||||
@@ -108,6 +130,8 @@ private:
|
||||
|
||||
bool autorecovery_saved_;
|
||||
|
||||
MainWindowLayoutInfo layout_info_;
|
||||
|
||||
private slots:
|
||||
void ColorManagerValueChanged(const NodeInput& input, const TimeRange& range);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user