GNU Radio Manual and C++ API Reference
3.7.5
The Free & Open Software Radio Ecosystem
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
freqdisplayform.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 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 FREQ_DISPLAY_FORM_H
24
#define FREQ_DISPLAY_FORM_H
25
26
#include <
gnuradio/qtgui/spectrumUpdateEvents.h
>
27
#include <
gnuradio/qtgui/FrequencyDisplayPlot.h
>
28
#include <QtGui/QtGui>
29
#include <vector>
30
#include <
gnuradio/filter/firdes.h
>
31
32
#include <
gnuradio/qtgui/displayform.h
>
33
34
/*!
35
* \brief DisplayForm child for managing frequency (PSD) plots.
36
* \ingroup qtgui_blk
37
*/
38
class
FreqDisplayForm
:
public
DisplayForm
39
{
40
Q_OBJECT
41
42
public
:
43
FreqDisplayForm
(
int
nplots=1, QWidget* parent = 0);
44
~FreqDisplayForm
();
45
46
FrequencyDisplayPlot
*
getPlot
();
47
48
int
getFFTSize
()
const
;
49
float
getFFTAverage
()
const
;
50
gr::filter::firdes::win_type
getFFTWindowType
()
const
;
51
52
// returns the frequency that was last double-clicked on by the user
53
float
getClickedFreq
()
const
;
54
55
// checks if there was a double-click event; reset if there was
56
bool
checkClicked
();
57
58
public
slots:
59
void
customEvent
(QEvent *e);
60
61
void
setSampleRate
(
const
QString &samprate);
62
void
setFFTSize
(
const
int
);
63
void
setFFTAverage
(
const
float
);
64
void
setFFTWindowType
(
const
gr::filter::firdes::win_type
);
65
66
void
setFrequencyRange
(
const
double
centerfreq,
67
const
double
bandwidth);
68
void
setYaxis
(
double
min
,
double
max);
69
void
setYMax
(
const
QString &m);
70
void
setYMin
(
const
QString &m);
71
void
autoScale
(
bool
en);
72
void
clearMaxHold
();
73
void
clearMinHold
();
74
75
private
slots:
76
void
newData(
const
QEvent *updateEvent);
77
void
onPlotPointSelected(
const
QPointF p);
78
79
private
:
80
uint64_t
d_num_real_data_points;
81
QIntValidator* d_int_validator;
82
83
double
d_samp_rate, d_center_freq;
84
int
d_fftsize;
85
float
d_fftavg;
86
gr::filter::firdes::win_type
d_fftwintype;
87
double
d_units;
88
89
bool
d_clicked;
90
double
d_clicked_freq;
91
92
FFTSizeMenu
*d_sizemenu;
93
FFTAverageMenu
*d_avgmenu;
94
FFTWindowMenu
*d_winmenu;
95
QAction *d_clearmin_act, *d_clearmax_act;
96
};
97
98
#endif
/* FREQ_DISPLAY_FORM_H */
gr-qtgui
include
gnuradio
qtgui
freqdisplayform.h
Generated on Fri Oct 3 2014 00:33:50 for GNU Radio Manual and C++ API Reference by
1.8.1.2