kleopageconfigdialog.h 1.13 KB
Newer Older
1
2
3
4
/*
    kleopageconfigdialog.h.h

    This file is part of Kleopatra
5
6
    SPDX-FileCopyrightText: 2016 Bundesamt für Sicherheit in der Informationstechnik
    SPDX-FileContributor: Intevation GmbH
7

8
    SPDX-License-Identifier: GPL-2.0-only
9
10
*/

11
#pragma once
12
13
14
15
16

#include <KPageDialog>
#include <QList>

class KPageWidgetItem;
17
class KCModule;
18
19
20
21
22
23
24
25

/**
 * KPageDialog based config dialog to be used when
 * KCMUtils are not available. */
class KleoPageConfigDialog : public KPageDialog
{
    Q_OBJECT
public:
Laurent Montel's avatar
Laurent Montel committed
26
    explicit KleoPageConfigDialog(QWidget *parent = nullptr);
27

28
    void addModule(const QString &name, const QString &docPath, const QString &icon, KCModule *module);
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

Q_SIGNALS:
    void configCommitted();

protected Q_SLOTS:
    void slotDefaultClicked();
    void slotUser1Clicked();
    void slotApplyClicked();
    void slotOkClicked();
    void slotHelpClicked();
    void slotCurrentPageChanged(KPageWidgetItem *current, KPageWidgetItem *previous);
    void moduleChanged(bool value);

private:
    void clientChanged();
    void apply();

    QList<KCModule *> mModules;
    QList<KCModule *> mChangedModules;
    QMap<QString, QString> mHelpUrls;
};