GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
timedisplayform.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2011,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 TIME_DISPLAY_FORM_H
12 #define TIME_DISPLAY_FORM_H
13 
17 #include <QtGui/QtGui>
18 #include <vector>
19 
20 class TimeControlPanel;
21 
22 /*!
23  * \brief DisplayForm child for managing time domain plots.
24  * \ingroup qtgui_blk
25  */
27 {
28  Q_OBJECT
29 
30 public:
31  TimeDisplayForm(int nplots = 1, QWidget* parent = 0);
32  ~TimeDisplayForm() override;
33 
35 
36  int getNPoints() const;
39  float getTriggerLevel() const;
40  float getTriggerDelay() const;
41  int getTriggerChannel() const;
42  std::string getTriggerTagKey() const;
43 
44 public slots:
45  void customEvent(QEvent* e) override;
46 
47  void setSampleRate(const double samprate);
48  void setSampleRate(const QString& samprate) override;
49  void setYaxis(double min, double max);
50  void setYLabel(const std::string& label, const std::string& unit = "");
51  void setNPoints(const int);
52  void setStem(bool en);
53  void autoScale(bool en) override;
54  void autoScaleShot();
55  void setSemilogx(bool en);
56  void setSemilogy(bool en);
57  void tagMenuSlot(bool en);
58  void setTagMenu(unsigned int which, bool en);
59 
63  void setTriggerLevel(QString s);
64  void setTriggerLevel(float level);
65  void setTriggerDelay(QString s);
66  void setTriggerDelay(float delay);
67  void setTriggerChannel(int chan);
68  void setTriggerTagKey(QString s);
69  void setTriggerTagKey(const std::string& s);
70 
71  void setupControlPanel(bool en);
74 
75 private slots:
76  void newData(const QEvent*) override;
77  void notifyYAxisPlus();
78  void notifyYAxisMinus();
79  void notifyYRangePlus();
80  void notifyYRangeMinus();
81  void notifyXAxisPlus();
82  void notifyXAxisMinus();
83  void notifyTriggerMode(const QString& mode);
84  void notifyTriggerSlope(const QString& slope);
85  void notifyTriggerLevelPlus();
86  void notifyTriggerLevelMinus();
87  void notifyTriggerDelayPlus();
88  void notifyTriggerDelayMinus();
89 
90 signals:
93  void signalTriggerLevel(float level);
94  void signalTriggerDelay(float delay);
95  void signalReplot();
96  void signalNPoints(const int npts);
97 
98 private:
99  QIntValidator* d_int_validator;
100 
101  double d_start_frequency;
102  double d_stop_frequency;
103  double d_current_units;
104 
105  int d_npoints;
106 
107  bool d_stem;
108  bool d_semilogx;
109  bool d_semilogy;
110 
111  NPointsMenu* d_nptsmenu;
112  QAction* d_stemmenu;
113  QAction* d_semilogxmenu;
114  QAction* d_semilogymenu;
115  QAction* d_controlpanelmenu;
116  std::vector<QAction*> d_tagsmenu;
117 
118  QMenu* d_triggermenu;
119  TriggerModeMenu* d_tr_mode_menu;
120  TriggerSlopeMenu* d_tr_slope_menu;
121  PopupMenu* d_tr_level_act;
122  PopupMenu* d_tr_delay_act;
123  TriggerChannelMenu* d_tr_channel_menu;
124  PopupMenu* d_tr_tag_key_act;
125 
126  gr::qtgui::trigger_mode d_trig_mode;
127  gr::qtgui::trigger_slope d_trig_slope;
128  float d_trig_level;
129  float d_trig_delay;
130  int d_trig_channel;
131  std::string d_trig_tag_key;
132 
133  TimeControlPanel* d_controlpanel;
134 };
135 
136 #endif /* TIME_DISPLAY_FORM_H */
Base class for setting up and managing QTGUI plot forms.
Definition: displayform.h:30
Definition: form_menus.h:679
Definition: form_menus.h:1191
Definition: timecontrolpanel.h:26
DisplayForm child for managing time domain plots.
Definition: timedisplayform.h:27
~TimeDisplayForm() override
void teardownControlPanel()
void setupControlPanel()
void signalTriggerDelay(float delay)
void setYLabel(const std::string &label, const std::string &unit="")
void signalNPoints(const int npts)
void setStem(bool en)
void setSemilogy(bool en)
int getTriggerChannel() const
gr::qtgui::trigger_slope getTriggerSlope() const
void setSampleRate(const QString &samprate) override
gr::qtgui::trigger_mode getTriggerMode() const
void autoScaleShot()
void setTagMenu(unsigned int which, bool en)
void setTriggerSlope(gr::qtgui::trigger_slope slope)
int getNPoints() const
void tagMenuSlot(bool en)
void updateTrigger(gr::qtgui::trigger_mode mode)
void setTriggerLevel(float level)
void autoScale(bool en) override
void setSampleRate(const double samprate)
float getTriggerDelay() const
void setTriggerTagKey(QString s)
void setTriggerDelay(float delay)
void setTriggerChannel(int chan)
void setSemilogx(bool en)
void setupControlPanel(bool en)
TimeDomainDisplayPlot * getPlot() override
float getTriggerLevel() const
void setYaxis(double min, double max)
void signalTriggerSlope(gr::qtgui::trigger_slope slope)
void setTriggerMode(gr::qtgui::trigger_mode mode)
TimeDisplayForm(int nplots=1, QWidget *parent=0)
std::string getTriggerTagKey() const
void setTriggerTagKey(const std::string &s)
void signalTriggerLevel(float level)
void customEvent(QEvent *e) override
void setTriggerLevel(QString s)
void signalTriggerMode(gr::qtgui::trigger_mode mode)
void setNPoints(const int)
void setTriggerDelay(QString s)
QWidget for displaying time domain plots.
Definition: TimeDomainDisplayPlot.h:25
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)