KConfig

kconfigbase.cpp
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2006, 2007 Thomas Braxton <[email protected]>
4  SPDX-FileCopyrightText: 1999 Preston Brown <[email protected]>
5  SPDX-FileCopyrightText: 1997-1999 Matthias Kalle Dalheimer <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #include "kconfigbase.h"
11 
12 #include "kconfiggroup.h"
13 
14 #include <QString>
15 
16 bool KConfigBase::hasGroup(const QString &group) const
17 {
18  return hasGroupImpl(group.toUtf8());
19 }
20 
21 bool KConfigBase::hasGroup(const char *group) const
22 {
23  return hasGroupImpl(QByteArray(group));
24 }
25 
27 {
28  return hasGroupImpl(group);
29 }
30 
32 {
33  return groupImpl(b);
34 }
35 
37 {
38  return groupImpl(str.toUtf8());
39 }
40 
42 {
43  return groupImpl(QByteArray(str));
44 }
45 
47 {
48  return groupImpl(b);
49 }
50 
52 {
53  return groupImpl(s.toUtf8());
54 }
55 
56 const KConfigGroup KConfigBase::group(const char *s) const
57 {
58  return groupImpl(QByteArray(s));
59 }
60 
62 {
63  deleteGroupImpl(group, flags);
64 }
65 
67 {
68  deleteGroupImpl(group.toUtf8(), flags);
69 }
70 
72 {
73  deleteGroupImpl(QByteArray(group), flags);
74 }
75 
76 bool KConfigBase::isGroupImmutable(const QByteArray &aGroup) const
77 {
78  return isGroupImmutableImpl(aGroup);
79 }
80 
81 bool KConfigBase::isGroupImmutable(const QString &aGroup) const
82 {
83  return isGroupImmutableImpl(aGroup.toUtf8());
84 }
85 
86 bool KConfigBase::isGroupImmutable(const char *aGroup) const
87 {
88  return isGroupImmutableImpl(QByteArray(aGroup));
89 }
90 
92 {
93 }
94 
95 KConfigBase::KConfigBase()
96 {
97 }
98 
99 void KConfigBase::virtual_hook(int, void *)
100 {
101 }
virtual void virtual_hook(int id, void *data)
Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.
Definition: kconfigbase.cpp:99
bool isGroupImmutable(const QString &group) const
Can changes be made to the entries in group?
Definition: kconfigbase.cpp:81
bool hasGroup(const QString &group) const
Returns true if the specified group is known about.
Definition: kconfigbase.cpp:16
virtual ~KConfigBase()
Destructs the KConfigBase object.
Definition: kconfigbase.cpp:91
void deleteGroup(const QString &group, WriteConfigFlags flags=Normal)
Delete group.
Definition: kconfigbase.cpp:66
virtual bool hasGroupImpl(const QByteArray &group) const =0
virtual void deleteGroupImpl(const QByteArray &group, WriteConfigFlags flags=Normal)=0
A class for one specific group in a KConfig object.
Definition: kconfiggroup.h:38
KConfigGroup group(const QString &group)
Returns an object for the named subgroup.
Definition: kconfigbase.cpp:36
virtual KConfigGroup groupImpl(const QByteArray &group)=0
virtual bool isGroupImmutableImpl(const QByteArray &group) const =0
QByteArray toUtf8() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Dec 6 2021 22:43:35 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.