comparison view/Pane.cpp @ 290:3101c68a00c1

* Restore Scale setting which had mistakenly disappeared from spectrum * Some tweaks to spectrum peaks * Make spectrum default to 4096/75%... or is that overdoing it? * Show harmonic cursor even during playback if in measure mode and mouse in relevant pane * Avoid crash when trying to measure a non-layer * Various adjustments to some icons to make them look better in white-on-black schemes
author Chris Cannam
date Fri, 13 Jul 2007 15:54:17 +0000
parents cd2492c5fe45
children 919740b20cc9
comparison
equal deleted inserted replaced
289:4ca7562dd246 290:3101c68a00c1
59 m_scaleWidth(0), 59 m_scaleWidth(0),
60 m_headsUpDisplay(0), 60 m_headsUpDisplay(0),
61 m_vpan(0), 61 m_vpan(0),
62 m_hthumb(0), 62 m_hthumb(0),
63 m_vthumb(0), 63 m_vthumb(0),
64 m_reset(0) 64 m_reset(0),
65 m_mouseInWidget(false)
65 { 66 {
66 setObjectName("Pane"); 67 setObjectName("Pane");
67 setMouseTracking(true); 68 setMouseTracking(true);
68 69
69 updateHeadsUpDisplay(); 70 updateHeadsUpDisplay();
378 if (e) paint.setClipRect(r); 379 if (e) paint.setClipRect(r);
379 380
380 ViewManager::ToolMode toolMode = m_manager->getToolMode(); 381 ViewManager::ToolMode toolMode = m_manager->getToolMode();
381 382
382 if (m_manager && 383 if (m_manager &&
383 !m_manager->isPlaying() && 384 // !m_manager->isPlaying() &&
385 m_mouseInWidget &&
384 toolMode == ViewManager::MeasureMode) { 386 toolMode == ViewManager::MeasureMode) {
385 387
386 for (LayerList::iterator vi = m_layers.end(); vi != m_layers.begin(); ) { 388 for (LayerList::iterator vi = m_layers.end(); vi != m_layers.begin(); ) {
387 --vi; 389 --vi;
388 390
1358 } else if (mode == ViewManager::MeasureMode) { 1360 } else if (mode == ViewManager::MeasureMode) {
1359 1361
1360 if (m_measureCursor2) setCursor(*m_measureCursor2); 1362 if (m_measureCursor2) setCursor(*m_measureCursor2);
1361 1363
1362 Layer *layer = getTopLayer(); 1364 Layer *layer = getTopLayer();
1363 if (layer) layer->measureDrag(this, e); 1365 if (layer) {
1364 if (layer->hasTimeXAxis()) edgeScrollMaybe(e->x()); 1366 layer->measureDrag(this, e);
1367 if (layer->hasTimeXAxis()) edgeScrollMaybe(e->x());
1368 }
1365 1369
1366 update(); 1370 update();
1367 } 1371 }
1368 } 1372 }
1369 1373
1674 } 1678 }
1675 } 1679 }
1676 } 1680 }
1677 1681
1678 void 1682 void
1683 Pane::enterEvent(QEvent *)
1684 {
1685 m_mouseInWidget = true;
1686 }
1687
1688 void
1679 Pane::leaveEvent(QEvent *) 1689 Pane::leaveEvent(QEvent *)
1680 { 1690 {
1691 m_mouseInWidget = false;
1681 bool previouslyIdentifying = m_identifyFeatures; 1692 bool previouslyIdentifying = m_identifyFeatures;
1682 m_identifyFeatures = false; 1693 m_identifyFeatures = false;
1683 if (previouslyIdentifying) update(); 1694 if (previouslyIdentifying) update();
1684 emit contextHelpChanged(""); 1695 emit contextHelpChanged("");
1685 } 1696 }