16#ifndef QGSRULEBASED3DRENDERER_H
17#define QGSRULEBASED3DRENDERER_H
28class QgsFeature3DHandler;
65 typedef QList<QgsRuleBased3DRenderer::Rule *>
RuleList;
66 typedef QHash<const QgsRuleBased3DRenderer::Rule *, QgsFeature3DHandler *>
RuleToHandlerMap;
114 bool active()
const {
return mIsActive; }
121 bool isElse()
const {
return mElseRule; }
136 mFilterExp = filterExp;
145 void setDescription(
const QString &description ) { mDescription = description; }
208 void removeChildAt(
int i );
278 void updateElseRules();
281 Rule *mParent =
nullptr;
282 std::unique_ptr<QgsAbstract3DSymbol> mSymbol;
284 QString mDescription;
285 bool mElseRule =
false;
288 bool mIsActive =
true;
290 QString mRuleKey = QUuid::createUuid().toString();
292 std::unique_ptr<QgsExpression> mFilter;
305 QString
type()
const override {
return "rulebased"; }
313 Rule *mRootRule =
nullptr;
Base class for all renderers that may to participate in 3D view.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
The class is used as a container of context for various read/write operations on other objects.
Rule & operator=(const Rule &rh)=delete
bool isElse() const
Check if this rule is an ELSE rule.
QgsRuleBased3DRenderer::Rule * parent()
The parent rule.
const QgsRuleBased3DRenderer::RuleList & children() const
Returns all children rules of this rule.
void setDescription(const QString &description)
Set a human readable description for this rule.
Rule(const Rule &rh)=delete
const QgsRuleBased3DRenderer::Rule * parent() const
The parent rule.
void setFilterExpression(const QString &filterExp)
Set the expression used to check if a given feature shall be rendered with this rule.
void setActive(bool state)
Sets if this rule is active.
QString ruleKey() const
Unique rule identifier (for identification of rule within labeling, used as provider ID)
RegisterResult
The result of registering a rule.
@ Inactive
The rule is inactive.
bool active() const
Returns if this rule is active.
void setIsElse(bool iselse)
Sets if this rule is an ELSE rule.
QString filterExpression() const
A filter that will check if this rule applies.
QgsAbstract3DSymbol * symbol() const
Returns the labeling settings.
void setRuleKey(const QString &key)
Override the assigned rule key (should be used just internally by rule-based renderer)
QString description() const
A human readable description for this rule.
QgsRuleBased3DRenderer::RuleList & children()
Returns all children rules of this rule.
QHash< const QgsRuleBased3DRenderer::Rule *, QgsFeature3DHandler * > RuleToHandlerMap
QgsRuleBased3DRenderer::Rule * rootRule()
Returns pointer to the root rule.
QString type() const override
Returns unique identifier of the renderer class (used to identify subclass)
QList< QgsRuleBased3DRenderer::Rule * > RuleList
const Rule * rootRule() const
Returns pointer to the root rule.
Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double precisi...
Represents a vector layer which manages a vector based data sets.