Mercurial > hg > svcore
changeset 22:a1a6acb7cd37
* Some fixes to waveform layer greyscaling
* Tidying in panner class
author | Chris Cannam |
---|---|
date | Fri, 03 Feb 2006 17:30:47 +0000 |
parents | 5da86cc182bd |
children | 6ace4286ba06 |
files | base/View.cpp base/View.h |
diffstat | 2 files changed, 8 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/base/View.cpp Thu Feb 02 17:31:08 2006 +0000 +++ b/base/View.cpp Fri Feb 03 17:30:47 2006 +0000 @@ -32,7 +32,6 @@ QFrame(w), m_centreFrame(0), m_zoomLevel(1024), - m_newModel(true), m_followPan(true), m_followZoom(true), m_followPlay(PlaybackScrollPage), @@ -246,6 +245,12 @@ return (long(x) * long(m_zoomLevel)) + getStartFrame(); } +int +View::getZoomLevel() const +{ + return m_zoomLevel; +} + void View::setZoomLevel(size_t z) { @@ -291,7 +296,6 @@ connect(layer, SIGNAL(modelReplaced()), this, SLOT(modelReplaced())); - m_newModel = true; update(); emit propertyContainerAdded(layer); @@ -460,7 +464,6 @@ delete m_cache; m_cache = 0; - m_newModel = true; update(); } @@ -845,19 +848,6 @@ } } } -/*!!! -void -View::identifyLocalFeatures(bool on, int x, int y) -{ - for (LayerList::const_iterator i = m_layers.end(); i != m_layers.begin(); ) { - --i; -#ifdef DEBUG_VIEW_WIDGET_PAINT - std::cerr << "View::identifyLocalFeatures: calling on " << *i << std::endl; -#endif - if ((*i)->identifyLocalFeatures(on, x, y)) break; - } -} -*/ void View::paintEvent(QPaintEvent *e) @@ -870,10 +860,6 @@ return; } - if (m_newModel) { - m_newModel = false; - } - // ensure our constraints are met m_zoomLevel = getZoomConstraintBlockSize(m_zoomLevel, ZoomConstraint::RoundUp);
--- a/base/View.h Thu Feb 02 17:31:08 2006 +0000 +++ b/base/View.h Fri Feb 03 17:30:47 2006 +0000 @@ -96,9 +96,9 @@ long getFrameForX(int x) const; /** - * Return the zoom level, i.e. the number of frames per pixel. + * Return the zoom level, i.e. the number of frames per pixel */ - virtual int getZoomLevel() const { return m_zoomLevel; } + int getZoomLevel() const; /** * Set the zoom level, i.e. the number of frames per pixel. The @@ -228,7 +228,6 @@ size_t m_centreFrame; int m_zoomLevel; - bool m_newModel; bool m_followPan; bool m_followZoom; PlaybackFollowMode m_followPlay;