This repository has been archived by the owner on May 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathmainwindow.hpp
66 lines (54 loc) · 1.65 KB
/
mainwindow.hpp
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
#ifndef MAINWINDOW_HPP
#define MAINWINDOW_HPP
/** \file mainwindow.hpp
* \brief Definitions for everything that has to do with GUI.*/
#include <QFutureWatcher>
#include "spectrogram.hpp"
#include "ui_mainwindow.h"
/// Represents the main application window.
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow();
private:
Ui::MainWindow ui;
Soundfile soundfile;
bool soundfileOk();
QImage image;
bool imageOk();
Spectrogram* spectrogram;
void setValues();
void loadValues();
void updatePalette();
void workingState();
void idleState();
QFutureWatcher<QImage>* image_watcher;
QFutureWatcher<real_vec>* sound_watcher;
private slots:
void setFilterUnits(int scale);
void makeSpectrogram();
bool checkAnalysisValues();
void makeSound();
bool checkSynthesisValues();
void chooseImage();
void loadImage();
void updateImage();
void resetImage();
void saveImage();
void chooseSoundfile();
void loadSoundfile();
void updateSoundfile();
void resetSoundfile();
void saveSoundfile(const real_vec& signal);
void choosePalette();
//void showHelp(QWidget* parent, const QString& text) const;
bool confirmWarnings(const QStringList& errors);
void newSpectrogram();
void newSound();
signals:
//void makeSound(Spectrogram* spectrogram, QImage image, int samplerate);
void makeSpectrogram(Spectrogram* spectrogram, real_vec signal,
int samplerate);
};
#endif