Skip to content

Class FeatureCheckListModelBase

ClassList > FeatureCheckListModelBase

Inherits the following classes: FeatureListModel

Public Types

Type Name
enum FeatureListRoles

Public Types inherited from FeatureListModel

See FeatureListModel

Type Name
enum FeatureListRoles

Public Properties inherited from FeatureListModel

See FeatureListModel

Type Name
property bool addNull
property AppExpressionContextScopesGenerator * appExpressionContextScopesGenerator
property QgsFeature currentFormFeature
property QgsVectorLayer * currentLayer
property bool displayGroupName
property QString displayValueField
property QString filterExpression
property QString groupField
property QString keyField
property bool orderByValue

Public Signals

Type Name
signal void allowMultiChanged
signal void attributeFieldChanged
signal void attributeValueChanged
signal void listUpdated

Public Signals inherited from FeatureListModel

See FeatureListModel

Type Name
signal void addNullChanged
signal void appExpressionContextScopesGeneratorChanged
signal void currentFormFeatureChanged
signal void currentLayerChanged
signal void displayGroupNameChanged
signal void displayValueFieldChanged
signal void filterExpressionChanged
signal void groupFieldChanged
signal void keyFieldChanged
signal void orderByValueChanged

Public Functions

Type Name
FeatureCheckListModelBase (QObject * parent=nullptr)
bool allowMulti () const
QgsField attributeField () const
QVariant attributeValue () const
virtual QVariant data (const QModelIndex & index, int role) override const
virtual QHash< int, QByteArray > roleNames () override const
void setAllowMulti (bool allowMulti)
void setAttributeField (const QgsField & field)
void setAttributeValue (const QVariant & attributeValue)
virtual bool setData (const QModelIndex & index, const QVariant & value, int role) override
Q_INVOKABLE void toggleCheckAll (bool toggleChecked=true)

Public Functions inherited from FeatureListModel

See FeatureListModel

Type Name
FeatureListModel (QObject * parent=nullptr)
bool addNull () const
AppExpressionContextScopesGenerator * appExpressionContextScopesGenerator () const
virtual int columnCount (const QModelIndex & parent) override const
QgsFeature currentFormFeature () const
QgsVectorLayer * currentLayer () const
virtual QVariant data (const QModelIndex & index, int role) override const
Q_INVOKABLE QVariant dataFromRowIndex (int row, int role)
bool displayGroupName () const
QString displayValueField () const
QString filterExpression () const
Q_INVOKABLE QList< int > findDisplayValueMatches (const QString & filter) const
Q_INVOKABLE int findKey (const QVariant & key) const
Q_INVOKABLE QgsFeature getFeatureById (QgsFeatureId id) const
Q_INVOKABLE QgsFeature getFeatureFromKeyValue (const QVariant & value) const
QString groupField () const
virtual QModelIndex index (int row, int column, const QModelIndex & parent) override const
QString keyField () const
bool orderByValue () const
virtual QModelIndex parent (const QModelIndex & child) override const
virtual QHash< int, QByteArray > roleNames () override const
virtual int rowCount (const QModelIndex & parent=QModelIndex()) override const
void setAddNull (bool addNull)
void setAppExpressionContextScopesGenerator (AppExpressionContextScopesGenerator * generator)
void setCurrentFormFeature (const QgsFeature & feature)
void setCurrentLayer (QgsVectorLayer * currentLayer)
void setDisplayGroupName (bool displayGroupName)
void setDisplayValueField (const QString & displayValueField)
void setFilterExpression (const QString & filterExpression)
void setGroupField (const QString & groupField)
void setKeyField (const QString & keyField)
void setOrderByValue (bool orderByValue)
~FeatureListModel ()

Public Types Documentation

enum FeatureListRoles

enum FeatureCheckListModelBase::FeatureListRoles {
    CheckedRole = Qt::UserRole + 100
};

Public Signals Documentation

signal allowMultiChanged

void FeatureCheckListModelBase::allowMultiChanged;

signal attributeFieldChanged

void FeatureCheckListModelBase::attributeFieldChanged;

signal attributeValueChanged

void FeatureCheckListModelBase::attributeValueChanged;

signal listUpdated

void FeatureCheckListModelBase::listUpdated;

Public Functions Documentation

function FeatureCheckListModelBase

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

function allowMulti

bool FeatureCheckListModelBase::allowMulti () const

Whether multiple selected items are allowed


function attributeField

QgsField FeatureCheckListModelBase::attributeField () const

the current attribute field


function attributeValue

QVariant FeatureCheckListModelBase::attributeValue () const

the attribute value. A QVariantList or an hstore formatted string, depending on the field type.


function data

virtual QVariant FeatureCheckListModelBase::data (
    const QModelIndex & index,
    int role
) override const

Implements FeatureListModel::data


function roleNames

virtual QHash< int, QByteArray > FeatureCheckListModelBase::roleNames () override const

Implements FeatureListModel::roleNames


function setAllowMulti

void FeatureCheckListModelBase::setAllowMulti (
    bool allowMulti
) 

Sets whether multiple selected items are allowed


function setAttributeField

void FeatureCheckListModelBase::setAttributeField (
    const QgsField & field
) 

the current attribute field


function setAttributeValue

void FeatureCheckListModelBase::setAttributeValue (
    const QVariant & attributeValue
) 

the attribute value. A QVariantList or an hstore formatted string, depending on the field type.


function setData

virtual bool FeatureCheckListModelBase::setData (
    const QModelIndex & index,
    const QVariant & value,
    int role
) override

function toggleCheckAll

Q_INVOKABLE void FeatureCheckListModelBase::toggleCheckAll (
    bool toggleChecked=true
) 

Sets all element to either checked or unchecked state, depending on toggleChecked



The documentation for this class was generated from the following file src/core/featurechecklistmodel.h