diff data/model/EditableDenseThreeDimensionalModel.cpp @ 841:226733f3cf3f tonioni

Merge from default branch
author Chris Cannam
date Fri, 22 Nov 2013 10:37:28 +0000
parents 33fca917c800
children e802e550a1f2
line wrap: on
line diff
--- a/data/model/EditableDenseThreeDimensionalModel.cpp	Wed Jul 17 16:01:28 2013 +0100
+++ b/data/model/EditableDenseThreeDimensionalModel.cpp	Fri Nov 22 10:37:28 2013 +0000
@@ -483,6 +483,24 @@
     return s;
 }
 
+QString
+EditableDenseThreeDimensionalModel::toDelimitedDataString(QString delimiter, size_t f0, size_t f1) const
+{
+    QReadLocker locker(&m_lock);
+    QString s;
+    for (size_t i = 0; i < m_data.size(); ++i) {
+        size_t fr = m_startFrame + i * m_resolution;
+        if (fr >= f0 && fr < f1) {
+            QStringList list;
+            for (size_t j = 0; j < m_data.at(i).size(); ++j) {
+                list << QString("%1").arg(m_data.at(i).at(j));
+            }
+            s += list.join(delimiter) + "\n";
+        }
+    }
+    return s;
+}
+
 void
 EditableDenseThreeDimensionalModel::toXml(QTextStream &out,
                                           QString indent,