comparison layer/SliceLayer.cpp @ 290:3101c68a00c1

* Restore Scale setting which had mistakenly disappeared from spectrum * Some tweaks to spectrum peaks * Make spectrum default to 4096/75%... or is that overdoing it? * Show harmonic cursor even during playback if in measure mode and mouse in relevant pane * Avoid crash when trying to measure a non-layer * Various adjustments to some icons to make them look better in white-on-black schemes
author Chris Cannam
date Fri, 13 Jul 2007 15:54:17 +0000
parents cd2492c5fe45
children c0b9eec70639
comparison
equal deleted inserted replaced
289:4ca7562dd246 290:3101c68a00c1
265 norm = float(y) / float(h); 265 norm = float(y) / float(h);
266 y = yorigin - y; 266 y = yorigin - y;
267 break; 267 break;
268 268
269 default: 269 default:
270 std::cerr << "thresh = " << m_threshold << std::endl; 270 // std::cerr << "thresh = " << m_threshold << std::endl;
271 norm = (fabsf(value) - m_threshold); 271 norm = (fabsf(value) - m_threshold);
272 if (norm < 0) norm = 0; 272 if (norm < 0) norm = 0;
273 y = yorigin - (float(h) * norm); 273 y = yorigin - (float(h) * norm);
274 break; 274 break;
275 } 275 }
563 563
564 QString 564 QString
565 SliceLayer::getPropertyLabel(const PropertyName &name) const 565 SliceLayer::getPropertyLabel(const PropertyName &name) const
566 { 566 {
567 if (name == "Plot Type") return tr("Plot Type"); 567 if (name == "Plot Type") return tr("Plot Type");
568 if (name == "Energy Scale") return tr("Scale"); 568 if (name == "Scale") return tr("Scale");
569 if (name == "Normalize") return tr("Normalize"); 569 if (name == "Normalize") return tr("Normalize");
570 if (name == "Threshold") return tr("Threshold"); 570 if (name == "Threshold") return tr("Threshold");
571 if (name == "Gain") return tr("Gain"); 571 if (name == "Gain") return tr("Gain");
572 if (name == "Sampling Mode") return tr("Sampling Mode"); 572 if (name == "Sampling Mode") return tr("Sampling Mode");
573 if (name == "Bin Scale") return tr("Plot X Scale"); 573 if (name == "Bin Scale") return tr("Plot X Scale");
579 { 579 {
580 if (name == "Gain") return RangeProperty; 580 if (name == "Gain") return RangeProperty;
581 if (name == "Normalize") return ToggleProperty; 581 if (name == "Normalize") return ToggleProperty;
582 if (name == "Threshold") return RangeProperty; 582 if (name == "Threshold") return RangeProperty;
583 if (name == "Plot Type") return ValueProperty; 583 if (name == "Plot Type") return ValueProperty;
584 if (name == "Energy Scale") return ValueProperty; 584 if (name == "Scale") return ValueProperty;
585 if (name == "Sampling Mode") return ValueProperty; 585 if (name == "Sampling Mode") return ValueProperty;
586 if (name == "Bin Scale") return ValueProperty; 586 if (name == "Bin Scale") return ValueProperty;
587 if (name == "Colour" && m_plotStyle == PlotFilledBlocks) return ValueProperty; 587 if (name == "Colour" && m_plotStyle == PlotFilledBlocks) return ValueProperty;
588 return SingleColourLayer::getPropertyType(name); 588 return SingleColourLayer::getPropertyType(name);
589 } 589 }