mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-27 06:08:37 -05:00
Make decibels display toggleable
This commit is contained in:
parent
62858abbf5
commit
3c822e1bd8
@ -126,7 +126,6 @@ void SpectrumCanvas::moveCenterFrequency(long long freqChange) {
|
|||||||
freq -= freqChange;
|
freq -= freqChange;
|
||||||
}
|
}
|
||||||
wxGetApp().setFrequency(freq);
|
wxGetApp().setFrequency(freq);
|
||||||
setStatusText("Set center frequency: %s", freq);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,6 +133,10 @@ void SpectrumCanvas::setShowDb(bool showDb) {
|
|||||||
spectrumPanel.setShowDb(showDb);
|
spectrumPanel.setShowDb(showDb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SpectrumCanvas::getShowDb() {
|
||||||
|
return spectrumPanel.getShowDb();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SpectrumCanvas::OnMouseMoved(wxMouseEvent& event) {
|
void SpectrumCanvas::OnMouseMoved(wxMouseEvent& event) {
|
||||||
InteractiveCanvas::OnMouseMoved(event);
|
InteractiveCanvas::OnMouseMoved(event);
|
||||||
@ -144,7 +147,7 @@ void SpectrumCanvas::OnMouseMoved(wxMouseEvent& event) {
|
|||||||
moveCenterFrequency(freqChange);
|
moveCenterFrequency(freqChange);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setStatusText("Click and drag to adjust center frequency.");
|
setStatusText("Click and drag to adjust center frequency. 'B' to toggle decibels display.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ public:
|
|||||||
void moveCenterFrequency(long long freqChange);
|
void moveCenterFrequency(long long freqChange);
|
||||||
|
|
||||||
void setShowDb(bool showDb);
|
void setShowDb(bool showDb);
|
||||||
|
bool getShowDb();
|
||||||
|
|
||||||
SpectrumVisualDataQueue *getVisualDataQueue();
|
SpectrumVisualDataQueue *getVisualDataQueue();
|
||||||
|
|
||||||
|
@ -338,6 +338,11 @@ void WaterfallCanvas::OnKeyDown(wxKeyEvent& event) {
|
|||||||
activeDemod->setStereo(true);
|
activeDemod->setStereo(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'B':
|
||||||
|
if (spectrumCanvas) {
|
||||||
|
spectrumCanvas->setShowDb(!spectrumCanvas->getShowDb());
|
||||||
|
}
|
||||||
|
break;
|
||||||
case WXK_SPACE:
|
case WXK_SPACE:
|
||||||
wxGetApp().showFrequencyInput();
|
wxGetApp().showFrequencyInput();
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user