Mercurial > hg > svcore
diff data/model/EditableDenseThreeDimensionalModel.cpp @ 318:7a4bd2c8585c
* Some export fixes, and avoid clipping on resampling on import
author | Chris Cannam |
---|---|
date | Mon, 22 Oct 2007 09:45:35 +0000 |
parents | 70a232b1f12a |
children | 1afaf98dbf11 |
line wrap: on
line diff
--- a/data/model/EditableDenseThreeDimensionalModel.cpp Thu Oct 18 16:20:26 2007 +0000 +++ b/data/model/EditableDenseThreeDimensionalModel.cpp Mon Oct 22 09:45:35 2007 +0000 @@ -270,6 +270,20 @@ } } +QString +EditableDenseThreeDimensionalModel::toDelimitedDataString(QString delimiter) const +{ + QString s; + for (size_t i = 0; i < m_data.size(); ++i) { + QStringList list; + for (size_t j = 0; j < m_data[i].size(); ++j) { + list << QString("%1").arg(m_data[i][j]); + } + s += list.join(delimiter) + "\n"; + } + return s; +} + void EditableDenseThreeDimensionalModel::toXml(QTextStream &out, QString indent, @@ -277,6 +291,8 @@ { // For historical reasons we read and write "resolution" as "windowSize" + std::cerr << "EditableDenseThreeDimensionalModel::toXml" << std::endl; + Model::toXml (out, indent, QString("type=\"dense\" dimensions=\"3\" windowSize=\"%1\" yBinCount=\"%2\" minimum=\"%3\" maximum=\"%4\" dataset=\"%5\" %6") @@ -307,6 +323,7 @@ out << m_data[i][j]; } out << QString("</row>\n"); + out.flush(); } out << indent + "</dataset>\n";