QGIS API Documentation 3.41.0-Master (57ec4277f5e)
|
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 34 of file qgslabelingengineruleswidget.cpp.
|
overridedefault |
void QgsLabelingEngineRulesModel::addRule | ( | std::unique_ptr< QgsAbstractLabelingEngineRule > & | rule | ) |
Adds a rule to the model.
Definition at line 190 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 208 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 74 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 80 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 39 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 116 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 60 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 126 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 66 of file qgslabelingengineruleswidget.cpp.
QgsAbstractLabelingEngineRule * QgsLabelingEngineRulesModel::ruleAtIndex | ( | const QModelIndex & | index | ) | const |
Returns the rule at the specified model index.
Definition at line 197 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 220 of file qgslabelingengineruleswidget.cpp.
|
override |
Definition at line 143 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 179 of file qgslabelingengineruleswidget.cpp.