mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-08 08:55:07 -04:00
cleanup
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "ColorTheme.h"
|
||||
|
||||
SpectrumContext::SpectrumContext(SpectrumCanvas *canvas, wxGLContext *sharedContext) :
|
||||
PrimaryGLContext(canvas, sharedContext), fft_size(0), floorValue(0), ceilValue(1) {
|
||||
PrimaryGLContext(canvas, sharedContext), floorValue(0), ceilValue(1) {
|
||||
glDisable(GL_CULL_FACE);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
|
||||
@@ -19,6 +19,5 @@ public:
|
||||
void setCeilValue(float ceilValue);
|
||||
|
||||
private:
|
||||
int fft_size;
|
||||
float floorValue, ceilValue;
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ EVT_KEY_UP(TuningCanvas::OnKeyUp)
|
||||
wxEND_EVENT_TABLE()
|
||||
|
||||
TuningCanvas::TuningCanvas(wxWindow *parent, int *attribList) :
|
||||
InteractiveCanvas(parent, attribList), dragAccum(0), top(false), bottom(false), uxDown(0) {
|
||||
InteractiveCanvas(parent, attribList), dragAccum(0), uxDown(0), top(false), bottom(false) {
|
||||
|
||||
glContext = new TuningContext(this, &wxGetApp().GetContext(this));
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ wxEND_EVENT_TABLE()
|
||||
|
||||
WaterfallCanvas::WaterfallCanvas(wxWindow *parent, int *attribList) :
|
||||
InteractiveCanvas(parent, attribList), dragState(WF_DRAG_NONE), nextDragState(WF_DRAG_NONE), fft_size(0), waterfall_lines(
|
||||
0), zoom(1), mouseZoom(1), hoverAlpha(1.0), dragOfs(0) {
|
||||
0), mouseZoom(1), zoom(1), hoverAlpha(1.0), dragOfs(0) {
|
||||
|
||||
glContext = new WaterfallContext(this, &wxGetApp().GetContext(this));
|
||||
|
||||
@@ -173,7 +173,6 @@ void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||
int currentBandwidth = getBandwidth();
|
||||
long long currentCenterFreq = getCenterFrequency();
|
||||
|
||||
float demodColor, selectorColor;
|
||||
ColorTheme *currentTheme = ThemeMgr::mgr.currentTheme;
|
||||
int last_type = wxGetApp().getDemodMgr().getLastDemodulatorType();
|
||||
|
||||
@@ -260,13 +259,11 @@ void WaterfallCanvas::OnKeyUp(wxKeyEvent& event) {
|
||||
|
||||
void WaterfallCanvas::OnKeyDown(wxKeyEvent& event) {
|
||||
InteractiveCanvas::OnKeyDown(event);
|
||||
float angle = 5.0;
|
||||
|
||||
DemodulatorInstance *activeDemod = wxGetApp().getDemodMgr().getActiveDemodulator();
|
||||
|
||||
long long freq;
|
||||
long long originalFreq;
|
||||
unsigned int bw;
|
||||
switch (event.GetKeyCode()) {
|
||||
case 'A':
|
||||
zoom = 0.95;
|
||||
@@ -425,7 +422,6 @@ void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {
|
||||
setStatusText("Click and drag to set the current demodulator range.");
|
||||
}
|
||||
} else if (demodsHover->size() && !shiftDown) {
|
||||
int hovered = -1;
|
||||
long near_dist = getBandwidth();
|
||||
|
||||
DemodulatorInstance *activeDemodulator = NULL;
|
||||
|
||||
@@ -57,7 +57,6 @@ private:
|
||||
int waterfall_lines;
|
||||
int dragOfs;
|
||||
|
||||
int lastInputBandwidth;
|
||||
float mouseZoom, zoom;
|
||||
float hoverAlpha;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "CubicSDR.h"
|
||||
|
||||
WaterfallContext::WaterfallContext(WaterfallCanvas *canvas, wxGLContext *sharedContext) :
|
||||
PrimaryGLContext(canvas, sharedContext), waterfall_lines(0), waterfall_slice(NULL), fft_size(0), activeTheme(NULL) {
|
||||
PrimaryGLContext(canvas, sharedContext), fft_size(0), waterfall_lines(0), waterfall_slice(NULL), activeTheme(NULL) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
waterfall[i] = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user