GNU Radio Manual and C++ API Reference 3.8.5.0
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
vectordisplayform.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 VECTOR_DISPLAY_FORM_H
24#define VECTOR_DISPLAY_FORM_H
25
28#include <QtGui/QtGui>
29#include <vector>
30
32
33/*!
34 * \brief DisplayForm child for managing vector plots.
35 * \ingroup qtgui_blk
36 */
38{
39 Q_OBJECT
40
41public:
42 VectorDisplayForm(int nplots = 1, QWidget* parent = 0);
44
46
47 int getVecSize() const;
48 float getVecAverage() const;
49
50 void setXAxisLabel(const QString& label);
51 void setYAxisLabel(const QString& label);
52 void setRefLevel(double refLevel);
53
54 // returns the x-Value that was last double-clicked on by the user
55 float getClickedXVal() const;
56
57 // checks if there was a double-click event; reset if there was
59
60public slots:
61 void customEvent(QEvent* e);
62
63 void setVecSize(const int);
64 void setVecAverage(const float);
65
66 void setXaxis(double start, double step);
67 void setYaxis(double min, double max);
68 void setYMax(const QString& m);
69 void setYMin(const QString& m);
70 void autoScale(bool en);
73
74private slots:
75 void newData(const QEvent* updateEvent);
76 void onPlotPointSelected(const QPointF p);
77
78private:
79 uint64_t d_num_real_data_points;
80 QIntValidator* d_int_validator;
81
82 int d_vecsize;
83 float d_vecavg;
84 double d_ref_level;
85
86 // TODO do I keep these?
87 bool d_clicked;
88 double d_clicked_x_level;
89
90 AverageMenu* d_avgmenu;
91 QAction *d_clearmin_act, *d_clearmax_act;
92};
93
94#endif /* VECTOR_DISPLAY_FORM_H */
Definition form_menus.h:709
Base class for setting up and managing QTGUI plot forms.
Definition displayform.h:42
DisplayForm child for managing vector plots.
Definition vectordisplayform.h:38
void setYMax(const QString &m)
void autoScale(bool en)
void setRefLevel(double refLevel)
void customEvent(QEvent *e)
void setXaxis(double start, double step)
void setYaxis(double min, double max)
VectorDisplayPlot * getPlot()
float getClickedXVal() const
void setYAxisLabel(const QString &label)
void setYMin(const QString &m)
float getVecAverage() const
void setVecSize(const int)
int getVecSize() const
VectorDisplayForm(int nplots=1, QWidget *parent=0)
void setXAxisLabel(const QString &label)
void setVecAverage(const float)
QWidget for displaying 1D-vector plots.
Definition VectorDisplayPlot.h:36