changeset 1391:2c0e04062a99

Write aggregate models to .sv file when saving document. They still are not reloaded, but I think this is far as I'm prepared to go for 3.0.
author Chris Cannam
date Mon, 27 Feb 2017 16:52:47 +0000
parents 1a572937ed8c
children 667e369cfeab
files data/model/AggregateWaveModel.cpp
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/data/model/AggregateWaveModel.cpp	Mon Feb 27 15:44:14 2017 +0000
+++ b/data/model/AggregateWaveModel.cpp	Mon Feb 27 16:52:47 2017 +0000
@@ -217,10 +217,17 @@
 }
 
 void
-AggregateWaveModel::toXml(QTextStream &,
-                          QString ,
-                          QString ) const
+AggregateWaveModel::toXml(QTextStream &out,
+                          QString indent,
+                          QString extraAttributes) const
 {
-    //!!! complete
+    QStringList componentStrings;
+    for (const auto &c: m_components) {
+        componentStrings.push_back(QString("%1").arg(getObjectExportId(c.model)));
+    }
+    Model::toXml(out, indent,
+                 QString("type=\"aggregatewave\" components=\"%1\" %2")
+                 .arg(componentStrings.join(","))
+                 .arg(extraAttributes));
 }