comparison data/model/SparseModel.h @ 407:88ad01799040

* Save alignments to session file. Needs much testing.
author Chris Cannam
date Tue, 29 Apr 2008 15:34:17 +0000
parents a1b6d2e33cab
children a00902d5f0ab
comparison
equal deleted inserted replaced
406:d095214ffbaf 407:88ad01799040
131 131
132 virtual bool hasTextLabels() const { return m_hasTextLabels; } 132 virtual bool hasTextLabels() const { return m_hasTextLabels; }
133 133
134 QString getTypeName() const { return tr("Sparse"); } 134 QString getTypeName() const { return tr("Sparse"); }
135 135
136 virtual QString getXmlOutputType() const { return "sparse"; }
137
136 virtual void toXml(QTextStream &out, 138 virtual void toXml(QTextStream &out,
137 QString indent = "", 139 QString indent = "",
138 QString extraAttributes = "") const; 140 QString extraAttributes = "") const;
139 141
140 virtual QString toDelimitedDataString(QString delimiter) const 142 virtual QString toDelimitedDataString(QString delimiter) const
552 QString extraAttributes) const 554 QString extraAttributes) const
553 { 555 {
554 std::cerr << "SparseModel::toXml: extraAttributes = \"" 556 std::cerr << "SparseModel::toXml: extraAttributes = \""
555 << extraAttributes.toStdString() << std::endl; 557 << extraAttributes.toStdString() << std::endl;
556 558
559 QString type = getXmlOutputType();
560
557 Model::toXml 561 Model::toXml
558 (out, 562 (out,
559 indent, 563 indent,
560 QString("type=\"sparse\" dimensions=\"%1\" resolution=\"%2\" notifyOnAdd=\"%3\" dataset=\"%4\" %5") 564 QString("type=\"%1\" dimensions=\"%2\" resolution=\"%3\" notifyOnAdd=\"%4\" dataset=\"%5\" %6")
565 .arg(type)
561 .arg(PointType(0).getDimensions()) 566 .arg(PointType(0).getDimensions())
562 .arg(m_resolution) 567 .arg(m_resolution)
563 .arg(m_notifyOnAdd ? "true" : "false") 568 .arg(m_notifyOnAdd ? "true" : "false")
564 .arg(getObjectExportId(&m_points)) 569 .arg(getObjectExportId(&m_points))
565 .arg(extraAttributes)); 570 .arg(extraAttributes));