added save functions to various classes

Each class is responsible for its own saving and loading from the XML data
in order to reduce the complexity of the save code.
This commit is contained in:
itsmattkc
2020-01-12 18:36:31 +11:00
parent fa95a61c7b
commit bb57884cac
30 changed files with 275 additions and 35 deletions
+8
View File
@@ -25,6 +25,7 @@
#include <QObject>
#include <QVariant>
#include <QVector>
#include <QXmlStreamWriter>
#include "common/rational.h"
#include "node/edge.h"
@@ -229,6 +230,11 @@ public:
virtual ~NodeParam() override;
/**
* @brief Save function
*/
virtual void Save(QXmlStreamWriter* writer) const = 0;
/**
* @brief Return ID of this parameter
*/
@@ -368,6 +374,8 @@ signals:
void EdgeRemoved(NodeEdgePtr edge);
protected:
void SaveConnections(QXmlStreamWriter* writer) const;
/**
* @brief Internal list of edges
*/