comparison framework/MainWindowBase.cpp @ 571:5369359351cb 3.0-integration

Add record update timer (very crude this)
author Chris Cannam
date Wed, 04 Jan 2017 13:23:18 +0000
parents 6f54789f3127
children 4c1ab4f9e116
comparison
equal deleted inserted replaced
570:6f54789f3127 571:5369359351cb
156 m_labeller(0), 156 m_labeller(0),
157 m_lastPlayStatusSec(0), 157 m_lastPlayStatusSec(0),
158 m_initialDarkBackground(false), 158 m_initialDarkBackground(false),
159 m_defaultFfwdRwdStep(2, 0), 159 m_defaultFfwdRwdStep(2, 0),
160 m_audioRecordMode(RecordCreateAdditionalModel), 160 m_audioRecordMode(RecordCreateAdditionalModel),
161 m_audioRecordUpdateTimer(this),
161 m_statusLabel(0), 162 m_statusLabel(0),
162 m_iconsVisibleInMenus(true), 163 m_iconsVisibleInMenus(true),
163 m_menuShortcutMapper(0) 164 m_menuShortcutMapper(0)
164 { 165 {
165 Profiler profiler("MainWindowBase::MainWindowBase"); 166 Profiler profiler("MainWindowBase::MainWindowBase");
229 connect(m_paneStack, SIGNAL(dropAccepted(Pane *, QString)), 230 connect(m_paneStack, SIGNAL(dropAccepted(Pane *, QString)),
230 this, SLOT(paneDropAccepted(Pane *, QString))); 231 this, SLOT(paneDropAccepted(Pane *, QString)));
231 connect(m_paneStack, SIGNAL(paneDeleteButtonClicked(Pane *)), 232 connect(m_paneStack, SIGNAL(paneDeleteButtonClicked(Pane *)),
232 this, SLOT(paneDeleteButtonClicked(Pane *))); 233 this, SLOT(paneDeleteButtonClicked(Pane *)));
233 234
235 connect(&m_audioRecordUpdateTimer, SIGNAL(timeout()),
236 m_paneStack, SLOT(update()));
237
234 m_playSource = new AudioCallbackPlaySource(m_viewManager, 238 m_playSource = new AudioCallbackPlaySource(m_viewManager,
235 QApplication::applicationName()); 239 QApplication::applicationName());
236 if (m_soundOptions & WithAudioInput) { 240 if (m_soundOptions & WithAudioInput) {
237 m_recordTarget = new AudioRecordTarget(m_viewManager, 241 m_recordTarget = new AudioRecordTarget(m_viewManager,
238 QApplication::applicationName()); 242 QApplication::applicationName());
478 if (m_oscQueue && m_oscQueue->isOK()) { 482 if (m_oscQueue && m_oscQueue->isOK()) {
479 connect(m_oscQueue, SIGNAL(messagesAvailable()), this, SLOT(pollOSC())); 483 connect(m_oscQueue, SIGNAL(messagesAvailable()), this, SLOT(pollOSC()));
480 QTimer *oscTimer = new QTimer(this); 484 QTimer *oscTimer = new QTimer(this);
481 connect(oscTimer, SIGNAL(timeout()), this, SLOT(pollOSC())); 485 connect(oscTimer, SIGNAL(timeout()), this, SLOT(pollOSC()));
482 oscTimer->start(1000); 486 oscTimer->start(1000);
483 cerr << "Finished setting up OSC interface" << endl; 487 SVCERR << "Finished setting up OSC interface" << endl;
484 } 488 }
485 } 489 }
486 490
487 QString 491 QString
488 MainWindowBase::getOpenFileName(FileFinder::FileType type) 492 MainWindowBase::getOpenFileName(FileFinder::FileType type)
3012 updateMenuStates(); 3016 updateMenuStates();
3013 m_recentFiles.addFile(model->getLocation()); 3017 m_recentFiles.addFile(model->getLocation());
3014 currentPaneChanged(m_paneStack->getCurrentPane()); 3018 currentPaneChanged(m_paneStack->getCurrentPane());
3015 3019
3016 emit audioFileLoaded(); 3020 emit audioFileLoaded();
3021
3022 m_audioRecordUpdateTimer.start(1000);
3017 } 3023 }
3018 3024
3019 void 3025 void
3020 MainWindowBase::ffwd() 3026 MainWindowBase::ffwd()
3021 { 3027 {
3260 updateVisibleRangeDisplay(m_paneStack->getCurrentPane()); 3266 updateVisibleRangeDisplay(m_paneStack->getCurrentPane());
3261 } else { 3267 } else {
3262 m_myStatusMessage = ""; 3268 m_myStatusMessage = "";
3263 getStatusLabel()->setText(""); 3269 getStatusLabel()->setText("");
3264 } 3270 }
3271
3272 m_audioRecordUpdateTimer.stop();
3265 } 3273 }
3266 3274
3267 MainWindowBase::AddPaneCommand::AddPaneCommand(MainWindowBase *mw) : 3275 MainWindowBase::AddPaneCommand::AddPaneCommand(MainWindowBase *mw) :
3268 m_mw(mw), 3276 m_mw(mw),
3269 m_pane(0), 3277 m_pane(0),