1 /*
2     SPDX-FileCopyrightText: 2010 Benjamin Port <port.benjamin@gmail.com>
3     SPDX-FileCopyrightText: 2014 Kevin Funk <kfunk@kde.org>
4 
5     SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef QTHELPCONFIG_H
9 #define QTHELPCONFIG_H
10 
11 #include <interfaces/configpage.h>
12 
13 #include <KNS3/Entry>
14 
15 class QTreeWidgetItem;
16 class QtHelpPlugin;
17 
18 namespace Ui
19 {
20     class QtHelpConfigUI;
21 }
22 
23 class QtHelpConfig : public KDevelop::ConfigPage
24 {
25 public:
26     Q_OBJECT
27 
28     public:
29       explicit QtHelpConfig(QtHelpPlugin* plugin, QWidget *parent = nullptr);
30       ~QtHelpConfig() override;
31 
32       KDevelop::ConfigPage::ConfigPageType configPageType() const override;
33 
34       bool checkNamespace(const QString &filename, QTreeWidgetItem* modifiedItem);
35 
36       QString name() const override;
37       QString fullName() const override;
38       QIcon icon() const override;
39 
40     private Q_SLOTS:
41       void add();
42       void remove(QTreeWidgetItem* item);
43       void modify(QTreeWidgetItem* item);
44       void knsUpdate(const KNS3::Entry::List& list);
45 
46     public Q_SLOTS:
47       void apply() override;
48       void defaults() override;
49       void reset() override;
50     private:
51       QTreeWidgetItem * addTableItem(const QString &icon, const QString &name,
52                                      const QString &path, const QString &ghnsStatus);
53       Ui::QtHelpConfigUI* m_configWidget;
54 };
55 
56 #endif // QTHELPCONFIG_H
57