blob: a6bfceb042531f15a46a04c93719d635dc347cd8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/* -*- c++ -*- */
/*
* Copyright 2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef VECTOR_DISPLAY_FORM_H
#define VECTOR_DISPLAY_FORM_H
#include <gnuradio/qtgui/VectorDisplayPlot.h>
#include <gnuradio/qtgui/spectrumUpdateEvents.h>
#include <QtGui/QtGui>
#include <vector>
#include <gnuradio/qtgui/displayform.h>
/*!
* \brief DisplayForm child for managing vector plots.
* \ingroup qtgui_blk
*/
class VectorDisplayForm : public DisplayForm
{
Q_OBJECT
public:
VectorDisplayForm(int nplots = 1, QWidget* parent = 0);
~VectorDisplayForm() override;
VectorDisplayPlot* getPlot() override;
int getVecSize() const;
float getVecAverage() const;
void setXAxisLabel(const QString& label);
void setYAxisLabel(const QString& label);
void setRefLevel(double refLevel);
// returns the x-Value that was last double-clicked on by the user
float getClickedXVal() const;
// checks if there was a double-click event; reset if there was
bool checkClicked();
public slots:
void customEvent(QEvent* e) override;
void setVecSize(const int);
void setVecAverage(const float);
void setXaxis(double start, double step);
void setYaxis(double min, double max);
void setYMax(const QString& m);
void setYMin(const QString& m);
void autoScale(bool en) override;
void clearMaxHold();
void clearMinHold();
private slots:
void newData(const QEvent* updateEvent) override;
void onPlotPointSelected(const QPointF p) override;
private:
uint64_t d_num_real_data_points;
QIntValidator* d_int_validator;
int d_vecsize;
float d_vecavg;
double d_ref_level;
// TODO do I keep these?
bool d_clicked;
double d_clicked_x_level;
AverageMenu* d_avgmenu;
QAction *d_clearmin_act, *d_clearmax_act;
};
#endif /* VECTOR_DISPLAY_FORM_H */
|