Skip to content

Class QfOrderedRelationModel

ClassList > QfOrderedRelationModel

Inherits the following classes: QfReferencingFeatureListModelBase

Public Types

Type Name
enum Roles

Public Types inherited from QfReferencingFeatureListModelBase

See QfReferencingFeatureListModelBase

Type Name
enum ReferencedFeatureListRoles

Public Properties

Type Name
property QString description
property QString imagePath
property QString orderingField

Public Properties inherited from QfReferencingFeatureListModelBase

See QfReferencingFeatureListModelBase

Type Name
property int attachmentDocumentViewer
property QString attachmentFieldName
property QString attachmentStorageAuthConfigId
property QString attachmentStorageType
property QString attachmentStorageUrl
property QString currentNmRelationId
property QString currentRelationId
property QgsFeature feature
property bool isLoading
property QgsRelation nmRelation
property bool parentPrimariesAvailable
property QgsRelation relation

Public Signals

Type Name
signal void currentFeatureChanged (QgsFeature feature)
signal void descriptionChanged
signal void failedReorder
signal void imagePathChanged
signal void orderingFieldChanged

Public Signals inherited from QfReferencingFeatureListModelBase

See QfReferencingFeatureListModelBase

Type Name
signal void attachmentDetailsChanged
signal void attributeFormModelChanged
signal void beforeModelUpdated
signal void featureChanged
signal void isLoadingChanged
signal void modelUpdated
signal void nmRelationChanged
signal void parentPrimariesAvailableChanged
signal void relationChanged

Public Functions

Type Name
QfOrderedRelationModel (QObject * parent=nullptr)
QVariant data (const QModelIndex & index, int role=Qt::DisplayRole) override const
QString description () const
QString imagePath () const
Q_INVOKABLE bool moveItems (const int fromIdx, const int toIdx)
QString orderingField () const
QHash< int, QByteArray > roleNames () override const
void setDescription (const QString & description)
void setImagePath (const QString & imagePath)
void setOrderingField (const QString & orderingField)
Q_INVOKABLE void triggerViewCurrentFeatureChange (int index)

Public Functions inherited from QfReferencingFeatureListModelBase

See QfReferencingFeatureListModelBase

Type Name
QfReferencingFeatureListModelBase (QObject * parent=nullptr)
int attachmentDocumentViewer () const
QString attachmentFieldName () const
QString attachmentStorageAuthConfigId () const
QString attachmentStorageType () const
QString attachmentStorageUrl () const
int columnCount (const QModelIndex & parent=QModelIndex()) override const
QString currentNmRelationId () const
On many-to-many relations returns the second relation id connecting the children in the association table to their other parent.
QString currentRelationId () const
Returns the id of the relation connecting the parent feature with the children in this model.
QVariant data (const QModelIndex & index, int role=Qt::DisplayRole) override const
Q_INVOKABLE bool deleteFeature (QgsFeatureId referencingFeatureId)
QgsFeature feature () const
Q_INVOKABLE int getFeatureIdRow (QgsFeatureId featureId)
QModelIndex index (int row, int column, const QModelIndex & parent=QModelIndex()) override const
bool isLoading () const
QgsRelation nmRelation () const
QModelIndex parent (const QModelIndex & index) override const
bool parentPrimariesAvailable () const
QgsRelation relation () const
Q_INVOKABLE void reload ()
QHash< int, QByteArray > roleNames () override const
int rowCount (const QModelIndex & parent=QModelIndex()) override const
void setCurrentNmRelationId (const QString & nmRelationId)
On many-to-many relations sets the second relation connecting the children in the association table to their other parent.
void setCurrentRelationId (const QString & relationId)
Sets the relation connecting the parent feature with the children in this model.
void setFeature (const QgsFeature & feature)
void setNmRelation (const QgsRelation & relation)
void setParentPrimariesAvailable (const bool parentPrimariesAvailable)
void setRelation (const QgsRelation & relation)

Public Types Documentation

enum Roles

enum QfOrderedRelationModel::Roles {
    ImagePathRole = Qt::UserRole + 100,
    DescriptionRole,
    FeatureIdRole,
    OrderingValueRole
};

Public Properties Documentation

property description [1/2]

QString QfOrderedRelationModel::description;

property imagePath [1/2]

QString QfOrderedRelationModel::imagePath;

property orderingField [1/2]

QString QfOrderedRelationModel::orderingField;

Public Signals Documentation

signal currentFeatureChanged

void QfOrderedRelationModel::currentFeatureChanged;

signal descriptionChanged

void QfOrderedRelationModel::descriptionChanged;

signal failedReorder

void QfOrderedRelationModel::failedReorder;

signal imagePathChanged

void QfOrderedRelationModel::imagePathChanged;

signal orderingFieldChanged

void QfOrderedRelationModel::orderingFieldChanged;

Public Functions Documentation

function QfOrderedRelationModel

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

function data

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

function description [2/2]

QString QfOrderedRelationModel::description () const

function imagePath [2/2]

QString QfOrderedRelationModel::imagePath () const

function moveItems

Q_INVOKABLE bool QfOrderedRelationModel::moveItems (
    const int fromIdx,
    const int toIdx
) 

function orderingField [2/2]

QString QfOrderedRelationModel::orderingField () const

function roleNames

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

function setDescription

void QfOrderedRelationModel::setDescription (
    const QString & description
) 

function setImagePath

void QfOrderedRelationModel::setImagePath (
    const QString & imagePath
) 

function setOrderingField

void QfOrderedRelationModel::setOrderingField (
    const QString & orderingField
) 

function triggerViewCurrentFeatureChange

Q_INVOKABLE void QfOrderedRelationModel::triggerViewCurrentFeatureChange (
    int index
) 


The documentation for this class was generated from the following file src/gui/qforderedrelationmodel.h