-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathtabgridwidget.h
69 lines (57 loc) · 1.7 KB
/
tabgridwidget.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
#ifndef TABGRIDWIDGET_H
#define TABGRIDWIDGET_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 TabGridWidget;
}
class TabGridWidget : public QWidget
{
Q_OBJECT
public:
explicit TabGridWidget(QWidget *parent = 0);
~TabGridWidget();
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_playAudio_toggled();
void on_listSlices_doubleClicked(const QModelIndex &index);
void on_listSlices_itemSelectionChanged();
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();
void on_chkCreateOTFile_stateChanged(int value);
private:
Ui::TabGridWidget *ui;
void playAudio();
void createWav(const QString destFilename);
void updateSliceCount();
void addListItems(const QStringList files);
void enableDisableOTSection(bool enable);
QMediaPlayer *mediaplayer;
};
#endif // TABGRIDWIDGET_H