GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
vectordisplayform.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2014 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 VECTOR_DISPLAY_FORM_H
12 #define VECTOR_DISPLAY_FORM_H
13 
16 #include <QtGui/QtGui>
17 #include <vector>
18 
20 
21 /*!
22  * \brief DisplayForm child for managing vector plots.
23  * \ingroup qtgui_blk
24  */
26 {
27  Q_OBJECT
28 
29 public:
30  VectorDisplayForm(int nplots = 1, QWidget* parent = 0);
31  ~VectorDisplayForm() override;
32 
34 
35  int getVecSize() const;
36  float getVecAverage() const;
37 
38  void setXAxisLabel(const QString& label);
39  void setYAxisLabel(const QString& label);
40  void setRefLevel(double refLevel);
41 
42  // returns the x-Value that was last double-clicked on by the user
43  float getClickedXVal() const;
44 
45  // checks if there was a double-click event; reset if there was
46  bool checkClicked();
47 
48 public slots:
49  void customEvent(QEvent* e) override;
50 
51  void setVecSize(const int);
52  void setVecAverage(const float);
53 
54  void setXaxis(double start, double step);
55  void setYaxis(double min, double max);
56  void setYMax(const QString& m);
57  void setYMin(const QString& m);
58  void autoScale(bool en) override;
59  void clearMaxHold();
60  void clearMinHold();
61 
62 private slots:
63  void newData(const QEvent* updateEvent) override;
64  void onPlotPointSelected(const QPointF p) override;
65 
66 private:
67  uint64_t d_num_real_data_points;
68  QIntValidator* d_int_validator;
69 
70  int d_vecsize;
71  float d_vecavg;
72  double d_ref_level;
73 
74  // TODO do I keep these?
75  bool d_clicked;
76  double d_clicked_x_level;
77 
78  AverageMenu* d_avgmenu;
79  QAction *d_clearmin_act, *d_clearmax_act;
80 };
81 
82 #endif /* VECTOR_DISPLAY_FORM_H */
Definition: form_menus.h:466
Base class for setting up and managing QTGUI plot forms.
Definition: displayform.h:30
DisplayForm child for managing vector plots.
Definition: vectordisplayform.h:26
void autoScale(bool en) override
void setYMax(const QString &m)
void setRefLevel(double refLevel)
void setXaxis(double start, double step)
void setYaxis(double min, double max)
float getClickedXVal() const
void setYAxisLabel(const QString &label)
void setYMin(const QString &m)
float getVecAverage() const
VectorDisplayPlot * getPlot() override
void customEvent(QEvent *e) override
void setVecSize(const int)
int getVecSize() const
~VectorDisplayForm() override
VectorDisplayForm(int nplots=1, QWidget *parent=0)
void setXAxisLabel(const QString &label)
void setVecAverage(const float)
QWidget for displaying 1D-vector plots.
Definition: VectorDisplayPlot.h:24
float min(float a, float b)