-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmainwindow.h
47 lines (33 loc) · 960 Bytes
/
mainwindow.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
#pragma once
// Qt includes
#include <QMainWindow>
#include <QActionGroup>
// system includes
#include <memory>
// forward declares
class QAudioDeviceInfo;
class QLabel;
namespace Ui { class MainWindow; }
class BaseDevice;
class BaseToneGenerator;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow() override;
private slots:
void start();
void stop();
void refreshRateChanged();
void zoomChanged();
void startStopGenerator();
private:
int samplerate() const;
const std::unique_ptr<Ui::MainWindow> m_ui;
const QList<QAudioDeviceInfo> m_inputDevices, m_outputDevices;
std::unique_ptr<BaseDevice> m_input;
QActionGroup m_inputDeviceGroup{this}, m_outputDeviceGroup{this}, m_samplerateGroup{this}, m_refreshrateGroup{this}, m_zoomlevelsGroup{this};
QLabel &m_statusLabel;
std::unique_ptr<BaseToneGenerator> m_generator;
};