KTextAddons

speechtotextconfigurewidget.cpp
1/*
2 SPDX-FileCopyrightText: 2023-2025 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "speechtotextconfigurewidget.h"
8#include "speechtotextcomboboxwidget.h"
9#include "speechtotextselectdevicewidget.h"
10#include <KLocalizedString>
11#include <KSharedConfig>
12#include <QVBoxLayout>
13
14using namespace TextSpeechToText;
15
16SpeechToTextConfigureWidget::SpeechToTextConfigureWidget(QWidget *parent)
17 : QWidget{parent}
18 , mSpeechToTextComboBox(new SpeechToTextComboBoxWidget(this))
19 , mSpeechToTextDevice(new SpeechToTextSelectDeviceWidget(this))
20{
21 auto mainLayout = new QVBoxLayout(this);
22 mainLayout->setObjectName(QStringLiteral("mainLayout"));
23 mainLayout->setContentsMargins({});
24
25 mSpeechToTextDevice->setObjectName(QStringLiteral("mSpeechToTextDevice"));
26 mainLayout->addWidget(mSpeechToTextDevice);
27
28 mSpeechToTextComboBox->setObjectName(QStringLiteral("mSpeechToTextComboBox"));
29 mainLayout->addWidget(mSpeechToTextComboBox);
30 mSpeechToTextComboBox->fillEngine();
31}
32
33SpeechToTextConfigureWidget::~SpeechToTextConfigureWidget() = default;
34
35void SpeechToTextConfigureWidget::loadSettings()
36{
37 mSpeechToTextComboBox->load();
38 mSpeechToTextDevice->loadSettings();
39}
40
41void SpeechToTextConfigureWidget::saveSettings()
42{
43 mSpeechToTextComboBox->save();
44 mSpeechToTextDevice->saveSettings();
45}
46
47#include "moc_speechtotextconfigurewidget.cpp"
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 3 2025 11:46:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.