comparison view/ViewManager.h @ 806:4c8ca536b54f warnfix_no_size_t

Some more unsigned/long removal
author Chris Cannam
date Tue, 17 Jun 2014 15:36:56 +0100
parents b75c95e7f906
children 09026c875301
comparison
equal deleted inserted replaced
805:1d526ba11a24 806:4c8ca536b54f
57 57
58 void setAudioPlaySource(AudioPlaySource *source); 58 void setAudioPlaySource(AudioPlaySource *source);
59 59
60 bool isPlaying() const; 60 bool isPlaying() const;
61 61
62 unsigned long getGlobalCentreFrame() const; // the set method is a slot 62 int getGlobalCentreFrame() const; // the set method is a slot
63 unsigned long getGlobalZoom() const; 63 int getGlobalZoom() const;
64 64
65 unsigned long getPlaybackFrame() const; // the set method is a slot 65 int getPlaybackFrame() const; // the set method is a slot
66 66
67 // Only meaningful in solo mode, and used for optional alignment feature 67 // Only meaningful in solo mode, and used for optional alignment feature
68 Model *getPlaybackModel() const; 68 Model *getPlaybackModel() const;
69 void setPlaybackModel(Model *); 69 void setPlaybackModel(Model *);
70 70
71 size_t alignPlaybackFrameToReference(size_t) const; 71 int alignPlaybackFrameToReference(int) const;
72 size_t alignReferenceToPlaybackFrame(size_t) const; 72 int alignReferenceToPlaybackFrame(int) const;
73 73
74 bool haveInProgressSelection() const; 74 bool haveInProgressSelection() const;
75 const Selection &getInProgressSelection(bool &exclusive) const; 75 const Selection &getInProgressSelection(bool &exclusive) const;
76 void setInProgressSelection(const Selection &selection, bool exclusive); 76 void setInProgressSelection(const Selection &selection, bool exclusive);
77 void clearInProgressSelection(); 77 void clearInProgressSelection();
81 const MultiSelection::SelectionList &getSelections() const; 81 const MultiSelection::SelectionList &getSelections() const;
82 void setSelection(const Selection &selection); 82 void setSelection(const Selection &selection);
83 void addSelection(const Selection &selection); 83 void addSelection(const Selection &selection);
84 void removeSelection(const Selection &selection); 84 void removeSelection(const Selection &selection);
85 void clearSelections(); 85 void clearSelections();
86 size_t constrainFrameToSelection(size_t frame) const; 86 int constrainFrameToSelection(int frame) const;
87 87
88 /** 88 /**
89 * Adding a selection normally emits the selectionChangedByUser 89 * Adding a selection normally emits the selectionChangedByUser
90 * signal. Call this to add a selection without emitting that signal. 90 * signal. Call this to add a selection without emitting that signal.
91 * This is used in session file load, for example. 91 * This is used in session file load, for example.
96 * Return the selection that contains a given frame. 96 * Return the selection that contains a given frame.
97 * If defaultToFollowing is true, and if the frame is not in a 97 * If defaultToFollowing is true, and if the frame is not in a
98 * selected area, return the next selection after the given frame. 98 * selected area, return the next selection after the given frame.
99 * Return the empty selection if no appropriate selection is found. 99 * Return the empty selection if no appropriate selection is found.
100 */ 100 */
101 Selection getContainingSelection(size_t frame, bool defaultToFollowing) const; 101 Selection getContainingSelection(int frame, bool defaultToFollowing) const;
102 102
103 Clipboard &getClipboard() { return m_clipboard; } 103 Clipboard &getClipboard() { return m_clipboard; }
104 104
105 enum ToolMode { 105 enum ToolMode {
106 NavigateMode, 106 NavigateMode,
140 * The sample rate that is used for playback. This is usually the 140 * The sample rate that is used for playback. This is usually the
141 * rate of the main model, but not always. Models whose rates 141 * rate of the main model, but not always. Models whose rates
142 * differ from this will play back at the wrong speed -- there is 142 * differ from this will play back at the wrong speed -- there is
143 * no per-model resampler. 143 * no per-model resampler.
144 */ 144 */
145 size_t getPlaybackSampleRate() const; 145 int getPlaybackSampleRate() const;
146 146
147 /** 147 /**
148 * The sample rate of the audio output device. If the playback 148 * The sample rate of the audio output device. If the playback
149 * sample rate differs from this, everything will be resampled at 149 * sample rate differs from this, everything will be resampled at
150 * the output stage. 150 * the output stage.
151 */ 151 */
152 size_t getOutputSampleRate() const; 152 int getOutputSampleRate() const;
153 153
154 /** 154 /**
155 * The sample rate of the current main model. This may in theory 155 * The sample rate of the current main model. This may in theory
156 * differ from the playback sample rate, in which case even the 156 * differ from the playback sample rate, in which case even the
157 * main model will play at the wrong speed. 157 * main model will play at the wrong speed.
158 */ 158 */
159 size_t getMainModelSampleRate() const { return m_mainModelSampleRate; } 159 int getMainModelSampleRate() const { return m_mainModelSampleRate; }
160 160
161 void setMainModelSampleRate(size_t sr) { m_mainModelSampleRate = sr; } 161 void setMainModelSampleRate(int sr) { m_mainModelSampleRate = sr; }
162 162
163 enum OverlayMode { 163 enum OverlayMode {
164 NoOverlays, 164 NoOverlays,
165 GlobalOverlays, 165 GlobalOverlays,
166 StandardOverlays, 166 StandardOverlays,
209 void setGlobalDarkBackground(bool dark); 209 void setGlobalDarkBackground(bool dark);
210 bool getGlobalDarkBackground() const; 210 bool getGlobalDarkBackground() const;
211 211
212 signals: 212 signals:
213 /** Emitted when user causes the global centre frame to change. */ 213 /** Emitted when user causes the global centre frame to change. */
214 void globalCentreFrameChanged(unsigned long frame); 214 void globalCentreFrameChanged(int frame);
215 215
216 /** Emitted when user scrolls a view, but doesn't affect global centre. */ 216 /** Emitted when user scrolls a view, but doesn't affect global centre. */
217 void viewCentreFrameChanged(View *v, unsigned long frame); 217 void viewCentreFrameChanged(View *v, int frame);
218 218
219 /** Emitted when a view zooms. */ 219 /** Emitted when a view zooms. */
220 void viewZoomLevelChanged(View *v, unsigned long zoom, bool locked); 220 void viewZoomLevelChanged(View *v, int zoom, bool locked);
221 221
222 /** Emitted when the playback frame changes. */ 222 /** Emitted when the playback frame changes. */
223 void playbackFrameChanged(unsigned long frame); 223 void playbackFrameChanged(int frame);
224 224
225 /** Emitted when the output levels change. Values in range 0.0 -> 1.0. */ 225 /** Emitted when the output levels change. Values in range 0.0 -> 1.0. */
226 void outputLevelsChanged(float left, float right); 226 void outputLevelsChanged(float left, float right);
227 227
228 /** Emitted whenever the selection has changed. */ 228 /** Emitted whenever the selection has changed. */
266 266
267 /** Emitted when any loggable activity has occurred. */ 267 /** Emitted when any loggable activity has occurred. */
268 void activity(QString); 268 void activity(QString);
269 269
270 public slots: 270 public slots:
271 void viewCentreFrameChanged(unsigned long, bool, PlaybackFollowMode); 271 void viewCentreFrameChanged(int, bool, PlaybackFollowMode);
272 void viewZoomLevelChanged(unsigned long, bool); 272 void viewZoomLevelChanged(int, bool);
273 void setGlobalCentreFrame(unsigned long); 273 void setGlobalCentreFrame(int);
274 void setPlaybackFrame(unsigned long); 274 void setPlaybackFrame(int);
275 void playStatusChanged(bool playing); 275 void playStatusChanged(bool playing);
276 276
277 protected slots: 277 protected slots:
278 void checkPlayStatus(); 278 void checkPlayStatus();
279 void seek(unsigned long); 279 void seek(int);
280 //!!! void considerZoomChange(void *, unsigned long, bool); 280 //!!! void considerZoomChange(void *, int, bool);
281 281
282 protected: 282 protected:
283 AudioPlaySource *m_playSource; 283 AudioPlaySource *m_playSource;
284 unsigned long m_globalCentreFrame; 284 int m_globalCentreFrame;
285 unsigned long m_globalZoom; 285 int m_globalZoom;
286 mutable unsigned long m_playbackFrame; 286 mutable int m_playbackFrame;
287 Model *m_playbackModel; //!!! 287 Model *m_playbackModel; //!!!
288 size_t m_mainModelSampleRate; 288 int m_mainModelSampleRate;
289 289
290 float m_lastLeft; 290 float m_lastLeft;
291 float m_lastRight; 291 float m_lastRight;
292 292
293 MultiSelection m_selections; 293 MultiSelection m_selections;