| 855 | } |
| 856 | |
| 857 | void BookmarkView::activeSelection(const DemodulatorInstancePtr& dsel) { |
| 858 | |
| 859 | if (dsel == nullptr) { |
| 860 | hideProps(); |
| 861 | clearButtons(); |
| 862 | refreshLayout(); |
| 863 | return; |
| 864 | } |
| 865 | |
| 866 | m_frequencyVal->SetLabelText(frequencyToStr(dsel->getFrequency())); |
| 867 | m_bandwidthVal->SetLabelText(frequencyToStr(dsel->getBandwidth())); |
| 868 | m_modulationVal->SetLabelText(dsel->getDemodulatorType()); |
| 869 | m_labelText->SetValue(dsel->getDemodulatorUserLabel()); |
| 870 | |
| 871 | hideProps(false); |
| 872 | |
| 873 | m_frequencyVal->Show(); |
| 874 | m_frequencyLabel->Show(); |
| 875 | |
| 876 | m_bandwidthVal->Show(); |
| 877 | m_bandwidthLabel->Show(); |
| 878 | |
| 879 | m_modulationVal->Show(); |
| 880 | m_modulationLabel->Show(); |
| 881 | |
| 882 | m_labelText->Show(); |
| 883 | m_labelLabel->Show(); |
| 884 | |
| 885 | clearButtons(); |
| 886 | |
| 887 | addBookmarkChoice(m_buttonPanel); |
| 888 | |
| 889 | if (!(dsel->isRecording())) { |
| 890 | addButton(m_buttonPanel, "Start Recording", wxCommandEventHandler(BookmarkView::onStartRecording)); |
| 891 | } else { |
| 892 | addButton(m_buttonPanel, "Stop Recording", wxCommandEventHandler(BookmarkView::onStopRecording)); |
| 893 | } |
| 894 | |
| 895 | addButton(m_buttonPanel, "Remove Active", wxCommandEventHandler( BookmarkView::onRemoveActive )); |
| 896 | |
| 897 | showProps(); |
| 898 | showButtons(); |
| 899 | refreshLayout(); |
| 900 | } |
| 901 | |
| 902 | |
| 903 | void BookmarkView::activateBookmark(const BookmarkEntryPtr& bmEnt) { |
nothing calls this directly
no test coverage detected