Mercurial > hg > tony
changeset 476:bc48192e8307 recording
Enable record button. Let's see what it does.
author | Chris Cannam |
---|---|
date | Thu, 20 Aug 2015 15:46:05 +0100 |
parents | 93ce2193af31 |
children | bacfe9945ce4 |
files | src/MainWindow.cpp |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/MainWindow.cpp Thu Aug 20 15:40:04 2015 +0100 +++ b/src/MainWindow.cpp Thu Aug 20 15:46:05 2015 +0100 @@ -1020,6 +1020,17 @@ connect(ffwdEndAction, SIGNAL(triggered()), this, SLOT(ffwdEnd())); connect(this, SIGNAL(canPlay(bool)), ffwdEndAction, SLOT(setEnabled(bool))); + QAction *recordAction = toolbar->addAction(il.load("record"), + tr("Record")); + recordAction->setCheckable(true); + recordAction->setShortcut(tr("Ctrl+Space")); + recordAction->setStatusTip(tr("Record a new audio file")); + connect(recordAction, SIGNAL(triggered()), this, SLOT(record())); + connect(m_recordTarget, SIGNAL(recordStatusChanged(bool)), + recordAction, SLOT(setChecked(bool))); + connect(this, SIGNAL(canRecord(bool)), + recordAction, SLOT(setEnabled(bool))); + toolbar = addToolBar(tr("Play Mode Toolbar")); QAction *psAction = toolbar->addAction(il.load("playselection"), @@ -1071,10 +1082,12 @@ m_keyReference->registerShortcut(psAction); m_keyReference->registerShortcut(plAction); m_keyReference->registerShortcut(playAction); + m_keyReference->registerShortcut(recordAction); m_keyReference->registerShortcut(m_rwdAction); m_keyReference->registerShortcut(m_ffwdAction); m_keyReference->registerShortcut(rwdStartAction); m_keyReference->registerShortcut(ffwdEndAction); + m_keyReference->registerShortcut(recordAction); m_keyReference->registerShortcut(oneLeftAction); m_keyReference->registerShortcut(oneRightAction); m_keyReference->registerShortcut(selectOneLeftAction); @@ -1095,6 +1108,8 @@ menu->addAction(selectOneLeftAction); menu->addAction(selectOneRightAction); menu->addSeparator(); + menu->addAction(recordAction); + menu->addSeparator(); m_rightButtonPlaybackMenu->addAction(playAction); m_rightButtonPlaybackMenu->addAction(psAction); @@ -1111,6 +1126,8 @@ m_rightButtonPlaybackMenu->addAction(selectOneLeftAction); m_rightButtonPlaybackMenu->addAction(selectOneRightAction); m_rightButtonPlaybackMenu->addSeparator(); + m_rightButtonPlaybackMenu->addAction(recordAction); + m_rightButtonPlaybackMenu->addSeparator(); QAction *fastAction = menu->addAction(tr("Speed Up")); fastAction->setShortcut(tr("Ctrl+PgUp"));