File indexing completed on 2024-05-05 04:40:50
0001 /* 0002 SPDX-FileCopyrightText: 2010 Benjamin Port <port.benjamin@gmail.com> 0003 SPDX-FileCopyrightText: 2014 Kevin Funk <kfunk@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef QTHELPCONFIG_H 0009 #define QTHELPCONFIG_H 0010 0011 #include <interfaces/configpage.h> 0012 0013 // KNSCore::Entry is only a typedef in KF5, defined here 0014 #include <KNSWidgets/Button> 0015 0016 class QTreeWidgetItem; 0017 class QtHelpPlugin; 0018 0019 namespace Ui 0020 { 0021 class QtHelpConfigUI; 0022 } 0023 0024 class QtHelpConfig : public KDevelop::ConfigPage 0025 { 0026 public: 0027 Q_OBJECT 0028 0029 public: 0030 explicit QtHelpConfig(QtHelpPlugin* plugin, QWidget *parent = nullptr); 0031 ~QtHelpConfig() override; 0032 0033 KDevelop::ConfigPage::ConfigPageType configPageType() const override; 0034 0035 bool checkNamespace(const QString &filename, QTreeWidgetItem* modifiedItem); 0036 0037 QString name() const override; 0038 QString fullName() const override; 0039 QIcon icon() const override; 0040 0041 private Q_SLOTS: 0042 void add(); 0043 void remove(QTreeWidgetItem* item); 0044 void modify(QTreeWidgetItem* item); 0045 void knsUpdate(const QList<KNSCore::Entry>& list); 0046 0047 public Q_SLOTS: 0048 void apply() override; 0049 void defaults() override; 0050 void reset() override; 0051 private: 0052 QTreeWidgetItem * addTableItem(const QString &icon, const QString &name, 0053 const QString &path, const QString &ghnsStatus); 0054 Ui::QtHelpConfigUI* m_configWidget; 0055 }; 0056 0057 #endif // QTHELPCONFIG_H