QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
labeling
rules
qgslabelingengineruleregistry.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslabelingengineruleregistry.h
3
---------------------
4
Date : August 2024
5
Copyright : (C) 2024 by Nyall Dawson
6
Email : nyall dot dawson at gmail dot com
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
#ifndef QGSLABELINGENGINERULEREGISTRY_H
16
#define QGSLABELINGENGINERULEREGISTRY_H
17
18
#include "
qgis.h
"
19
#include "qgis_core.h"
20
#include "
qgis_sip.h
"
21
22
class
QgsAbstractLabelingEngineRule
;
23
38
class
CORE_EXPORT
QgsLabelingEngineRuleRegistry
39
{
40
public
:
45
QgsLabelingEngineRuleRegistry
();
46
~QgsLabelingEngineRuleRegistry
();
47
49
QgsLabelingEngineRuleRegistry
(
const
QgsLabelingEngineRuleRegistry
&other ) =
delete
;
51
QgsLabelingEngineRuleRegistry
&
operator=
(
const
QgsLabelingEngineRuleRegistry
&other ) =
delete
;
52
56
QStringList
ruleIds
()
const
;
57
61
QString
displayType
(
const
QString &
id
)
const
;
62
69
bool
isAvailable
(
const
QString &
id
)
const
;
70
78
QgsAbstractLabelingEngineRule
*
create
(
const
QString &
id
)
const
SIP_TRANSFERBACK
;
79
89
bool
addRule
(
QgsAbstractLabelingEngineRule
*rule
SIP_TRANSFER
);
90
96
void
removeRule
(
const
QString &
id
);
97
98
private
:
99
#ifdef SIP_RUN
100
QgsLabelingEngineRuleRegistry
(
const
QgsLabelingEngineRuleRegistry
&other );
101
#endif
102
103
std::map< QString, std::unique_ptr< QgsAbstractLabelingEngineRule > > mRules;
104
};
105
106
#endif
// QGSLABELINGENGINERULEREGISTRY_H
QgsAbstractLabelingEngineRule
Abstract base class for labeling engine rules.
Definition
qgslabelingenginerule.h:131
QgsLabelingEngineRuleRegistry::create
QgsAbstractLabelingEngineRule * create(const QString &id) const
Creates a new rule from the type with matching id.
Definition
qgslabelingengineruleregistry.cpp:61
QgsLabelingEngineRuleRegistry::QgsLabelingEngineRuleRegistry
QgsLabelingEngineRuleRegistry(const QgsLabelingEngineRuleRegistry &other)=delete
QgsLabelingEngineRuleRegistry cannot be copied.
QgsLabelingEngineRuleRegistry::QgsLabelingEngineRuleRegistry
QgsLabelingEngineRuleRegistry()
Constructor for QgsLabelingEngineRuleRegistry, containing a set of default rules.
Definition
qgslabelingengineruleregistry.cpp:22
QgsLabelingEngineRuleRegistry::operator=
QgsLabelingEngineRuleRegistry & operator=(const QgsLabelingEngineRuleRegistry &other)=delete
QgsLabelingEngineRuleRegistry cannot be copied.
QgsLabelingEngineRuleRegistry::isAvailable
bool isAvailable(const QString &id) const
Returns true if the rule is with matching id is available for use within the current QGIS environment...
Definition
qgslabelingengineruleregistry.cpp:52
QgsLabelingEngineRuleRegistry::~QgsLabelingEngineRuleRegistry
~QgsLabelingEngineRuleRegistry()
QgsLabelingEngineRuleRegistry::addRule
bool addRule(QgsAbstractLabelingEngineRule *rule)
Adds a new rule type to the registry.
Definition
qgslabelingengineruleregistry.cpp:70
QgsLabelingEngineRuleRegistry::displayType
QString displayType(const QString &id) const
Returns a user-friendly, translated string representing the rule type with matching id.
Definition
qgslabelingengineruleregistry.cpp:43
QgsLabelingEngineRuleRegistry::ruleIds
QStringList ruleIds() const
Returns a list of the rule IDs for rules present in the registry.
Definition
qgslabelingengineruleregistry.cpp:32
QgsLabelingEngineRuleRegistry::removeRule
void removeRule(const QString &id)
Removes the rule with matching id from the registry.
Definition
qgslabelingengineruleregistry.cpp:85
qgis.h
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:35
SIP_TRANSFERBACK
#define SIP_TRANSFERBACK
Definition
qgis_sip.h:47
Generated on
for QGIS API Documentation by
1.17.0