# HG changeset patch # User Chris Cannam # Date 1154084976 0 # Node ID f90fad823cea2a44628c8b45956adce91d8bbf6b # Parent 82f529a08cf344c3ddab737160f66d4f69b5d939 * Add Recent Files menu * (Untested attempt to) avoid hang when exporting sparse models to XML diff -r 82f529a08cf3 -r f90fad823cea base/Model.cpp --- a/base/Model.cpp Thu Jul 27 16:06:32 2006 +0000 +++ b/base/Model.cpp Fri Jul 28 11:09:36 2006 +0000 @@ -16,6 +16,8 @@ #include "Model.h" #include "PlayParameterRepository.h" +#include + #include const int Model::COMPLETION_UNKNOWN = -1; @@ -31,6 +33,20 @@ PlayParameterRepository::getInstance()->removeModel(this); } +void +Model::toXml(QTextStream &stream, QString indent, + QString extraAttributes) const +{ + stream << indent; + stream << QString("\n") + .arg(getObjectExportId(this)) + .arg(encodeEntities(objectName())) + .arg(getSampleRate()) + .arg(getStartFrame()) + .arg(getEndFrame()) + .arg(extraAttributes); +} + QString Model::toXmlString(QString indent, QString extraAttributes) const { diff -r 82f529a08cf3 -r f90fad823cea base/Model.h --- a/base/Model.h Thu Jul 27 16:06:32 2006 +0000 +++ b/base/Model.h Fri Jul 28 11:09:36 2006 +0000 @@ -93,6 +93,10 @@ } static const int COMPLETION_UNKNOWN; + virtual void toXml(QTextStream &stream, + QString indent = "", + QString extraAttributes = "") const; + virtual QString toXmlString(QString indent = "", QString extraAttributes = "") const; diff -r 82f529a08cf3 -r f90fad823cea base/View.cpp --- a/base/View.cpp Thu Jul 27 16:06:32 2006 +0000 +++ b/base/View.cpp Fri Jul 28 11:09:36 2006 +0000 @@ -678,7 +678,7 @@ checkProgress(obj); update(); -//!! update(x0, 0, x1 - x0 + 1, height()); +//!!! update(x0, 0, x1 - x0 + 1, height()); } void