GNU Radio Manual and C++ API Reference 3.7.14.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#else
38// clang-format off
39#include <qwt_point_3d.h> // doesn't seem necessary, but is...
40#include <qwt_compat.h>
41// clang-format on
42#endif
43
44/*!
45 * \brief QWidget for time raster (time vs. time) plots.
46 * \ingroup qtgui_blk
47 */
49{
50 Q_OBJECT
51
56
57public:
59 int nplots, double samp_rate, double rows, double cols, QWidget*);
61
62 void reset();
63
64 void setNumRows(double rows);
65 void setNumCols(double cols);
66 void setAlpha(int which, int alpha);
67 void setSampleRate(double samprate);
68
69 double numRows() const;
70 double numCols() const;
71
72 int getAlpha(int which);
73
74 void setPlotDimensions(const double rows,
75 const double cols,
76 const double units,
77 const std::string& strunits);
78
79 void plotNewData(const std::vector<double*> dataPoints, const int64_t numDataPoints);
80
81 void plotNewData(const double* dataPoints, const int64_t numDataPoints);
82
83 void setIntensityRange(const double minIntensity, const double maxIntensity);
84
85 void replot(void);
86
89 void setIntensityColorMapType(const int, const int, const QColor, const QColor);
93 const QColor getUserDefinedLowIntensityColor() const;
95
96 double getMinIntensity(int which) const;
97 double getMaxIntensity(int which) const;
98
99signals:
100 void updatedLowerIntensityLevel(const double);
101 void updatedUpperIntensityLevel(const double);
102
103private:
104 void _updateIntensityRangeDisplay();
105
106 std::vector<TimeRasterData*> d_data;
107 std::vector<PlotTimeRaster*> d_raster;
108
109 double d_samp_rate;
110 double d_rows, d_cols;
111
112 std::vector<int> d_color_map_type;
113 QColor d_low_intensity;
114 QColor d_high_intensity;
115
116 int d_color_bar_title_font_size;
117};
118
119#endif /* TIMERASTER_DISPLAY_PLOT_H */
QWidget base plot to build QTGUI plotting tools.
Definition: DisplayPlot.h:65
QWidget for time raster (time vs. time) plots.
Definition: TimeRasterDisplayPlot.h:49
void updatedUpperIntensityLevel(const double)
double numRows() const
void setPlotDimensions(const double rows, const double cols, const double units, const std::string &strunits)
double getMinIntensity(int which) const
void setColorMapTitleFontSize(int tfs)
double getMaxIntensity(int which) const
void setSampleRate(double samprate)
void plotNewData(const double *dataPoints, const int64_t numDataPoints)
int getIntensityColorMapType(int) const
int getColorMapTitleFontSize() const
void setAlpha(int which, int alpha)
void setNumRows(double rows)
int getIntensityColorMapType1() const
int intensity_color_map_type1
Definition: TimeRasterDisplayPlot.h:53
void setIntensityColorMapType(const int, const int, const QColor, const QColor)
void updatedLowerIntensityLevel(const double)
virtual ~TimeRasterDisplayPlot()
void setNumCols(double cols)
int color_map_title_font_size
Definition: TimeRasterDisplayPlot.h:55
void setIntensityRange(const double minIntensity, const double maxIntensity)
const QColor getUserDefinedHighIntensityColor() const
const QColor getUserDefinedLowIntensityColor() const
TimeRasterDisplayPlot(int nplots, double samp_rate, double rows, double cols, QWidget *)
double numCols() const
int getAlpha(int which)
void plotNewData(const std::vector< double * > dataPoints, const int64_t numDataPoints)
void setIntensityColorMapType1(int)