CuteLogger
Fast and simple logging solution for Qt based applications
alignaudiodialog.h
1 /*
2  * Copyright (c) 2022 Meltytech, LLC
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef ALIGNAUDIODIALOG_H
19 #define ALIGNAUDIODIALOG_H
20 
21 #include "models/alignclipsmodel.h"
22 
23 #include <QDialog>
24 #include <QUuid>
25 
26 class QComboBox;
27 class QDialogButtonBox;
28 class QLabel;
29 class QListWidget;
30 class QLineEdit;
31 class QPushButton;
32 class QTreeView;
33 
34 class AlignTableDelegate;
35 class MultitrackModel;
36 class LongUiTask;
37 
38 class AlignAudioDialog : public QDialog
39 {
40  Q_OBJECT
41 public:
42  explicit AlignAudioDialog(QString title, MultitrackModel *model, const QVector<QUuid> &uuids,
43  QWidget *parent = 0);
44  virtual ~AlignAudioDialog();
45 
46 private slots:
47  void rebuildClipList();
48  void process();
49  void apply();
50  void processAndApply();
51  void updateReferenceProgress(int percent);
52  void updateClipProgress(int index, int percent);
53  void clipFinished(int index, int offset, double speed, double quality);
54 
55 private:
56  AlignTableDelegate *m_delegate;
57  MultitrackModel *m_model;
58  AlignClipsModel m_alignClipsModel;
59  QVector<QUuid> m_uuids;
60  QComboBox *m_trackCombo;
61  QComboBox *m_speedCombo;
62  QTreeView *m_table;
63  QDialogButtonBox *m_buttonBox;
64  QPushButton *m_applyButton;
65  QPushButton *m_processAndApplyButton;
66  LongUiTask *m_uiTask;
67 };
68 
69 #endif // ALIGNAUDIODIALOG_H