annotate data/fileio/FileFinder.h @ 224:8ff1ad4e7a9c

* Work on harmonising colour and scale ranges between types of layer * Add normalize options to colour 3d plot layer
author Chris Cannam
date Thu, 01 Feb 2007 14:31:28 +0000
parents e2bbb58e6df6
children 40db5491bcf8
rev   line source
Chris@210 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@210 2
Chris@210 3 /*
Chris@210 4 Sonic Visualiser
Chris@210 5 An audio file viewer and annotation editor.
Chris@210 6 Centre for Digital Music, Queen Mary, University of London.
Chris@210 7 This file copyright 2007 QMUL.
Chris@210 8
Chris@210 9 This program is free software; you can redistribute it and/or
Chris@210 10 modify it under the terms of the GNU General Public License as
Chris@210 11 published by the Free Software Foundation; either version 2 of the
Chris@210 12 License, or (at your option) any later version. See the file
Chris@210 13 COPYING included with this distribution for more information.
Chris@210 14 */
Chris@210 15
Chris@210 16 #ifndef _FILE_FINDER_H_
Chris@210 17 #define _FILE_FINDER_H_
Chris@210 18
Chris@210 19 #include <QString>
Chris@211 20 #include <QObject>
Chris@210 21
Chris@211 22 class FileFinder : public QObject
Chris@210 23 {
Chris@211 24 Q_OBJECT
Chris@211 25
Chris@210 26 public:
Chris@210 27 virtual ~FileFinder();
Chris@210 28
Chris@211 29 enum FileType {
Chris@211 30 SessionFile,
Chris@211 31 AudioFile,
Chris@211 32 LayerFile,
Chris@211 33 SessionOrAudioFile,
Chris@211 34 AnyFile
Chris@211 35 };
Chris@211 36
Chris@211 37 QString getOpenFileName(FileType type, QString fallbackLocation = "");
Chris@211 38 QString getSaveFileName(FileType type, QString fallbackLocation = "");
Chris@211 39 void registerLastOpenedFilePath(FileType type, QString path);
Chris@211 40
Chris@211 41 QString find(FileType type, QString location, QString lastKnownLocation = "");
Chris@211 42
Chris@211 43 static FileFinder *getInstance();
Chris@210 44
Chris@210 45 protected:
Chris@211 46 FileFinder();
Chris@211 47 static FileFinder *m_instance;
Chris@211 48
Chris@211 49 QString findRelative(QString location, QString relativeTo);
Chris@211 50 QString locateInteractive(FileType type, QString thing);
Chris@211 51
Chris@210 52 QString m_lastLocatedLocation;
Chris@210 53 };
Chris@210 54
Chris@210 55 #endif
Chris@210 56