summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2011-01-17 18:09:38 -0800
committerJosh Blum2011-01-17 18:09:38 -0800
commite1fd88db9b7edc13a90b5c81263d062ebcf2932b (patch)
tree0144336ef27a42c89e69217471302d352899de42
parent31bbbec88b19230eb37b197d7623c3671e57837e (diff)
downloadgnuradio-e1fd88db9b7edc13a90b5c81263d062ebcf2932b.tar.gz
gnuradio-e1fd88db9b7edc13a90b5c81263d062ebcf2932b.tar.bz2
gnuradio-e1fd88db9b7edc13a90b5c81263d062ebcf2932b.zip
qtgui plots static const fixes:
Initialize static data members in the cpp file: http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.12 For the WaterfallDisplayPlot, rather than bringing the initialization into the cpp file, the numbers seemed far more fitting as an enum given that they are by nature. This removed the symbol declaration from the cpp file, so its actually simpler.
-rw-r--r--gr-qtgui/src/lib/SpectrumGUIClass.cc4
-rw-r--r--gr-qtgui/src/lib/SpectrumGUIClass.h4
-rw-r--r--gr-qtgui/src/lib/WaterfallDisplayPlot.cc6
-rw-r--r--gr-qtgui/src/lib/WaterfallDisplayPlot.h12
4 files changed, 11 insertions, 15 deletions
diff --git a/gr-qtgui/src/lib/SpectrumGUIClass.cc b/gr-qtgui/src/lib/SpectrumGUIClass.cc
index 563ed34ba..052730fc2 100644
--- a/gr-qtgui/src/lib/SpectrumGUIClass.cc
+++ b/gr-qtgui/src/lib/SpectrumGUIClass.cc
@@ -6,8 +6,8 @@
#include <QEvent>
#include <QCustomEvent>
-const long SpectrumGUIClass::MAX_FFT_SIZE;
-const long SpectrumGUIClass::MIN_FFT_SIZE;
+const long SpectrumGUIClass::MAX_FFT_SIZE = 32768;
+const long SpectrumGUIClass::MIN_FFT_SIZE = 1024;
SpectrumGUIClass::SpectrumGUIClass(const uint64_t maxDataSize,
const uint64_t fftSize,
diff --git a/gr-qtgui/src/lib/SpectrumGUIClass.h b/gr-qtgui/src/lib/SpectrumGUIClass.h
index 63a340c34..57a749a6a 100644
--- a/gr-qtgui/src/lib/SpectrumGUIClass.h
+++ b/gr-qtgui/src/lib/SpectrumGUIClass.h
@@ -67,8 +67,8 @@ public:
void DecrementPendingGUIUpdateEvents();
void ResetPendingGUIUpdateEvents();
- static const long MAX_FFT_SIZE = /*1048576*/32768;
- static const long MIN_FFT_SIZE = 1024;
+ static const long MAX_FFT_SIZE;
+ static const long MIN_FFT_SIZE;
QWidget* qwidget();
diff --git a/gr-qtgui/src/lib/WaterfallDisplayPlot.cc b/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
index 680c44756..805af1d8d 100644
--- a/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
+++ b/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
@@ -210,12 +210,6 @@ private:
};
-const int WaterfallDisplayPlot::INTENSITY_COLOR_MAP_TYPE_MULTI_COLOR;
-const int WaterfallDisplayPlot::INTENSITY_COLOR_MAP_TYPE_WHITE_HOT;
-const int WaterfallDisplayPlot::INTENSITY_COLOR_MAP_TYPE_BLACK_HOT;
-const int WaterfallDisplayPlot::INTENSITY_COLOR_MAP_TYPE_INCANDESCENT;
-const int WaterfallDisplayPlot::INTENSITY_COLOR_MAP_TYPE_USER_DEFINED;
-
WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent)
: QwtPlot(parent)
{
diff --git a/gr-qtgui/src/lib/WaterfallDisplayPlot.h b/gr-qtgui/src/lib/WaterfallDisplayPlot.h
index a5ccaec40..5f55e91c0 100644
--- a/gr-qtgui/src/lib/WaterfallDisplayPlot.h
+++ b/gr-qtgui/src/lib/WaterfallDisplayPlot.h
@@ -39,11 +39,13 @@ public:
const QColor GetUserDefinedLowIntensityColor()const;
const QColor GetUserDefinedHighIntensityColor()const;
- static const int INTENSITY_COLOR_MAP_TYPE_MULTI_COLOR = 0;
- static const int INTENSITY_COLOR_MAP_TYPE_WHITE_HOT = 1;
- static const int INTENSITY_COLOR_MAP_TYPE_BLACK_HOT = 2;
- static const int INTENSITY_COLOR_MAP_TYPE_INCANDESCENT = 3;
- static const int INTENSITY_COLOR_MAP_TYPE_USER_DEFINED = 4;
+ enum{
+ INTENSITY_COLOR_MAP_TYPE_MULTI_COLOR = 0,
+ INTENSITY_COLOR_MAP_TYPE_WHITE_HOT = 1,
+ INTENSITY_COLOR_MAP_TYPE_BLACK_HOT = 2,
+ INTENSITY_COLOR_MAP_TYPE_INCANDESCENT = 3,
+ INTENSITY_COLOR_MAP_TYPE_USER_DEFINED = 4
+ };
public slots:
void resizeSlot( QSize *s );