KTextAddons

speechtotextconfiguredialog.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 "speechtotextconfiguredialog.h"
8#include "speechtotextconfigurewidget.h"
9#include <KLocalizedString>
10#include <QDialogButtonBox>
11#include <QVBoxLayout>
12
13using namespace TextSpeechToText;
14SpeechToTextConfigureDialog::SpeechToTextConfigureDialog(QWidget *parent)
15 : QDialog(parent)
16 , mSpeechToTextConfigureWidget(new SpeechToTextConfigureWidget(this))
17{
18 setWindowTitle(i18nc("@title:window", "Configure Speech To Text"));
19 auto mainLayout = new QVBoxLayout(this);
20 mainLayout->setObjectName(QStringLiteral("mainLayout"));
21
22 mSpeechToTextConfigureWidget->setObjectName(QStringLiteral("mSpeechToTextConfigureWidget"));
23 mainLayout->addWidget(mSpeechToTextConfigureWidget);
24 mainLayout->addStretch();
25
27 buttonBox->setObjectName(QStringLiteral("buttonBox"));
28 mainLayout->addWidget(buttonBox);
29
30 connect(buttonBox, &QDialogButtonBox::accepted, this, &SpeechToTextConfigureDialog::slotAccept);
31 connect(buttonBox, &QDialogButtonBox::rejected, this, &SpeechToTextConfigureDialog::reject);
32 mSpeechToTextConfigureWidget->loadSettings();
33}
34
35SpeechToTextConfigureDialog::~SpeechToTextConfigureDialog() = default;
36
37void SpeechToTextConfigureDialog::slotAccept()
38{
39 mSpeechToTextConfigureWidget->saveSettings();
40 accept();
41}
42
43#include "moc_speechtotextconfiguredialog.cpp"
QString i18nc(const char *context, const char *text, const TYPE &arg...)
virtual void accept()
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:47:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.