GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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  * 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 TIME_DISPLAY_FORM_H
24 #define TIME_DISPLAY_FORM_H
25 
29 #include <QtGui/QtGui>
30 #include <vector>
31 
32 class TimeControlPanel;
33 
34 /*!
35  * \brief DisplayForm child for managing time domain plots.
36  * \ingroup qtgui_blk
37  */
39 {
40  Q_OBJECT
41 
42 public:
43  TimeDisplayForm(int nplots=1, QWidget* parent = 0);
45 
47 
48  int getNPoints() const;
51  float getTriggerLevel() const;
52  float getTriggerDelay() const;
53  int getTriggerChannel() const;
54  std::string getTriggerTagKey() const;
55 
56 public slots:
57  void customEvent(QEvent * e);
58 
59  void setSampleRate(const double samprate);
60  void setSampleRate(const QString &samprate);
61  void setYaxis(double min, double max);
62  void setYLabel(const std::string &label,
63  const std::string &unit="");
64  void setNPoints(const int);
65  void setStem(bool en);
66  void autoScale(bool en);
67  void autoScaleShot();
68  void setSemilogx(bool en);
69  void setSemilogy(bool en);
70  void tagMenuSlot(bool en);
71  void setTagMenu(int which, bool en);
72 
76  void setTriggerLevel(QString s);
77  void setTriggerLevel(float level);
78  void setTriggerDelay(QString s);
79  void setTriggerDelay(float delay);
80  void setTriggerChannel(int chan);
81  void setTriggerTagKey(QString s);
82  void setTriggerTagKey(const std::string &s);
83 
84  void setupControlPanel(bool en);
85  void setupControlPanel();
86  void teardownControlPanel();
87 
88 private slots:
89  void newData(const QEvent*);
90  void notifyYAxisPlus();
91  void notifyYAxisMinus();
92  void notifyYRangePlus();
93  void notifyYRangeMinus();
94  void notifyXAxisPlus();
95  void notifyXAxisMinus();
96  void notifyTriggerMode(const QString &mode);
97  void notifyTriggerSlope(const QString &slope);
98  void notifyTriggerLevelPlus();
99  void notifyTriggerLevelMinus();
100  void notifyTriggerDelayPlus();
101  void notifyTriggerDelayMinus();
102 
103 signals:
106  void signalTriggerLevel(float level);
107  void signalTriggerDelay(float delay);
108  void signalReplot();
109  void signalNPoints(const int npts);
110 
111 private:
112  QIntValidator* d_int_validator;
113 
114  double d_start_frequency;
115  double d_stop_frequency;
116  double d_current_units;
117 
118  int d_npoints;
119 
120  bool d_stem;
121  bool d_semilogx;
122  bool d_semilogy;
123 
124  NPointsMenu *d_nptsmenu;
125  QAction *d_stemmenu;
126  QAction *d_semilogxmenu;
127  QAction *d_semilogymenu;
128  QAction *d_controlpanelmenu;
129  std::vector<QAction*> d_tagsmenu;
130 
131  QMenu *d_triggermenu;
132  TriggerModeMenu *d_tr_mode_menu;
133  TriggerSlopeMenu *d_tr_slope_menu;
134  PopupMenu *d_tr_level_act;
135  PopupMenu *d_tr_delay_act;
136  TriggerChannelMenu *d_tr_channel_menu;
137  PopupMenu *d_tr_tag_key_act;
138 
139  gr::qtgui::trigger_mode d_trig_mode;
140  gr::qtgui::trigger_slope d_trig_slope;
141  float d_trig_level;
142  float d_trig_delay;
143  int d_trig_channel;
144  std::string d_trig_tag_key;
145 
146  TimeControlPanel *d_controlpanel;
147 };
148 
149 #endif /* TIME_DISPLAY_FORM_H */
void signalTriggerLevel(float level)
Base class for setting up and managing QTGUI plot forms.
Definition: displayform.h:41
Definition: timecontrolpanel.h:37
Definition: form_menus.h:1125
Definition: form_menus.h:1494
float min(float a, float b)
int getTriggerChannel() const
void updateTrigger(gr::qtgui::trigger_mode mode)
void setTriggerChannel(int chan)
Definition: form_menus.h:972
void customEvent(QEvent *e)
void tagMenuSlot(bool en)
void setSemilogy(bool en)
void teardownControlPanel()
void setTriggerLevel(QString s)
void setYaxis(double min, double max)
gr::qtgui::trigger_mode getTriggerMode() const
void signalTriggerSlope(gr::qtgui::trigger_slope slope)
DisplayForm child for managing time domain plots.
Definition: timedisplayform.h:38
Definition: form_menus.h:1207
void signalTriggerMode(gr::qtgui::trigger_mode mode)
void setTriggerSlope(gr::qtgui::trigger_slope slope)
void setSemilogx(bool en)
std::string getTriggerTagKey() const
int getNPoints() const
trigger_slope
Definition: gr-qtgui/include/gnuradio/qtgui/trigger_mode.h:36
trigger_mode
Definition: gr-qtgui/include/gnuradio/qtgui/trigger_mode.h:29
void signalTriggerDelay(float delay)
void setSampleRate(const double samprate)
void autoScale(bool en)
float getTriggerLevel() const
void setTriggerTagKey(QString s)
gr::qtgui::trigger_slope getTriggerSlope() const
void setupControlPanel()
void setTriggerDelay(QString s)
QWidget for displaying time domain plots.
Definition: TimeDomainDisplayPlot.h:36
void setTagMenu(int which, bool en)
void setYLabel(const std::string &label, const std::string &unit="")
void autoScaleShot()
void setStem(bool en)
void setNPoints(const int)
Definition: form_menus.h:1277
void setTriggerMode(gr::qtgui::trigger_mode mode)
void signalNPoints(const int npts)
TimeDisplayForm(int nplots=1, QWidget *parent=0)
float getTriggerDelay() const
TimeDomainDisplayPlot * getPlot()