annotate widgets/InteractiveFileFinder.h @ 1127:9fb8dfd7ce4c
spectrogram-minor-refactor
Fix threshold in spectrogram -- it wasn't working in the last release.
There is a new protocol for this. Formerly the threshold parameter had a
range from -50dB to 0 with the default at -50, and -50 treated internally
as "no threshold". However, there was a hardcoded, hidden internal threshold
for spectrogram colour mapping at -80dB with anything below this being rounded
to zero. Now the threshold parameter has range -81 to -1 with the default
at -80, -81 is treated internally as "no threshold", and there is no hidden
internal threshold. So the default behaviour is the same as before, an
effective -80dB threshold, but it is now possible to change this in both
directions. Sessions reloaded from prior versions may look slightly different
because, if the session says there should be no threshold, there will now
actually be no threshold instead of having the hidden internal one.
Still need to do something in the UI to make it apparent that the -81dB
setting removes the threshold entirely. This is at least no worse than the
previous, also obscured, magic -50dB setting.
author |
Chris Cannam |
date |
Mon, 01 Aug 2016 16:21:01 +0100 |
parents |
831188672987 |
children |
a18e78b9c78b |
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@831
|
47 static void setParentWidget(QWidget *);
|
Chris@831
|
48
|
Chris@529
|
49 static InteractiveFileFinder *getInstance() { return &m_instance; }
|
Chris@529
|
50
|
Chris@529
|
51 protected:
|
Chris@529
|
52 InteractiveFileFinder();
|
Chris@529
|
53 static InteractiveFileFinder m_instance;
|
Chris@529
|
54
|
Chris@529
|
55 QString findRelative(QString location, QString relativeTo);
|
Chris@529
|
56 QString locateInteractive(FileType type, QString thing);
|
Chris@529
|
57
|
Chris@760
|
58 QString m_sessionExtension;
|
Chris@529
|
59 QString m_lastLocatedLocation;
|
Chris@831
|
60
|
Chris@831
|
61 QWidget *m_parent;
|
Chris@529
|
62 };
|
Chris@529
|
63
|
Chris@529
|
64 #endif
|
Chris@529
|
65
|