comparison data/model/FFTModel.h @ 212:fb8ddd00f440

* 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 f75f8a1cd7b1
children 21b9b25bff48
comparison
equal deleted inserted replaced
211:e2bbb58e6df6 212:fb8ddd00f440
57 // 57 //
58 virtual size_t getWidth() const { 58 virtual size_t getWidth() const {
59 return m_server->getWidth() >> m_xshift; 59 return m_server->getWidth() >> m_xshift;
60 } 60 }
61 virtual size_t getHeight() const { 61 virtual size_t getHeight() const {
62 return m_server->getHeight() >> m_yshift; 62 // If there is no y-shift, the server's height (based on its
63 // fftsize/2 + 1) is correct. If there is a shift, then the
64 // server is using a larger fft size than we want, so we shift
65 // it right as many times as necessary, but then we need to
66 // re-add the "+1" part (because ((fftsize*2)/2 + 1) / 2 !=
67 // fftsize/2 + 1).
68 return (m_server->getHeight() >> m_yshift) + (m_yshift > 0 ? 1 : 0);
63 } 69 }
64 virtual float getValueAt(size_t x, size_t y) const { 70 virtual float getValueAt(size_t x, size_t y) const {
65 return const_cast<FFTModel *>(this)->getMagnitudeAt(x, y); 71 return const_cast<FFTModel *>(this)->getMagnitudeAt(x, y);
66 } 72 }
67 virtual bool isOK() const { 73 virtual bool isOK() const {