KConfig

kconfiggui.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 1999 Matthias Ettrich <ettrich@kde.org>
4 
5  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7 
8 #ifndef KCONFIGGUI_H
9 #define KCONFIGGUI_H
10 
11 #include <kconfiggui_export.h>
12 
13 #include <QString>
14 
15 class KConfig;
16 
17 /**
18  * Interface-related functions.
19  */
20 namespace KConfigGui
21 {
22 /**
23  * Returns the current application session config object.
24  *
25  * @note If Qt is built without session manager support, i.e.
26  * QT_NO_SESSIONMANAGER is defined, this by default will return
27  * nullptr, unless a custom config has been set via
28  * @c setSessionConfig.
29  *
30  * @return A pointer to the application's instance specific
31  * KConfig object.
32  * @see KConfig
33  */
34 KCONFIGGUI_EXPORT KConfig *sessionConfig();
35 
36 /**
37  * Replaces the current application session config object.
38  *
39  * @param id new session id
40  * @param key new session key
41  *
42  * @since 5.11
43  */
44 KCONFIGGUI_EXPORT void setSessionConfig(const QString &id, const QString &key);
45 
46 /**
47  * Indicates if a session config has been created for that application
48  * (i.e.\ if sessionConfig() got called at least once)
49  *
50  * @return @c true if a sessionConfig object was created, @c false otherwise
51  */
52 KCONFIGGUI_EXPORT bool hasSessionConfig();
53 }
54 
55 #endif // KCONFIGGUI_H
KCONFIGGUI_EXPORT void setSessionConfig(const QString &id, const QString &key)
Replaces the current application session config object.
Definition: kconfiggui.cpp:37
The central class of the KDE configuration data system.
Definition: kconfig.h:55
Interface-related functions.
Definition: kconfiggui.h:20
KCONFIGGUI_EXPORT bool hasSessionConfig()
Indicates if a session config has been created for that application (i.e. if sessionConfig() got call...
Definition: kconfiggui.cpp:48
KCONFIGGUI_EXPORT KConfig * sessionConfig()
Returns the current application session config object.
Definition: kconfiggui.cpp:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 04:07:59 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.