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

Method actionOnMenuDBOffset

src/AppFrame.cpp:2020–2033  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2018}
2019
2020bool AppFrame::actionOnMenuDBOffset(wxCommandEvent &event) {
2021 if (event.GetId() == wxID_SET_DB_OFFSET) {
2022 long ofs = wxGetNumberFromUser("Shift the displayed RF power level by this amount.\ni.e. -30 for -30 dB",
2023 "Decibels (dB)",
2024 "Power Level Offset", wxGetApp().getConfig()->getDBOffset(), -1000, 1000, this);
2025 if (ofs != -1) {
2026 wxGetApp().getConfig()->setDBOffset(ofs);
2027 settingsMenuItems[wxID_SET_DB_OFFSET]->SetItemLabel(
2028 getSettingsLabel("Power Level Offset", to_string(wxGetApp().getConfig()->getDBOffset()), "dB"));
2029 }
2030 return true;
2031 }
2032 return false;
2033}
2034
2035bool AppFrame::actionOnMenuFreqOffset(wxCommandEvent &event) {
2036 if (event.GetId() == wxID_SET_FREQ_OFFSET) {

Callers

nothing calls this directly

Calls 3

getDBOffsetMethod · 0.80
getConfigMethod · 0.80
setDBOffsetMethod · 0.80

Tested by

no test coverage detected