Recording path notify, bookmark panel record buttons, tweaks and adjustments

This commit is contained in:
Charles J. Cliffe
2017-12-04 22:44:47 -05:00
parent 326a993a29
commit b9e4f6aeba
10 changed files with 84 additions and 14 deletions
+33 -1
View File
@@ -816,8 +816,16 @@ void BookmarkView::activeSelection(DemodulatorInstancePtr dsel) {
clearButtons();
addBookmarkChoice(m_buttonPanel);
addButton(m_buttonPanel, "Remove Active", wxCommandEventHandler( BookmarkView::onRemoveActive ));
if (dsel->isActive() && !(dsel->isRecording())) {
addButton(m_buttonPanel, "Start Recording", wxCommandEventHandler( BookmarkView::onStartRecording ));
} else {
addButton(m_buttonPanel, "Stop Recording", wxCommandEventHandler( BookmarkView::onStopRecording ));
}
addButton(m_buttonPanel, "Remove Active", wxCommandEventHandler( BookmarkView::onRemoveActive ));
showProps();
showButtons();
refreshLayout();
@@ -1149,6 +1157,30 @@ void BookmarkView::onRemoveActive( wxCommandEvent& /* event */ ) {
}
}
void BookmarkView::onStartRecording( wxCommandEvent& /* event */ ) {
TreeViewItem *curSel = itemToTVI(m_treeView->GetSelection());
if (curSel && curSel->type == TreeViewItem::TREEVIEW_ITEM_TYPE_ACTIVE) {
if (!curSel->demod->isRecording() && wxGetApp().getConfig()->verifyRecordingPath()) {
curSel->demod->setRecording(true);
wxGetApp().getBookmarkMgr().updateActiveList();
}
}
}
void BookmarkView::onStopRecording( wxCommandEvent& /* event */ ) {
TreeViewItem *curSel = itemToTVI(m_treeView->GetSelection());
if (curSel && curSel->type == TreeViewItem::TREEVIEW_ITEM_TYPE_ACTIVE) {
if (curSel->demod->isRecording()) {
curSel->demod->setRecording(false);
wxGetApp().getBookmarkMgr().updateActiveList();
}
}
}
void BookmarkView::onRemoveBookmark( wxCommandEvent& /* event */ ) {
if (editingLabel) {
+2
View File
@@ -145,6 +145,8 @@ protected:
void onBookmarkChoice( wxCommandEvent &event );
void onRemoveActive( wxCommandEvent& event );
void onStartRecording( wxCommandEvent& event );
void onStopRecording( wxCommandEvent& event );
void onRemoveBookmark( wxCommandEvent& event );
void onActivateBookmark( wxCommandEvent& event );