Mercurial > hg > svgui
comparison view/ViewManager.h @ 211:e2baee498ec8
* Rejig handling of scrolling views. Ensures, among other things, that playing
when there is a scroll mode view present (e.g. a spectrum) does not drag
any page mode views into scroll mode with it.
author | Chris Cannam |
---|---|
date | Thu, 01 Mar 2007 11:55:46 +0000 |
parents | 4a3bdde1ef13 |
children | cd81066ac7ad |
comparison
equal
deleted
inserted
replaced
210:748985c7e2c1 | 211:e2baee498ec8 |
---|---|
26 #include "base/Clipboard.h" | 26 #include "base/Clipboard.h" |
27 | 27 |
28 class AudioPlaySource; | 28 class AudioPlaySource; |
29 class Model; | 29 class Model; |
30 | 30 |
31 enum PlaybackFollowMode { | |
32 PlaybackScrollContinuous, | |
33 PlaybackScrollPage, | |
34 PlaybackIgnore | |
35 }; | |
36 | |
37 class View; | |
38 | |
31 /** | 39 /** |
32 * The ViewManager manages properties that may need to be synchronised | 40 * The ViewManager manages properties that may need to be synchronised |
33 * between separate Views. For example, it handles signals associated | 41 * between separate Views. For example, it handles signals associated |
34 * with changes to the global pan and zoom, and it handles selections. | 42 * with changes to the global pan and zoom, and it handles selections. |
35 * | 43 * |
131 | 139 |
132 void setZoomWheelsEnabled(bool enable); | 140 void setZoomWheelsEnabled(bool enable); |
133 bool getZoomWheelsEnabled() const { return m_zoomWheelsEnabled; } | 141 bool getZoomWheelsEnabled() const { return m_zoomWheelsEnabled; } |
134 | 142 |
135 signals: | 143 signals: |
136 /** Emitted when a widget pans. The originator identifies the widget. */ | 144 /** Emitted when user causes the global centre frame to change. */ |
137 void centreFrameChanged(void *originator, unsigned long frame, bool locked); | 145 void globalCentreFrameChanged(unsigned long frame); |
138 | 146 |
139 /** Emitted when a widget zooms. The originator identifies the widget. */ | 147 /** Emitted when user scrolls a view, but doesn't affect global centre. */ |
148 void viewCentreFrameChanged(View *v, unsigned long frame); | |
149 | |
150 /** Emitted when a view zooms. The originator identifies the view. */ | |
140 void zoomLevelChanged(void *originator, unsigned long zoom, bool locked); | 151 void zoomLevelChanged(void *originator, unsigned long zoom, bool locked); |
141 | 152 |
142 /** Emitted when a widget zooms. */ | 153 /** Emitted when a view zooms. */ |
143 void zoomLevelChanged(); | 154 void zoomLevelChanged(); |
144 | 155 |
145 /** Emitted when the playback frame changes. */ | 156 /** Emitted when the playback frame changes. */ |
146 void playbackFrameChanged(unsigned long frame); | 157 void playbackFrameChanged(unsigned long frame); |
147 | 158 |
169 void overlayModeChanged(); | 180 void overlayModeChanged(); |
170 | 181 |
171 /** Emitted when the zoom wheels have been toggled. */ | 182 /** Emitted when the zoom wheels have been toggled. */ |
172 void zoomWheelsEnabledChanged(); | 183 void zoomWheelsEnabledChanged(); |
173 | 184 |
185 public slots: | |
186 void viewCentreFrameChanged(unsigned long, bool, PlaybackFollowMode); | |
187 | |
174 protected slots: | 188 protected slots: |
175 void checkPlayStatus(); | 189 void checkPlayStatus(); |
176 void playStatusChanged(bool playing); | 190 void playStatusChanged(bool playing); |
177 void considerSeek(void *, unsigned long, bool); | 191 void seek(unsigned long); |
178 void considerZoomChange(void *, unsigned long, bool); | 192 void considerZoomChange(void *, unsigned long, bool); |
179 | 193 |
180 protected: | 194 protected: |
181 AudioPlaySource *m_playSource; | 195 AudioPlaySource *m_playSource; |
182 unsigned long m_globalCentreFrame; | 196 unsigned long m_globalCentreFrame; |