Class ReferencingFeatureListModel
ClassList > ReferencingFeatureListModel
Inherits the following classes: QSortFilterProxyModel
Public Properties
| Type | Name |
|---|---|
| property QString | currentNmRelationId |
| property QString | currentRelationId |
| property QgsFeature | feature |
| property bool | isLoading |
| property QgsRelation | nmRelation |
| property bool | parentPrimariesAvailable |
| property QgsRelation | relation |
| property Qt::SortOrder | sortOrder |
Public Signals
| Type | Name |
|---|---|
| signal void | attributeFormModelChanged |
| signal void | beforeModelUpdated |
| signal void | featureChanged |
| signal void | isLoadingChanged |
| signal void | modelUpdated |
| signal void | nmRelationChanged |
| signal void | parentPrimariesAvailableChanged |
| signal void | relationChanged |
| signal void | sortOrderChanged |
Public Functions
| Type | Name |
|---|---|
| ReferencingFeatureListModel (QObject * parent=nullptr) |
|
| 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. |
| Q_INVOKABLE bool | deleteFeature (QgsFeatureId referencingFeatureId) |
| QgsFeature | feature () const |
| Q_INVOKABLE int | getFeatureIdRow (QgsFeatureId featureId) |
| bool | isLoading () const |
| QgsRelation | nmRelation () const |
| bool | parentPrimariesAvailable () const |
| QgsRelation | relation () const |
| Q_INVOKABLE void | reload () |
| 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) |
| void | setSortOrder (Qt::SortOrder sortOrder) Sets the sort order and re-applies sorting. |
| Qt::SortOrder | sortOrder () const Returns the current sort order (ascending or descending). |
Public Properties Documentation
property currentNmRelationId [1/2]
QString ReferencingFeatureListModel::currentNmRelationId;
property currentRelationId [1/2]
QString ReferencingFeatureListModel::currentRelationId;
property feature [1/2]
QgsFeature ReferencingFeatureListModel::feature;
property isLoading [1/2]
bool ReferencingFeatureListModel::isLoading;
property nmRelation [1/2]
QgsRelation ReferencingFeatureListModel::nmRelation;
property parentPrimariesAvailable [1/2]
bool ReferencingFeatureListModel::parentPrimariesAvailable;
property relation [1/2]
QgsRelation ReferencingFeatureListModel::relation;
property sortOrder [1/2]
Qt::SortOrder ReferencingFeatureListModel::sortOrder;
Public Signals Documentation
signal attributeFormModelChanged
void ReferencingFeatureListModel::attributeFormModelChanged;
signal beforeModelUpdated
void ReferencingFeatureListModel::beforeModelUpdated;
signal featureChanged
void ReferencingFeatureListModel::featureChanged;
signal isLoadingChanged
void ReferencingFeatureListModel::isLoadingChanged;
signal modelUpdated
void ReferencingFeatureListModel::modelUpdated;
signal nmRelationChanged
void ReferencingFeatureListModel::nmRelationChanged;
signal parentPrimariesAvailableChanged
void ReferencingFeatureListModel::parentPrimariesAvailableChanged;
signal relationChanged
void ReferencingFeatureListModel::relationChanged;
signal sortOrderChanged
void ReferencingFeatureListModel::sortOrderChanged;
Public Functions Documentation
function ReferencingFeatureListModel
explicit ReferencingFeatureListModel::ReferencingFeatureListModel (
QObject * parent=nullptr
)
function currentNmRelationId [2/2]
On many-to-many relations returns the second relation id connecting the children in the association table to their other parent.
QString ReferencingFeatureListModel::currentNmRelationId () const
function currentRelationId [2/2]
Returns the id of the relation connecting the parent feature with the children in this model.
QString ReferencingFeatureListModel::currentRelationId () const
function deleteFeature
Q_INVOKABLE bool ReferencingFeatureListModel::deleteFeature (
QgsFeatureId referencingFeatureId
)
Deletes a feature regarding the referencing layer and the feature id of the selected child
Parameters:
referencingFeatureIdid of the selected child
function feature [2/2]
QgsFeature ReferencingFeatureListModel::feature () const
The parent feature for which this model contains the children
Returns:
the parent feature
See also: setFeature
function getFeatureIdRow
Q_INVOKABLE int ReferencingFeatureListModel::getFeatureIdRow (
QgsFeatureId featureId
)
Returns the row number for a given feature id
Parameters:
featureIdthe feature id
function isLoading [2/2]
bool ReferencingFeatureListModel::isLoading () const
Indicator if the model is currently performing any feature iteration in the background.
function nmRelation [2/2]
QgsRelation ReferencingFeatureListModel::nmRelation () const
On many-to-many relations this is the second relation connecting the children in the associationtable to their other parent
Returns:
associated relation
See also: setNmRelation
function parentPrimariesAvailable [2/2]
bool ReferencingFeatureListModel::parentPrimariesAvailable () const
The status if the pk of the parent feature (this feature) are valid (not null) It's needed to check on opening a form to add a new child
Returns:
parentPrimariesAvailable The status if the parent pks are available
See also: setParentPrimariesAvailable
function relation [2/2]
QgsRelation ReferencingFeatureListModel::relation () const
The relation connecting the parent feature with the children in this model
Returns:
relation
See also: setRelation
function reload
Q_INVOKABLE void ReferencingFeatureListModel::reload ()
Reloads the model by starting the reload functionality in the gatherer (seperate thread) Sets the property parentPrimariesAvailable
function setCurrentNmRelationId
On many-to-many relations sets the second relation connecting the children in the association table to their other parent.
void ReferencingFeatureListModel::setCurrentNmRelationId (
const QString & nmRelationId
)
function setCurrentRelationId
Sets the relation connecting the parent feature with the children in this model.
void ReferencingFeatureListModel::setCurrentRelationId (
const QString & relationId
)
function setFeature
void ReferencingFeatureListModel::setFeature (
const QgsFeature & feature
)
The parent feature for which this model contains the children
Parameters:
feature
See also: feature
function setNmRelation
void ReferencingFeatureListModel::setNmRelation (
const QgsRelation & relation
)
On many-to-many relations this is the second relation connecting the children in the associationtable to their other parent
Parameters:
relationThe associated relation
See also: nmRelation
function setParentPrimariesAvailable
void ReferencingFeatureListModel::setParentPrimariesAvailable (
const bool parentPrimariesAvailable
)
The status if the pk of the parent feature (this feature) are valid (not null)
Parameters:
parentPrimariesAvailableThe status if the parent pks are available
See also: parentPrimariesAvailable
function setRelation
void ReferencingFeatureListModel::setRelation (
const QgsRelation & relation
)
The relation connecting the parent feature with the children in this model
Parameters:
relation
See also: relation
function setSortOrder
Sets the sort order and re-applies sorting.
void ReferencingFeatureListModel::setSortOrder (
Qt::SortOrder sortOrder
)
Parameters:
sortOrderThe new sort order to use.
function sortOrder [2/2]
Returns the current sort order (ascending or descending).
Qt::SortOrder ReferencingFeatureListModel::sortOrder () const
The documentation for this class was generated from the following file src/core/referencingfeaturelistmodel.h