GNU Radio Manual and C++ API Reference 3.7.14.0
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 * 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
33
34/*!
35 * \brief DisplayForm child for managing time domain plots.
36 * \ingroup qtgui_blk
37 */
39{
40 Q_OBJECT
41
42public:
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
56public 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, const std::string& unit = "");
63 void setNPoints(const int);
64 void setStem(bool en);
65 void autoScale(bool en);
67 void setSemilogx(bool en);
68 void setSemilogy(bool en);
69 void tagMenuSlot(bool en);
70 void setTagMenu(int which, bool en);
71
75 void setTriggerLevel(QString s);
76 void setTriggerLevel(float level);
77 void setTriggerDelay(QString s);
78 void setTriggerDelay(float delay);
79 void setTriggerChannel(int chan);
80 void setTriggerTagKey(QString s);
81 void setTriggerTagKey(const std::string& s);
82
83 void setupControlPanel(bool en);
86
87private slots:
88 void newData(const QEvent*);
89 void notifyYAxisPlus();
90 void notifyYAxisMinus();
91 void notifyYRangePlus();
92 void notifyYRangeMinus();
93 void notifyXAxisPlus();
94 void notifyXAxisMinus();
95 void notifyTriggerMode(const QString& mode);
96 void notifyTriggerSlope(const QString& slope);
97 void notifyTriggerLevelPlus();
98 void notifyTriggerLevelMinus();
99 void notifyTriggerDelayPlus();
100 void notifyTriggerDelayMinus();
101
102signals:
105 void signalTriggerLevel(float level);
106 void signalTriggerDelay(float delay);
108 void signalNPoints(const int npts);
109
110private:
111 QIntValidator* d_int_validator;
112
113 double d_start_frequency;
114 double d_stop_frequency;
115 double d_current_units;
116
117 int d_npoints;
118
119 bool d_stem;
120 bool d_semilogx;
121 bool d_semilogy;
122
123 NPointsMenu* d_nptsmenu;
124 QAction* d_stemmenu;
125 QAction* d_semilogxmenu;
126 QAction* d_semilogymenu;
127 QAction* d_controlpanelmenu;
128 std::vector<QAction*> d_tagsmenu;
129
130 QMenu* d_triggermenu;
131 TriggerModeMenu* d_tr_mode_menu;
132 TriggerSlopeMenu* d_tr_slope_menu;
133 PopupMenu* d_tr_level_act;
134 PopupMenu* d_tr_delay_act;
135 TriggerChannelMenu* d_tr_channel_menu;
136 PopupMenu* d_tr_tag_key_act;
137
138 gr::qtgui::trigger_mode d_trig_mode;
139 gr::qtgui::trigger_slope d_trig_slope;
140 float d_trig_level;
141 float d_trig_delay;
142 int d_trig_channel;
143 std::string d_trig_tag_key;
144
145 TimeControlPanel* d_controlpanel;
146};
147
148#endif /* TIME_DISPLAY_FORM_H */
Base class for setting up and managing QTGUI plot forms.
Definition: displayform.h:42
Definition: form_menus.h:935
Definition: form_menus.h:1436
Definition: timecontrolpanel.h:38
DisplayForm child for managing time domain plots.
Definition: timedisplayform.h:39
void teardownControlPanel()
void setupControlPanel()
void signalTriggerDelay(float delay)
void setSampleRate(const QString &samprate)
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 setTagMenu(int which, bool en)
gr::qtgui::trigger_mode getTriggerMode() const
void autoScaleShot()
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)
TimeDomainDisplayPlot * getPlot()
void setSampleRate(const double samprate)
float getTriggerDelay() const
void setTriggerTagKey(QString s)
void setTriggerDelay(float delay)
void autoScale(bool en)
void setTriggerChannel(int chan)
void setSemilogx(bool en)
void setupControlPanel(bool en)
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 setTriggerLevel(QString s)
void signalTriggerMode(gr::qtgui::trigger_mode mode)
void customEvent(QEvent *e)
void setNPoints(const int)
void setTriggerDelay(QString s)
QWidget for displaying time domain plots.
Definition: TimeDomainDisplayPlot.h:37
Definition: form_menus.h:1230
Definition: form_menus.h:1085
Definition: form_menus.h:1163
trigger_mode
Definition: gr-qtgui/include/gnuradio/qtgui/trigger_mode.h:29
trigger_slope
Definition: gr-qtgui/include/gnuradio/qtgui/trigger_mode.h:36
float min(float a, float b)