QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Generic visitor that collects symbol layers of a vector layer's renderer and call a callback function on them with their corresponding QgsSymbolLayerId. More...
Public Types | |
typedef std::function< void(const QgsSymbolLayer *, const QgsSymbolLayerId &)> | SymbolLayerCallback |
Public Types inherited from QgsStyleEntityVisitorInterface | |
enum | NodeType : int { NodeType::Project, NodeType::Layer, NodeType::SymbolRule, NodeType::Layouts, NodeType::PrintLayout, NodeType::LayoutItem, NodeType::Report, NodeType::ReportHeader, NodeType::ReportFooter, NodeType::ReportSection, NodeType::Annotations, NodeType::Annotation } |
Describes the types of nodes which may be visited by the visitor. More... | |
Public Member Functions | |
SymbolLayerVisitor (SymbolLayerCallback callback) | |
constructor More... | |
bool | visit (const QgsStyleEntityVisitorInterface::StyleLeaf &leaf) override |
Called when the visitor will visit a style entity. More... | |
bool | visitEnter (const QgsStyleEntityVisitorInterface::Node &node) override |
Called when the visitor starts visiting a node. More... | |
void | visitSymbol (const QgsSymbol *symbol, const QString &leafIdentifier, QVector< int > rootPath) |
Process a symbol. More... | |
Public Member Functions inherited from QgsStyleEntityVisitorInterface | |
virtual | ~QgsStyleEntityVisitorInterface ()=default |
virtual bool | visitExit (const QgsStyleEntityVisitorInterface::Node &node) |
Called when the visitor stops visiting a node. More... | |
Generic visitor that collects symbol layers of a vector layer's renderer and call a callback function on them with their corresponding QgsSymbolLayerId.
Definition at line 86 of file qgsmaskingwidget.cpp.
typedef std::function<void( const QgsSymbolLayer *, const QgsSymbolLayerId & )> SymbolLayerVisitor::SymbolLayerCallback |
Definition at line 89 of file qgsmaskingwidget.cpp.
|
inline |
constructor
Definition at line 92 of file qgsmaskingwidget.cpp.
|
inlineoverridevirtual |
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.
Reimplemented from QgsStyleEntityVisitorInterface.
Definition at line 124 of file qgsmaskingwidget.cpp.
|
inlineoverridevirtual |
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
.
Reimplemented from QgsStyleEntityVisitorInterface.
Definition at line 96 of file qgsmaskingwidget.cpp.
|
inline |
Process a symbol.
Definition at line 106 of file qgsmaskingwidget.cpp.