comparison framework/MainWindowBase.h @ 481:52c0aff69478 3.0-integration

Merge from branch recording
author Chris Cannam
date Thu, 20 Aug 2015 13:15:19 +0100
parents 411e019474e5
children 493f2af85497
comparison
equal deleted inserted replaced
472:6ec35c1690c0 481:52c0aff69478
44 class Overview; 44 class Overview;
45 class Layer; 45 class Layer;
46 class WaveformLayer; 46 class WaveformLayer;
47 class WaveFileModel; 47 class WaveFileModel;
48 class AudioCallbackPlaySource; 48 class AudioCallbackPlaySource;
49 class AudioRecordTarget;
49 class CommandHistory; 50 class CommandHistory;
50 class QMenu; 51 class QMenu;
51 class AudioDial; 52 class AudioDial;
52 class QLabel; 53 class QLabel;
53 class QCheckBox; 54 class QCheckBox;
62 class QSignalMapper; 63 class QSignalMapper;
63 class QShortcut; 64 class QShortcut;
64 65
65 namespace breakfastquay { 66 namespace breakfastquay {
66 class SystemPlaybackTarget; 67 class SystemPlaybackTarget;
68 class SystemAudioIO;
67 } 69 }
68 70
69 /** 71 /**
70 * The base class for the SV main window. This includes everything to 72 * The base class for the SV main window. This includes everything to
71 * do with general document and pane stack management, but nothing 73 * do with general document and pane stack management, but nothing
78 class MainWindowBase : public QMainWindow, public FrameTimer 80 class MainWindowBase : public QMainWindow, public FrameTimer
79 { 81 {
80 Q_OBJECT 82 Q_OBJECT
81 83
82 public: 84 public:
83 MainWindowBase(bool withAudioOutput, bool withMIDIInput); 85 enum SoundOption {
86 WithAudioOutput = 0x01,
87 WithAudioInput = 0x02,
88 WithMIDIInput = 0x04,
89 WithEverything = 0xff
90 };
91 typedef int SoundOptions;
92
93 MainWindowBase(SoundOptions options = WithEverything);
84 virtual ~MainWindowBase(); 94 virtual ~MainWindowBase();
85 95
86 enum AudioFileOpenMode { 96 enum AudioFileOpenMode {
87 ReplaceSession, 97 ReplaceSession,
88 ReplaceMainModel, 98 ReplaceMainModel,
147 void canRenumberInstants(bool); 157 void canRenumberInstants(bool);
148 void canDeleteCurrentLayer(bool); 158 void canDeleteCurrentLayer(bool);
149 void canZoom(bool); 159 void canZoom(bool);
150 void canScroll(bool); 160 void canScroll(bool);
151 void canPlay(bool); 161 void canPlay(bool);
162 void canRecord(bool);
152 void canFfwd(bool); 163 void canFfwd(bool);
153 void canRewind(bool); 164 void canRewind(bool);
154 void canPlaySelection(bool); 165 void canPlaySelection(bool);
155 void canSpeedUpPlayback(bool); 166 void canSpeedUpPlayback(bool);
156 void canSlowDownPlayback(bool); 167 void canSlowDownPlayback(bool);
197 virtual void play(); 208 virtual void play();
198 virtual void ffwd(); 209 virtual void ffwd();
199 virtual void ffwdEnd(); 210 virtual void ffwdEnd();
200 virtual void rewind(); 211 virtual void rewind();
201 virtual void rewindStart(); 212 virtual void rewindStart();
213 virtual void record();
202 virtual void stop(); 214 virtual void stop();
203 215
204 virtual void ffwdSimilar(); 216 virtual void ffwdSimilar();
205 virtual void rewindSimilar(); 217 virtual void rewindSimilar();
206 218
305 317
306 PaneStack *m_paneStack; 318 PaneStack *m_paneStack;
307 ViewManager *m_viewManager; 319 ViewManager *m_viewManager;
308 Layer *m_timeRulerLayer; 320 Layer *m_timeRulerLayer;
309 321
310 bool m_audioOutput; 322 SoundOptions m_soundOptions;
323
311 AudioCallbackPlaySource *m_playSource; 324 AudioCallbackPlaySource *m_playSource;
312 breakfastquay::SystemPlaybackTarget *m_playTarget; 325 AudioRecordTarget *m_recordTarget;
326 breakfastquay::SystemPlaybackTarget *m_playTarget; // only one of this...
327 breakfastquay::SystemAudioIO *m_audioIO; // ... and this exists
313 328
314 class OSCQueueStarter : public QThread 329 class OSCQueueStarter : public QThread
315 { 330 {
316 public: 331 public:
317 OSCQueueStarter(MainWindowBase *mwb) : QThread(mwb), m_mwb(mwb) { } 332 OSCQueueStarter(MainWindowBase *mwb) : QThread(mwb), m_mwb(mwb) { }
422 virtual void registerLastOpenedFilePath(FileFinder::FileType type, QString path); 437 virtual void registerLastOpenedFilePath(FileFinder::FileType type, QString path);
423 438
424 virtual QString getDefaultSessionTemplate() const; 439 virtual QString getDefaultSessionTemplate() const;
425 virtual void setDefaultSessionTemplate(QString); 440 virtual void setDefaultSessionTemplate(QString);
426 441
427 virtual void createPlayTarget(); 442 virtual void createAudioIO();
428 virtual void openHelpUrl(QString url); 443 virtual void openHelpUrl(QString url);
429 444
430 virtual void setupMenus() = 0; 445 virtual void setupMenus() = 0;
431 virtual void updateVisibleRangeDisplay(Pane *p) const = 0; 446 virtual void updateVisibleRangeDisplay(Pane *p) const = 0;
432 virtual void updatePositionStatusDisplays() const = 0; 447 virtual void updatePositionStatusDisplays() const = 0;