GNU Radio Manual and C++ API Reference  3.7.4.1
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 
50 
51 public:
52  TimeRasterDisplayPlot(int nplots,
53  double samp_rate,
54  double rows, double cols,
55  QWidget*);
56  virtual ~TimeRasterDisplayPlot();
57 
58  void reset();
59 
60  void setNumRows(double rows);
61  void setNumCols(double cols);
62  void setAlpha(int which, int alpha);
63  void setSampleRate(double samprate);
64 
65  double numRows() const;
66  double numCols() const;
67 
68  int getAlpha(int which);
69 
70  void setPlotDimensions(const double rows, const double cols,
71  const double units, const std::string &strunits);
72 
73  void plotNewData(const std::vector<double*> dataPoints,
74  const int64_t numDataPoints);
75 
76  void plotNewData(const double* dataPoints,
77  const int64_t numDataPoints);
78 
79  void setIntensityRange(const double minIntensity,
80  const double maxIntensity);
81 
82  void replot(void);
83 
84  int getIntensityColorMapType(int) const;
85  int getIntensityColorMapType1() const;
86  void setIntensityColorMapType(const int, const int, const QColor, const QColor);
87  void setIntensityColorMapType1(int);
88  const QColor getUserDefinedLowIntensityColor() const;
89  const QColor getUserDefinedHighIntensityColor() const;
90 
91  double getMinIntensity(int which) const;
92  double getMaxIntensity(int which) const;
93 
94 signals:
95  void updatedLowerIntensityLevel(const double);
96  void updatedUpperIntensityLevel(const double);
97 
98 private:
99  void _updateIntensityRangeDisplay();
100 
101  std::vector<TimeRasterData*> d_data;
102  std::vector<PlotTimeRaster*> d_raster;
103 
104  double d_samp_rate;
105  double d_rows, d_cols;
106 
107  std::vector<int> d_color_map_type;
108  QColor d_low_intensity;
109  QColor d_high_intensity;
110 };
111 
112 #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)
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)
int intensity_color_map_type1
Definition: TimeRasterDisplayPlot.h:49
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)
void setIntensityColorMapType1(int)