KTextAddons

speechtotextconfigurewidget.cpp
1/*
2 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.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 <KConfigGroup>
11#include <KLocalizedString>
12#include <KSharedConfig>
13#include <QVBoxLayout>
14
15using namespace TextSpeechToText;
16
17SpeechToTextConfigureWidget::SpeechToTextConfigureWidget(QWidget *parent)
18 : QWidget{parent}
19 , mSpeechToTextComboBox(new SpeechToTextComboBoxWidget(this))
20 , mSpeechToTextDevice(new SpeechToTextSelectDeviceWidget(this))
21{
22 auto mainLayout = new QVBoxLayout(this);
23 mainLayout->setObjectName(QStringLiteral("mainLayout"));
24 mainLayout->setContentsMargins({});
25
26 mSpeechToTextDevice->setObjectName(QStringLiteral("mSpeechToTextDevice"));
27 mainLayout->addWidget(mSpeechToTextDevice);
28
29 mSpeechToTextComboBox->setObjectName(QStringLiteral("mSpeechToTextComboBox"));
30 mainLayout->addWidget(mSpeechToTextComboBox);
31 mSpeechToTextComboBox->fillEngine();
32}
33
34SpeechToTextConfigureWidget::~SpeechToTextConfigureWidget() = default;
35
36void SpeechToTextConfigureWidget::loadSettings()
37{
38 mSpeechToTextComboBox->load();
39 mSpeechToTextDevice->loadSettings();
40}
41
42void SpeechToTextConfigureWidget::saveSettings()
43{
44 mSpeechToTextComboBox->save();
45 mSpeechToTextDevice->saveSettings();
46}
47
48#include "moc_speechtotextconfigurewidget.cpp"
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.