diff layer/SpectrumLayer.cpp @ 1147:1badacff7ab2 3.0-integration

Introduce labels in RangeMapper and use them in AudioDial, though only for tooltip at present. Make use of this for spectrogram magic -81dB/-Inf threshold. Also introduce static strings for inf/pi and use where appropriate.
author Chris Cannam
date Fri, 05 Aug 2016 17:48:52 +0100
parents ee01a4062747
children ff97318e993c
line wrap: on
line diff
--- a/layer/SpectrumLayer.cpp	Fri Aug 05 15:05:02 2016 +0100
+++ b/layer/SpectrumLayer.cpp	Fri Aug 05 17:48:52 2016 +0100
@@ -21,6 +21,7 @@
 #include "base/Preferences.h"
 #include "base/RangeMapper.h"
 #include "base/Pitch.h"
+#include "base/Strings.h"
 
 #include "ColourMapper.h"
 #include "PaintAssistant.h"
@@ -607,12 +608,12 @@
     QString mindbstr;
     QString maxdbstr;
     if (mindb == AudioLevel::DB_FLOOR) {
-        mindbstr = tr("-Inf");
+        mindbstr = Strings::minus_infinity;
     } else {
         mindbstr = QString("%1").arg(lrint(mindb));
     }
     if (maxdb == AudioLevel::DB_FLOOR) {
-        maxdbstr = tr("-Inf");
+        maxdbstr = Strings::minus_infinity;
     } else {
         maxdbstr = QString("%1").arg(lrint(maxdb));
     }