File indexing completed on 2024-12-22 04:28:24
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 #include "speechtotext_private_export.h" 0009 #include <QWidget> 0010 class QComboBox; 0011 class QToolButton; 0012 namespace TextSpeechToText 0013 { 0014 class TEXTSPEECHTOTEXT_TESTS_EXPORT SpeechToTextComboBoxWidget : public QWidget 0015 { 0016 Q_OBJECT 0017 public: 0018 explicit SpeechToTextComboBoxWidget(QWidget *parent); 0019 ~SpeechToTextComboBoxWidget() override; 0020 void fillEngine(); 0021 0022 [[nodiscard]] QString engineName() const; 0023 void setEngineName(const QString &engineName); 0024 0025 void load(); 0026 void save(); 0027 0028 Q_SIGNALS: 0029 void configureChanged(const QString &engineName); 0030 void engineChanged(const QString &engineName); 0031 0032 private: 0033 void slotConfigureEngine(); 0034 void slotEngineChanged(int index); 0035 QComboBox *const mEngine; 0036 QToolButton *const mConfigureEngine; 0037 }; 0038 }