GNU Radio 3.7.2 C++ API
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  * 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 CONSTELLATION_DISPLAY_PLOT_H
24 #define CONSTELLATION_DISPLAY_PLOT_H
25 
26 #include <stdint.h>
27 #include <cstdio>
28 #include <vector>
30 
31 /*!
32  * \brief QWidget for displaying constellaton (I&Q) plots.
33  * \ingroup qtgui_blk
34  */
36 {
37  Q_OBJECT
38 
39 public:
40  ConstellationDisplayPlot(int nplots, QWidget*);
41  virtual ~ConstellationDisplayPlot();
42 
43  void plotNewData(const std::vector<double*> realDataPoints,
44  const std::vector<double*> imagDataPoints,
45  const int64_t numDataPoints,
46  const double timeInterval);
47 
48  // Old method to be removed
49  void plotNewData(const double* realDataPoints,
50  const double* imagDataPoints,
51  const int64_t numDataPoints,
52  const double timeInterval);
53 
54  void replot();
55 
56  void set_xaxis(double min, double max);
57  void set_yaxis(double min, double max);
58  void set_axis(double xmin, double xmax,
59  double ymin, double ymax);
60  void set_pen_size(int size);
61 
62 public slots:
63  void setAutoScale(bool state);
64 
65 private:
66  void _autoScale(double bottom, double top);
67 
68  std::vector<double*> d_real_data;
69  std::vector<double*> d_imag_data;
70 
71  int64_t d_pen_size;
72 };
73 
74 #endif /* CONSTELLATION_DISPLAY_PLOT_H */
void set_xaxis(double min, double max)
QWidget base plot to build QTGUI plotting tools.
Definition: DisplayPlot.h:53
float min(float a, float b)
void set_pen_size(int size)
ConstellationDisplayPlot(int nplots, QWidget *)
void setAutoScale(bool state)
void set_yaxis(double min, double max)
virtual ~ConstellationDisplayPlot()
void plotNewData(const std::vector< double * > realDataPoints, const std::vector< double * > imagDataPoints, const int64_t numDataPoints, const double timeInterval)
QWidget for displaying constellaton (I&Q) plots.
Definition: ConstellationDisplayPlot.h:35
signed __int64 int64_t
Definition: stdint.h:89
void set_axis(double xmin, double xmax, double ymin, double ymax)