Mercurial > hg > svcore
diff base/ViewManager.h @ 9:73d85d19919f
* Add play-selection and looping modes. Looping seems to work OK, but
the plain play-selection is miscalculating current frame number to
feed back to the GUI.
* Cache selection rectanges wherever possible in View::paintEvent.
author | Chris Cannam |
---|---|
date | Tue, 24 Jan 2006 16:20:58 +0000 |
parents | 214054a0d8b8 |
children | ec6886f0e673 |
line wrap: on
line diff
--- a/base/ViewManager.h Mon Jan 23 17:02:57 2006 +0000 +++ b/base/ViewManager.h Tue Jan 24 16:20:58 2006 +0000 @@ -63,6 +63,14 @@ void removeSelection(const Selection &selection); void clearSelections(); + /** + * Return the selection that contains a given frame. + * If defaultToFollowing is true, and if the frame is not in a + * selected area, return the next selection after the given frame. + * Return the empty selection if no appropriate selection is found. + */ + Selection getContainingSelection(size_t frame, bool defaultToFollowing); + enum ToolMode { NavigateMode, SelectMode, @@ -73,6 +81,12 @@ ToolMode getToolMode() const { return m_toolMode; } void setToolMode(ToolMode mode); + bool getPlayLoopMode() const { return m_playLoopMode; } + void setPlayLoopMode(bool on); + + bool getPlaySelectionMode() const { return m_playSelectionMode; } + void setPlaySelectionMode(bool on); + signals: /** Emitted when a widget pans. The originator identifies the widget. */ void centreFrameChanged(void *originator, unsigned long frame, bool locked); @@ -89,9 +103,18 @@ /** Emitted when the selection has changed. */ void selectionChanged(); + /** Emitted when the in-progress (rubberbanding) selection has changed. */ + void inProgressSelectionChanged(); + /** Emitted when the tool mode has been changed. */ void toolModeChanged(); + /** Emitted when the play loop mode has been changed. */ + void playLoopModeChanged(); + + /** Emitted when the play selection mode has been changed. */ + void playSelectionModeChanged(); + protected slots: void checkPlayStatus(); void considerSeek(void *, unsigned long, bool); @@ -111,6 +134,9 @@ ToolMode m_toolMode; + bool m_playLoopMode; + bool m_playSelectionMode; + std::map<const Model *, PlayParameters *> m_playParameters; };