blob: b030c9770b44b384056c943589995f3bb6159c50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
/*
This file is part of the KDE libraries
SPDX-FileCopyrightText: 1999 Matthias Ettrich <ettrich@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#ifndef KCONFIGGUI_H
#define KCONFIGGUI_H
#include <kconfiggui_export.h>
#include <QString>
class KConfig;
/**
* Interface-related functions.
*/
namespace KConfigGui
{
/**
* Returns the current application session config object.
*
* @note If Qt is built without session manager support, i.e.
* QT_NO_SESSIONMANAGER is defined, this by default will return
* nullptr, unless a custom config has been set via
* @c setSessionConfig.
*
* @return A pointer to the application's instance specific
* KConfig object.
* @see KConfig
*/
KCONFIGGUI_EXPORT KConfig *sessionConfig();
/**
* Replaces the current application session config object.
*
* @param id new session id
* @param key new session key
*
* @since 5.11
*/
KCONFIGGUI_EXPORT void setSessionConfig(const QString &id, const QString &key);
/**
* Indicates if a session config has been created for that application
* (i.e.\ if sessionConfig() got called at least once)
*
* @return @c true if a sessionConfig object was created, @c false otherwise
*/
KCONFIGGUI_EXPORT bool hasSessionConfig();
#if KCONFIGGUI_ENABLE_DEPRECATED_SINCE(5, 11)
/**
* Returns the name of the application session
*
* @return the application session name
* @deprecated since 5.11, use sessionConfig()->name()
*/
KCONFIGGUI_EXPORT
KCONFIGGUI_DEPRECATED_VERSION(5, 11, "Use KConfigGui::sessionConfig()->name()")
QString sessionConfigName();
#endif
}
#endif // KCONFIGGUI_H
|