annotate widgets/LabelCounterInputDialog.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 fee76aa923d8
children 05d614f6e46d
rev   line source
Chris@311 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@311 2
Chris@311 3 /*
Chris@311 4 Sonic Visualiser
Chris@311 5 An audio file viewer and annotation editor.
Chris@311 6 Centre for Digital Music, Queen Mary, University of London.
Chris@311 7 This file copyright 2007 QMUL.
Chris@311 8
Chris@311 9 This program is free software; you can redistribute it and/or
Chris@311 10 modify it under the terms of the GNU General Public License as
Chris@311 11 published by the Free Software Foundation; either version 2 of the
Chris@311 12 License, or (at your option) any later version. See the file
Chris@311 13 COPYING included with this distribution for more information.
Chris@311 14 */
Chris@311 15
Chris@311 16 #ifndef _LABEL_COUNTER_INPUT_DIALOG_H_
Chris@311 17 #define _LABEL_COUNTER_INPUT_DIALOG_H_
Chris@311 18
Chris@311 19 #include <QDialog>
Chris@311 20 #include "data/model/Labeller.h"
Chris@311 21
Chris@311 22 class LabelCounterInputDialog : public QDialog
Chris@311 23 {
Chris@311 24 Q_OBJECT
Chris@311 25
Chris@311 26 public:
Chris@311 27 LabelCounterInputDialog(Labeller *labeller, QWidget *parent);
Chris@311 28 virtual ~LabelCounterInputDialog();
Chris@311 29
Chris@311 30 protected slots:
Chris@311 31 void counterChanged(int);
Chris@311 32 void secondCounterChanged(int);
Chris@311 33 void cancelClicked();
Chris@311 34
Chris@311 35 protected:
Chris@311 36 Labeller *m_labeller;
Chris@311 37 int m_origCounter;
Chris@311 38 int m_origSecondCounter;
Chris@311 39 };
Chris@311 40
Chris@311 41 #endif