Mercurial > hg > svgui
diff view/Pane.cpp @ 187:e7cf6044c2a0
* better icon
* support range mappers in thumbwheel
* supply range mapper for vertical zoom from spectrogram
* fix bug in fftmodel for scaled ffts
* make the various widgets all respond to double-click for edit, middle-click
for reset, ctrl-left-click for reset
author | Chris Cannam |
---|---|
date | Fri, 12 Jan 2007 14:49:18 +0000 |
parents | 42118892f428 |
children | dd573e090eed |
line wrap: on
line diff
--- a/view/Pane.cpp Fri Jan 05 15:49:10 2007 +0000 +++ b/view/Pane.cpp Fri Jan 12 14:49:18 2007 +0000 @@ -58,6 +58,8 @@ void Pane::updateHeadsUpDisplay() { + Profiler profiler("Pane::updateHeadsUpDisplay", true); + /* int count = 0; int currentLevel = 1; @@ -85,6 +87,7 @@ m_headsUpDisplay->setLayout(layout); m_hthumb = new Thumbwheel(Qt::Horizontal); + m_hthumb->setObjectName(tr("Horizontal Zoom")); layout->addWidget(m_hthumb, 1, 0, 1, 2); m_hthumb->setFixedWidth(70); m_hthumb->setFixedHeight(16); @@ -102,6 +105,7 @@ this, SLOT(verticalPannerMoved(float, float, float, float))); m_vthumb = new Thumbwheel(Qt::Vertical); + m_vthumb->setObjectName(tr("Vertical Zoom")); layout->addWidget(m_vthumb, 0, 2); m_vthumb->setFixedWidth(16); m_vthumb->setFixedHeight(70); @@ -184,10 +188,12 @@ m_vthumb->hide(); } else { m_vthumb->show(); + m_vthumb->blockSignals(true); m_vthumb->setMinimumValue(0); m_vthumb->setMaximumValue(max); m_vthumb->setDefaultValue(defaultStep); m_vthumb->setValue(layer->getCurrentVerticalZoomStep()); + m_vthumb->blockSignals(false); std::cerr << "Vertical thumbwheel: min 0, max " << max << ", default " << defaultStep << ", value " @@ -1548,6 +1554,12 @@ View::propertyContainerSelected(v, pc); updateHeadsUpDisplay(); + if (m_vthumb) { + RangeMapper *rm = 0; + if (layer) rm = layer->getNewVerticalZoomRangeMapper(); + if (rm) m_vthumb->setRangeMapper(rm); + } + if (getLayerCount() > 0) { layer = getLayer(getLayerCount() - 1); connect(layer, SIGNAL(verticalZoomChanged()),