diff data/model/EditableDenseThreeDimensionalModel.cpp @ 611:dd97f7b3d120

* Add start frame get/set to EditableDenseThreeDimensionalModel and use it when importing grids from CSV with timings attached
author Chris Cannam
date Fri, 11 Sep 2009 15:42:32 +0000
parents a67651386253
children 06f13a3b9e9e
line wrap: on
line diff
--- a/data/model/EditableDenseThreeDimensionalModel.cpp	Fri Sep 11 11:41:22 2009 +0000
+++ b/data/model/EditableDenseThreeDimensionalModel.cpp	Fri Sep 11 15:42:32 2009 +0000
@@ -34,6 +34,7 @@
                                                                        size_t yBinCount,
                                                                        CompressionType compression,
                                                                        bool notifyOnAdd) :
+    m_startFrame(0),
     m_sampleRate(sampleRate),
     m_resolution(resolution),
     m_yBinCount(yBinCount),
@@ -63,7 +64,13 @@
 size_t
 EditableDenseThreeDimensionalModel::getStartFrame() const
 {
-    return 0;
+    return m_startFrame;
+}
+
+void
+EditableDenseThreeDimensionalModel::setStartFrame(size_t f)
+{
+    m_startFrame = f; 
 }
 
 size_t
@@ -489,12 +496,13 @@
 
     Model::toXml
 	(out, indent,
-         QString("type=\"dense\" dimensions=\"3\" windowSize=\"%1\" yBinCount=\"%2\" minimum=\"%3\" maximum=\"%4\" dataset=\"%5\" %6")
+         QString("type=\"dense\" dimensions=\"3\" windowSize=\"%1\" yBinCount=\"%2\" minimum=\"%3\" maximum=\"%4\" dataset=\"%5\" startFrame=\"%6\" %7")
 	 .arg(m_resolution)
 	 .arg(m_yBinCount)
 	 .arg(m_minimum)
 	 .arg(m_maximum)
 	 .arg(getObjectExportId(&m_data))
+         .arg(m_startFrame)
 	 .arg(extraAttributes));
 
     out << indent;