Mercurial > hg > svgui
diff view/Overview.cpp @ 1266:a34a2a25907c
Untabify
author | Chris Cannam |
---|---|
date | Thu, 01 Mar 2018 18:02:22 +0000 |
parents | 97d0c798c2ac |
children | 13d9b422f7fe |
line wrap: on
line diff
--- a/view/Overview.cpp Thu Mar 01 14:43:53 2018 +0000 +++ b/view/Overview.cpp Thu Mar 01 18:02:22 2018 +0000 @@ -50,7 +50,7 @@ int zoomLevel = int(frameCount / width()); if (zoomLevel < 1) zoomLevel = 1; zoomLevel = getZoomConstraintBlockSize(zoomLevel, - ZoomConstraint::RoundUp); + ZoomConstraint::RoundUp); if (zoomLevel != m_zoomLevel) { zoomChanged = true; } @@ -118,7 +118,7 @@ cerr << "Overview[" << this << "]::viewCentreFrameChanged(" << v << "): " << f << endl; #endif if (m_views.find(v) != m_views.end()) { - update(); + update(); } } @@ -127,7 +127,7 @@ { if (v == this) return; if (m_views.find(v) != m_views.end()) { - update(); + update(); } } @@ -182,26 +182,26 @@ int zoomLevel = int(frameCount / width()); if (zoomLevel < 1) zoomLevel = 1; zoomLevel = getZoomConstraintBlockSize(zoomLevel, - ZoomConstraint::RoundUp); + ZoomConstraint::RoundUp); if (zoomLevel != m_zoomLevel) { - m_zoomLevel = zoomLevel; - emit zoomLevelChanged(m_zoomLevel, m_followZoom); + m_zoomLevel = zoomLevel; + emit zoomLevelChanged(m_zoomLevel, m_followZoom); } sv_frame_t centreFrame = startFrame + m_zoomLevel * (width() / 2); if (centreFrame > (startFrame + getModelsEndFrame())/2) { - centreFrame = (startFrame + getModelsEndFrame())/2; + centreFrame = (startFrame + getModelsEndFrame())/2; } if (centreFrame != m_centreFrame) { #ifdef DEBUG_OVERVIEW cerr << "Overview::paintEvent: Centre frame changed from " << m_centreFrame << " to " << centreFrame << " and thus start frame from " << getStartFrame(); #endif - m_centreFrame = centreFrame; + m_centreFrame = centreFrame; #ifdef DEBUG_OVERVIEW cerr << " to " << getStartFrame() << endl; #endif - emit centreFrameChanged(m_centreFrame, false, PlaybackIgnore); + emit centreFrameChanged(m_centreFrame, false, PlaybackIgnore); } View::paintEvent(e); @@ -224,12 +224,12 @@ int y = 0; for (ViewSet::iterator i = m_views.begin(); i != m_views.end(); ++i) { - if (!*i) continue; + if (!*i) continue; - View *w = (View *)*i; + View *w = (View *)*i; - sv_frame_t f0 = w->getFrameForX(0); - sv_frame_t f1 = w->getFrameForX(w->width()); + sv_frame_t f0 = w->getFrameForX(0); + sv_frame_t f1 = w->getFrameForX(w->width()); if (f0 >= 0) { sv_frame_t rf0 = w->alignToReference(f0); @@ -240,16 +240,16 @@ f1 = alignFromReference(rf1); } - int x0 = getXForFrame(f0); - int x1 = getXForFrame(f1); + int x0 = getXForFrame(f0); + int x1 = getXForFrame(f1); - if (x1 <= x0) x1 = x0 + 1; + if (x1 <= x0) x1 = x0 + 1; std::pair<int, int> extent(x0, x1); if (extents.find(extent) == extents.end()) { - y += height() / 10 + 1; + y += height() / 10 + 1; extents.insert(extent); QRect vr(x0, y, x1 - x0, height() - 2 * y); @@ -287,7 +287,7 @@ m_clickedInRange = true; for (ViewSet::iterator i = m_views.begin(); i != m_views.end(); ++i) { - if (*i && (*i)->getAligningModel() == getAligningModel()) { + if (*i && (*i)->getAligningModel() == getAligningModel()) { m_dragCentreFrame = (*i)->getCentreFrame(); break; } @@ -298,7 +298,7 @@ Overview::mouseReleaseEvent(QMouseEvent *e) { if (m_clickedInRange) { - mouseMoveEvent(e); + mouseMoveEvent(e); } m_clickedInRange = false; } @@ -313,20 +313,20 @@ sv_frame_t newCentreFrame = m_dragCentreFrame; if (frameOff > 0) { - newCentreFrame += frameOff; + newCentreFrame += frameOff; } else if (newCentreFrame >= -frameOff) { - newCentreFrame += frameOff; + newCentreFrame += frameOff; } else { - newCentreFrame = 0; + newCentreFrame = 0; } if (newCentreFrame >= getModelsEndFrame()) { - newCentreFrame = getModelsEndFrame(); - if (newCentreFrame > 0) --newCentreFrame; + newCentreFrame = getModelsEndFrame(); + if (newCentreFrame > 0) --newCentreFrame; } if (std::max(m_centreFrame, newCentreFrame) - - std::min(m_centreFrame, newCentreFrame) > m_zoomLevel) { + std::min(m_centreFrame, newCentreFrame) > m_zoomLevel) { sv_frame_t rf = alignToReference(newCentreFrame); #ifdef DEBUG_OVERVIEW cerr << "Overview::mouseMoveEvent: x " << e->x() << " and click x " << m_clickPos.x() << " -> frame " << newCentreFrame << " -> rf " << rf << endl;