File indexing completed on 2025-01-05 05:18:57
0001 // SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0002 // 0003 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 0005 #include "KLLMConfigureDialog.h" 0006 #include "KLLMConfigureWidget.h" 0007 #include <KLocalizedString> 0008 #include <QDialogButtonBox> 0009 #include <QVBoxLayout> 0010 0011 using namespace KLLMWidgets; 0012 0013 KLLMConfigureDialog::KLLMConfigureDialog(QWidget *parent) 0014 : QDialog(parent) 0015 , mKLLMConfigureWidget(new KLLMConfigureWidget(this)) 0016 { 0017 setWindowTitle(i18nc("@title:window", "Configure Ollama")); 0018 auto mainLayout = new QVBoxLayout(this); 0019 mainLayout->setObjectName(QLatin1StringView("mainLayout")); 0020 0021 mKLLMConfigureWidget->setObjectName(QLatin1StringView("mKLLMConfigureWidget")); 0022 mainLayout->addWidget(mKLLMConfigureWidget); 0023 0024 auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this); 0025 buttonBox->setObjectName(QLatin1StringView("buttonBox")); 0026 mainLayout->addWidget(buttonBox); 0027 0028 connect(buttonBox, &QDialogButtonBox::accepted, this, &KLLMConfigureDialog::accept); 0029 connect(buttonBox, &QDialogButtonBox::rejected, this, &KLLMConfigureDialog::reject); 0030 } 0031 0032 KLLMConfigureDialog::~KLLMConfigureDialog() = default; 0033 0034 #include "moc_KLLMConfigureDialog.cpp"