File indexing completed on 2024-06-23 05:13:48

0001 /*
0002     kleopageconfigdialog.h.h
0003 
0004     This file is part of Kleopatra
0005     SPDX-FileCopyrightText: 2016 Bundesamt für Sicherheit in der Informationstechnik
0006     SPDX-FileContributor: Intevation GmbH
0007 
0008     SPDX-License-Identifier: GPL-2.0-only
0009 */
0010 
0011 #pragma once
0012 
0013 #include <KPageDialog>
0014 #include <QList>
0015 
0016 class KPageWidgetItem;
0017 class KCModule;
0018 
0019 /**
0020  * KPageDialog based config dialog to be used when
0021  * KCMUtils are not available. */
0022 class KleoPageConfigDialog : public KPageDialog
0023 {
0024     Q_OBJECT
0025 public:
0026     explicit KleoPageConfigDialog(QWidget *parent = nullptr);
0027 
0028     void addModule(const QString &name, const QString &docPath, const QString &icon, KCModule *module);
0029 
0030 Q_SIGNALS:
0031     void configCommitted();
0032 
0033 protected Q_SLOTS:
0034     void slotDefaultClicked();
0035     void slotUser1Clicked();
0036     void slotApplyClicked();
0037     void slotOkClicked();
0038     void slotHelpClicked();
0039     void slotCurrentPageChanged(KPageWidgetItem *current, KPageWidgetItem *previous);
0040     void moduleChanged(bool value);
0041 
0042 private:
0043     void clientChanged();
0044     void apply();
0045 
0046     QList<KCModule *> mModules;
0047     QList<KCModule *> mChangedModules;
0048     QMap<QString, QString> mHelpUrls;
0049 };