KTextAddons

lingvaenginewidget.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 "lingvaenginewidget.h"
8#include <KLineEditEventHandler>
9#include <KLocalizedString>
10#include <QFormLayout>
11#include <QLineEdit>
12
13LingvaEngineWidget::LingvaEngineWidget(QWidget *parent)
14 : QWidget{parent}
15 , mServerUrl(new QLineEdit(this))
16{
17 auto mainLayout = new QFormLayout(this);
18 mainLayout->setObjectName(QStringLiteral("mainLayout"));
19 mainLayout->setContentsMargins({});
20
21 mServerUrl->setObjectName(QStringLiteral("mServerUrl"));
22 mServerUrl->setClearButtonEnabled(true);
23 mainLayout->addRow(i18n("Server Url:"), mServerUrl);
25}
26
27LingvaEngineWidget::~LingvaEngineWidget() = default;
28
29QString LingvaEngineWidget::serverUrl() const
30{
31 return mServerUrl->text();
32}
33
34void LingvaEngineWidget::setServerUrl(const QString &serverUrl)
35{
36 mServerUrl->setText(serverUrl);
37}
38
39#include "moc_lingvaenginewidget.cpp"
QString i18n(const char *text, const TYPE &arg...)
void catchReturnKey(QObject *lineEdit)
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.