MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / makeModemSelectorPanel

Method makeModemSelectorPanel

src/AppFrame.cpp:799–829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

797}
798
799ModeSelectorCanvas *AppFrame::makeModemSelectorPanel(wxWindow *parent, const wxGLAttributes &attribList) {
800 vector<string> modemList = {"FM", "FMS", "NBFM", "AM", "CW", "LSB", "USB", "DSB", "I/Q" };
801
802#ifdef CUBICSDR_MODEM_EXCLUDE
803 std::string excludeListStr = "" CUBICSDR_MODEM_EXCLUDE;
804 std::vector<std::string> excludeList = str_explode(",",excludeListStr);
805 for (auto ex_i : excludeList) {
806 std::vector<std::string>::iterator found_i = std::find(modemList.begin(),modemList.end(),ex_i);
807 if (found_i != modemList.end()) {
808 modemList.erase(found_i);
809 }
810 }
811#endif
812
813 auto *pCanvas = new ModeSelectorCanvas(parent, attribList);
814
815 for (const auto& mt_i : modemList) {
816 pCanvas->addChoice(mt_i);
817 }
818
819#ifdef CUBICSDR_MODEM_EXCLUDE
820 demodModeSelector->setHelpTip("Use buttons to choose modulation type.");
821#else
822 pCanvas->setHelpTip("Choose modulation type: Frequency Modulation (Hotkey F), Amplitude Modulation (A) and Lower (L), Upper (U), Double Side-Band and more.");
823#endif
824
825 pCanvas->SetMinSize(wxSize(50, -1));
826 pCanvas->SetMaxSize(wxSize(50, -1));
827
828 return pCanvas;
829}
830
831AppFrame::~AppFrame() {
832

Callers

nothing calls this directly

Calls 2

addChoiceMethod · 0.80
setHelpTipMethod · 0.45

Tested by

no test coverage detected