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
15class KConfig;
16
17/**
18 * Interface-related functions.
19 */
20namespace 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 */
34KCONFIGGUI_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 */
44KCONFIGGUI_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 */
52KCONFIGGUI_EXPORT bool hasSessionConfig();
53}
54
55#endif // KCONFIGGUI_H
56

source code of kconfig/src/gui/kconfiggui.h