File indexing completed on 2024-04-21 15:24:34

0001 /*
0002     SPDX-FileCopyrightText: 2013 Sven Brauch <svenbrauch@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "kcm_docfiles.h"
0008 
0009 #include <QVBoxLayout>
0010 
0011 #include "docfilemanagerwidget.h"
0012 
0013 DocfilesKCModule::DocfilesKCModule(KDevelop::IPlugin* plugin, QWidget* parent)
0014     : KDevelop::ConfigPage(plugin, nullptr, parent)
0015 {
0016     managerWidget = new DocfileManagerWidget(this);
0017 
0018     QVBoxLayout* layout = new QVBoxLayout;
0019     layout->setContentsMargins(0, 0, 0, 0);
0020     layout->addWidget(managerWidget);
0021     setLayout(layout);
0022 }
0023 
0024 DocfilesKCModule::~DocfilesKCModule()
0025 {
0026 }
0027 
0028 KDevelop::ConfigPage::ConfigPageType DocfilesKCModule::configPageType() const
0029 {
0030     return KDevelop::ConfigPage::LanguageConfigPage;
0031 }
0032 
0033 void DocfilesKCModule::apply()
0034 {
0035     // nothing to do, but must override since we do not use KCoreConfigSkeleton
0036 }
0037 void DocfilesKCModule::reset()
0038 {
0039     // nothing to do, but must override since we do not use KCoreConfigSkeleton
0040 }
0041 void DocfilesKCModule::defaults()
0042 {
0043     // nothing to do, but must override since we do not use KCoreConfigSkeleton
0044 }
0045 
0046 QString DocfilesKCModule::fullName() const
0047 {
0048     return i18n("Manage Documentation Files Used by the Python Plugin");
0049 }
0050 
0051 QIcon DocfilesKCModule::icon() const
0052 {
0053     return QIcon::fromTheme(QStringLiteral("text-x-python"));
0054 }
0055 
0056 QString DocfilesKCModule::name() const
0057 {
0058     return i18n("Python Documentation");
0059 }
0060 
0061 #include "moc_kcm_docfiles.cpp"