KTextAddons

bergamotenginewidget.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 "bergamotenginewidget.h"
8#include "bergamotenginelanguagewidget.h"
9#include <KLocalizedString>
10#include <QTabWidget>
11#include <QVBoxLayout>
12
13BergamotEngineWidget::BergamotEngineWidget(QWidget *parent)
14 : QWidget{parent}
15 , mTabWidget(new QTabWidget(this))
16 , mLanguageWidget(new BergamotEngineLanguageWidget(this))
17 , mSettingsWidget(new BergamotEngineSettingsWidget(this))
18{
19 auto mainLayout = new QVBoxLayout(this);
20 mainLayout->setObjectName(QStringLiteral("mainLayout"));
21 mainLayout->setContentsMargins({});
22
23 mTabWidget->setObjectName(QStringLiteral("mTabWidget"));
24 mainLayout->addWidget(mTabWidget);
25
26 mLanguageWidget->setObjectName(QStringLiteral("mLanguageWidget"));
27 mSettingsWidget->setObjectName(QStringLiteral("mSettingsWidget"));
28
29 mTabWidget->addTab(mLanguageWidget, i18n("Languages"));
30 mTabWidget->addTab(mSettingsWidget, i18n("Settings"));
31}
32
33BergamotEngineWidget::~BergamotEngineWidget() = default;
34
35void BergamotEngineWidget::setSettingsInfo(const BergamotEngineUtils::SettingsInfo &info)
36{
37 mSettingsWidget->setSettingsInfo(info);
38}
39
40BergamotEngineUtils::SettingsInfo BergamotEngineWidget::settingsInfo() const
41{
42 return mSettingsWidget->settingsInfo();
43}
44
45#include "moc_bergamotenginewidget.cpp"
QString i18n(const char *text, const TYPE &arg...)
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.