GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
ConstellationDisplayPlot.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2008-2012 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 CONSTELLATION_DISPLAY_PLOT_H
12 #define CONSTELLATION_DISPLAY_PLOT_H
13 
15 #include <cstdint>
16 #include <cstdio>
17 #include <vector>
18 
19 /*!
20  * \brief QWidget for displaying constellaton (I&Q) plots.
21  * \ingroup qtgui_blk
22  */
24 {
25  Q_OBJECT
26 
27 public:
28  ConstellationDisplayPlot(int nplots, QWidget*);
30 
31  void plotNewData(const std::vector<double*> realDataPoints,
32  const std::vector<double*> imagDataPoints,
33  const int64_t numDataPoints,
34  const double timeInterval);
35 
36  // Old method to be removed
37  void plotNewData(const double* realDataPoints,
38  const double* imagDataPoints,
39  const int64_t numDataPoints,
40  const double timeInterval);
41 
42  void replot() override;
43 
44  void set_xaxis(double min, double max);
45  void set_yaxis(double min, double max);
46  void set_axis(double xmin, double xmax, double ymin, double ymax);
47  void set_pen_size(int size);
48 
49 public slots:
50  void setAutoScale(bool state);
51 
52 private:
53  void _autoScale(double bottom, double top);
54 
55  std::vector<std::vector<double>> d_real_data;
56  std::vector<std::vector<double>> d_imag_data;
57 
58  int64_t d_pen_size;
59 };
60 
61 #endif /* CONSTELLATION_DISPLAY_PLOT_H */
QWidget for displaying constellaton (I&Q) plots.
Definition: ConstellationDisplayPlot.h:24
void plotNewData(const std::vector< double * > realDataPoints, const std::vector< double * > imagDataPoints, const int64_t numDataPoints, const double timeInterval)
void setAutoScale(bool state)
void plotNewData(const double *realDataPoints, const double *imagDataPoints, const int64_t numDataPoints, const double timeInterval)
void replot() override
~ConstellationDisplayPlot() override
void set_pen_size(int size)
void set_xaxis(double min, double max)
void set_axis(double xmin, double xmax, double ymin, double ymax)
ConstellationDisplayPlot(int nplots, QWidget *)
void set_yaxis(double min, double max)
QWidget base plot to build QTGUI plotting tools.
Definition: DisplayPlot.h:42
float min(float a, float b)