Mercurial > hg > svcore
diff base/View.cpp @ 16:cc98d496d52b
* Add command history class, and basic undo/redo menus. No actual commands
to undo/redo yet. Selecting the placeholders sometimes seems to cause
a crash, so this looks a little uncertain so far.
* Add Rename Layer
* Remove models from playback when their layers are removed (and ref counts
hit zero)
* Don't hang around waiting so much when there's work to be done in the audio
buffer fill thread
* Put more sensible names on layers generated from transforms
* Add basic editing to time-value layer like existing editing in time-instants
layer, and make both of them snap to the appropriate resolution during drag
author | Chris Cannam |
---|---|
date | Mon, 30 Jan 2006 17:51:56 +0000 |
parents | 47500c27ac26 |
children | 4563a72c1d8b |
line wrap: on
line diff
--- a/base/View.cpp Mon Jan 30 13:19:42 2006 +0000 +++ b/base/View.cpp Mon Jan 30 17:51:56 2006 +0000 @@ -21,8 +21,9 @@ #include <QApplication> #include <iostream> +#include <cassert> -//#define DEBUG_VIEW_WIDGET_PAINT 1 +#define DEBUG_VIEW_WIDGET_PAINT 1 using std::cerr; using std::endl; @@ -195,7 +196,7 @@ size_t View::getEndFrame() const { - return getStartFrame() + (width() * m_zoomLevel) - 1; + return getFrameForX(width()) - 1; } void @@ -255,6 +256,14 @@ } } +View::LayerProgressBar::LayerProgressBar(QWidget *parent) : + QProgressBar(parent) +{ + QFont f(font()); + f.setPointSize(f.pointSize() * 8 / 10); + setFont(f); +} + void View::addLayer(Layer *layer) { @@ -268,7 +277,7 @@ m_progressBars[layer]->setMaximum(100); m_progressBars[layer]->setMinimumWidth(80); m_progressBars[layer]->hide(); - + connect(layer, SIGNAL(layerParametersChanged()), this, SLOT(layerParametersChanged())); connect(layer, SIGNAL(layerNameChanged()), @@ -503,6 +512,9 @@ if (m_playPointerFrame == f) return; bool visible = (getXForFrame(m_playPointerFrame) != getXForFrame(f)); + std::cerr << "old x = " << getXForFrame(m_playPointerFrame) + << ", new x = " << getXForFrame(f) + << ", visible = " << visible << std::endl; size_t oldPlayPointerFrame = m_playPointerFrame; m_playPointerFrame = f; if (!visible) return;