KTextAddons

deeplengineconfiguredialog.cpp
1/*
2 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "deeplengineconfiguredialog.h"
8#include "deeplengineconfigurewidget.h"
9#include <KLocalizedString>
10#include <QDialogButtonBox>
11#include <QVBoxLayout>
12
13DeeplEngineConfigureDialog::DeeplEngineConfigureDialog(QWidget *parent)
14 : QDialog(parent)
15 , mConfigureWidget(new DeeplEngineConfigureWidget(this))
16{
17 setWindowTitle(i18nc("@title:window", "Configure Engine"));
18 mConfigureWidget->setObjectName(QStringLiteral("mConfigureWidget"));
19
20 auto mainLayout = new QVBoxLayout(this);
21 mainLayout->setObjectName(QStringLiteral("mainLayout"));
22 mainLayout->addWidget(mConfigureWidget);
23
25 buttonBox->setObjectName(QStringLiteral("buttonBox"));
26 mainLayout->addWidget(buttonBox);
29}
30
31DeeplEngineConfigureDialog::~DeeplEngineConfigureDialog() = default;
32
33void DeeplEngineConfigureDialog::setUseFreeLicenceKey(bool b)
34{
35 mConfigureWidget->setUseFreeLicenceKey(b);
36}
37
38bool DeeplEngineConfigureDialog::useFreeLicenceKey() const
39{
40 return mConfigureWidget->useFreeLicenceKey();
41}
42
43QString DeeplEngineConfigureDialog::apiKey() const
44{
45 return mConfigureWidget->apiKey();
46}
47
48void DeeplEngineConfigureDialog::setApiKey(const QString &key)
49{
50 mConfigureWidget->setApiKey(key);
51}
52
53#include "moc_deeplengineconfiguredialog.cpp"
QString i18nc(const char *context, const char *text, const TYPE &arg...)
virtual void accept()
virtual void reject()
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 22 2024 12:02:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.