File indexing completed on 2024-12-22 04:28:23

0001 /*
0002   SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003 
0004   SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 #pragma once
0007 #include "libvoskspeechtotext_private_export.h"
0008 #include "managermodelvoskspeechtotext.h"
0009 #include "voskdownloadlanguagejob.h"
0010 #include <QWidget>
0011 class QTreeView;
0012 class VoskSpeechToTextModel;
0013 class QLineEdit;
0014 class VoskSpeechToTextProxyModel;
0015 class QProgressBar;
0016 class QLabel;
0017 class LIBVOSKSPEECHTOTEXT_TESTS_EXPORT VoskEngineLanguageWidget : public QWidget
0018 {
0019     Q_OBJECT
0020 public:
0021     explicit VoskEngineLanguageWidget(QWidget *parent = nullptr);
0022     ~VoskEngineLanguageWidget() override;
0023 
0024 private:
0025     void slotTextChanged(const QString &str);
0026     void slotDownLoad(const VoskDownloadLanguageJob::DownloadLanguageInfo &info);
0027     void slotDelete(const QString &identifier);
0028     void slotUpdateListLanguage();
0029     void slotError(const QString &str);
0030     void updateListModel();
0031     void slotProgressInfo(const ManagerModelVoskSpeechToText::ProgressInfo &info);
0032     QTreeView *const mTreeView;
0033     QLineEdit *const mSearchLineEdit;
0034     VoskSpeechToTextModel *const mVoskSpeechToTextModel;
0035     VoskSpeechToTextProxyModel *const mVoskSpeechToTextProxyModel;
0036     QProgressBar *const mProgressBar;
0037     QLabel *const mProgressBarLabel;
0038     QWidget *const mProgressBarWidget;
0039 };