File indexing completed on 2024-05-12 03:54:09

0001 /*
0002     SPDX-FileCopyrightText: 2015 Kai Uwe Broulik <kde@privat.broulik.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KCMSHELL_H
0008 #define KCMSHELL_H
0009 
0010 #include <QObject>
0011 
0012 class KCMLauncher : public QObject
0013 {
0014     Q_OBJECT
0015 
0016 public Q_SLOTS:
0017     void open(const QStringList &names) const;
0018 
0019     /**
0020      * Opens the specified module in System Settings. Only a single KCM name may
0021      * be provided.
0022      *
0023      * @code
0024      * onClicked: KCMShell.openSystemSettings("kcm_kscreen")
0025      * @endcode
0026      *
0027      * @param name A single kcm name to open in System Settings. Opening multiple
0028      * KCMs using this function is not supported; to do that, use kcmshell.open.
0029      * @param args Additional arguments to pass to the module.
0030      *
0031      * @since 5.71
0032      */
0033     void openSystemSettings(const QString &name, const QStringList &args = QStringList()) const;
0034 
0035     /**
0036      * Opens the specified module in InfCenter. Only a single KCM name may
0037      * be provided.
0038      *
0039      * @code
0040      * onClicked: KCMShell.openInfoCenter("kcm_energy")
0041      * @endcode
0042      *
0043      * @param name A single kcm name to open in Info Center. Opening multiple
0044      * KCMs using this function is not supported; to do that, use kcmshell.open.
0045      *
0046      * @since 5.71
0047      */
0048     void openInfoCenter(const QString &name) const;
0049 };
0050 
0051 #endif // KCMSHELL_H