16 #ifndef SV_FILE_READER_H 17 #define SV_FILE_READER_H 19 #include "layer/LayerFactory.h" 20 #include "transform/Transform.h" 22 #include <QXmlDefaultHandler> 38 virtual void addSelection(sv_frame_t start, sv_frame_t end) = 0;
173 QString location =
"");
176 void parse(
const QString &xmlData);
177 void parse(QXmlInputSource &source);
185 bool startElement(
const QString &namespaceURI,
186 const QString &localName,
187 const QString &qName,
188 const QXmlAttributes& atts)
override;
190 bool characters(
const QString &)
override;
192 bool endElement(
const QString &namespaceURI,
193 const QString &localName,
194 const QString &qName)
override;
196 bool error(
const QXmlParseException &exception)
override;
197 bool fatalError(
const QXmlParseException &exception)
override;
206 static FileType identifyXmlFile(QString path);
209 void modelRegenerationFailed(QString layerName, QString transformName,
211 void modelRegenerationWarning(QString layerName, QString transformName,
215 bool readWindow(
const QXmlAttributes &);
216 bool readModel(
const QXmlAttributes &);
217 bool readView(
const QXmlAttributes &);
218 bool readLayer(
const QXmlAttributes &);
219 bool readDatasetStart(
const QXmlAttributes &);
220 bool addBinToDataset(
const QXmlAttributes &);
221 bool addPointToDataset(
const QXmlAttributes &);
222 bool addRowToDataset(
const QXmlAttributes &);
223 bool readRowData(
const QString &);
224 bool readDerivation(
const QXmlAttributes &);
225 bool readPlayParameters(
const QXmlAttributes &);
226 bool readPlugin(
const QXmlAttributes &);
227 bool readPluginForTransform(
const QXmlAttributes &);
228 bool readPluginForPlayback(
const QXmlAttributes &);
229 bool readTransform(
const QXmlAttributes &);
230 bool readParameter(
const QXmlAttributes &);
231 bool readSelection(
const QXmlAttributes &);
232 bool readMeasurement(
const QXmlAttributes &);
234 void makeAggregateModels();
235 void addUnaddedModels();
250 return (m_models.find(
id) != m_models.end()) && !m_models[
id].isNone();
void setCurrentPane(Pane *pane)
virtual void addSelection(sv_frame_t start, sv_frame_t end)=0
Transform m_currentTransform
std::map< ExportId, PendingAggregateRec > m_pendingAggregates
bool haveModel(ExportId id)
SVFileReaderPaneCallback & m_paneCallback
XmlExportable::ExportId ExportId
ModelId m_currentDerivedModel
std::map< ExportId, ExportId > m_awaitingDatasets
sv_samplerate_t sampleRate
ModelId m_currentTransformSource
ExportId m_pendingDerivedModel
QString m_datasetSeparator
SVFileReader loads Sonic Visualiser XML files.
virtual void setWindowSize(int width, int height)=0
std::map< ExportId, Layer * > m_layers
virtual Pane * addPane()=0
QString getErrorString() const
bool m_currentTransformIsNewStyle
ExportId m_currentDataset
A Sonic Visualiser document consists of a set of data models, and also the visualisation layers used ...
std::set< ModelId > m_addedModels
std::shared_ptr< PlayParameters > m_currentPlayParameters
std::vector< ExportId > components
std::map< ExportId, Path * > m_paths
int m_currentTransformChannel
virtual ~SVFileReaderPaneCallback()
std::map< ExportId, ModelId > m_models