diff layer/SliceLayer.cpp @ 280:3c402c6052f6

* Pull peak-picker out of SpectrumLayer and into FFTModel; use combined peak-picker and frequency estimator for SpectrogramLayer (makes the peak frequency spectrogram a bit quicker) * Add more information to spectrum and spectrogram crosshairs
author Chris Cannam
date Wed, 04 Jul 2007 15:29:16 +0000
parents b9380f679f70
children 1284955856ab
line wrap: on
line diff
--- a/layer/SliceLayer.cpp	Tue Jul 03 18:56:27 2007 +0000
+++ b/layer/SliceLayer.cpp	Wed Jul 04 15:29:16 2007 +0000
@@ -133,6 +133,8 @@
     
     range = f1 - f0 + 1;
 
+    QString rtrangestr = QString("%1 s").arg((rt1 - rt0).toText().c_str());
+
     if (includeBinDescription) {
 
         float minvalue = 0.f;
@@ -157,10 +159,11 @@
             valuestr = QString("%1").arg(minvalue);
         }
 
-        QString description = tr("Time:\t%1 - %2\nRange:\t%3 samples\nBin:\t%4\n%5 value:\t%6")
+        QString description = tr("Time:\t%1 - %2\nRange:\t%3 samples (%4)\nBin:\t%5\n%6 value:\t%7")
             .arg(QString::fromStdString(rt0.toText(true)))
             .arg(QString::fromStdString(rt1.toText(true)))
             .arg(range)
+            .arg(rtrangestr)
             .arg(binstr)
             .arg(m_samplingMode == NearestSample ? tr("First") :
                  m_samplingMode == SampleMean ? tr("Mean") : tr("Peak"))
@@ -170,10 +173,11 @@
     
     } else {
 
-        QString description = tr("Time:\t%1 - %2\nRange:\t%3 samples")
+        QString description = tr("Time:\t%1 - %2\nRange:\t%3 samples (%4)")
             .arg(QString::fromStdString(rt0.toText(true)))
             .arg(QString::fromStdString(rt1.toText(true)))
-            .arg(range);
+            .arg(range)
+            .arg(rtrangestr);
         
         return description;
     }