GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
26 #include <stdint.h>
27 #include <cstdio>
28 #include <vector>
29 #include <qwt_plot_rasteritem.h>
34 
35 #if QWT_VERSION < 0x060000
37 #else
38 #include <qwt_compat.h>
39 #endif
40 
41 /*!
42  * \brief QWidget for time raster (time vs. time) plots.
43  * \ingroup qtgui_blk
44  */
46 {
47  Q_OBJECT
48 
49  Q_PROPERTY(int intensity_color_map_type1 READ getIntensityColorMapType1 WRITE setIntensityColorMapType1)
50  Q_PROPERTY(int color_map_title_font_size READ getColorMapTitleFontSize WRITE setColorMapTitleFontSize)
51 
52 public:
53  TimeRasterDisplayPlot(int nplots,
54  double samp_rate,
55  double rows, double cols,
56  QWidget*);
57  virtual ~TimeRasterDisplayPlot();
58 
59  void reset();
60 
61  void setNumRows(double rows);
62  void setNumCols(double cols);
63  void setAlpha(int which, int alpha);
64  void setSampleRate(double samprate);
65 
66  double numRows() const;
67  double numCols() const;
68 
69  int getAlpha(int which);
70 
71  void setPlotDimensions(const double rows, const double cols,
72  const double units, const std::string &strunits);
73 
74  void plotNewData(const std::vector<double*> dataPoints,
75  const int64_t numDataPoints);
76 
77  void plotNewData(const double* dataPoints,
78  const int64_t numDataPoints);
79 
80  void setIntensityRange(const double minIntensity,
81  const double maxIntensity);
82 
83  void replot(void);
84 
85  int getIntensityColorMapType(int) const;
86  int getIntensityColorMapType1() const;
87  void setIntensityColorMapType(const int, const int, const QColor, const QColor);
88  void setIntensityColorMapType1(int);
89  int getColorMapTitleFontSize() const;
90  void setColorMapTitleFontSize(int tfs);
91  const QColor getUserDefinedLowIntensityColor() const;
92  const QColor getUserDefinedHighIntensityColor() const;
93 
94  double getMinIntensity(int which) const;
95  double getMaxIntensity(int which) const;
96 
97 signals:
98  void updatedLowerIntensityLevel(const double);
99  void updatedUpperIntensityLevel(const double);
100 
101 private:
102  void _updateIntensityRangeDisplay();
103 
104  std::vector<TimeRasterData*> d_data;
105  std::vector<PlotTimeRaster*> d_raster;
106 
107  double d_samp_rate;
108  double d_rows, d_cols;
109 
110  std::vector<int> d_color_map_type;
111  QColor d_low_intensity;
112  QColor d_high_intensity;
113 
114  int d_color_bar_title_font_size;
115 };
116 
117 #endif /* TIMERASTER_DISPLAY_PLOT_H */
QWidget base plot to build QTGUI plotting tools.
Definition: DisplayPlot.h:61
void plotNewData(const std::vector< double * > dataPoints, const int64_t numDataPoints)
QWidget for time raster (time vs. time) plots.
Definition: TimeRasterDisplayPlot.h:45
void setColorMapTitleFontSize(int tfs)
const QColor getUserDefinedLowIntensityColor() const
const QColor getUserDefinedHighIntensityColor() const
int getAlpha(int which)
void updatedLowerIntensityLevel(const double)
void setSampleRate(double samprate)
int getIntensityColorMapType1() const
virtual ~TimeRasterDisplayPlot()
void setPlotDimensions(const double rows, const double cols, const double units, const std::string &strunits)
void setAlpha(int which, int alpha)
double numRows() const
void setIntensityColorMapType(const int, const int, const QColor, const QColor)
void updatedUpperIntensityLevel(const double)
void setNumRows(double rows)
void setIntensityRange(const double minIntensity, const double maxIntensity)
int getColorMapTitleFontSize() const
double numCols() const
TimeRasterDisplayPlot(int nplots, double samp_rate, double rows, double cols, QWidget *)
double getMaxIntensity(int which) const
int getIntensityColorMapType(int) const
double getMinIntensity(int which) const
void setNumCols(double cols)
void setIntensityColorMapType1(int)