1/*
2 SPDX-FileCopyrightText: 2015 Kai Uwe Broulik <kde@privat.broulik.de>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KCMSHELL_H
8#define KCMSHELL_H
9
10#include <QObject>
11#include <QQmlEngine>
12
13class KCMLauncher : public QObject
14{
15 Q_OBJECT
16 QML_ELEMENT
17 QML_SINGLETON
18
19public Q_SLOTS:
20 void open(const QStringList &names) const;
21
22 /**
23 * Opens the specified module in System Settings. Only a single KCM name may
24 * be provided.
25 *
26 * @code
27 * import QtQuick.Controls as QQC2
28 * import org.kde.kcmutils as KCMUtils
29 *
30 * QQC2.Button {
31 * onClicked: KCMUtils.KCMLauncher.openSystemSettings("kcm_kscreen")
32 * }
33 * @endcode
34 *
35 * @param name A single kcm name to open in System Settings. Opening multiple
36 * KCMs using this function is not supported; to do that, use KCMLauncher.open().
37 * @param args Additional arguments to pass to the module.
38 *
39 * @since 5.71
40 */
41 void openSystemSettings(const QString &name, const QStringList &args = QStringList()) const;
42
43 /**
44 * Opens the specified module in InfCenter. Only a single KCM name may
45 * be provided.
46 *
47 * @code
48 * import QtQuick.Controls as QQC2
49 * import org.kde.kcmutils as KCMUtils
50 * QQC2.Button {
51 * onClicked: KCMUtils.KCMLauncher.openInfoCenter("kcm_energy")
52 * }
53 * @endcode
54 *
55 * @param name A single kcm name to open in Info Center. Opening multiple
56 * KCMs using this function is not supported; to do that, use KCMLauncher.open().
57 *
58 * @since 5.71
59 */
60 void openInfoCenter(const QString &name) const;
61};
62
63#endif // KCMSHELL_H
64

source code of kcmutils/src/qml/kcmlauncher_p.h