comparison base/ViewManager.h @ 24:bb9291d84810

* Add ffwd/rewind * Abstract out MultiSelection
author Chris Cannam
date Wed, 08 Feb 2006 17:59:16 +0000
parents ec6886f0e673
children 4b16526b011b
comparison
equal deleted inserted replaced
23:6ace4286ba06 24:bb9291d84810
12 12
13 #include <QObject> 13 #include <QObject>
14 #include <QTimer> 14 #include <QTimer>
15 15
16 #include <map> 16 #include <map>
17 #include <set>
18 17
19 #include "Selection.h" 18 #include "Selection.h"
20 19
21 class AudioPlaySource; 20 class AudioPlaySource;
22 class PlayParameters; 21 class PlayParameters;
48 bool isPlaying() const; 47 bool isPlaying() const;
49 48
50 unsigned long getGlobalCentreFrame() const; 49 unsigned long getGlobalCentreFrame() const;
51 unsigned long getGlobalZoom() const; 50 unsigned long getGlobalZoom() const;
52 51
53 typedef std::set<Selection> SelectionList; 52 unsigned long getPlaybackFrame() const;
53 void setPlaybackFrame(unsigned long frame);
54 54
55 bool haveInProgressSelection() const; 55 bool haveInProgressSelection() const;
56 const Selection &getInProgressSelection(bool &exclusive) const; 56 const Selection &getInProgressSelection(bool &exclusive) const;
57 void setInProgressSelection(const Selection &selection, bool exclusive); 57 void setInProgressSelection(const Selection &selection, bool exclusive);
58 void clearInProgressSelection(); 58 void clearInProgressSelection();
59 59
60 const SelectionList &getSelections() const; 60 const MultiSelection &getSelection() const;
61
62 const MultiSelection::SelectionList &getSelections() const;
61 void setSelection(const Selection &selection); 63 void setSelection(const Selection &selection);
62 void addSelection(const Selection &selection); 64 void addSelection(const Selection &selection);
63 void removeSelection(const Selection &selection); 65 void removeSelection(const Selection &selection);
64 void clearSelections(); 66 void clearSelections();
65 67
123 125
124 protected: 126 protected:
125 AudioPlaySource *m_playSource; 127 AudioPlaySource *m_playSource;
126 unsigned long m_globalCentreFrame; 128 unsigned long m_globalCentreFrame;
127 unsigned long m_globalZoom; 129 unsigned long m_globalZoom;
130 mutable unsigned long m_playbackFrame;
128 131
129 float m_lastLeft; 132 float m_lastLeft;
130 float m_lastRight; 133 float m_lastRight;
131 134
132 SelectionList m_selections; 135 MultiSelection m_selections;
133 Selection m_inProgressSelection; 136 Selection m_inProgressSelection;
134 bool m_inProgressExclusive; 137 bool m_inProgressExclusive;
135 138
136 ToolMode m_toolMode; 139 ToolMode m_toolMode;
137 140