QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
A model for configuration of a list of labeling engine rules. More...
#include <qgslabelingengineruleswidget.h>
Public Member Functions | |
QgsLabelingEngineRulesModel (QObject *parent=nullptr) | |
Constructor for QgsLabelingEngineRulesModel. | |
~QgsLabelingEngineRulesModel () override | |
void | addRule (std::unique_ptr< QgsAbstractLabelingEngineRule > &rule) |
Adds a rule to the model. | |
void | changeRule (const QModelIndex &index, std::unique_ptr< QgsAbstractLabelingEngineRule > &rule) |
Swaps the rule at the specified index for a new rule. | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
QModelIndex | index (int row, int column, const QModelIndex &parent) const override |
QModelIndex | parent (const QModelIndex &child) const override |
bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
QgsAbstractLabelingEngineRule * | ruleAtIndex (const QModelIndex &index) const |
Returns the rule at the specified model index. | |
QList< QgsAbstractLabelingEngineRule * > | rules () const |
Returns the rules shown in the widget. | |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
void | setRules (const QList< QgsAbstractLabelingEngineRule * > &rules) |
Sets the rules to include in the model. | |
A model for configuration of a list of labeling engine rules.
Definition at line 39 of file qgslabelingengineruleswidget.h.
|
explicit |
Constructor for QgsLabelingEngineRulesModel.
Definition at line 33 of file qgslabelingengineruleswidget.cpp.
|
overridedefault |
void QgsLabelingEngineRulesModel::addRule | ( | std::unique_ptr< QgsAbstractLabelingEngineRule > & | rule | ) |
Adds a rule to the model.
Definition at line 189 of file qgslabelingengineruleswidget.cpp.
void QgsLabelingEngineRulesModel::changeRule | ( | const QModelIndex & | index, |
std::unique_ptr< QgsAbstractLabelingEngineRule > & | rule | ||
) |
Swaps the rule at the specified index for a new rule.
Definition at line 207 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 73 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 79 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 38 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 115 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 59 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 125 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 65 of file qgslabelingengineruleswidget.cpp.
QgsAbstractLabelingEngineRule * QgsLabelingEngineRulesModel::ruleAtIndex | ( | const QModelIndex & | index | ) | const |
Returns the rule at the specified model index.
Definition at line 196 of file qgslabelingengineruleswidget.cpp.
QList< QgsAbstractLabelingEngineRule * > QgsLabelingEngineRulesModel::rules | ( | ) | const |
Returns the rules shown in the widget.
The caller takes ownership of all returned rules.
Definition at line 219 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 142 of file qgslabelingengineruleswidget.cpp.
void QgsLabelingEngineRulesModel::setRules | ( | const QList< QgsAbstractLabelingEngineRule * > & | rules | ) |
Sets the rules to include in the model.
Ownership is not transferred, an internal copy will be made.
Definition at line 178 of file qgslabelingengineruleswidget.cpp.