|
QGIS API Documentation 3.99.0-Master (26c88405ac0)
|
Base class for dev tools model "group" nodes, which contain children of their own. More...
#include <qgsdevtoolsmodelnode.h>

Public Member Functions | |
| QgsDevToolsModelGroup (QgsDevToolsModelGroup &&other) noexcept=default | |
| Constructor for a QgsDevToolsModelGroup. | |
| ~QgsDevToolsModelGroup () override | |
| QgsDevToolsModelNode * | addChild (std::unique_ptr< QgsDevToolsModelNode > child) |
| Adds a child node to this node. | |
| QgsDevToolsModelNode * | childAt (int index) |
| Returns the child at the specified index. | |
| int | childCount () const final |
| Returns the number of child nodes owned by this node. | |
| void | clear () |
| Clears the group, removing all its children. | |
| QVariant | data (int role=Qt::DisplayRole) const override |
| Returns the node's data for the specified model role. | |
| int | indexOf (QgsDevToolsModelNode *child) const |
| Returns the index of the specified child node. | |
| QgsDevToolsModelGroup & | operator= (QgsDevToolsModelGroup &&other) noexcept=default |
| Assignment operator for QgsDevToolsModelGroup. | |
| QVariant | toVariant () const override |
| Converts the node's contents to a variant. | |
| Public Member Functions inherited from QgsDevToolsModelNode | |
| virtual | ~QgsDevToolsModelNode () |
| virtual QList< QAction * > | actions (QObject *parent) |
| Returns a list of actions relating to the node. | |
| QgsDevToolsModelGroup * | parent () |
| Returns the node's parent node. | |
Protected Member Functions | |
| QgsDevToolsModelGroup (const QString &title) | |
| Constructor for a QgsDevToolsModelGroup, with the specified title. | |
| void | addKeyValueNode (const QString &key, const QString &value, const QColor &color=QColor()) |
| Adds a simple key: value node to the group. | |
| Protected Member Functions inherited from QgsDevToolsModelNode | |
| QgsDevToolsModelNode () | |
Protected Attributes | |
| std::deque< std::unique_ptr< QgsDevToolsModelNode > > | mChildren |
Base class for dev tools model "group" nodes, which contain children of their own.
Definition at line 87 of file qgsdevtoolsmodelnode.h.
|
overridedefault |
|
defaultnoexcept |
Constructor for a QgsDevToolsModelGroup.
Copy constructor is disabled
|
protected |
Constructor for a QgsDevToolsModelGroup, with the specified title.
Definition at line 53 of file qgsdevtoolsmodelnode.cpp.
| QgsDevToolsModelNode * QgsDevToolsModelGroup::addChild | ( | std::unique_ptr< QgsDevToolsModelNode > | child | ) |
Adds a child node to this node.
Returns a pointer to the newly added node.
Definition at line 60 of file qgsdevtoolsmodelnode.cpp.
|
protected |
Adds a simple key: value node to the group.
Definition at line 170 of file qgsdevtoolsmodelnode.cpp.
| QgsDevToolsModelNode * QgsDevToolsModelGroup::childAt | ( | int | index | ) |
Returns the child at the specified index.
Definition at line 82 of file qgsdevtoolsmodelnode.cpp.
|
inlinefinalvirtual |
Returns the number of child nodes owned by this node.
Implements QgsDevToolsModelNode.
Definition at line 128 of file qgsdevtoolsmodelnode.h.
| void QgsDevToolsModelGroup::clear | ( | ) |
Clears the group, removing all its children.
Definition at line 88 of file qgsdevtoolsmodelnode.cpp.
|
overridevirtual |
Returns the node's data for the specified model role.
Implements QgsDevToolsModelNode.
Definition at line 93 of file qgsdevtoolsmodelnode.cpp.
| int QgsDevToolsModelGroup::indexOf | ( | QgsDevToolsModelNode * | child | ) | const |
Returns the index of the specified child node.
Definition at line 71 of file qgsdevtoolsmodelnode.cpp.
|
defaultnoexcept |
Assignment operator for QgsDevToolsModelGroup.
Copy assignment is disabled
|
overridevirtual |
Converts the node's contents to a variant.
Reimplemented from QgsDevToolsModelNode.
Definition at line 106 of file qgsdevtoolsmodelnode.cpp.
|
protected |
Definition at line 145 of file qgsdevtoolsmodelnode.h.