annotate widgets/InteractiveFileFinder.h @ 796:7717751f4407 tonioni

fixed selection by note move to not include the next note on the right
author matthiasm
date Fri, 13 Jun 2014 16:50:17 +0100
parents d0fd7630d32f
children 831188672987
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@760 21 #include <QApplication>
Chris@529 22 #include <QString>
Chris@529 23 #include <QObject>
Chris@529 24
Chris@529 25 class InteractiveFileFinder : public QObject,
Chris@529 26 public FileFinder
Chris@529 27 {
Chris@529 28 Q_OBJECT
Chris@529 29
Chris@529 30 public:
Chris@529 31 virtual ~InteractiveFileFinder();
Chris@529 32
Chris@760 33 /// Specify the extension for this application's session files
Chris@760 34 /// (without the dot)
Chris@760 35 void setApplicationSessionExtension(QString extension);
Chris@760 36
Chris@760 37 QString getApplicationSessionExtension() const {
Chris@760 38 return m_sessionExtension;
Chris@760 39 }
Chris@760 40
Chris@529 41 QString getOpenFileName(FileType type, QString fallbackLocation = "");
Chris@529 42 QString getSaveFileName(FileType type, QString fallbackLocation = "");
Chris@529 43 void registerLastOpenedFilePath(FileType type, QString path);
Chris@529 44
Chris@529 45 QString find(FileType type, QString location, QString lastKnownLocation = "");
Chris@529 46
Chris@529 47 static InteractiveFileFinder *getInstance() { return &m_instance; }
Chris@529 48
Chris@529 49 protected:
Chris@529 50 InteractiveFileFinder();
Chris@529 51 static InteractiveFileFinder m_instance;
Chris@529 52
Chris@529 53 QString findRelative(QString location, QString relativeTo);
Chris@529 54 QString locateInteractive(FileType type, QString thing);
Chris@529 55
Chris@760 56 QString m_sessionExtension;
Chris@529 57 QString m_lastLocatedLocation;
Chris@529 58 };
Chris@529 59
Chris@529 60 #endif
Chris@529 61