Class OrderedRelationModel
ClassList > OrderedRelationModel
Inherits the following classes: ReferencingFeatureListModelBase
Public Types
| Type | Name |
|---|---|
| enum | Roles |
Public Types inherited from ReferencingFeatureListModelBase
See ReferencingFeatureListModelBase
| Type | Name |
|---|---|
| enum | ReferencedFeatureListRoles |
Public Properties
| Type | Name |
|---|---|
| property QString | description |
| property QString | imagePath |
| property QString | orderingField |
Public Properties inherited from ReferencingFeatureListModelBase
See ReferencingFeatureListModelBase
| Type | Name |
|---|---|
| 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 ReferencingFeatureListModelBase
See ReferencingFeatureListModelBase
| 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 |
Public Functions
| Type | Name |
|---|---|
| OrderedRelationModel (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 ReferencingFeatureListModelBase
See ReferencingFeatureListModelBase
| Type | Name |
|---|---|
| ReferencingFeatureListModelBase (QObject * parent=nullptr) |
|
| 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 OrderedRelationModel::Roles {
ImagePathRole = Qt::UserRole + 100,
DescriptionRole,
FeatureIdRole,
OrderingValueRole
};
Public Properties Documentation
property description [1/2]
QString OrderedRelationModel::description;
property imagePath [1/2]
QString OrderedRelationModel::imagePath;
property orderingField [1/2]
QString OrderedRelationModel::orderingField;
Public Signals Documentation
signal currentFeatureChanged
void OrderedRelationModel::currentFeatureChanged;
signal descriptionChanged
void OrderedRelationModel::descriptionChanged;
signal failedReorder
void OrderedRelationModel::failedReorder;
signal imagePathChanged
void OrderedRelationModel::imagePathChanged;
signal orderingFieldChanged
void OrderedRelationModel::orderingFieldChanged;
Public Functions Documentation
function OrderedRelationModel
explicit OrderedRelationModel::OrderedRelationModel (
QObject * parent=nullptr
)
function data
QVariant OrderedRelationModel::data (
const QModelIndex & index,
int role=Qt::DisplayRole
) override const
function description [2/2]
QString OrderedRelationModel::description () const
function imagePath [2/2]
QString OrderedRelationModel::imagePath () const
function moveItems
Q_INVOKABLE bool OrderedRelationModel::moveItems (
const int fromIdx,
const int toIdx
)
function orderingField [2/2]
QString OrderedRelationModel::orderingField () const
function roleNames
QHash< int, QByteArray > OrderedRelationModel::roleNames () override const
function setDescription
void OrderedRelationModel::setDescription (
const QString & description
)
function setImagePath
void OrderedRelationModel::setImagePath (
const QString & imagePath
)
function setOrderingField
void OrderedRelationModel::setOrderingField (
const QString & orderingField
)
function triggerViewCurrentFeatureChange
Q_INVOKABLE void OrderedRelationModel::triggerViewCurrentFeatureChange (
int index
)
The documentation for this class was generated from the following file src/core/orderedrelationmodel.h