QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsLabelingEngineRulesModel Class Reference

A model for configuration of a list of labeling engine rules. More...

#include <qgslabelingengineruleswidget.h>

Inheritance diagram for QgsLabelingEngineRulesModel:
Inheritance graph
[legend]

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
 
QgsAbstractLabelingEngineRuleruleAtIndex (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.
 

Detailed Description

A model for configuration of a list of labeling engine rules.

Note
Not available in Python bindings
Since
QGIS 3.40

Definition at line 39 of file qgslabelingengineruleswidget.h.

Constructor & Destructor Documentation

◆ QgsLabelingEngineRulesModel()

QgsLabelingEngineRulesModel::QgsLabelingEngineRulesModel ( QObject *  parent = nullptr)
explicit

Constructor for QgsLabelingEngineRulesModel.

Definition at line 32 of file qgslabelingengineruleswidget.cpp.

◆ ~QgsLabelingEngineRulesModel()

QgsLabelingEngineRulesModel::~QgsLabelingEngineRulesModel ( )
overridedefault

Member Function Documentation

◆ addRule()

void QgsLabelingEngineRulesModel::addRule ( std::unique_ptr< QgsAbstractLabelingEngineRule > &  rule)

Adds a rule to the model.

Definition at line 189 of file qgslabelingengineruleswidget.cpp.

◆ changeRule()

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.

◆ columnCount()

int QgsLabelingEngineRulesModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 73 of file qgslabelingengineruleswidget.cpp.

◆ data()

QVariant QgsLabelingEngineRulesModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

Definition at line 79 of file qgslabelingengineruleswidget.cpp.

◆ flags()

Qt::ItemFlags QgsLabelingEngineRulesModel::flags ( const QModelIndex &  index) const
override

Definition at line 38 of file qgslabelingengineruleswidget.cpp.

◆ index()

QModelIndex QgsLabelingEngineRulesModel::index ( int  row,
int  column,
const QModelIndex &  parent 
) const
override

Definition at line 115 of file qgslabelingengineruleswidget.cpp.

◆ parent()

QModelIndex QgsLabelingEngineRulesModel::parent ( const QModelIndex &  child) const
override

Definition at line 59 of file qgslabelingengineruleswidget.cpp.

◆ removeRows()

bool QgsLabelingEngineRulesModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
override

Definition at line 125 of file qgslabelingengineruleswidget.cpp.

◆ rowCount()

int QgsLabelingEngineRulesModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 65 of file qgslabelingengineruleswidget.cpp.

◆ ruleAtIndex()

QgsAbstractLabelingEngineRule * QgsLabelingEngineRulesModel::ruleAtIndex ( const QModelIndex &  index) const

Returns the rule at the specified model index.

Definition at line 196 of file qgslabelingengineruleswidget.cpp.

◆ rules()

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.

◆ setData()

bool QgsLabelingEngineRulesModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override

Definition at line 142 of file qgslabelingengineruleswidget.cpp.

◆ setRules()

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.


The documentation for this class was generated from the following files: