diff 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
line wrap: on
line diff
--- a/view/ViewManager.h	Wed Feb 28 11:20:14 2007 +0000
+++ b/view/ViewManager.h	Thu Mar 01 11:55:46 2007 +0000
@@ -28,6 +28,14 @@
 class AudioPlaySource;
 class Model;
 
+enum PlaybackFollowMode {
+    PlaybackScrollContinuous,
+    PlaybackScrollPage,
+    PlaybackIgnore
+};
+
+class View;
+
 /**
  * The ViewManager manages properties that may need to be synchronised
  * between separate Views.  For example, it handles signals associated
@@ -133,13 +141,16 @@
     bool getZoomWheelsEnabled() const { return m_zoomWheelsEnabled; }
 
 signals:
-    /** Emitted when a widget pans.  The originator identifies the widget. */
-    void centreFrameChanged(void *originator, unsigned long frame, bool locked);
+    /** Emitted when user causes the global centre frame to change. */
+    void globalCentreFrameChanged(unsigned long frame);
 
-    /** Emitted when a widget zooms.  The originator identifies the widget. */
+    /** Emitted when user scrolls a view, but doesn't affect global centre. */
+    void viewCentreFrameChanged(View *v, unsigned long frame);
+
+    /** Emitted when a view zooms.  The originator identifies the view. */
     void zoomLevelChanged(void *originator, unsigned long zoom, bool locked);
 
-    /** Emitted when a widget zooms. */
+    /** Emitted when a view zooms. */
     void zoomLevelChanged();
 
     /** Emitted when the playback frame changes. */
@@ -171,10 +182,13 @@
     /** Emitted when the zoom wheels have been toggled. */
     void zoomWheelsEnabledChanged();
 
+public slots:
+    void viewCentreFrameChanged(unsigned long, bool, PlaybackFollowMode);
+
 protected slots:
     void checkPlayStatus();
     void playStatusChanged(bool playing);
-    void considerSeek(void *, unsigned long, bool);
+    void seek(unsigned long);
     void considerZoomChange(void *, unsigned long, bool);
 
 protected: