-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathspectrumwindow.h
69 lines (49 loc) · 1.36 KB
/
spectrumwindow.h
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
/*
Spectrum display window
Copyright 2006-2016
Niels A. Moseley
Pieter-Tjerk de Boer
License: GPLv2
*/
#ifndef SPECTRUMWINDOW_H
#define SPECTRUMWINDOW_H
#include <QDialog>
#include <QLineEdit>
#include <QLabel>
#include <QHBoxLayout>
#include "spectrumwidget.h"
#include "virtualmachine.h"
namespace Ui {
class SpectrumWindow;
}
class SpectrumWindow : public QDialog
{
Q_OBJECT
public:
explicit SpectrumWindow(QWidget *parent = 0);
~SpectrumWindow();
/** submit 256 FFT'd samples */
void submit256Samples(const VirtualMachine::ring_buffer_data_t *samples);
/** set the sample rate for correct frequency axis scaling */
void setSampleRate(float rate);
/** get name of channel variable */
std::string getChannelName(uint32_t channel);
signals:
void channelChanged(uint32_t channel);
private slots:
void chan1Changed();
void chan2Changed();
void on_windowTypeBox_activated(int index);
void on_smoothingBox_activated(int index);
void on_modeBox_activated(int index);
void on_verticalRangeBox_activated(int index);
private:
Ui::SpectrumWindow *ui;
SpectrumWidget *m_spectrum;
QHBoxLayout *m_hsizer;
QLineEdit *m_chan1;
QLineEdit *m_chan2;
QLabel *m_chan1Label;
QLabel *m_chan2Label;
};
#endif // SPECTRUMWINDOW_H