Mercurial > hg > svapp
changeset 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 |
files | framework/MainWindowBase.cpp framework/MainWindowBase.h |
diffstat | 2 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Wed Jan 04 11:48:03 2017 +0000 +++ b/framework/MainWindowBase.cpp Wed Jan 04 13:23:18 2017 +0000 @@ -158,6 +158,7 @@ m_initialDarkBackground(false), m_defaultFfwdRwdStep(2, 0), m_audioRecordMode(RecordCreateAdditionalModel), + m_audioRecordUpdateTimer(this), m_statusLabel(0), m_iconsVisibleInMenus(true), m_menuShortcutMapper(0) @@ -231,6 +232,9 @@ connect(m_paneStack, SIGNAL(paneDeleteButtonClicked(Pane *)), this, SLOT(paneDeleteButtonClicked(Pane *))); + connect(&m_audioRecordUpdateTimer, SIGNAL(timeout()), + m_paneStack, SLOT(update())); + m_playSource = new AudioCallbackPlaySource(m_viewManager, QApplication::applicationName()); if (m_soundOptions & WithAudioInput) { @@ -480,7 +484,7 @@ QTimer *oscTimer = new QTimer(this); connect(oscTimer, SIGNAL(timeout()), this, SLOT(pollOSC())); oscTimer->start(1000); - cerr << "Finished setting up OSC interface" << endl; + SVCERR << "Finished setting up OSC interface" << endl; } } @@ -3014,6 +3018,8 @@ currentPaneChanged(m_paneStack->getCurrentPane()); emit audioFileLoaded(); + + m_audioRecordUpdateTimer.start(1000); } void @@ -3262,6 +3268,8 @@ m_myStatusMessage = ""; getStatusLabel()->setText(""); } + + m_audioRecordUpdateTimer.stop(); } MainWindowBase::AddPaneCommand::AddPaneCommand(MainWindowBase *mw) :
--- a/framework/MainWindowBase.h Wed Jan 04 11:48:03 2017 +0000 +++ b/framework/MainWindowBase.h Wed Jan 04 13:23:18 2017 +0000 @@ -13,8 +13,8 @@ COPYING included with this distribution for more information. */ -#ifndef _MAIN_WINDOW_BASE_H_ -#define _MAIN_WINDOW_BASE_H_ +#ifndef SV_MAIN_WINDOW_BASE_H +#define SV_MAIN_WINDOW_BASE_H #include <QFrame> #include <QString> @@ -22,6 +22,7 @@ #include <QMainWindow> #include <QPointer> #include <QThread> +#include <QTimer> #include "base/Command.h" #include "view/ViewManager.h" @@ -388,7 +389,8 @@ RealTime m_defaultFfwdRwdStep; AudioRecordMode m_audioRecordMode; - + QTimer m_audioRecordUpdateTimer; + mutable QLabel *m_statusLabel; QLabel *getStatusLabel() const;