GNU Radio Manual and C++ API Reference  3.9.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  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef TIMERASTER_DISPLAY_PLOT_H
12 #define TIMERASTER_DISPLAY_PLOT_H
13 
18 #include <qwt_plot_rasteritem.h>
19 #include <cstdint>
20 #include <cstdio>
21 #include <vector>
22 
23 #if QWT_VERSION < 0x060000
25 #else
26 #include <qwt_interval.h>
27 
28 typedef QwtInterval QwtDoubleInterval;
29 #endif
30 
31 /*!
32  * \brief QWidget for time raster (time vs. time) plots.
33  * \ingroup qtgui_blk
34  */
36 {
37  Q_OBJECT
38 
41  Q_PROPERTY(int color_map_title_font_size READ getColorMapTitleFontSize WRITE
43 
44 public:
46  int nplots, double samp_rate, double rows, double cols, QWidget*);
48 
49  void reset();
50 
51  void setNumRows(double rows);
52  void setNumCols(double cols);
53  void setAlpha(unsigned int which, int alpha);
54  void setSampleRate(double samprate);
55  void setXLabel(const std::string& label);
56  void setXAxis(double start, double end);
57  void setYLabel(const std::string& label);
58  void setYAxis(double start, double end);
59 
60  double numRows() const;
61  double numCols() const;
62 
63  int getAlpha(unsigned int which);
64 
65  void setPlotDimensions(const double rows,
66  const double cols,
67  const double units,
68  const std::string& strunits);
69 
70  void plotNewData(const std::vector<double*> dataPoints, const uint64_t numDataPoints);
71 
72  void plotNewData(const double* dataPoints, const uint64_t numDataPoints);
73 
74  void setIntensityRange(const double minIntensity, const double maxIntensity);
75 
76  void replot(void) override;
77 
78  int getIntensityColorMapType(unsigned int) const;
80  void
81  setIntensityColorMapType(const unsigned int, const int, const QColor, const QColor);
84  void setColorMapTitleFontSize(int tfs);
85  const QColor getUserDefinedLowIntensityColor() const;
86  const QColor getUserDefinedHighIntensityColor() const;
87 
88  double getMinIntensity(unsigned int which) const;
89  double getMaxIntensity(unsigned int which) const;
90 
91 signals:
92  void updatedLowerIntensityLevel(const double);
93  void updatedUpperIntensityLevel(const double);
94 
95 private:
96  void _updateIntensityRangeDisplay();
97 
98  std::vector<TimeRasterData*> d_data;
99  std::vector<PlotTimeRaster*> d_raster;
100 
101  double d_samp_rate;
102  double d_rows, d_cols;
103 
104  std::vector<int> d_color_map_type;
105  QColor d_low_intensity;
106  QColor d_high_intensity;
107 
108  int d_color_bar_title_font_size;
109 
110  std::string d_x_label;
111  double d_x_start_value;
112  double d_x_end_value;
113  std::string d_y_label;
114  double d_y_start_value;
115  double d_y_end_value;
116 };
117 
118 #endif /* TIMERASTER_DISPLAY_PLOT_H */
QWidget base plot to build QTGUI plotting tools.
Definition: DisplayPlot.h:53
QWidget for time raster (time vs. time) plots.
Definition: TimeRasterDisplayPlot.h:36
void updatedUpperIntensityLevel(const double)
double numRows() const
void plotNewData(const double *dataPoints, const uint64_t numDataPoints)
void setPlotDimensions(const double rows, const double cols, const double units, const std::string &strunits)
void setXLabel(const std::string &label)
void setColorMapTitleFontSize(int tfs)
~TimeRasterDisplayPlot() override
void setSampleRate(double samprate)
void setYLabel(const std::string &label)
void replot(void) override
int getColorMapTitleFontSize() const
void setXAxis(double start, double end)
void plotNewData(const std::vector< double * > dataPoints, const uint64_t numDataPoints)
void setNumRows(double rows)
int getAlpha(unsigned int which)
int getIntensityColorMapType1() const
int getIntensityColorMapType(unsigned int) const
int intensity_color_map_type1
Definition: TimeRasterDisplayPlot.h:40
void updatedLowerIntensityLevel(const double)
void setYAxis(double start, double end)
void setNumCols(double cols)
int color_map_title_font_size
Definition: TimeRasterDisplayPlot.h:42
void setIntensityRange(const double minIntensity, const double maxIntensity)
double getMinIntensity(unsigned int which) const
const QColor getUserDefinedHighIntensityColor() const
const QColor getUserDefinedLowIntensityColor() const
double getMaxIntensity(unsigned int which) const
TimeRasterDisplayPlot(int nplots, double samp_rate, double rows, double cols, QWidget *)
void setAlpha(unsigned int which, int alpha)
double numCols() const
void setIntensityColorMapType1(int)
void setIntensityColorMapType(const unsigned int, const int, const QColor, const QColor)