-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrackselectdialog.h
More file actions
66 lines (58 loc) · 1.7 KB
/
trackselectdialog.h
File metadata and controls
66 lines (58 loc) · 1.7 KB
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 TRACKSELECTDIALOG_H
#define TRACKSELECTDIALOG_H
#include <qchar.h>
#include <qdialog.h>
#include <qdir.h>
#include <qeventloop.h>
#include <qfiledialog.h>
#include <qfileinfo.h>
#include <qlineedit.h>
#include <qlist.h>
#include <qobject.h>
#include <qmediaplayer.h>
#include <qmessagebox.h>
#include <qprocess.h>
#include <qpushbutton.h>
#include <qstandardpaths.h>
#include <qtemporaryfile.h>
#include <qthread.h>
#include <qtimer.h>
#include "bitrateselectdialog.h"
#include "processingdialog.h"
namespace Ui {
class TrackSelectDialog;
}
class TrackSelectDialog : public QDialog
{
Q_OBJECT
public:
explicit TrackSelectDialog(QWidget *parent = nullptr);
~TrackSelectDialog();
QString getTrack1();
QString getTrack2();
int getTrials();
qint64 getSegmentStart();
qint64 getSegmentStop();
private:
Ui::TrackSelectDialog *ui;
ProcessingDialog *processingDialog;
const QString fileMatchingPatterns =
"Audio Files (*.flac *.mp3 *.ogg *.opus *.wav *.webm);; Any (*)";
qint64 track1Length;
qint64 track2Length;
QProcess *ffmpegProcess;
QLineEdit *targetLineEdit;
bool isFileReadable(const QString &filePath);
qint64 getFileLength(const QString &filePath);
enum timestampElementsEnumeration { HOURS, MINUTES, SECONDS };
QList<int> getTimestampElements(const QString ×tamp);
bool isTimestampValid(const QString ×tamp);
QString millisecondsToTimestamp(const qint64 &milliseconds);
qint64 timestampToMilliseconds(const QString ×tamp);
private slots:
void convertAudio(const QString &filePath);
signals:
void conversionStarted();
void conversionFinished(QString outputFilePath);
};
#endif // TRACKSELECTDIALOG_H