Cleanup, reformat

This commit is contained in:
Charles J. Cliffe
2014-12-16 21:30:03 -05:00
parent a78651687a
commit 9e32ef478d
23 changed files with 348 additions and 368 deletions
+1 -2
View File
@@ -56,7 +56,7 @@ PrimaryGLContext::PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContex
SetCurrent(*canvas);
// Pre-load fonts
for (int i = 0; i < GLFONT_MAX; i++) {
getFont((GLFontSize)i);
getFont((GLFontSize) i);
}
CheckGLError();
}
@@ -202,7 +202,6 @@ void PrimaryGLContext::DrawFreqSelector(float uxPos, float r, float g, float b,
bw = demod->getParams().bandwidth;
}
glDisable(GL_DEPTH_TEST);
glDisable(GL_TEXTURE_2D);
+4 -2
View File
@@ -12,7 +12,9 @@
class PrimaryGLContext: public wxGLContext {
public:
enum GLFontSize { GLFONT_SIZE12, GLFONT_SIZE16, GLFONT_SIZE18, GLFONT_SIZE24, GLFONT_SIZE32, GLFONT_SIZE48, GLFONT_MAX };
enum GLFontSize {
GLFONT_SIZE12, GLFONT_SIZE16, GLFONT_SIZE18, GLFONT_SIZE24, GLFONT_SIZE32, GLFONT_SIZE48, GLFONT_MAX
};
PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContext);
static wxString glGetwxString(GLenum name);
@@ -21,7 +23,7 @@ public:
void BeginDraw();
void EndDraw();
void DrawFreqSelector(float uxPos, float r = 1, float g = 1, float b = 1, float w=0);
void DrawFreqSelector(float uxPos, float r = 1, float g = 1, float b = 1, float w = 0);
void DrawDemod(DemodulatorInstance *demod, float r = 1, float g = 1, float b = 1);
void DrawDemodInfo(DemodulatorInstance *demod, float r = 1, float g = 1, float b = 1);
+3 -3
View File
@@ -444,7 +444,7 @@ void WaterfallCanvas::mouseReleased(wxMouseEvent& event) {
demod->run();
wxGetApp().bindDemodulator(demod);
wxGetApp().getDemodMgr().setActiveDemodulator(demod,false);
wxGetApp().getDemodMgr().setActiveDemodulator(demod, false);
}
if (demod == NULL) {
@@ -482,7 +482,7 @@ void WaterfallCanvas::mouseReleased(wxMouseEvent& event) {
int center_freq = wxGetApp().getFrequency();
int freq = center_freq - (int) (0.5 * (float) SRATE) + (int) ((float) pos * (float) SRATE);
int bandwidth = (int)(fabs(width) * (float)SRATE);
int bandwidth = (int) (fabs(width) * (float) SRATE);
if (bandwidth < 1000) {
bandwidth = 1000;
@@ -503,7 +503,7 @@ void WaterfallCanvas::mouseReleased(wxMouseEvent& event) {
demod->run();
wxGetApp().bindDemodulator(demod);
wxGetApp().getDemodMgr().setActiveDemodulator(demod,false);
wxGetApp().getDemodMgr().setActiveDemodulator(demod, false);
}
if (demod == NULL) {
+4 -4
View File
@@ -14,7 +14,9 @@
class WaterfallCanvas: public wxGLCanvas {
public:
enum DragState { WF_DRAG_NONE, WF_DRAG_BANDWIDTH_LEFT, WF_DRAG_BANDWIDTH_RIGHT, WF_DRAG_FREQUENCY, WF_DRAG_RANGE };
enum DragState {
WF_DRAG_NONE, WF_DRAG_BANDWIDTH_LEFT, WF_DRAG_BANDWIDTH_RIGHT, WF_DRAG_FREQUENCY, WF_DRAG_RANGE
};
WaterfallCanvas(wxWindow *parent, int *attribList = NULL);
~WaterfallCanvas();
@@ -60,9 +62,7 @@ private:
DragState dragState;
DragState nextDragState;
bool shiftDown;
bool altDown;
bool ctrlDown;
bool shiftDown;bool altDown;bool ctrlDown;
// event table
wxDECLARE_EVENT_TABLE();
};
-1
View File
@@ -37,7 +37,6 @@ WaterfallContext::WaterfallContext(WaterfallCanvas *canvas, wxGLContext *sharedC
glPixelMapfv(GL_PIXEL_MAP_I_TO_B, 256, &(grad.getBlue())[0]);
}
void WaterfallContext::Draw(std::vector<float> &points) {
if (points.size()) {
-1
View File
@@ -11,7 +11,6 @@ class WaterfallContext: public PrimaryGLContext {
public:
WaterfallContext(WaterfallCanvas *canvas, wxGLContext *sharedContext);
void Draw(std::vector<float> &points);
private: