File indexing completed on 2024-05-12 12:43:10

0001 /*
0002    SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 #pragma once
0007 #include "textedittexttospeech_private_export.h"
0008 #include <QComboBox>
0009 #include <QVoice>
0010 namespace TextEditTextToSpeech
0011 {
0012 class TEXTEDITTEXTTOSPEECH_TESTS_EXPORT TextToSpeechVoiceComboBox : public QComboBox
0013 {
0014     Q_OBJECT
0015 public:
0016     explicit TextToSpeechVoiceComboBox(QWidget *parent = nullptr);
0017     ~TextToSpeechVoiceComboBox() override;
0018 
0019     [[nodiscard]] QVoice currentVoice() const;
0020     void setCurrentVoice(const QVoice &voice);
0021     void updateVoices(const QVector<QVoice> &voices);
0022 };
0023 }
0024 #if QT_VERSION < QT_VERSION_CHECK(6, 4, 0)
0025 Q_DECLARE_METATYPE(QVoice)
0026 #endif