Mercurial > hg > svcore
annotate rdf/RDFImporter.h @ 494:81963c51b488
* Add ability to export a transform structure as RDF -- for use
when exporting data from runner, so as to refer back to the generating
transform from the audio features rdf
* some improvements to pane & layer management when importing rdf, but
it's all still a big hack here
author | Chris Cannam |
---|---|
date | Tue, 25 Nov 2008 17:46:02 +0000 |
parents | c3fb8258e34d |
children | b71116d3c180 |
rev | line source |
---|---|
Chris@439 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@439 | 2 |
Chris@439 | 3 /* |
Chris@439 | 4 Sonic Visualiser |
Chris@439 | 5 An audio file viewer and annotation editor. |
Chris@439 | 6 Centre for Digital Music, Queen Mary, University of London. |
Chris@439 | 7 This file copyright 2008 QMUL. |
Chris@439 | 8 |
Chris@439 | 9 This program is free software; you can redistribute it and/or |
Chris@439 | 10 modify it under the terms of the GNU General Public License as |
Chris@439 | 11 published by the Free Software Foundation; either version 2 of the |
Chris@439 | 12 License, or (at your option) any later version. See the file |
Chris@439 | 13 COPYING included with this distribution for more information. |
Chris@439 | 14 */ |
Chris@439 | 15 |
Chris@439 | 16 #ifndef _RDF_IMPORTER_H_ |
Chris@439 | 17 #define _RDF_IMPORTER_H_ |
Chris@439 | 18 |
Chris@439 | 19 #include <QObject> |
Chris@439 | 20 #include <QString> |
Chris@439 | 21 |
Chris@439 | 22 #include <vector> |
Chris@439 | 23 |
Chris@439 | 24 class Model; |
Chris@439 | 25 class RDFImporterImpl; |
Chris@439 | 26 class ProgressReporter; |
Chris@439 | 27 |
Chris@439 | 28 class RDFImporter : public QObject |
Chris@439 | 29 { |
Chris@439 | 30 Q_OBJECT |
Chris@439 | 31 |
Chris@439 | 32 public: |
Chris@439 | 33 /** |
Chris@439 | 34 * Return the file extensions that we have data file readers for, |
Chris@439 | 35 * in a format suitable for use with QFileDialog. For example, |
Chris@439 | 36 * "*.rdf *.n3". |
Chris@439 | 37 */ |
Chris@439 | 38 static QString getKnownExtensions(); |
Chris@439 | 39 |
Chris@490 | 40 RDFImporter(QString url, int sampleRate = 0); |
Chris@439 | 41 virtual ~RDFImporter(); |
Chris@439 | 42 |
Chris@490 | 43 void setSampleRate(int sampleRate); |
Chris@490 | 44 |
Chris@439 | 45 bool isOK(); |
Chris@439 | 46 QString getErrorString() const; |
Chris@439 | 47 |
Chris@490 | 48 QString getAudioAvailableUrl() const; |
Chris@490 | 49 |
Chris@439 | 50 std::vector<Model *> getDataModels(ProgressReporter *reporter); |
Chris@439 | 51 |
Chris@490 | 52 enum RDFDocumentType { |
Chris@490 | 53 AudioRefAndAnnotations, |
Chris@490 | 54 Annotations, |
Chris@490 | 55 AudioRef, |
Chris@490 | 56 OtherDocument |
Chris@490 | 57 }; |
Chris@490 | 58 |
Chris@490 | 59 static RDFDocumentType identifyDocumentType(QString url); |
Chris@490 | 60 |
Chris@439 | 61 protected: |
Chris@439 | 62 RDFImporterImpl *m_d; |
Chris@439 | 63 }; |
Chris@439 | 64 |
Chris@439 | 65 #endif |