QGIS API Documentation  3.6.0-Noosa (5873452)
Public Member Functions | Protected Attributes | List of all members
QgsRuleBasedRendererModel Class Reference

Tree model for the rules: More...

#include <qgsrulebasedrendererwidget.h>

Inheritance diagram for QgsRuleBasedRendererModel:
Inheritance graph
[legend]

Public Member Functions

 QgsRuleBasedRendererModel (QgsRuleBasedRenderer *renderer, QObject *parent)
 Constructor for QgsRuleBasedRendererModel, for the specified renderer. More...
 
void clearFeatureCounts ()
 
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 ()
 
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
 
void insertRule (const QModelIndex &parent, int before, QgsRuleBasedRenderer::Rule *newrule)
 
QMimeData * mimeData (const QModelIndexList &indexes) const override
 
QStringList mimeTypes () const override
 
QModelIndex parent (const QModelIndex &index) const override
 
bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override
 
void removeRule (const QModelIndex &index)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
QgsRuleBasedRenderer::RuleruleForIndex (const QModelIndex &index) const
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 
void setFeatureCounts (const QHash< QgsRuleBasedRenderer::Rule *, QgsRuleBasedRendererCount > &countMap)
 
Qt::DropActions supportedDropActions () const override
 
void updateRule (const QModelIndex &parent, int row)
 
void updateRule (const QModelIndex &index)
 
void willAddRules (const QModelIndex &parent, int count)
 

Protected Attributes

QHash< QgsRuleBasedRenderer::Rule *, QgsRuleBasedRendererCountmFeatureCountMap
 
QgsRuleBasedRenderermR = nullptr
 

Detailed Description

Tree model for the rules:

(invalid) == root node +— top level rule +— top level rule

Definition at line 47 of file qgsrulebasedrendererwidget.h.

Constructor & Destructor Documentation

◆ QgsRuleBasedRendererModel()

QgsRuleBasedRendererModel::QgsRuleBasedRendererModel ( QgsRuleBasedRenderer renderer,
QObject *  parent 
)

Constructor for QgsRuleBasedRendererModel, for the specified renderer.

Definition at line 836 of file qgsrulebasedrendererwidget.cpp.

Member Function Documentation

◆ clearFeatureCounts()

void QgsRuleBasedRendererModel::clearFeatureCounts ( )

Definition at line 1288 of file qgsrulebasedrendererwidget.cpp.

◆ columnCount()

int QgsRuleBasedRendererModel::columnCount ( const QModelIndex &  = QModelIndex()) const
override

Definition at line 999 of file qgsrulebasedrendererwidget.cpp.

◆ data()

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

Definition at line 857 of file qgsrulebasedrendererwidget.cpp.

◆ dropMimeData()

bool QgsRuleBasedRendererModel::dropMimeData ( const QMimeData *  data,
Qt::DropAction  action,
int  row,
int  column,
const QModelIndex &  parent 
)
override

Definition at line 1137 of file qgsrulebasedrendererwidget.cpp.

◆ finishedAddingRules()

void QgsRuleBasedRendererModel::finishedAddingRules ( )

Definition at line 1277 of file qgsrulebasedrendererwidget.cpp.

◆ flags()

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

Definition at line 842 of file qgsrulebasedrendererwidget.cpp.

◆ headerData()

QVariant QgsRuleBasedRendererModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override

Definition at line 966 of file qgsrulebasedrendererwidget.cpp.

◆ index()

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

Definition at line 1004 of file qgsrulebasedrendererwidget.cpp.

◆ insertRule()

void QgsRuleBasedRendererModel::insertRule ( const QModelIndex &  parent,
int  before,
QgsRuleBasedRenderer::Rule newrule 
)

Definition at line 1228 of file qgsrulebasedrendererwidget.cpp.

◆ mimeData()

QMimeData * QgsRuleBasedRendererModel::mimeData ( const QModelIndexList &  indexes) const
override

Definition at line 1083 of file qgsrulebasedrendererwidget.cpp.

◆ mimeTypes()

QStringList QgsRuleBasedRendererModel::mimeTypes ( ) const
override

Definition at line 1076 of file qgsrulebasedrendererwidget.cpp.

◆ parent()

QModelIndex QgsRuleBasedRendererModel::parent ( const QModelIndex &  index) const
override

Definition at line 1015 of file qgsrulebasedrendererwidget.cpp.

◆ removeRows()

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

Definition at line 1197 of file qgsrulebasedrendererwidget.cpp.

◆ removeRule()

void QgsRuleBasedRendererModel::removeRule ( const QModelIndex &  index)

Definition at line 1258 of file qgsrulebasedrendererwidget.cpp.

◆ rowCount()

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

Definition at line 989 of file qgsrulebasedrendererwidget.cpp.

◆ ruleForIndex()

QgsRuleBasedRenderer::Rule * QgsRuleBasedRendererModel::ruleForIndex ( const QModelIndex &  index) const

Definition at line 1190 of file qgsrulebasedrendererwidget.cpp.

◆ setData()

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

Definition at line 1032 of file qgsrulebasedrendererwidget.cpp.

◆ setFeatureCounts()

void QgsRuleBasedRendererModel::setFeatureCounts ( const QHash< QgsRuleBasedRenderer::Rule *, QgsRuleBasedRendererCount > &  countMap)
Note
not available in Python bindungs

Definition at line 1282 of file qgsrulebasedrendererwidget.cpp.

◆ supportedDropActions()

Qt::DropActions QgsRuleBasedRendererModel::supportedDropActions ( ) const
override

Definition at line 1071 of file qgsrulebasedrendererwidget.cpp.

◆ updateRule() [1/2]

void QgsRuleBasedRendererModel::updateRule ( const QModelIndex &  parent,
int  row 
)

Definition at line 1240 of file qgsrulebasedrendererwidget.cpp.

◆ updateRule() [2/2]

void QgsRuleBasedRendererModel::updateRule ( const QModelIndex &  index)

Definition at line 1246 of file qgsrulebasedrendererwidget.cpp.

◆ willAddRules()

void QgsRuleBasedRendererModel::willAddRules ( const QModelIndex &  parent,
int  count 
)

Definition at line 1271 of file qgsrulebasedrendererwidget.cpp.

Member Data Documentation

◆ mFeatureCountMap

QHash<QgsRuleBasedRenderer::Rule *, QgsRuleBasedRendererCount> QgsRuleBasedRendererModel::mFeatureCountMap
protected

Definition at line 97 of file qgsrulebasedrendererwidget.h.

◆ mR

QgsRuleBasedRenderer* QgsRuleBasedRendererModel::mR = nullptr
protected

Definition at line 96 of file qgsrulebasedrendererwidget.h.


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