forked from KaiDrange/OctaChainer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtabmainwidget.h
64 lines (53 loc) · 1.53 KB
/
tabmainwidget.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
#ifndef TABMAINWIDGET_H
#define TABMAINWIDGET_H
#include <QWidget>
#include <QFileDialog>
#include <QShortcut>
#include <QThread>
#include <QMimeData>
#include <QAudio>
#include <QMediaPlayer>
#include "projectsettings.h"
#include "audiofactory.h"
extern QString _defaultPathAudio;
extern QString _defaultPathProjects;
extern QString _defaultPathOutput;
namespace Ui {
class TabMainWidget;
}
class TabMainWidget : public QWidget
{
Q_OBJECT
public:
explicit TabMainWidget(QWidget *parent = 0);
~TabMainWidget();
void reset();
void configure(ProjectSettings &settings);
void updateCurrentSettings(ProjectSettings &settings);
public slots:
void updateProgressBar(int currentSlice, int totalSlices);
void updateUIafterCreateDone();
protected:
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
private slots:
void on_btnAddWav_clicked();
void on_btnPlay_clicked();
void on_btnStop_clicked();
void on_listSlices_doubleClicked(const QModelIndex &index);
void on_btnRemove_clicked();
void on_btnCreate_clicked();
void on_sliderGain_valueChanged(int value);
void on_sliderBPM_valueChanged(int value);
void on_btnAddSilence_clicked();
void on_txtBPMValue_textChanged();
void on_txtGainValue_textChanged();
private:
Ui::TabMainWidget *ui;
void playAudio();
void createWav(const QString destFilename);
void updateSliceCount();
void addListItems(const QStringList files);
QMediaPlayer *mediaplayer;
};
#endif // TABMAINWIDGET_H