diff data/model/TextModel.h @ 302:726b32522e3f

* Phase 1 of an image layer.
author Chris Cannam
date Thu, 04 Oct 2007 16:34:11 +0000
parents 7b96b3bd4bae
children 70a232b1f12a
line wrap: on
line diff
--- a/data/model/TextModel.h	Thu Oct 04 11:52:38 2007 +0000
+++ b/data/model/TextModel.h	Thu Oct 04 16:34:11 2007 +0000
@@ -17,6 +17,7 @@
 #define _TEXT_MODEL_H_
 
 #include "SparseModel.h"
+#include "base/XmlExportable.h"
 #include "base/RealTime.h"
 
 /**
@@ -25,7 +26,7 @@
  * of height on the window).  Intended for casual textual annotations.
  */
 
-struct TextPoint
+struct TextPoint : public XmlExportable
 {
 public:
     TextPoint(long _frame) : frame(_frame), height(0.0f) { }
@@ -42,7 +43,8 @@
 			QString extraAttributes = "") const
     {
 	return QString("%1<point frame=\"%2\" height=\"%3\" label=\"%4\" %5/>\n")
-	    .arg(indent).arg(frame).arg(height).arg(label).arg(extraAttributes);
+	    .arg(indent).arg(frame).arg(height)
+            .arg(encodeEntities(label)).arg(extraAttributes);
     }
 
     QString toDelimitedDataString(QString delimiter, size_t sampleRate) const