add: reencode album feature
for now presets which are featured in the GUI are: mp3, aac, opus, lossless. to-refactor: AlbumReencoder.cpp, backend code is currently longer than needed! we can shorten it. with seperating the raii handlers into a seperate class
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
#include <QDialog>
|
||||
#include <QList>
|
||||
#include "engine/Track.h"
|
||||
#include "engine/ReencodeJob.h"
|
||||
|
||||
class QComboBox;
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
class QTableWidget;
|
||||
class QLabel;
|
||||
class QProgressBar;
|
||||
|
||||
namespace engine { class AlbumReencoder; }
|
||||
class ReencodeDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ReencodeDialog(const QList<engine::Track> &tracks,
|
||||
QWidget *parent = nullptr);
|
||||
~ReencodeDialog();
|
||||
|
||||
private slots:
|
||||
void onPresetChanged(int index);
|
||||
void onBrowseOutput();
|
||||
void onStartStop();
|
||||
void onTrackStarted (int index, const QString &title);
|
||||
void onTrackFinished(int index, bool ok, const QString &outPath,
|
||||
const QString &err);
|
||||
void onAllFinished (int succeeded, int failed);
|
||||
|
||||
private:
|
||||
void buildUi();
|
||||
void populateTrackTable();
|
||||
void setRunning(bool running);
|
||||
void updateOverallProgress();
|
||||
|
||||
QList<engine::Track> m_tracks;
|
||||
QList<engine::EncodePreset> m_presets;
|
||||
|
||||
QComboBox *m_presetCombo { nullptr };
|
||||
QLabel *m_presetDesc { nullptr };
|
||||
QLineEdit *m_outputDir { nullptr };
|
||||
QPushButton *m_browseBtn { nullptr };
|
||||
QTableWidget *m_table { nullptr };
|
||||
QProgressBar *m_overallBar { nullptr };
|
||||
QLabel *m_statusLabel { nullptr };
|
||||
QPushButton *m_startStopBtn { nullptr };
|
||||
QPushButton *m_closeBtn { nullptr };
|
||||
|
||||
engine::AlbumReencoder *m_reencoder { nullptr };
|
||||
|
||||
int m_doneCount { 0 };
|
||||
int m_totalCount { 0 };
|
||||
};
|
||||
Reference in New Issue
Block a user