QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
An interface for classes which can visit style entity (e.g. More...
#include <qgsstyleentityvisitor.h>
Classes | |
struct | Node |
Contains information relating to a node (i.e. More... | |
struct | StyleLeaf |
Contains information relating to the style entity currently being visited. More... | |
Public Types | |
enum class | NodeType : int { Project , Layer , SymbolRule , Layouts , PrintLayout , LayoutItem , Report , ReportHeader , ReportFooter , ReportSection , Annotations , Annotation } |
Describes the types of nodes which may be visited by the visitor. More... | |
Public Member Functions | |
virtual | ~QgsStyleEntityVisitorInterface ()=default |
virtual bool | visit (const QgsStyleEntityVisitorInterface::StyleLeaf &entity) |
Called when the visitor will visit a style entity. | |
virtual bool | visitEnter (const QgsStyleEntityVisitorInterface::Node &node) |
Called when the visitor starts visiting a node. | |
virtual bool | visitExit (const QgsStyleEntityVisitorInterface::Node &node) |
Called when the visitor stops visiting a node. | |
An interface for classes which can visit style entity (e.g.
symbol) nodes (using the visitor pattern).
Definition at line 33 of file qgsstyleentityvisitor.h.
|
strong |
Describes the types of nodes which may be visited by the visitor.
Definition at line 41 of file qgsstyleentityvisitor.h.
|
virtualdefault |
|
inlinevirtual |
Called when the visitor will visit a style entity.
Subclasses should return false
to abort further visitations, or true
to continue visiting after processing this entity.
Definition at line 153 of file qgsstyleentityvisitor.h.
|
inlinevirtual |
Called when the visitor starts visiting a node.
Subclasses should return false
if they do NOT want to visit this particular node - e.g. if the node type is QgsStyleEntityVisitorInterface::NodeType::Layouts and they do not wish to visit layout objects. In this case the visitor will not process the node, and will move to the next available node instead. Return true
to proceed with visiting the node.
The default implementation returns true
.
Definition at line 169 of file qgsstyleentityvisitor.h.
|
inlinevirtual |
Called when the visitor stops visiting a node.
Subclasses should return false
to abort further visitations, or true
to continue visiting other nodes.
The default implementation returns true
.
Definition at line 183 of file qgsstyleentityvisitor.h.