# HG changeset patch # User Chris Cannam # Date 1440082571 -3600 # Node ID bacfe9945ce48a60a0e36e3b6ad3211d475883f7 # Parent bc48192e830778577cebe78868142815cf0c5fc9# Parent 30b304e226100ce29eb82cae04502bbe5780fa9d Merge from branch 2.0-integration diff -r 30b304e22610 -r bacfe9945ce4 src/MainWindow.cpp --- a/src/MainWindow.cpp Thu Aug 20 15:52:23 2015 +0100 +++ b/src/MainWindow.cpp Thu Aug 20 15:56:11 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"));