GNU Radio Manual and C++ API Reference  3.8.4.0
The Free & Open Software Radio Ecosystem
TimeRasterDisplayPlot.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2012,2013 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef TIMERASTER_DISPLAY_PLOT_H
24 #define TIMERASTER_DISPLAY_PLOT_H
25 
30 #include <qwt_plot_rasteritem.h>
31 #include <stdint.h>
32 #include <cstdio>
33 #include <vector>
34 
35 #if QWT_VERSION < 0x060000
37 #elif QWT_VERSION >= 0x060200
38 #include "qwt_interval.h"
39 
40 typedef QwtInterval QwtDoubleInterval;
41 #elif QWT_VERSION >= 0x060000
42 #include <qwt_compat.h>
43 #include <qwt_point_3d.h> // doesn't seem necessary, but is...
44 #endif
45 
46 /*!
47  * \brief QWidget for time raster (time vs. time) plots.
48  * \ingroup qtgui_blk
49  */
51 {
52  Q_OBJECT
53 
56  Q_PROPERTY(int color_map_title_font_size READ getColorMapTitleFontSize WRITE
58 
59 public:
61  int nplots, double samp_rate, double rows, double cols, QWidget*);
62  virtual ~TimeRasterDisplayPlot();
63 
64  void reset();
65 
66  void setNumRows(double rows);
67  void setNumCols(double cols);
68  void setAlpha(unsigned int which, int alpha);
69  void setSampleRate(double samprate);
70 
71  double numRows() const;
72  double numCols() const;
73 
74  int getAlpha(unsigned int which);
75 
76  void setPlotDimensions(const double rows,
77  const double cols,
78  const double units,
79  const std::string& strunits);
80 
81  void plotNewData(const std::vector<double*> dataPoints, const uint64_t numDataPoints);
82 
83  void plotNewData(const double* dataPoints, const uint64_t numDataPoints);
84 
85  void setIntensityRange(const double minIntensity, const double maxIntensity);
86 
87  void replot(void);
88 
89  int getIntensityColorMapType(unsigned int) const;
90  int getIntensityColorMapType1() const;
91  void
92  setIntensityColorMapType(const unsigned int, const int, const QColor, const QColor);
93  void setIntensityColorMapType1(int);
94  int getColorMapTitleFontSize() const;
95  void setColorMapTitleFontSize(int tfs);
96  const QColor getUserDefinedLowIntensityColor() const;
97  const QColor getUserDefinedHighIntensityColor() const;
98 
99  double getMinIntensity(unsigned int which) const;
100  double getMaxIntensity(unsigned int which) const;
101 
102 signals:
103  void updatedLowerIntensityLevel(const double);
104  void updatedUpperIntensityLevel(const double);
105 
106 private:
107  void _updateIntensityRangeDisplay();
108 
109  std::vector<TimeRasterData*> d_data;
110  std::vector<PlotTimeRaster*> d_raster;
111 
112  double d_samp_rate;
113  double d_rows, d_cols;
114 
115  std::vector<int> d_color_map_type;
116  QColor d_low_intensity;
117  QColor d_high_intensity;
118 
119  int d_color_bar_title_font_size;
120 };
121 
122 #endif /* TIMERASTER_DISPLAY_PLOT_H */
void setAlpha(unsigned int which, int alpha)
void plotNewData(const std::vector< double *> dataPoints, const uint64_t numDataPoints)
QWidget base plot to build QTGUI plotting tools.
Definition: DisplayPlot.h:66
int getAlpha(unsigned int which)
QWidget for time raster (time vs. time) plots.
Definition: TimeRasterDisplayPlot.h:50
void setColorMapTitleFontSize(int tfs)
void updatedLowerIntensityLevel(const double)
double numCols() const
void setSampleRate(double samprate)
void setIntensityColorMapType(const unsigned int, const int, const QColor, const QColor)
virtual ~TimeRasterDisplayPlot()
void setPlotDimensions(const double rows, const double cols, const double units, const std::string &strunits)
int getIntensityColorMapType(unsigned int) const
double getMinIntensity(unsigned int which) const
int getIntensityColorMapType1() const
int color_map_title_font_size
Definition: TimeRasterDisplayPlot.h:57
void updatedUpperIntensityLevel(const double)
int intensity_color_map_type1
Definition: TimeRasterDisplayPlot.h:55
int getColorMapTitleFontSize() const
void setNumRows(double rows)
const QColor getUserDefinedHighIntensityColor() const
void setIntensityRange(const double minIntensity, const double maxIntensity)
TimeRasterDisplayPlot(int nplots, double samp_rate, double rows, double cols, QWidget *)
double getMaxIntensity(unsigned int which) const
double numRows() const
const QColor getUserDefinedLowIntensityColor() const
void setNumCols(double cols)
void setIntensityColorMapType1(int)