GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
eyedisplayform.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2020 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 #ifndef EYE_DISPLAY_FORM_H
11 #define EYE_DISPLAY_FORM_H
12 
16 #include <QtGui/QtGui>
17 #include <vector>
18 
19 class EyeControlPanel;
20 
21 /*!
22  * \brief EyeDisplaysForm child for managing eye pattern plots.
23  * \ingroup qtgui_blk
24  */
26 {
27  Q_OBJECT
28 
29 public:
30  EyeDisplayForm(int nplots = 1, bool cmplx = false, QWidget* parent = 0);
31  ~EyeDisplayForm() override;
32 
34  EyeDisplayPlot* getSinglePlot(unsigned int);
35 
36  int getNPoints() const;
37  int getSamplesPerSymbol() const;
38 
41  float getTriggerLevel() const;
42  float getTriggerDelay() const;
43  int getTriggerChannel() const;
44  std::string getTriggerTagKey() const;
45  void setAxisLabels(bool en);
46 
47 public slots:
48  void customEvent(QEvent* e) override;
49 
50  void setSampleRate(const double samprate);
51  void setSampleRate(const QString& samprate) override;
52  void setYaxis(double min, double max);
53  void setYLabel(const std::string& label, const std::string& unit = "");
54  void setNPoints(const int);
55  void autoScale(bool en) override;
56  void autoScaleShot();
57  void tagMenuSlot(bool en);
58  void setTagMenu(unsigned int which, bool en);
59 
63  void setTriggerLevel(float level);
64  void setTriggerDelay(float delay);
65  void setTriggerChannel(int chan);
66  void setTriggerTagKey(QString s);
67  void setTriggerTagKey(const std::string& s);
68 
69  void setupControlPanel(bool en);
72 
73 private slots:
74  void newData(const QEvent*) override;
75  void notifyYAxisPlus();
76  void notifyYAxisMinus();
77  void notifyYRangePlus();
78  void notifyYRangeMinus();
79  void notifyTriggerMode(const QString& mode);
80  void notifyTriggerSlope(const QString& slope);
81  void notifyTriggerLevelPlus();
82  void notifyTriggerLevelMinus();
83  void notifyTriggerDelayPlus();
84  void notifyTriggerDelayMinus();
85 
86 signals:
89  void signalTriggerLevel(float level);
90  void signalTriggerDelay(float delay);
91  void signalReplot();
92  void signalNPoints(const int npts);
93 
94 private:
95  double d_start_frequency;
96  double d_stop_frequency;
97  double d_current_units;
98  int d_npoints;
99  unsigned int d_rows;
100  unsigned int d_cols;
101  NPointsMenu* d_nptsmenu;
102 
103  QAction* d_controlpanelmenu;
104  std::vector<QAction*> d_tagsmenu;
105 
106  QMenu* d_triggermenu;
107  TriggerModeMenu* d_tr_mode_menu;
108  TriggerSlopeMenu* d_tr_slope_menu;
109  TriggerChannelMenu* d_tr_channel_menu;
110  PopupMenu* d_tr_tag_key_act;
111 
112  gr::qtgui::trigger_mode d_trig_mode;
113  gr::qtgui::trigger_slope d_trig_slope;
114  float d_trig_level;
115  float d_trig_delay;
116  int d_trig_channel;
117  std::string d_trig_tag_key;
118 
119  EyeControlPanel* d_controlpanel;
120 };
121 
122 #endif /* EYE_DISPLAY_FORM_H */
Definition: eyecontrolpanel.h:25
EyeDisplaysForm child for managing eye pattern plots.
Definition: eyedisplayform.h:26
gr::qtgui::trigger_mode getTriggerMode() const
void setSampleRate(const QString &samprate) override
void setupControlPanel(bool en)
void teardownControlPanel()
float getTriggerLevel() const
void setTriggerTagKey(QString s)
void autoScale(bool en) override
void signalTriggerLevel(float level)
std::string getTriggerTagKey() const
float getTriggerDelay() const
int getTriggerChannel() const
void setTriggerMode(gr::qtgui::trigger_mode mode)
void signalTriggerMode(gr::qtgui::trigger_mode mode)
void signalTriggerSlope(gr::qtgui::trigger_slope slope)
void setYaxis(double min, double max)
void setTriggerChannel(int chan)
void setAxisLabels(bool en)
EyeDisplayPlot * getPlot()
void tagMenuSlot(bool en)
void updateTrigger(gr::qtgui::trigger_mode mode)
void setYLabel(const std::string &label, const std::string &unit="")
gr::qtgui::trigger_slope getTriggerSlope() const
void setTriggerTagKey(const std::string &s)
void signalReplot()
int getNPoints() const
int getSamplesPerSymbol() const
void setSampleRate(const double samprate)
void setTriggerLevel(float level)
void customEvent(QEvent *e) override
void signalTriggerDelay(float delay)
void setTagMenu(unsigned int which, bool en)
void setupControlPanel()
EyeDisplayForm(int nplots=1, bool cmplx=false, QWidget *parent=0)
void setTriggerDelay(float delay)
EyeDisplayPlot * getSinglePlot(unsigned int)
void signalNPoints(const int npts)
~EyeDisplayForm() override
void setNPoints(const int)
void setTriggerSlope(gr::qtgui::trigger_slope slope)
void autoScaleShot()
QWidget for displaying eye pattern plots.
Definition: EyeDisplayPlot.h:24
Base class for setting up and managing QTGUI plot forms.
Definition: eyedisplaysform.h:29
Definition: form_menus.h:679
Definition: form_menus.h:1191
Definition: form_menus.h:986
Definition: form_menus.h:843
Definition: form_menus.h:920
trigger_mode
Definition: trigger_mode.h:17
trigger_slope
Definition: trigger_mode.h:24
float min(float a, float b)