CuteLogger
Fast and simple logging solution for Qt based applications
transcribeaudiodialog.h
1/*
2 * Copyright (c) 2024-2025 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 TRANSCRIBEAUDIODIALOG_H
19#define TRANSCRIBEAUDIODIALOG_H
20
21#include "models/extensionmodel.h"
22
23#include <QDialog>
24
25class QAbstractButton;
26class QCheckBox;
27class QComboBox;
28class QDialogButtonBox;
29class QLineEdit;
30class QListWidget;
31class QSpinBox;
32class QTreeView;
33
34class TranscribeAudioDialog : public QDialog
35{
36 Q_OBJECT
37
38public:
39 explicit TranscribeAudioDialog(const QString &trackName, QWidget *parent);
40 QString name();
41 QString language();
42 QList<int> tracks();
43 bool translate();
44 int maxLineLength();
45 bool includeNonspoken();
46
47protected:
48 virtual void showEvent(QShowEvent *event) override;
49
50private slots:
51 void onButtonClicked(QAbstractButton *button);
52 void onModelRowClicked(const QModelIndex &index);
53
54private:
55 void refreshModels(bool report = true);
56 void downloadModel(int index);
57 void setCurrentModel(int index);
58 void updateWhisperStatus();
59 void showModelContextMenu(QPoint p);
60 ExtensionModel m_model;
61 QLineEdit *m_name;
62 QComboBox *m_lang;
63 QCheckBox *m_translate;
64 QSpinBox *m_maxLength;
65 QCheckBox *m_nonspoken;
66 QListWidget *m_trackList;
67 QWidget *m_configWidget;
68 QLineEdit *m_exeLabel;
69 QLineEdit *m_modelLabel;
70 QDialogButtonBox *m_buttonBox;
71 QTreeView *m_table;
72};
73
74#endif // TRANSCRIBEAUDIODIALOG_H