annotate data/fileio/FileFinder.h @ 618:b1dc68507e46
sv-v1.7.1
* Layer data editor window: fix sorting for columns in region model,
add Find feature
* RDF import: assign names to layers based on event types, if no suitable
labels are found in the RDF
* Add label to status bar showing the last text that was passed in current
layer (so e.g. counting 1, 2, 3, 4 if that's what beats are labelled)
* Better layout of text labels for region layers in segmentation mode when
they are close together
* Give text layer the same method for finding "nearest point" as region and
note layers, should improve its editability
author |
Chris Cannam |
date |
Thu, 22 Oct 2009 15:54:21 +0000 |
parents |
442e2ff876aa |
children |
43b0bfd07bd3 |
rev |
line source |
Chris@582
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@582
|
2
|
Chris@582
|
3 /*
|
Chris@582
|
4 Sonic Visualiser
|
Chris@582
|
5 An audio file viewer and annotation editor.
|
Chris@582
|
6 Centre for Digital Music, Queen Mary, University of London.
|
Chris@582
|
7 This file copyright 2009 QMUL.
|
Chris@582
|
8
|
Chris@582
|
9 This program is free software; you can redistribute it and/or
|
Chris@582
|
10 modify it under the terms of the GNU General Public License as
|
Chris@582
|
11 published by the Free Software Foundation; either version 2 of the
|
Chris@582
|
12 License, or (at your option) any later version. See the file
|
Chris@582
|
13 COPYING included with this distribution for more information.
|
Chris@582
|
14 */
|
Chris@582
|
15
|
Chris@582
|
16 #ifndef _FILE_FINDER_H_
|
Chris@582
|
17 #define _FILE_FINDER_H_
|
Chris@582
|
18
|
Chris@582
|
19 #include <QString>
|
Chris@582
|
20
|
Chris@582
|
21 class FileFinder
|
Chris@582
|
22 {
|
Chris@582
|
23 public:
|
Chris@582
|
24 enum FileType {
|
Chris@582
|
25 SessionFile,
|
Chris@582
|
26 AudioFile,
|
Chris@582
|
27 LayerFile,
|
Chris@582
|
28 LayerFileNoMidi,
|
Chris@582
|
29 SessionOrAudioFile,
|
Chris@582
|
30 ImageFile,
|
Chris@582
|
31 AnyFile
|
Chris@582
|
32 };
|
Chris@582
|
33
|
Chris@582
|
34 virtual QString getOpenFileName(FileType type, QString fallbackLocation = "") = 0;
|
Chris@582
|
35 virtual QString getSaveFileName(FileType type, QString fallbackLocation = "") = 0;
|
Chris@582
|
36 virtual void registerLastOpenedFilePath(FileType type, QString path) = 0;
|
Chris@582
|
37
|
Chris@582
|
38 virtual QString find(FileType type, QString location, QString lastKnownLocation = "") = 0;
|
Chris@582
|
39
|
Chris@582
|
40 static FileFinder *getInstance() { return m_instance; }
|
Chris@582
|
41
|
Chris@582
|
42 protected:
|
Chris@582
|
43 static void registerFileFinder(FileFinder *ff) { m_instance = ff; }
|
Chris@582
|
44 static FileFinder *m_instance;
|
Chris@582
|
45 };
|
Chris@582
|
46
|
Chris@582
|
47 #endif
|
Chris@582
|
48
|
Chris@582
|
49
|