@@ -43,6 +43,7 @@ SpectrogramPlot::SpectrogramPlot(std::shared_ptr<SampleSource<std::complex<float
4343 sampleRate = 0 ;
4444 frequencyScaleEnabled = false ;
4545 sigmfAnnotationsEnabled = true ;
46+ sigmfAnnotationLabels = true ;
4647 sigmfAnnotationColors = true ;
4748
4849 for (int i = 0 ; i < 256 ; i++) {
@@ -201,9 +202,10 @@ void SpectrogramPlot::paintAnnotations(QPainter &painter, QRect &rect, range_t<s
201202 if (sigmfAnnotationColors) {
202203 painter.setPen (a.boxColor );
203204 }
204-
205- // Draw the label 2 pixels above the box
206- painter.drawText (x, y - 2 , a.label );
205+ if (sigmfAnnotationLabels) {
206+ // Draw the label 2 pixels above the box
207+ painter.drawText (x, y - 2 , a.label );
208+ }
207209 painter.drawRect (x, y, width, height);
208210
209211 visibleAnnotationLocations.emplace_back (a, x, y, width, height);
@@ -436,6 +438,11 @@ bool SpectrogramPlot::isAnnotationsEnabled(void)
436438 return sigmfAnnotationsEnabled;
437439}
438440
441+ void SpectrogramPlot::enableAnnoLabels (bool enabled)
442+ {
443+ sigmfAnnotationLabels = enabled;
444+ }
445+
439446void SpectrogramPlot::enableAnnoColors (bool enabled)
440447{
441448 sigmfAnnotationColors = enabled;
0 commit comments