Mercurial > hg > svgui
comparison view/ViewManager.cpp @ 180:29f01de27db4
* Add vertical zooming and snap-to-selection for OSC control;
add a demo script
author | Chris Cannam |
---|---|
date | Wed, 15 Nov 2006 18:22:26 +0000 |
parents | dbd34ff746c7 |
children | 42118892f428 |
comparison
equal
deleted
inserted
replaced
179:6a0d54f3f21a | 180:29f01de27db4 |
---|---|
20 | 20 |
21 #include <QSettings> | 21 #include <QSettings> |
22 | 22 |
23 #include <iostream> | 23 #include <iostream> |
24 | 24 |
25 // #define DEBUG_VIEW_MANAGER 1 | 25 //#define DEBUG_VIEW_MANAGER 1 |
26 | 26 |
27 ViewManager::ViewManager() : | 27 ViewManager::ViewManager() : |
28 m_playSource(0), | 28 m_playSource(0), |
29 m_globalCentreFrame(0), | 29 m_globalCentreFrame(0), |
30 m_globalZoom(1024), | 30 m_globalZoom(1024), |
67 std::cout << "ViewManager::getGlobalCentreFrame: returning " << m_globalCentreFrame << std::endl; | 67 std::cout << "ViewManager::getGlobalCentreFrame: returning " << m_globalCentreFrame << std::endl; |
68 #endif | 68 #endif |
69 return m_globalCentreFrame; | 69 return m_globalCentreFrame; |
70 } | 70 } |
71 | 71 |
72 void | |
73 ViewManager::setGlobalCentreFrame(unsigned long f) | |
74 { | |
75 #ifdef DEBUG_VIEW_MANAGER | |
76 std::cout << "ViewManager::setGlobalCentreFrame to " << f << std::endl; | |
77 #endif | |
78 m_globalCentreFrame = f; | |
79 } | |
80 | |
72 unsigned long | 81 unsigned long |
73 ViewManager::getGlobalZoom() const | 82 ViewManager::getGlobalZoom() const |
74 { | 83 { |
75 #ifdef DEBUG_VIEW_MANAGER | 84 #ifdef DEBUG_VIEW_MANAGER |
76 std::cout << "ViewManager::getGlobalZoom: returning " << m_globalZoom << std::endl; | 85 std::cout << "ViewManager::getGlobalZoom: returning " << m_globalZoom << std::endl; |