File: dockfft.h

package info (click to toggle)
gqrx-sdr 2.6-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,700 kB
  • ctags: 2,724
  • sloc: cpp: 22,413; ansic: 564; xml: 25; makefile: 4
file content (105 lines) | stat: -rw-r--r-- 3,992 bytes parent folder | download | duplicates (2)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/* -*- c++ -*- */
/*
 * Gqrx SDR: Software defined radio receiver powered by GNU Radio and Qt
 *           http://gqrx.dk/
 *
 * Copyright 2011-2016 Alexandru Csete OZ9AEC.
 *
 * Gqrx is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3, or (at your option)
 * any later version.
 *
 * Gqrx is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Gqrx; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street,
 * Boston, MA 02110-1301, USA.
 */
#ifndef DOCKFFT_H
#define DOCKFFT_H

#include <QDockWidget>
#include <QSettings>

namespace Ui {
    class DockFft;
}

/*! \brief Dock widget with FFT settings. */
class DockFft : public QDockWidget
{
    Q_OBJECT

public:
    explicit DockFft(QWidget *parent = 0);
    ~DockFft();

    int fftRate();
    int setFftRate(int fft_rate);

    int fftSize();
    int setFftSize(int fft_size);

    void setSampleRate(float sample_rate);

    void saveSettings(QSettings *settings);
    void readSettings(QSettings *settings);

signals:
    void fftSizeChanged(int size);                 /*! FFT size changed. */
    void fftRateChanged(int fps);                  /*! FFT rate changed. */
    void wfSpanChanged(quint64 span_ms);           /*! Waterfall span changed. */
    void fftSplitChanged(int pct);                 /*! Split between pandapter and waterfall changed. */
    void fftZoomChanged(float level);              /*! Zoom level slider changed. */
    void fftAvgChanged(float gain);                /*! FFT video filter gain has changed. */
    void pandapterRangeChanged(float min, float max);
    void waterfallRangeChanged(float min, float max);
    void resetFftZoom(void);                       /*! FFT zoom reset. */
    void gotoFftCenter(void);                      /*! Go to FFT center. */
    void gotoDemodFreq(void);                      /*! Center FFT around demodulator frequency. */
    void fftColorChanged(const QColor &);          /*! FFT color has changed. */
    void fftFillToggled(bool fill);                /*! Toggle filling area under FFT plot. */
    void fftPeakHoldToggled(bool enable);          /*! Toggle peak hold in FFT area. */
    void peakDetectionToggled(bool enabled);       /*! Enable peak detection in FFT plot */

public slots:
    void setPandapterRange(float min, float max);
    void setWaterfallRange(float min, float max);
    void setWfResolution(quint64 msec_per_line);
    void setZoomLevel(float level);

private slots:
    void on_fftSizeComboBox_currentIndexChanged(const QString & text);
    void on_fftRateComboBox_currentIndexChanged(const QString & text);
    void on_wfSpanComboBox_currentIndexChanged(int index);
    void on_fftSplitSlider_valueChanged(int value);
    void on_fftAvgSlider_valueChanged(int value);
    void on_fftZoomSlider_valueChanged(int level);
    void on_pandRangeSlider_valuesChanged(int min, int max);
    void on_wfRangeSlider_valuesChanged(int min, int max);
    void on_resetButton_clicked(void);
    void on_centerButton_clicked(void);
    void on_demodButton_clicked(void);
    void on_colorPicker_colorChanged(const QColor &);
    void on_fillButton_toggled(bool checked);
    void on_peakHoldButton_toggled(bool checked);
    void on_peakDetectionButton_toggled(bool checked);
    void on_lockButton_toggled(bool checked);

private:
    void updateInfoLabels(void);

private:
    Ui::DockFft   * ui;
//    float         m_maximumFftDb;
//    float         m_minimumFftDb;
    float         m_sample_rate;
    bool          m_pand_last_modified; /* Flag to indicate which slider was changed last */
};

#endif // DOCKFFT_H