annotate widgets/InteractiveFileFinder.h @ 690:8072264dc61f

Pull out PianoScale into separate class
author Chris Cannam
date Tue, 03 Dec 2013 17:32:25 +0000
parents 3228b7913aa4
children d0fd7630d32f
rev   line source
Chris@529 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@529 2
Chris@529 3 /*
Chris@529 4 Sonic Visualiser
Chris@529 5 An audio file viewer and annotation editor.
Chris@529 6 Centre for Digital Music, Queen Mary, University of London.
Chris@529 7 This file copyright 2007 QMUL.
Chris@529 8
Chris@529 9 This program is free software; you can redistribute it and/or
Chris@529 10 modify it under the terms of the GNU General Public License as
Chris@529 11 published by the Free Software Foundation; either version 2 of the
Chris@529 12 License, or (at your option) any later version. See the file
Chris@529 13 COPYING included with this distribution for more information.
Chris@529 14 */
Chris@529 15
Chris@529 16 #ifndef _INTERACTIVE_FILE_FINDER_H_
Chris@529 17 #define _INTERACTIVE_FILE_FINDER_H_
Chris@529 18
Chris@529 19 #include "data/fileio/FileFinder.h"
Chris@529 20
Chris@529 21 #include <QString>
Chris@529 22 #include <QObject>
Chris@529 23
Chris@529 24 class InteractiveFileFinder : public QObject,
Chris@529 25 public FileFinder
Chris@529 26 {
Chris@529 27 Q_OBJECT
Chris@529 28
Chris@529 29 public:
Chris@529 30 virtual ~InteractiveFileFinder();
Chris@529 31
Chris@529 32 QString getOpenFileName(FileType type, QString fallbackLocation = "");
Chris@529 33 QString getSaveFileName(FileType type, QString fallbackLocation = "");
Chris@529 34 void registerLastOpenedFilePath(FileType type, QString path);
Chris@529 35
Chris@529 36 QString find(FileType type, QString location, QString lastKnownLocation = "");
Chris@529 37
Chris@529 38 static InteractiveFileFinder *getInstance() { return &m_instance; }
Chris@529 39
Chris@529 40 protected:
Chris@529 41 InteractiveFileFinder();
Chris@529 42 static InteractiveFileFinder m_instance;
Chris@529 43
Chris@529 44 QString findRelative(QString location, QString relativeTo);
Chris@529 45 QString locateInteractive(FileType type, QString thing);
Chris@529 46
Chris@529 47 QString m_lastLocatedLocation;
Chris@529 48 };
Chris@529 49
Chris@529 50 #endif
Chris@529 51