GNU Radio 3.7.3 C++ API
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 
28 #include <QtGui/QtGui>
29 #include <vector>
30 
32 
33 /*!
34  * \brief DisplayForm child for managing time domain plots.
35  * \ingroup qtgui_blk
36  */
38 {
39  Q_OBJECT
40 
41  public:
42  TimeDisplayForm(int nplots=1, QWidget* parent = 0);
44 
46 
47  int getNPoints() const;
50  float getTriggerLevel() const;
51  float getTriggerDelay() const;
52  int getTriggerChannel() const;
53  std::string getTriggerTagKey() const;
54 
55 public slots:
56  void customEvent(QEvent * e);
57 
58  void setSampleRate(const double samprate);
59  void setSampleRate(const QString &samprate);
60  void setYaxis(double min, double max);
61  void setNPoints(const int);
62  void setStem(bool en);
63  void autoScale(bool en);
64  void setSemilogx(bool en);
65  void setSemilogy(bool en);
66  void tagMenuSlot(bool en);
67  void setTagMenu(int which, bool en);
68 
72  void setTriggerLevel(QString s);
73  void setTriggerLevel(float level);
74  void setTriggerDelay(QString s);
75  void setTriggerDelay(float delay);
76  void setTriggerChannel(int chan);
77  void setTriggerTagKey(QString s);
78  void setTriggerTagKey(const std::string &s);
79 
80 private slots:
81  void newData(const QEvent*);
82 
83 private:
84  QIntValidator* d_int_validator;
85 
86  double d_start_frequency;
87  double d_stop_frequency;
88 
89  int d_npoints;
90 
91  bool d_stem;
92  bool d_semilogx;
93  bool d_semilogy;
94 
95  NPointsMenu *d_nptsmenu;
96  QAction *d_stemmenu;
97  QAction *d_semilogxmenu;
98  QAction *d_semilogymenu;
99  std::vector<QAction*> d_tagsmenu;
100 
101  QMenu *d_triggermenu;
102  TriggerModeMenu *d_tr_mode_menu;
103  TriggerSlopeMenu *d_tr_slope_menu;
104  PopupMenu *d_tr_level_act;
105  PopupMenu *d_tr_delay_act;
106  TriggerChannelMenu *d_tr_channel_menu;
107  PopupMenu *d_tr_tag_key_act;
108 
109  gr::qtgui::trigger_mode d_trig_mode;
110  gr::qtgui::trigger_slope d_trig_slope;
111  float d_trig_level;
112  float d_trig_delay;
113  int d_trig_channel;
114  std::string d_trig_tag_key;
115 };
116 
117 #endif /* TIME_DISPLAY_FORM_H */
Base class for setting up and managing QTGUI plot forms.
Definition: displayform.h:41
Definition: form_menus.h:1056
Definition: form_menus.h:1264
float min(float a, float b)
int getTriggerChannel() const
void updateTrigger(gr::qtgui::trigger_mode mode)
void setTriggerChannel(int chan)
Definition: form_menus.h:914
void customEvent(QEvent *e)
void tagMenuSlot(bool en)
void setSemilogy(bool en)
void setTriggerLevel(QString s)
void setYaxis(double min, double max)
gr::qtgui::trigger_mode getTriggerMode() const
DisplayForm child for managing time domain plots.
Definition: timedisplayform.h:37
Definition: form_menus.h:1138
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 setSampleRate(const double samprate)
void autoScale(bool en)
float getTriggerLevel() const
void setTriggerTagKey(QString s)
gr::qtgui::trigger_slope getTriggerSlope() const
void setTriggerDelay(QString s)
QWidget for displaying time domain plots.
Definition: TimeDomainDisplayPlot.h:36
void setTagMenu(int which, bool en)
void setStem(bool en)
void setNPoints(const int)
Definition: form_menus.h:1208
void setTriggerMode(gr::qtgui::trigger_mode mode)
TimeDisplayForm(int nplots=1, QWidget *parent=0)
float getTriggerDelay() const
TimeDomainDisplayPlot * getPlot()