Mercurial > hg > svgui
diff layer/SpectrumLayer.cpp @ 456:035d62c4cddf
* Permit viewing (though not editing) colour 3d plot layer data in
the spreadsheet data viewer dialog
* Add somewhat simplistic RDF export for layers
* Fix display of peak frequencies in spectrum layer
* Fix (I hope) sizing of plugin parameter dialog
author | Chris Cannam |
---|---|
date | Tue, 02 Dec 2008 17:17:25 +0000 |
parents | e1a9e478b7f2 |
children | bd4db63b085e |
line wrap: on
line diff
--- a/layer/SpectrumLayer.cpp Mon Dec 01 16:45:17 2008 +0000 +++ b/layer/SpectrumLayer.cpp Tue Dec 02 17:17:25 2008 +0000 @@ -682,6 +682,8 @@ // draw peak lines +// std::cerr << "Showing peaks..." << std::endl; + size_t col = v->getCentreFrame() / fft->getResolution(); paint.save(); @@ -832,9 +834,11 @@ QString indent, QString extraAttributes) const { QString s = QString("windowSize=\"%1\" " - "windowHopLevel=\"%2\"") + "windowHopLevel=\"%2\" " + "showPeaks=\"%3\" ") .arg(m_windowSize) - .arg(m_windowHopLevel); + .arg(m_windowHopLevel) + .arg(m_showPeaks ? "true" : "false"); SliceLayer::toXml(stream, indent, extraAttributes + " " + s); } @@ -851,6 +855,9 @@ size_t windowHopLevel = attributes.value("windowHopLevel").toUInt(&ok); if (ok) setWindowHopLevel(windowHopLevel); + + bool showPeaks = (attributes.value("showPeaks").trimmed() == "true"); + setShowPeaks(showPeaks); }