Chris@3: /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */ Chris@3: Chris@3: /* Chris@3: A waveform viewer and audio annotation editor. Chris@3: Chris Cannam, Queen Mary University of London, 2005-2006 Chris@3: Chris@3: This is experimental software. Not for distribution. Chris@3: */ Chris@0: Chris@0: #include "Model.h" Chris@30: #include "PlayParameterRepository.h" Chris@0: Chris@43: #include Chris@43: Chris@0: const int Model::COMPLETION_UNKNOWN = -1; Chris@0: Chris@30: Model::~Model() Chris@30: { Chris@43: std::cerr << "Model::~Model(" << this << ")" << std::endl; Chris@43: Chris@30: // Subclasses have to handle adding themselves to the repository, Chris@30: // if they want to be played. We can't do it from here because Chris@30: // the repository would be unable to tell whether we were playable Chris@30: // or not (because dynamic_cast won't work from the base class ctor) Chris@30: PlayParameterRepository::instance()->removeModel(this); Chris@30: } Chris@30: Chris@3: QString Chris@3: Model::toXmlString(QString indent, QString extraAttributes) const Chris@3: { Chris@3: QString s; Chris@3: Chris@3: s += indent; Chris@3: Chris@4: s += QString("\n") Chris@4: .arg(getObjectExportId(this)) Chris@3: .arg(objectName()) Chris@4: .arg(getSampleRate()) Chris@4: .arg(getStartFrame()) Chris@4: .arg(getEndFrame()) Chris@3: .arg(extraAttributes); Chris@3: Chris@3: return s; Chris@3: } Chris@3: Chris@0: #ifdef INCLUDE_MOCFILES Chris@0: #ifdef INCLUDE_MOCFILES Chris@0: #include "Model.moc.cpp" Chris@0: #endif Chris@0: #endif Chris@0: