comparison view/ViewManager.h @ 1406:a18e78b9c78b fix-static-analysis

Use override throughout
author Chris Cannam
date Mon, 26 Nov 2018 13:52:27 +0000
parents 646e713a4632
children de41a11cabc2
comparison
equal deleted inserted replaced
1405:4c359c2b220c 1406:a18e78b9c78b
79 79
80 public: 80 public:
81 ViewManager(); 81 ViewManager();
82 virtual ~ViewManager(); 82 virtual ~ViewManager();
83 83
84 void setAudioPlaySource(AudioPlaySource *source); 84 void setAudioPlaySource(AudioPlaySource *source) override;
85 void setAudioRecordTarget(AudioRecordTarget *target); 85 void setAudioRecordTarget(AudioRecordTarget *target) override;
86 86
87 bool isPlaying() const; 87 bool isPlaying() const;
88 bool isRecording() const; 88 bool isRecording() const;
89 89
90 sv_frame_t getGlobalCentreFrame() const; // the set method is a slot 90 sv_frame_t getGlobalCentreFrame() const; // the set method is a slot
94 94
95 // Only meaningful in solo mode, and used for optional alignment feature 95 // Only meaningful in solo mode, and used for optional alignment feature
96 Model *getPlaybackModel() const; 96 Model *getPlaybackModel() const;
97 void setPlaybackModel(Model *); 97 void setPlaybackModel(Model *);
98 98
99 sv_frame_t alignPlaybackFrameToReference(sv_frame_t) const; 99 sv_frame_t alignPlaybackFrameToReference(sv_frame_t) const override;
100 sv_frame_t alignReferenceToPlaybackFrame(sv_frame_t) const; 100 sv_frame_t alignReferenceToPlaybackFrame(sv_frame_t) const override;
101 101
102 bool haveInProgressSelection() const; 102 bool haveInProgressSelection() const;
103 const Selection &getInProgressSelection(bool &exclusive) const; 103 const Selection &getInProgressSelection(bool &exclusive) const;
104 void setInProgressSelection(const Selection &selection, bool exclusive); 104 void setInProgressSelection(const Selection &selection, bool exclusive);
105 void clearInProgressSelection(); 105 void clearInProgressSelection();
106 106
107 const MultiSelection &getSelection() const; 107 const MultiSelection &getSelection() const override;
108 108
109 const MultiSelection::SelectionList &getSelections() const; 109 const MultiSelection::SelectionList &getSelections() const override;
110 void setSelection(const Selection &selection); 110 void setSelection(const Selection &selection);
111 void addSelection(const Selection &selection); 111 void addSelection(const Selection &selection);
112 void removeSelection(const Selection &selection); 112 void removeSelection(const Selection &selection);
113 void clearSelections(); 113 void clearSelections();
114 sv_frame_t constrainFrameToSelection(sv_frame_t frame) const; 114 sv_frame_t constrainFrameToSelection(sv_frame_t frame) const override;
115 115
116 /** 116 /**
117 * Adding a selection normally emits the selectionChangedByUser 117 * Adding a selection normally emits the selectionChangedByUser
118 * signal. Call this to add a selection without emitting that signal. 118 * signal. Call this to add a selection without emitting that signal.
119 * This is used in session file load, for example. 119 * This is used in session file load, for example.
124 * Return the selection that contains a given frame. 124 * Return the selection that contains a given frame.
125 * If defaultToFollowing is true, and if the frame is not in a 125 * If defaultToFollowing is true, and if the frame is not in a
126 * selected area, return the next selection after the given frame. 126 * selected area, return the next selection after the given frame.
127 * Return the empty selection if no appropriate selection is found. 127 * Return the empty selection if no appropriate selection is found.
128 */ 128 */
129 Selection getContainingSelection(sv_frame_t frame, bool defaultToFollowing) const; 129 Selection getContainingSelection(sv_frame_t frame, bool defaultToFollowing) const override;
130 130
131 Clipboard &getClipboard() { return m_clipboard; } 131 Clipboard &getClipboard() { return m_clipboard; }
132 132
133 enum ToolMode { 133 enum ToolMode {
134 NavigateMode, 134 NavigateMode,
147 /// Return override mode if it exists for this view or global mode otherwise 147 /// Return override mode if it exists for this view or global mode otherwise
148 ToolMode getToolModeFor(const View *v) const; 148 ToolMode getToolModeFor(const View *v) const;
149 /// Clear all current view-specific overrides 149 /// Clear all current view-specific overrides
150 void clearToolModeOverrides(); 150 void clearToolModeOverrides();
151 151
152 bool getPlayLoopMode() const { return m_playLoopMode; } 152 bool getPlayLoopMode() const override { return m_playLoopMode; }
153 void setPlayLoopMode(bool on); 153 void setPlayLoopMode(bool on);
154 154
155 bool getPlaySelectionMode() const { return m_playSelectionMode; } 155 bool getPlaySelectionMode() const override { return m_playSelectionMode; }
156 void setPlaySelectionMode(bool on); 156 void setPlaySelectionMode(bool on);
157 157
158 bool getPlaySoloMode() const { return m_playSoloMode; } 158 bool getPlaySoloMode() const override { return m_playSoloMode; }
159 void setPlaySoloMode(bool on); 159 void setPlaySoloMode(bool on);
160 160
161 bool getAlignMode() const { return m_alignMode; } 161 bool getAlignMode() const override { return m_alignMode; }
162 void setAlignMode(bool on); 162 void setAlignMode(bool on);
163 163
164 void setIlluminateLocalFeatures(bool i) { m_illuminateLocalFeatures = i; } 164 void setIlluminateLocalFeatures(bool i) { m_illuminateLocalFeatures = i; }
165 void setShowWorkTitle(bool show) { m_showWorkTitle = show; } 165 void setShowWorkTitle(bool show) { m_showWorkTitle = show; }
166 void setShowDuration(bool show) { m_showDuration = show; } 166 void setShowDuration(bool show) { m_showDuration = show; }
352 class SetSelectionCommand : public Command 352 class SetSelectionCommand : public Command
353 { 353 {
354 public: 354 public:
355 SetSelectionCommand(ViewManager *vm, const MultiSelection &ms); 355 SetSelectionCommand(ViewManager *vm, const MultiSelection &ms);
356 virtual ~SetSelectionCommand(); 356 virtual ~SetSelectionCommand();
357 virtual void execute(); 357 void execute() override;
358 virtual void unexecute(); 358 void unexecute() override;
359 virtual QString getName() const; 359 QString getName() const override;
360 360
361 protected: 361 protected:
362 ViewManager *m_vm; 362 ViewManager *m_vm;
363 MultiSelection m_oldSelection; 363 MultiSelection m_oldSelection;
364 MultiSelection m_newSelection; 364 MultiSelection m_newSelection;