Mercurial > hg > svgui
changeset 1115:ee8e73dc5c8b spectrogram-minor-refactor
Re-enable a couple more features
author | Chris Cannam |
---|---|
date | Tue, 19 Jul 2016 15:02:44 +0100 |
parents | a42e5a3c63ef |
children | e7a07cd63d21 |
files | layer/Colour3DPlotRenderer.cpp layer/SpectrogramLayer.cpp |
diffstat | 2 files changed, 18 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/layer/Colour3DPlotRenderer.cpp Tue Jul 19 14:50:39 2016 +0100 +++ b/layer/Colour3DPlotRenderer.cpp Tue Jul 19 15:02:44 2016 +0100 @@ -265,9 +265,9 @@ QPainter &paint, QRect rect) { -//!!! QPoint illuminatePos; -// bool illuminate = v->shouldIlluminateLocalFeatures -// (m_sources.verticalBinLayer, illuminatePos); + QPoint illuminatePos; + bool illuminate = v->shouldIlluminateLocalFeatures + (m_sources.verticalBinLayer, illuminatePos); const DenseThreeDimensionalModel *model = m_sources.source; @@ -294,7 +294,7 @@ const int buflen = 40; char labelbuf[buflen]; - int minbin = 0; + int minbin = 0; //!!! int maxbin = sh - 1; //!!! int psx = -1; @@ -337,15 +337,13 @@ // overallMagChanged); // if (m_colourScale != ColourScaleType::Phase) { - column = ColumnOp::normalize(column, m_params.normalization); + preparedColumn = ColumnOp::normalize(column, m_params.normalization); // } if (m_params.binDisplay == BinDisplay::PeakBins) { - column = ColumnOp::peakPick(column); + preparedColumn = ColumnOp::peakPick(preparedColumn); } - preparedColumn = column; //!!! unnecessary dup - psx = sx; } @@ -390,11 +388,11 @@ paint.setPen(Qt::NoPen); paint.setBrush(brush); -//!!! if (illuminate) { -// if (r.contains(illuminatePos)) { -// paint.setPen(v->getForeground()); -// } -// } + if (illuminate) { + if (r.contains(illuminatePos)) { + paint.setPen(v->getForeground()); + } + } #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT // cerr << "rect " << r.x() << "," << r.y() << " "
--- a/layer/SpectrogramLayer.cpp Tue Jul 19 14:50:39 2016 +0100 +++ b/layer/SpectrogramLayer.cpp Tue Jul 19 15:02:44 2016 +0100 @@ -1090,7 +1090,12 @@ double SpectrogramLayer::getYForBin(const LayerGeometryProvider *, double) const { - //!!! not implemented + //!!! not implemented -- needed for non-opaque render + + //!!! this will crash, as it stands, when a spectrogram without + //!!! smoothing is zoomed in + + //!!! overlap with range methods throw std::logic_error("not implemented"); } @@ -1479,7 +1484,7 @@ params.normalization = m_normalization; params.binDisplay = m_binDisplay; params.binScale = m_binScale; - params.alwaysOpaque = true; + params.alwaysOpaque = false; params.invertVertical = false; params.colourRotation = m_colourRotation;