Skip to content

Class QfFeatureCheckListModelBase

ClassList > QfFeatureCheckListModelBase

Inherits the following classes: QfFeatureListModel

Public Types

Type Name
enum FeatureListRoles

Public Types inherited from QfFeatureListModel

See QfFeatureListModel

Type Name
enum FeatureListRoles

Public Properties inherited from QfFeatureListModel

See QfFeatureListModel

Type Name
property bool addNull
property QfAppExpressionContextScopesGenerator * appExpressionContextScopesGenerator
property QgsFeature currentFormFeature
property QgsVectorLayer * currentLayer
property bool displayGroupName
property QString displayValueField
property QString filterExpression
property QString groupField
property QString keyField
property bool orderByField
property QString orderByFieldName
property bool orderByValue
property QString searchTerm

Public Signals

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

Public Signals inherited from QfFeatureListModel

See QfFeatureListModel

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 orderByFieldChanged
signal void orderByFieldNameChanged
signal void orderByValueChanged
signal void searchTermChanged

Public Functions

Type Name
QfFeatureCheckListModelBase (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 QfFeatureListModel

See QfFeatureListModel

Type Name
QfFeatureListModel (QObject * parent=nullptr)
bool addNull () const
QfAppExpressionContextScopesGenerator * 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 orderByField () const
QString orderByFieldName () 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
QString searchTerm () const
void setAddNull (bool addNull)
void setAppExpressionContextScopesGenerator (QfAppExpressionContextScopesGenerator * 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 setOrderByField (bool orderByField)
void setOrderByFieldName (const QString & orderByFieldName)
void setOrderByValue (bool orderByValue)
void setSearchTerm (const QString & searchTerm)
~QfFeatureListModel ()

Public Types Documentation

enum FeatureListRoles

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

Public Signals Documentation

signal allowMultiChanged

void QfFeatureCheckListModelBase::allowMultiChanged;

signal attributeFieldChanged

void QfFeatureCheckListModelBase::attributeFieldChanged;

signal attributeValueChanged

void QfFeatureCheckListModelBase::attributeValueChanged;

signal listUpdated

void QfFeatureCheckListModelBase::listUpdated;

Public Functions Documentation

function QfFeatureCheckListModelBase

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

function allowMulti

bool QfFeatureCheckListModelBase::allowMulti () const

Whether multiple selected items are allowed


function attributeField

QgsField QfFeatureCheckListModelBase::attributeField () const

the current attribute field


function attributeValue

QVariant QfFeatureCheckListModelBase::attributeValue () const

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


function data

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

Implements QfFeatureListModel::data


function roleNames

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

Implements QfFeatureListModel::roleNames


function setAllowMulti

void QfFeatureCheckListModelBase::setAllowMulti (
    bool allowMulti
) 

Sets whether multiple selected items are allowed


function setAttributeField

void QfFeatureCheckListModelBase::setAttributeField (
    const QgsField & field
) 

the current attribute field


function setAttributeValue

void QfFeatureCheckListModelBase::setAttributeValue (
    const QVariant & attributeValue
) 

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


function setData

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

function toggleCheckAll

Q_INVOKABLE void QfFeatureCheckListModelBase::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/gui/qffeaturechecklistmodel.h