Mercurial > hg > svcore
diff data/fileio/MIDIFileReader.h @ 392:183ee2a55fc7
* More work to abstract out interactive components used in the data library,
so that it does not need to depend on QtGui.
author | Chris Cannam |
---|---|
date | Fri, 14 Mar 2008 17:14:21 +0000 |
parents | 73537d900d4b |
children | eb1b517f5eeb |
line wrap: on
line diff
--- a/data/fileio/MIDIFileReader.h Thu Mar 13 14:06:03 2008 +0000 +++ b/data/fileio/MIDIFileReader.h Fri Mar 14 17:14:21 2008 +0000 @@ -35,12 +35,34 @@ typedef unsigned char MIDIByte; +class MIDIFileImportPreferenceAcquirer // welcome to our grand marble foyer +{ +public: + enum TrackPreference { + ImportNothing, + ImportSingleTrack, + MergeAllTracks, + MergeAllNonPercussionTracks + }; + + virtual ~MIDIFileImportPreferenceAcquirer() { } + + virtual TrackPreference getTrackImportPreference + (QStringList trackNames, bool haveSomePercussion, + QString &singleTrack) const = 0; + + virtual void showError(QString error) = 0; +}; + + class MIDIFileReader : public DataFileReader { Q_OBJECT public: - MIDIFileReader(QString path, size_t mainModelSampleRate); + MIDIFileReader(QString path, + MIDIFileImportPreferenceAcquirer *pref, + size_t mainModelSampleRate); virtual ~MIDIFileReader(); virtual bool isOK() const; @@ -104,6 +126,8 @@ size_t m_fileSize; QString m_error; size_t m_mainModelSampleRate; + + MIDIFileImportPreferenceAcquirer *m_acquirer; };