KTextAddons

textautogenerateconfigurewidget.cpp
1/*
2 SPDX-FileCopyrightText: 2025 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "textautogenerateconfigurewidget.h"
8#include "textautogeneratetextconfigurecombowidget.h"
9#include <KLocalizedString>
10#include <QLabel>
11#include <QVBoxLayout>
12
13using namespace TextAutogenerateText;
14TextAutogenerateConfigureWidget::TextAutogenerateConfigureWidget(QWidget *parent)
15 : QWidget{parent}
16 , mPluginComboBox(new TextAutogenerateTextConfigureComboWidget(this))
17{
18 auto mainLayout = new QVBoxLayout(this);
19 mainLayout->setObjectName(QStringLiteral("mainLayout"));
20 mainLayout->setContentsMargins({});
21
22 auto hbox = new QHBoxLayout;
23 hbox->setObjectName(QStringLiteral("hbox"));
24 hbox->setContentsMargins({});
25 mainLayout->addLayout(hbox);
26
27 auto label = new QLabel(i18n("Engine:"), this);
28 label->setObjectName(QStringLiteral("label"));
29 label->setTextFormat(Qt::PlainText);
30 hbox->addWidget(label);
31
32 mPluginComboBox->setObjectName(QStringLiteral("mPluginComboBox"));
33 hbox->addWidget(mPluginComboBox);
34}
35
36TextAutogenerateConfigureWidget::~TextAutogenerateConfigureWidget() = default;
37
38void TextAutogenerateConfigureWidget::saveSettings()
39{
40 mPluginComboBox->save();
41}
42
43void TextAutogenerateConfigureWidget::loadSettings()
44{
45 mPluginComboBox->load();
46}
47
48#include "moc_textautogenerateconfigurewidget.cpp"
QString i18n(const char *text, const TYPE &arg...)
QString label(StandardShortcut id)
void setObjectName(QAnyStringView name)
PlainText
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 18 2025 12:00:52 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.