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
13/*!
14 * \qmltype KCMLauncher
15 * \inqmlmodule org.kde.kcmutils
16 *
17 * This is a QML singleton.
18 */
19class KCMLauncher : public QObject
20{
21 Q_OBJECT
22 QML_ELEMENT
23 QML_SINGLETON
24
25public Q_SLOTS:
26 /*!
27 * \qmlmethod void KCMLauncher::open(list<string> names) const
28 */
29 void open(const QStringList &names) const;
30
31 /*!
32 * \qmlmethod void KCMLauncher::openSystemSettings(string name, list<string> args = []) const
33 *
34 * Opens the specified module in System Settings. Only a single KCM name may
35 * be provided.
36 *
37 * \code
38 * import QtQuick.Controls as QQC2
39 * import org.kde.kcmutils as KCMUtils
40 *
41 * QQC2.Button {
42 * onClicked: KCMUtils.KCMLauncher.openSystemSettings("kcm_kscreen")
43 * }
44 * \endcode
45 *
46 * \a name A single kcm name to open in System Settings. Opening multiple
47 * KCMs using this function is not supported; to do that, use KCMLauncher.open().
48 * \a args Additional arguments to pass to the module.
49 *
50 * \since 5.71
51 */
52 void openSystemSettings(const QString &name, const QStringList &args = QStringList()) const;
53
54 /*!
55 * \qmlmethod void KCMLauncher::openInfoCenter(string name) const
56 *
57 * Opens the specified module in InfCenter. Only a single KCM name may
58 * be provided.
59 *
60 * \code
61 * import QtQuick.Controls as QQC2
62 * import org.kde.kcmutils as KCMUtils
63 * QQC2.Button {
64 * onClicked: KCMUtils.KCMLauncher.openInfoCenter("kcm_energy")
65 * }
66 * \endcode
67 *
68 * \a name A single kcm name to open in Info Center. Opening multiple
69 * KCMs using this function is not supported; to do that, use KCMLauncher.open().
70 *
71 * \since 5.71
72 */
73 void openInfoCenter(const QString &name) const;
74};
75
76#endif // KCMSHELL_H
77

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