GNU Radio C++ API Reference: TimeRasterDisplayPlot.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
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
14#include <gnuradio/high_res_timer.h>
15#include <gnuradio/qtgui/DisplayPlot.h>
16#include <gnuradio/qtgui/plot_raster.h>
17#include <gnuradio/qtgui/timeRasterGlobalData.h>
18#include <qwt_plot_rasteritem.h>
19#include <cstdint>
20#include <cstdio>
21#include <vector>
22
23#include <qwt_interval.h>
24
25/*!
26 * \brief QWidget for time raster (time vs. time) plots.
27 * \ingroup qtgui_blk
28 */
29 class TimeRasterDisplayPlot : public DisplayPlot
30{
31 Q_OBJECT
32
33 Q_PROPERTY(int intensity_color_map_type1 READ getIntensityColorMapType1 WRITE
34 setIntensityColorMapType1)
35 Q_PROPERTY(int color_map_title_font_size READ getColorMapTitleFontSize WRITE
36 setColorMapTitleFontSize)
37
38public:
39 TimeRasterDisplayPlot(
40 int nplots, double samp_rate, double rows, double cols, QWidget*);
41 ~TimeRasterDisplayPlot() override;
42
43 void reset();
44
45 void setNumRows(double rows);
46 void setNumCols(double cols);
47 void setAlpha(unsigned int which, int alpha);
48 void setSampleRate(double samprate);
49 void setXLabel(const std::string& label);
50 void setXAxis(double start, double end);
51 void setYLabel(const std::string& label);
52 void setYAxis(double start, double end);
53
54 double numRows() const;
55 double numCols() const;
56
57 int getAlpha(unsigned int which);
58
59 void setPlotDimensions(const double rows,
60 const double cols,
61 const double units,
62 const std::string& strunits);
63
64 void plotNewData(const std::vector<const double*> dataPoints,
65 const uint64_t numDataPoints);
66
67 void plotNewData(const double* dataPoints, const uint64_t numDataPoints);
68
69 void setIntensityRange(const double minIntensity, const double maxIntensity);
70
71 void replot(void) override;
72
73 int getIntensityColorMapType(unsigned int) const;
74 int getIntensityColorMapType1() const;
75 void
76 setIntensityColorMapType(const unsigned int, const int, const QColor, const QColor);
77 void setIntensityColorMapType1(int);
78 int getColorMapTitleFontSize() const;
79 void setColorMapTitleFontSize(int tfs);
80 const QColor getUserDefinedLowIntensityColor() const;
81 const QColor getUserDefinedHighIntensityColor() const;
82
83 double getMinIntensity(unsigned int which) const;
84 double getMaxIntensity(unsigned int which) const;
85
86signals:
87 void updatedLowerIntensityLevel(const double);
88 void updatedUpperIntensityLevel(const double);
89
90private:
91 void _updateIntensityRangeDisplay();
92
93 std::vector<TimeRasterData*> d_data;
94 std::vector<PlotTimeRaster*> d_raster;
95
96 double d_samp_rate;
97 double d_rows, d_cols;
98
99 std::vector<int> d_color_map_type;
100 QColor d_low_intensity;
101 QColor d_high_intensity;
102
103 int d_color_bar_title_font_size;
104
105 std::string d_x_label;
106 double d_x_start_value;
107 double d_x_end_value;
108 std::string d_y_label;
109 double d_y_start_value;
110 double d_y_end_value;
111};
112
113#endif /* TIMERASTER_DISPLAY_PLOT_H */
DisplayPlot.h
DisplayPlot::DisplayPlot
DisplayPlot(int nplots, QWidget *)
PlotTimeRaster
A plot item, which displays a time raster.
Definition plot_raster.h:35
TimeRasterData
Definition timeRasterGlobalData.h:20
TimeRasterDisplayPlot::updatedUpperIntensityLevel
void updatedUpperIntensityLevel(const double)
TimeRasterDisplayPlot::numRows
double numRows() const
TimeRasterDisplayPlot::setPlotDimensions
void setPlotDimensions(const double rows, const double cols, const double units, const std::string &strunits)
TimeRasterDisplayPlot::setXLabel
void setXLabel(const std::string &label)
TimeRasterDisplayPlot::setColorMapTitleFontSize
void setColorMapTitleFontSize(int tfs)
TimeRasterDisplayPlot::setSampleRate
void setSampleRate(double samprate)
TimeRasterDisplayPlot::setYLabel
void setYLabel(const std::string &label)
TimeRasterDisplayPlot::replot
void replot(void) override
TimeRasterDisplayPlot::getColorMapTitleFontSize
int getColorMapTitleFontSize() const
TimeRasterDisplayPlot::setXAxis
void setXAxis(double start, double end)
TimeRasterDisplayPlot::setNumRows
void setNumRows(double rows)
TimeRasterDisplayPlot::getAlpha
int getAlpha(unsigned int which)
TimeRasterDisplayPlot::getIntensityColorMapType1
int getIntensityColorMapType1() const
TimeRasterDisplayPlot::getIntensityColorMapType
int getIntensityColorMapType(unsigned int) const
TimeRasterDisplayPlot::intensity_color_map_type1
int intensity_color_map_type1
Definition TimeRasterDisplayPlot.h:33
TimeRasterDisplayPlot::updatedLowerIntensityLevel
void updatedLowerIntensityLevel(const double)
TimeRasterDisplayPlot::setYAxis
void setYAxis(double start, double end)
TimeRasterDisplayPlot::setNumCols
void setNumCols(double cols)
TimeRasterDisplayPlot::color_map_title_font_size
int color_map_title_font_size
Definition TimeRasterDisplayPlot.h:34
TimeRasterDisplayPlot::setIntensityRange
void setIntensityRange(const double minIntensity, const double maxIntensity)
TimeRasterDisplayPlot::getMinIntensity
double getMinIntensity(unsigned int which) const
TimeRasterDisplayPlot::getUserDefinedHighIntensityColor
const QColor getUserDefinedHighIntensityColor() const
TimeRasterDisplayPlot::reset
void reset()
TimeRasterDisplayPlot::getUserDefinedLowIntensityColor
const QColor getUserDefinedLowIntensityColor() const
TimeRasterDisplayPlot::getMaxIntensity
double getMaxIntensity(unsigned int which) const
TimeRasterDisplayPlot::TimeRasterDisplayPlot
TimeRasterDisplayPlot(int nplots, double samp_rate, double rows, double cols, QWidget *)
TimeRasterDisplayPlot::setAlpha
void setAlpha(unsigned int which, int alpha)
TimeRasterDisplayPlot::numCols
double numCols() const
TimeRasterDisplayPlot::plotNewData
void plotNewData(const std::vector< const double * > dataPoints, const uint64_t numDataPoints)
TimeRasterDisplayPlot::setIntensityColorMapType1
void setIntensityColorMapType1(int)
TimeRasterDisplayPlot::setIntensityColorMapType
void setIntensityColorMapType(const unsigned int, const int, const QColor, const QColor)
high_res_timer.h
std
STL namespace.
plot_raster.h
timeRasterGlobalData.h