summaryrefslogtreecommitdiff
path: root/gr-utils/src/python/gr_plot_qt
diff options
context:
space:
mode:
authorTom Rondeau2012-04-13 18:36:53 -0400
committerTom Rondeau2012-04-13 18:36:53 -0400
commitf919f9dcbb54a08e6e26d6c229ce92fb784fa1b2 (patch)
tree7e846386b9eb1676f9a93fc4a1e55916b9accc97 /gr-utils/src/python/gr_plot_qt
parent6a1e9783fec6ed827f49db27c171591d30f32933 (diff)
downloadgnuradio-f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2.tar.gz
gnuradio-f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2.tar.bz2
gnuradio-f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2.zip
Removed whitespace and added dtools/bin/remove-whitespace as a tool to do this in the future.
The sed script was provided by Moritz Fischer.
Diffstat (limited to 'gr-utils/src/python/gr_plot_qt')
-rwxr-xr-xgr-utils/src/python/gr_plot_qt42
1 files changed, 21 insertions, 21 deletions
diff --git a/gr-utils/src/python/gr_plot_qt b/gr-utils/src/python/gr_plot_qt
index 937d0014b..153359f0c 100755
--- a/gr-utils/src/python/gr_plot_qt
+++ b/gr-utils/src/python/gr_plot_qt
@@ -55,12 +55,12 @@ class SpectrogramData(Qwt.QwtRasterData):
def rasterHint(self, rect):
return Qt.QSize(self.sp.shape[0], self.sp.shape[1])
-
+
def copy(self):
return self
def range(self):
-
+
return Qwt.QwtDoubleInterval(self.sp.min(), self.sp.max())
def value(self, x, y):
@@ -77,7 +77,7 @@ class gr_plot_qt(QtGui.QMainWindow):
QtGui.QWidget.__init__(self, parent)
self.gui = Ui_MainWindow()
self.gui.setupUi(self)
-
+
self.filename = None
self.block_length = options.block_length
self.start = options.start
@@ -127,8 +127,8 @@ class gr_plot_qt(QtGui.QMainWindow):
self.connect(self.gui.colorComboBox,
Qt.SIGNAL("activated (const QString&)"),
self.colorComboBoxEdit)
-
-
+
+
# Set up line style combo box
self.line_styles = {"None" : Qwt.QwtSymbol.NoSymbol,
"Circle" : Qwt.QwtSymbol.Ellipse,
@@ -290,7 +290,7 @@ class gr_plot_qt(QtGui.QMainWindow):
def reload_file(self):
if(self.filename):
self.initialize(self.filename)
-
+
def initialize(self, filename):
self.filename = filename
self.hfile = open(filename, "r")
@@ -308,7 +308,7 @@ class gr_plot_qt(QtGui.QMainWindow):
self.init_data_input()
self.get_data(self.cur_start, self.cur_stop)
self.get_psd()
- self.get_specgram()
+ self.get_specgram()
self.gui.plotHBar.setSliderPosition(0)
self.gui.plotHBar.setMaximum(self.signal_size-self.block_length)
@@ -322,7 +322,7 @@ class gr_plot_qt(QtGui.QMainWindow):
self.signal_size = self.hfile.tell()/self.sizeof_data
#print "Sizeof File: ", self.signal_size
self.hfile.seek(0, os.SEEK_SET)
-
+
def get_data(self, start, end):
if(end > start):
self.hfile.seek(start*self.sizeof_data, os.SEEK_SET)
@@ -365,7 +365,7 @@ class gr_plot_qt(QtGui.QMainWindow):
noverlap=self.specfftsize/4.0,
window=winpoints,
scale_by_freq=False)
-
+
self.iq_spec = 10.0*scipy.log10(abs(iq_spec))
self.spec_f = f
self.spec_t = t
@@ -379,7 +379,7 @@ class gr_plot_qt(QtGui.QMainWindow):
self.specfftsize = fftSize.toInt()[0]
self.get_specgram()
self.update_specgram_curves()
-
+
def colorComboBoxEdit(self, colorSelection):
colorstr = str(colorSelection.toAscii())
color_func = self.color_modes[colorstr]
@@ -443,7 +443,7 @@ class gr_plot_qt(QtGui.QMainWindow):
tend = self.cur_stop / self.sample_rate
self.gui.fileTimeStartLineEdit.setText(Qt.QString("%1").arg(tstart))
self.gui.fileTimeStopLineEdit.setText(Qt.QString("%1").arg(tend))
-
+
self.get_data(self.cur_start, self.cur_stop)
self.update_time_curves()
@@ -456,7 +456,7 @@ class gr_plot_qt(QtGui.QMainWindow):
self.set_file_pos_box(self.cur_start, self.cur_stop)
except AttributeError:
pass
-
+
def file_time_changed(self):
tstart = self.gui.fileTimeStartLineEdit.text().toDouble()
@@ -548,16 +548,16 @@ class gr_plot_qt(QtGui.QMainWindow):
# Set the zoomer base to unzoom to the new axis
self.timeZoomer.setZoomBase()
-
+
self.gui.timePlot.replot()
-
+
def update_psd_curves(self):
self.psdcurve.setData(self.freq, self.iq_psd)
self.gui.freqPlot.setAxisScale(self.gui.freqPlot.xBottom,
min(self.freq),
max(self.freq))
-
+
# Set the zoomer base to unzoom to the new axis
self.freqZoomer.setZoomBase()
@@ -579,10 +579,10 @@ class gr_plot_qt(QtGui.QMainWindow):
self.gui.specPlot.setAxisScale(self.gui.specPlot.yLeft,
min(self.spec_t),
max(self.spec_t))
- self.gui.specPlot.setAxisScale(self.gui.specPlot.yRight,
+ self.gui.specPlot.setAxisScale(self.gui.specPlot.yRight,
self.iq_spec.min(),
self.iq_spec.max())
-
+
# Set the zoomer base to unzoom to the new axis
self.specZoomer.setZoomBase()
@@ -604,7 +604,7 @@ class gr_plot_qt(QtGui.QMainWindow):
self.rcurve.setSymbol(self.rsym)
self.icurve.setSymbol(self.isym)
self.gui.timePlot.replot()
-
+
def color_black_on_white(self):
blue = QtGui.qRgb(0x00, 0x00, 0xFF)
red = QtGui.qRgb(0xFF, 0x00, 0x00)
@@ -636,7 +636,7 @@ class gr_plot_qt(QtGui.QMainWindow):
whiteBrush = Qt.QBrush(Qt.QColor("white"))
whiteBrush = Qt.QBrush(Qt.QColor(white))
redBrush = Qt.QBrush(Qt.QColor(red))
-
+
self.gui.timePlot.setCanvasBackground(QtGui.QColor("black"))
self.gui.freqPlot.setCanvasBackground(QtGui.QColor("black"))
self.timeZoomer.setTrackerPen(Qt.QPen(whiteBrush, self.pen_width))
@@ -658,7 +658,7 @@ class gr_plot_qt(QtGui.QMainWindow):
whiteBrush = Qt.QBrush(Qt.QColor("white"))
greenBrush = Qt.QBrush(Qt.QColor(green))
redBrush = Qt.QBrush(Qt.QColor(red))
-
+
self.gui.timePlot.setCanvasBackground(QtGui.QColor("black"))
self.gui.freqPlot.setCanvasBackground(QtGui.QColor("black"))
self.timeZoomer.setTrackerPen(Qt.QPen(whiteBrush, self.pen_width))
@@ -679,7 +679,7 @@ class gr_plot_qt(QtGui.QMainWindow):
whiteBrush = Qt.QBrush(Qt.QColor("white"))
blueBrush = Qt.QBrush(Qt.QColor(blue))
redBrush = Qt.QBrush(Qt.QColor(red))
-
+
self.gui.timePlot.setCanvasBackground(QtGui.QColor("black"))
self.gui.freqPlot.setCanvasBackground(QtGui.QColor("black"))
self.timeZoomer.setTrackerPen(Qt.QPen(whiteBrush, self.pen_width))