Mercurial > hg > svcore
comparison 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 |
comparison
equal
deleted
inserted
replaced
610:0a9e960fca53 | 611:dd97f7b3d120 |
---|---|
32 EditableDenseThreeDimensionalModel::EditableDenseThreeDimensionalModel(size_t sampleRate, | 32 EditableDenseThreeDimensionalModel::EditableDenseThreeDimensionalModel(size_t sampleRate, |
33 size_t resolution, | 33 size_t resolution, |
34 size_t yBinCount, | 34 size_t yBinCount, |
35 CompressionType compression, | 35 CompressionType compression, |
36 bool notifyOnAdd) : | 36 bool notifyOnAdd) : |
37 m_startFrame(0), | |
37 m_sampleRate(sampleRate), | 38 m_sampleRate(sampleRate), |
38 m_resolution(resolution), | 39 m_resolution(resolution), |
39 m_yBinCount(yBinCount), | 40 m_yBinCount(yBinCount), |
40 m_compression(compression), | 41 m_compression(compression), |
41 m_minimum(0.0), | 42 m_minimum(0.0), |
61 } | 62 } |
62 | 63 |
63 size_t | 64 size_t |
64 EditableDenseThreeDimensionalModel::getStartFrame() const | 65 EditableDenseThreeDimensionalModel::getStartFrame() const |
65 { | 66 { |
66 return 0; | 67 return m_startFrame; |
68 } | |
69 | |
70 void | |
71 EditableDenseThreeDimensionalModel::setStartFrame(size_t f) | |
72 { | |
73 m_startFrame = f; | |
67 } | 74 } |
68 | 75 |
69 size_t | 76 size_t |
70 EditableDenseThreeDimensionalModel::getEndFrame() const | 77 EditableDenseThreeDimensionalModel::getEndFrame() const |
71 { | 78 { |
487 | 494 |
488 std::cerr << "EditableDenseThreeDimensionalModel::toXml" << std::endl; | 495 std::cerr << "EditableDenseThreeDimensionalModel::toXml" << std::endl; |
489 | 496 |
490 Model::toXml | 497 Model::toXml |
491 (out, indent, | 498 (out, indent, |
492 QString("type=\"dense\" dimensions=\"3\" windowSize=\"%1\" yBinCount=\"%2\" minimum=\"%3\" maximum=\"%4\" dataset=\"%5\" %6") | 499 QString("type=\"dense\" dimensions=\"3\" windowSize=\"%1\" yBinCount=\"%2\" minimum=\"%3\" maximum=\"%4\" dataset=\"%5\" startFrame=\"%6\" %7") |
493 .arg(m_resolution) | 500 .arg(m_resolution) |
494 .arg(m_yBinCount) | 501 .arg(m_yBinCount) |
495 .arg(m_minimum) | 502 .arg(m_minimum) |
496 .arg(m_maximum) | 503 .arg(m_maximum) |
497 .arg(getObjectExportId(&m_data)) | 504 .arg(getObjectExportId(&m_data)) |
505 .arg(m_startFrame) | |
498 .arg(extraAttributes)); | 506 .arg(extraAttributes)); |
499 | 507 |
500 out << indent; | 508 out << indent; |
501 out << QString("<dataset id=\"%1\" dimensions=\"3\" separator=\" \">\n") | 509 out << QString("<dataset id=\"%1\" dimensions=\"3\" separator=\" \">\n") |
502 .arg(getObjectExportId(&m_data)); | 510 .arg(getObjectExportId(&m_data)); |