Mercurial > hg > svcore
comparison data/model/EditableDenseThreeDimensionalModel.cpp @ 314:70a232b1f12a
* Make XmlExportable::toXml the function that is universally overridden (and
pure virtual) instead of toXmlString. Tidies up some classes, notably the
model classes, significantly. Closes #1794561.
author | Chris Cannam |
---|---|
date | Thu, 18 Oct 2007 10:15:07 +0000 |
parents | 46398ab6ff58 |
children | 7a4bd2c8585c |
comparison
equal
deleted
inserted
replaced
313:29485aa03da4 | 314:70a232b1f12a |
---|---|
270 } | 270 } |
271 } | 271 } |
272 | 272 |
273 void | 273 void |
274 EditableDenseThreeDimensionalModel::toXml(QTextStream &out, | 274 EditableDenseThreeDimensionalModel::toXml(QTextStream &out, |
275 QString indent, | 275 QString indent, |
276 QString extraAttributes) const | 276 QString extraAttributes) const |
277 { | 277 { |
278 // For historical reasons we read and write "resolution" as "windowSize" | 278 // For historical reasons we read and write "resolution" as "windowSize" |
279 | 279 |
280 out << Model::toXmlString | 280 Model::toXml |
281 (indent, QString("type=\"dense\" dimensions=\"3\" windowSize=\"%1\" yBinCount=\"%2\" minimum=\"%3\" maximum=\"%4\" dataset=\"%5\" %6") | 281 (out, indent, |
282 QString("type=\"dense\" dimensions=\"3\" windowSize=\"%1\" yBinCount=\"%2\" minimum=\"%3\" maximum=\"%4\" dataset=\"%5\" %6") | |
282 .arg(m_resolution) | 283 .arg(m_resolution) |
283 .arg(m_yBinCount) | 284 .arg(m_yBinCount) |
284 .arg(m_minimum) | 285 .arg(m_minimum) |
285 .arg(m_maximum) | 286 .arg(m_maximum) |
286 .arg(getObjectExportId(&m_data)) | 287 .arg(getObjectExportId(&m_data)) |
309 } | 310 } |
310 | 311 |
311 out << indent + "</dataset>\n"; | 312 out << indent + "</dataset>\n"; |
312 } | 313 } |
313 | 314 |
314 QString | 315 |
315 EditableDenseThreeDimensionalModel::toXmlString(QString indent, | |
316 QString extraAttributes) const | |
317 { | |
318 QString s; | |
319 | |
320 { | |
321 QTextStream out(&s); | |
322 toXml(out, indent, extraAttributes); | |
323 } | |
324 | |
325 return s; | |
326 } | |
327 |