QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSRULEBASED3DRENDERER_H
17 #define QGSRULEBASED3DRENDERER_H
27 class Qgs3DRenderContext;
28 class QgsFeature3DHandler;
66 typedef QList<QgsRuleBased3DRenderer::Rule *>
RuleList;
67 typedef QHash<const QgsRuleBased3DRenderer::Rule *, QgsFeature3DHandler *>
RuleToHandlerMap;
117 bool active()
const {
return mIsActive; }
124 bool isElse()
const {
return mElseRule; }
144 void setDescription(
const QString &description ) { mDescription = description; }
207 void removeChildAt(
int i );
247 void prepare( const Qgs3DRenderContext &context, QSet<QString> &attributeNames,
RuleToHandlerMap &handlers ) const
SIP_SKIP;
267 bool isFilterOK(
QgsFeature &f, Qgs3DRenderContext &context )
const;
277 void updateElseRules();
280 Rule *mParent =
nullptr;
281 std::unique_ptr<QgsAbstract3DSymbol> mSymbol;
283 QString mDescription;
284 bool mElseRule =
false;
287 bool mIsActive =
true;
289 QString mRuleKey = QUuid::createUuid().toString();
291 std::unique_ptr<QgsExpression> mFilter;
304 QString
type()
const override {
return "rulebased"; }
312 Rule *mRootRule =
nullptr;
316 #endif // QGSRULEBASED3DRENDERER_H
void setFilterExpression(const QString &filterExp)
Set the expression used to check if a given feature shall be rendered with this rule.
QgsRuleBased3DRenderer::Rule * rootRule()
Returns pointer to the root rule.
The class is used as a container of context for various read/write operations on other objects.
Base class for all renderers that may to participate in 3D view.
QString ruleKey() const
Unique rule identifier (for identification of rule within labeling, used as provider ID)
void setIsElse(bool iselse)
Sets if this rule is an ELSE rule.
Rule(const Rule &rh)=delete
Rules cannot be copied.
3 Base class for 3D renderers that are based on vector layers.
@ Inactive
The rule is inactive.
QgsAbstract3DSymbol * symbol() const
Returns the labeling settings.
QHash< const QgsRuleBased3DRenderer::Rule *, QgsFeature3DHandler * > RuleToHandlerMap
3 Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
void setActive(bool state)
Sets if this rule is active.
void setRuleKey(const QString &key)
Override the assigned rule key (should be used just internally by rule-based renderer)
const QgsRuleBased3DRenderer::Rule * parent() const
The parent rule.
QgsRuleBased3DRenderer::Rule * parent()
The parent rule.
3 Definition of the world
QgsRuleBased3DRenderer::RuleList & children()
Returns all children rules of this rule.
QString filterExpression() const
A filter that will check if this rule applies.
QList< QgsRuleBased3DRenderer::Rule * > RuleList
bool isElse() const
Check if this rule is an ELSE rule.
QString type() const override
Returns unique identifier of the renderer class (used to identify subclass)
void setDescription(const QString &description)
Set a human readable description for this rule.
Represents a vector layer which manages a vector based data sets.
Rule & operator=(const Rule &rh)=delete
Rules cannot be copied.
QString description() const
A human readable description for this rule.
RegisterResult
The result of registering a rule.
3 Rule-based 3D renderer.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
const Rule * rootRule() const
Returns pointer to the root rule.
const QgsRuleBased3DRenderer::RuleList & children() const
Returns all children rules of this rule.
bool active() const
Returns if this rule is active.