GNU Radio Manual and C++ API Reference  3.9.1.0
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 
33  VectorDisplayPlot* getPlot() override;
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 */
VectorDisplayForm::clearMinHold
void clearMinHold()
VectorDisplayForm::customEvent
void customEvent(QEvent *e) override
displayform.h
gr::trellis::min
float min(float a, float b)
VectorDisplayForm::setRefLevel
void setRefLevel(double refLevel)
VectorDisplayForm::setYaxis
void setYaxis(double min, double max)
VectorDisplayForm::autoScale
void autoScale(bool en) override
VectorDisplayForm
DisplayForm child for managing vector plots.
Definition: vectordisplayform.h:25
VectorDisplayForm::setVecSize
void setVecSize(const int)
VectorDisplayPlot.h
VectorDisplayPlot
QWidget for displaying 1D-vector plots.
Definition: VectorDisplayPlot.h:23
VectorDisplayForm::setYMin
void setYMin(const QString &m)
VectorDisplayForm::getVecSize
int getVecSize() const
VectorDisplayForm::setVecAverage
void setVecAverage(const float)
VectorDisplayForm::setYAxisLabel
void setYAxisLabel(const QString &label)
VectorDisplayForm::setYMax
void setYMax(const QString &m)
VectorDisplayForm::getClickedXVal
float getClickedXVal() const
VectorDisplayForm::clearMaxHold
void clearMaxHold()
VectorDisplayForm::~VectorDisplayForm
~VectorDisplayForm() override
VectorDisplayForm::getVecAverage
float getVecAverage() const
AverageMenu
Definition: form_menus.h:696
spectrumUpdateEvents.h
VectorDisplayForm::setXaxis
void setXaxis(double start, double step)
VectorDisplayForm::getPlot
VectorDisplayPlot * getPlot() override
DisplayForm
Base class for setting up and managing QTGUI plot forms.
Definition: displayform.h:29
VectorDisplayForm::checkClicked
bool checkClicked()
VectorDisplayForm::VectorDisplayForm
VectorDisplayForm(int nplots=1, QWidget *parent=0)
VectorDisplayForm::setXAxisLabel
void setXAxisLabel(const QString &label)