diff layer/PaintAssistant.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 dc6457ac4d07
line wrap: on
line diff
--- a/layer/PaintAssistant.cpp	Fri Aug 05 15:05:02 2016 +0100
+++ b/layer/PaintAssistant.cpp	Fri Aug 05 17:48:52 2016 +0100
@@ -18,6 +18,7 @@
 #include "LayerGeometryProvider.h"
 
 #include "base/AudioLevel.h"
+#include "base/Strings.h"
 
 #include <QPaintDevice>
 #include <QPainter>
@@ -81,7 +82,7 @@
             text = QString("%1").arg(meterdbs[i]);
             if (i == n) text = "0dB";
             if (i == 0) {
-                text = "-Inf";
+                text = Strings::minus_infinity;
                 val = 0.0;
             }
             break;
@@ -91,7 +92,7 @@
             text = QString("%1").arg(-(10*n) + i * 10);
             if (i == n) text = "0dB";
             if (i == 0) {
-                text = "-Inf";
+                text = Strings::minus_infinity;
                 val = 0.0;
             }
             break;