GNU Radio Manual and C++ API Reference 3.8.5.0
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
numberdisplayform.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2014 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 NUMBER_DISPLAY_FORM_H
24#define NUMBER_DISPLAY_FORM_H
25
28#include <QtGui/QtGui>
29#include <qwt_thermo.h>
30#include <vector>
31
32/*!
33 * \brief DisplayForm child for managing number sink plots.
34 * \ingroup qtgui_blk
35 */
36class NumberDisplayForm : public QWidget
37{
38 Q_OBJECT
39
40public:
41 NumberDisplayForm(int nplots = 1,
42 gr::qtgui::graph_t type = gr::qtgui::NUM_GRAPH_HORIZ,
43 QWidget* parent = 0);
45
46 gr::qtgui::graph_t graphType() const;
47 QColor colorMin(unsigned int which) const;
48 QColor colorMax(unsigned int which) const;
49 std::string label(unsigned int which) const;
50 float average() const;
51 float updateTime() const;
52 int scaleMin(unsigned int which);
53 int scaleMax(unsigned int which);
54 std::string title() const;
55 std::string unit(unsigned int which) const;
56 float factor(unsigned int which) const;
57
58public slots:
59 void mousePressEvent(QMouseEvent* e);
60 void customEvent(QEvent* e);
61 void setStop(bool on);
62 void setStop();
63 void setGraphType(const gr::qtgui::graph_t type);
64 void setColor(unsigned int which, const QColor& min, const QColor& max);
65 void setColorMin(unsigned int which, QString min);
66 void setColorMax(unsigned int which, QString max);
67 void setLabel(unsigned int which, const std::string& label);
68 void setLabel(unsigned int which, QString label);
69 void setAverage(const float avg);
70 void setUpdateTime(const float time);
71 void setUpdateTime(QString time);
72 void saveFigure();
73 void setScale(unsigned int which, int min, int max);
74 void setScaleMin(unsigned int which, int min);
75 void setScaleMax(unsigned int which, int max);
76 void autoScale(bool on);
77 void setTitle(const std::string& title);
78 void setUnit(unsigned int which, const std::string& unit);
79 void setFactor(unsigned int which, float factor);
80
81private slots:
82 void newData(const QEvent*);
83
84private:
85 unsigned int d_nplots;
86 QGridLayout* d_layout;
87 std::vector<QLabel*> d_label;
88 std::vector<QLabel*> d_text_box;
89 std::vector<QwtThermo*> d_indicator;
90 gr::qtgui::graph_t d_graph_type;
91 float d_avg, d_update_time;
92 std::vector<float> d_max, d_min;
93
94 bool d_menu_on;
95 bool d_stop_state;
96 bool d_autoscale_state;
97
98 QMenu* d_menu;
99 QAction* d_stop_act;
100 QList<QMenu*> d_label_menu;
101 std::vector<LineTitleAction*> d_label_act;
102 std::vector<ItemFloatAct*> d_factor_act;
103 FFTAverageMenu* d_avg_menu;
104 NumberLayoutMenu* d_layout_menu;
105 std::vector<NumberColorMapMenu*> d_color_menu;
106 PopupMenu* d_maxcolor_menu;
107 QAction* d_autoscale_act;
108 PopupMenu* d_update_time_menu;
109 QAction* d_save_act;
110
111 QLabel* d_title;
112 std::vector<std::string> d_unit;
113 std::vector<float> d_factor;
114};
115
116#endif /* NUMBER_DISPLAY_FORM_H */
Definition form_menus.h:816
DisplayForm child for managing number sink plots.
Definition numberdisplayform.h:37
void setColor(unsigned int which, const QColor &min, const QColor &max)
NumberDisplayForm(int nplots=1, gr::qtgui::graph_t type=gr::qtgui::NUM_GRAPH_HORIZ, QWidget *parent=0)
QColor colorMin(unsigned int which) const
std::string title() const
int scaleMin(unsigned int which)
void setUpdateTime(QString time)
void setStop(bool on)
void setColorMax(unsigned int which, QString max)
void setUpdateTime(const float time)
void setColorMin(unsigned int which, QString min)
void mousePressEvent(QMouseEvent *e)
void autoScale(bool on)
void setAverage(const float avg)
gr::qtgui::graph_t graphType() const
void setScaleMax(unsigned int which, int max)
void setScaleMin(unsigned int which, int min)
void setLabel(unsigned int which, const std::string &label)
float updateTime() const
std::string unit(unsigned int which) const
void setFactor(unsigned int which, float factor)
void setLabel(unsigned int which, QString label)
QColor colorMax(unsigned int which) const
void setUnit(unsigned int which, const std::string &unit)
void setScale(unsigned int which, int min, int max)
void setGraphType(const gr::qtgui::graph_t type)
void setTitle(const std::string &title)
std::string label(unsigned int which) const
float factor(unsigned int which) const
void customEvent(QEvent *e)
float average() const
int scaleMax(unsigned int which)
Definition form_menus.h:1284
Definition form_menus.h:1439