QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Model for rule based rendering rules view. More...
#include <qgsrulebasedlabelingwidget.h>
Public Member Functions | |
QgsRuleBasedLabelingModel (QgsRuleBasedLabeling::Rule *rootRule, QObject *parent=nullptr) | |
constructor More... | |
int | columnCount (const QModelIndex &=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override |
void | finishedAddingRules () |
Notify the model that one is done inserting new rules. More... | |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
provide model index for parent's child item More... | |
void | insertRule (const QModelIndex &parent, int before, QgsRuleBasedLabeling::Rule *newrule) |
Inserts a new rule at the specified position. More... | |
QMimeData * | mimeData (const QModelIndexList &indexes) const override |
QStringList | mimeTypes () const override |
QModelIndex | parent (const QModelIndex &index) const override |
provide parent model index More... | |
bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override |
void | removeRule (const QModelIndex &index) |
Removes the rule at the specified position. More... | |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
QgsRuleBasedLabeling::Rule * | ruleForIndex (const QModelIndex &index) const |
Returns the rule at the specified index. More... | |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
Qt::DropActions | supportedDropActions () const override |
void | updateRule (const QModelIndex &index) |
Update rule and all its descendants. More... | |
void | updateRule (const QModelIndex &parent, int row) |
Updates the rule at the specified position. More... | |
void | willAddRules (const QModelIndex &parent, int count) |
Notify the model that new rules will be added. More... | |
Protected Attributes | |
QgsRuleBasedLabeling::Rule * | mRootRule = nullptr |
Model for rule based rendering rules view.
Definition at line 41 of file qgsrulebasedlabelingwidget.h.
QgsRuleBasedLabelingModel::QgsRuleBasedLabelingModel | ( | QgsRuleBasedLabeling::Rule * | rootRule, |
QObject * | parent = nullptr |
||
) |
constructor
Definition at line 240 of file qgsrulebasedlabelingwidget.cpp.
|
override |
Definition at line 362 of file qgsrulebasedlabelingwidget.cpp.
|
override |
Definition at line 261 of file qgsrulebasedlabelingwidget.cpp.
|
override |
Definition at line 501 of file qgsrulebasedlabelingwidget.cpp.
void QgsRuleBasedLabelingModel::finishedAddingRules | ( | ) |
Notify the model that one is done inserting new rules.
|
override |
Definition at line 246 of file qgsrulebasedlabelingwidget.cpp.
|
override |
Definition at line 340 of file qgsrulebasedlabelingwidget.cpp.
|
override |
provide model index for parent's child item
Definition at line 367 of file qgsrulebasedlabelingwidget.cpp.
void QgsRuleBasedLabelingModel::insertRule | ( | const QModelIndex & | parent, |
int | before, | ||
QgsRuleBasedLabeling::Rule * | newrule | ||
) |
Inserts a new rule at the specified position.
Definition at line 580 of file qgsrulebasedlabelingwidget.cpp.
|
override |
Definition at line 467 of file qgsrulebasedlabelingwidget.cpp.
|
override |
Definition at line 444 of file qgsrulebasedlabelingwidget.cpp.
|
override |
provide parent model index
Definition at line 378 of file qgsrulebasedlabelingwidget.cpp.
|
override |
Definition at line 547 of file qgsrulebasedlabelingwidget.cpp.
void QgsRuleBasedLabelingModel::removeRule | ( | const QModelIndex & | index | ) |
Removes the rule at the specified position.
|
override |
Definition at line 352 of file qgsrulebasedlabelingwidget.cpp.
QgsRuleBasedLabeling::Rule * QgsRuleBasedLabelingModel::ruleForIndex | ( | const QModelIndex & | index | ) | const |
Returns the rule at the specified index.
Definition at line 573 of file qgsrulebasedlabelingwidget.cpp.
|
override |
Definition at line 395 of file qgsrulebasedlabelingwidget.cpp.
|
override |
Definition at line 439 of file qgsrulebasedlabelingwidget.cpp.
void QgsRuleBasedLabelingModel::updateRule | ( | const QModelIndex & | index | ) |
Update rule and all its descendants.
void QgsRuleBasedLabelingModel::updateRule | ( | const QModelIndex & | parent, |
int | row | ||
) |
Updates the rule at the specified position.
Definition at line 590 of file qgsrulebasedlabelingwidget.cpp.
void QgsRuleBasedLabelingModel::willAddRules | ( | const QModelIndex & | parent, |
int | count | ||
) |
Notify the model that new rules will be added.
|
protected |
Definition at line 95 of file qgsrulebasedlabelingwidget.h.