comparison data/model/NoteModel.h @ 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 f14e2f7b24f7 6f6ab834449d
comparison
equal deleted inserted replaced
317:c324d410b096 318:7a4bd2c8585c
56 { 56 {
57 QStringList list; 57 QStringList list;
58 list << RealTime::frame2RealTime(frame, sampleRate).toString().c_str(); 58 list << RealTime::frame2RealTime(frame, sampleRate).toString().c_str();
59 list << QString("%1").arg(value); 59 list << QString("%1").arg(value);
60 list << QString("%1").arg(duration); 60 list << QString("%1").arg(duration);
61 list << label; 61 if (label != "") list << label;
62 return list.join(delimiter); 62 return list.join(delimiter);
63 } 63 }
64 64
65 struct Comparator { 65 struct Comparator {
66 bool operator()(const Note &p1, 66 bool operator()(const Note &p1,
124 124
125 virtual void toXml(QTextStream &out, 125 virtual void toXml(QTextStream &out,
126 QString indent = "", 126 QString indent = "",
127 QString extraAttributes = "") const 127 QString extraAttributes = "") const
128 { 128 {
129 std::cerr << "NoteModel::toXml: extraAttributes = \""
130 << extraAttributes.toStdString() << std::endl;
131
129 SparseValueModel<Note>::toXml 132 SparseValueModel<Note>::toXml
130 (out, 133 (out,
131 indent, 134 indent,
132 QString("%1 valueQuantization=\"%2\"") 135 QString("%1 valueQuantization=\"%2\"")
133 .arg(extraAttributes).arg(m_valueQuantization)); 136 .arg(extraAttributes).arg(m_valueQuantization));