mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-25 13:03:21 -04:00
Demodulator now has it's own spectrum view
This commit is contained in:
@@ -21,7 +21,7 @@ wxEND_EVENT_TABLE()
|
||||
|
||||
ScopeCanvas::ScopeCanvas(wxWindow *parent, int *attribList) :
|
||||
wxGLCanvas(parent, wxID_ANY, attribList, wxDefaultPosition, wxDefaultSize,
|
||||
wxFULL_REPAINT_ON_RESIZE), parent(parent), frameTimer(0), divider(false) {
|
||||
wxFULL_REPAINT_ON_RESIZE), parent(parent), frameTimer(0), stereo(false) {
|
||||
|
||||
glContext = new ScopeContext(this, &wxGetApp().GetContext(this));
|
||||
timer.start();
|
||||
@@ -35,8 +35,8 @@ void ScopeCanvas::setWaveformPoints(std::vector<float> &waveform_points_in) {
|
||||
waveform_points = waveform_points_in;
|
||||
}
|
||||
|
||||
void ScopeCanvas::setDivider(bool state) {
|
||||
divider = state;
|
||||
void ScopeCanvas::setStereo(bool state) {
|
||||
stereo = state;
|
||||
}
|
||||
|
||||
void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||
@@ -47,10 +47,7 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||
glViewport(0, 0, ClientSize.x, ClientSize.y);
|
||||
|
||||
glContext->DrawBegin();
|
||||
glContext->Plot(waveform_points);
|
||||
if (divider) {
|
||||
glContext->DrawDivider();
|
||||
}
|
||||
glContext->Plot(waveform_points, stereo);
|
||||
glContext->DrawEnd();
|
||||
|
||||
SwapBuffers();
|
||||
|
||||
Reference in New Issue
Block a user