GNU Radio 3.7.3 C++ API
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 public:
50  TimeRasterDisplayPlot(int nplots,
51  double samp_rate,
52  double rows, double cols,
53  QWidget*);
54  virtual ~TimeRasterDisplayPlot();
55 
56  void reset();
57 
58  void setNumRows(double rows);
59  void setNumCols(double cols);
60  void setAlpha(int which, int alpha);
61  void setSampleRate(double samprate);
62 
63  double numRows() const;
64  double numCols() const;
65 
66  int getAlpha(int which);
67 
68  void setPlotDimensions(const double rows, const double cols,
69  const double units, const std::string &strunits);
70 
71  void plotNewData(const std::vector<double*> dataPoints,
72  const int64_t numDataPoints);
73 
74  void plotNewData(const double* dataPoints,
75  const int64_t numDataPoints);
76 
77  void setIntensityRange(const double minIntensity,
78  const double maxIntensity);
79 
80  void replot(void);
81 
82  int getIntensityColorMapType(int) const;
83  void setIntensityColorMapType(const int, const int, const QColor, const QColor);
84  const QColor getUserDefinedLowIntensityColor() const;
85  const QColor getUserDefinedHighIntensityColor() const;
86 
87  double getMinIntensity(int which) const;
88  double getMaxIntensity(int which) const;
89 
90 signals:
91  void updatedLowerIntensityLevel(const double);
92  void updatedUpperIntensityLevel(const double);
93 
94 private:
95  void _updateIntensityRangeDisplay();
96 
97  std::vector<TimeRasterData*> d_data;
98  std::vector<PlotTimeRaster*> d_raster;
99 
100  double d_samp_rate;
101  double d_rows, d_cols;
102 
103  std::vector<int> d_color_map_type;
104  QColor d_low_intensity;
105  QColor d_high_intensity;
106 };
107 
108 #endif /* TIMERASTER_DISPLAY_PLOT_H */
QWidget base plot to build QTGUI plotting tools.
Definition: DisplayPlot.h:53
void plotNewData(const std::vector< double * > dataPoints, const int64_t numDataPoints)
QWidget for time raster (time vs. time) plots.
Definition: TimeRasterDisplayPlot.h:45
const QColor getUserDefinedLowIntensityColor() const
const QColor getUserDefinedHighIntensityColor() const
int getAlpha(int which)
void updatedLowerIntensityLevel(const double)
void setSampleRate(double samprate)
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)
signed __int64 int64_t
Definition: stdint.h:89
void setIntensityRange(const double minIntensity, const double maxIntensity)
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)