QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
settings
qgssettingsentrygroup.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgssettingsentrygroup.h
3
--------------------------------------
4
Date : February 2021
5
Copyright : (C) 2021 by Damiano Lombardi
6
Email : damiano at opengis dot ch
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSSETTINGSENTRYGROUP_H
17
#define QGSSETTINGSENTRYGROUP_H
18
19
#include <limits>
20
21
#include "
qgis.h
"
22
#include "qgis_core.h"
23
#include "
qgis_sip.h
"
24
25
#include <QColor>
26
#include <QString>
27
28
using namespace
Qt::StringLiterals;
29
30
class
QgsSettingsEntryBase
;
31
32
41
class
CORE_DEPRECATED_EXPORT
QgsSettingsEntryGroup
SIP_DEPRECATED
42
{
43
public
:
45
QgsSettingsEntryGroup
( QList<const QgsSettingsEntryBase *>
settings
);
46
#ifdef SIP_RUN
47
// clang-format off
48
% MethodCode
49
sipCpp =
new
QgsSettingsEntryGroup
( *a0,
false
);
50
sipIsErr = sipCpp->isValid() ? 0 : 1;
51
if
( sipIsErr )
52
PyErr_SetString( PyExc_ValueError, u
"Settings do not share the same base definition key for this group. This will lead to unpredictable results."
_s.toUtf8().constData() );
53
% End
54
// clang-format on
55
#endif
56
58
QgsSettingsEntryGroup
( QList<const QgsSettingsEntryBase *>
settings
,
bool
fatalErrorIfInvalid )
SIP_SKIP
;
59
61
bool
isValid
()
const
{
return
mIsValid; }
62
64
QString baseKey(
const
QStringList &dynamicKeyPartList = QStringList() )
const
;
65
67
const
QList<const QgsSettingsEntryBase *>
settings
()
const
{
return
mSettings; }
68
73
void
removeAllSettingsAtBaseKey(
const
QStringList &dynamicKeyPartList = QStringList() )
const
;
74
79
void
removeAllChildrenSettings(
const
QString &dynamicKeyPart = QString() )
const
;
80
85
void
removeAllChildrenSettings(
const
QStringList &dynamicKeyPartList )
const
;
86
87
private
:
88
bool
hasDynamicKey()
const
;
89
90
QList<const QgsSettingsEntryBase *> mSettings;
91
QString mDefinitionBaseKey;
92
bool
mIsValid =
true
;
93
};
94
95
96
#endif
// QGSSETTINGSENTRYGROUP_H
QgsSettingsEntryBase
Represents a settings entry and provides methods for reading and writing settings values.
Definition
qgssettingsentry.h:49
QgsSettingsEntryGroup::isValid
bool isValid() const
Returns if the group is valid (if settings share the same base key).
Definition
qgssettingsentrygroup.h:61
QgsSettingsEntryGroup::settings
const QList< const QgsSettingsEntryBase * > settings() const
Returns all the settings.
Definition
qgssettingsentrygroup.h:67
QgsSettingsEntryGroup::QgsSettingsEntryGroup
QgsSettingsEntryGroup(QList< const QgsSettingsEntryBase * > settings)
Constructor.
Definition
qgssettingsentrygroup.cpp:29
qgis.h
qgis_sip.h
SIP_DEPRECATED
#define SIP_DEPRECATED
Definition
qgis_sip.h:113
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:138
Generated on
for QGIS API Documentation by
1.17.0