Class QfAttributeFormModel
ClassList > QfAttributeFormModel
Inherits the following classes: QSortFilterProxyModel
Public Types
| Type | Name |
|---|---|
| enum | FeatureRoles |
Public Properties
| Type | Name |
|---|---|
| property bool | constraintsHardValid |
| property bool | constraintsSoftValid |
| property QfFeatureModel * | featureModel |
| property bool | hasConstraints |
| property bool | hasRemembrance |
| property bool | hasTabs |
| property bool | isWizard |
Public Signals
| Type | Name |
|---|---|
| signal void | constraintsHardValidChanged |
| signal void | constraintsSoftValidChanged |
| signal void | featureModelChanged |
| signal void | hasConstraintsChanged |
| signal void | hasRemembranceChanged |
| signal void | hasTabsChanged |
| signal void | isWizardChanged |
Public Functions
| Type | Name |
|---|---|
| QfAttributeFormModel (QObject * parent=nullptr) |
|
| Q_INVOKABLE void | activateAllRememberValues () Activate all available value that can be remembered and reused. |
| Q_INVOKABLE void | applyFeatureModel () Applies feature model data such as attribute values, constraints, visibility to the attribute form model. |
| Q_INVOKABLE void | applyParentDefaultValues () Applies default values linked to a parent feature. |
| Q_INVOKABLE void | applyRelationshipDefaultValues () Applies default values linked to relationships. |
| Q_INVOKABLE QVariant | attribute (const QString & name) |
| Q_INVOKABLE bool | changeAttribute (const QString & name, const QVariant & value) |
| Q_INVOKABLE bool | changeGeometry (const QgsGeometry & geometry) |
| bool | constraintsHardValid () const |
| bool | constraintsSoftValid () const |
| Q_INVOKABLE bool | create () |
| QgsExpressionContext | createExpressionContext () const Creates an expression context. |
| Q_INVOKABLE void | deactivateAllRememberValues () Deactivate all available value that can be remembered and reused. |
| Q_INVOKABLE bool | deleteFeature () |
| QfFeatureModel * | featureModel () const |
| bool | hasConstraints () const |
| bool | hasRemembrance () const |
| bool | hasTabs () const |
| bool | isWizard () const |
| Q_INVOKABLE bool | save () |
| void | setFeatureModel (QfFeatureModel * featureModel) |
Protected Functions
| Type | Name |
|---|---|
| virtual bool | filterAcceptsRow (int sourceRow, const QModelIndex & sourceParent) override const |
Public Types Documentation
enum FeatureRoles
enum QfAttributeFormModel::FeatureRoles {
ElementType = Qt::UserRole + 1,
Name,
AttributeValue,
AttributeEditable,
EditorWidget,
EditorWidgetConfig,
RelationEditorWidget,
RelationEditorWidgetConfig,
CanRememberValue,
RememberValue,
Field,
RelationId,
NmRelationId,
FieldIndex,
AttributeEditorElement,
CurrentlyVisible,
ConstraintHardValid,
ConstraintSoftValid,
ConstraintDescription,
AttributeAllowEdit,
EditorWidgetCode,
TabIndex,
GroupColor,
GroupName,
GroupIndex,
ColumnCount,
LabelOverrideColor,
LabelColor,
LabelOverrideFont,
LabelFont
};
Public Properties Documentation
property constraintsHardValid [1/2]
bool QfAttributeFormModel::constraintsHardValid;
property constraintsSoftValid [1/2]
bool QfAttributeFormModel::constraintsSoftValid;
property featureModel [1/2]
QfFeatureModel * QfAttributeFormModel::featureModel;
property hasConstraints [1/2]
bool QfAttributeFormModel::hasConstraints;
property hasRemembrance [1/2]
bool QfAttributeFormModel::hasRemembrance;
property hasTabs [1/2]
bool QfAttributeFormModel::hasTabs;
property isWizard [1/2]
bool QfAttributeFormModel::isWizard;
Public Signals Documentation
signal constraintsHardValidChanged
void QfAttributeFormModel::constraintsHardValidChanged;
signal constraintsSoftValidChanged
void QfAttributeFormModel::constraintsSoftValidChanged;
signal featureModelChanged
void QfAttributeFormModel::featureModelChanged;
signal hasConstraintsChanged
void QfAttributeFormModel::hasConstraintsChanged;
signal hasRemembranceChanged
void QfAttributeFormModel::hasRemembranceChanged;
signal hasTabsChanged
void QfAttributeFormModel::hasTabsChanged;
signal isWizardChanged
void QfAttributeFormModel::isWizardChanged;
Public Functions Documentation
function QfAttributeFormModel
explicit QfAttributeFormModel::QfAttributeFormModel (
QObject * parent=nullptr
)
function activateAllRememberValues
Activate all available value that can be remembered and reused.
Q_INVOKABLE void QfAttributeFormModel::activateAllRememberValues ()
function applyFeatureModel
Applies feature model data such as attribute values, constraints, visibility to the attribute form model.
Q_INVOKABLE void QfAttributeFormModel::applyFeatureModel ()
function applyParentDefaultValues
Applies default values linked to a parent feature.
Q_INVOKABLE void QfAttributeFormModel::applyParentDefaultValues ()
function applyRelationshipDefaultValues
Applies default values linked to relationships.
Q_INVOKABLE void QfAttributeFormModel::applyRelationshipDefaultValues ()
function attribute
Q_INVOKABLE QVariant QfAttributeFormModel::attribute (
const QString & name
)
Returns the value for an attribute name of the current feature.
Returns:
value of the attribute
function changeAttribute
Q_INVOKABLE bool QfAttributeFormModel::changeAttribute (
const QString & name,
const QVariant & value
)
Gets the value for an attribute name of the current feature
Parameters:
valuethe value of the attribute
function changeGeometry
Q_INVOKABLE bool QfAttributeFormModel::changeGeometry (
const QgsGeometry & geometry
)
Sets the geometry of the current feature
function constraintsHardValid [2/2]
bool QfAttributeFormModel::constraintsHardValid () const
function constraintsSoftValid [2/2]
bool QfAttributeFormModel::constraintsSoftValid () const
function create
Q_INVOKABLE bool QfAttributeFormModel::create ()
Create the current (not existing yet) feature
function createExpressionContext
Creates an expression context.
QgsExpressionContext QfAttributeFormModel::createExpressionContext () const
function deactivateAllRememberValues
Deactivate all available value that can be remembered and reused.
Q_INVOKABLE void QfAttributeFormModel::deactivateAllRememberValues ()
function deleteFeature
Q_INVOKABLE bool QfAttributeFormModel::deleteFeature ()
Delete the current feature
function featureModel [2/2]
QfFeatureModel * QfAttributeFormModel::featureModel () const
function hasConstraints [2/2]
bool QfAttributeFormModel::hasConstraints () const
function hasRemembrance [2/2]
bool QfAttributeFormModel::hasRemembrance () const
function hasTabs [2/2]
bool QfAttributeFormModel::hasTabs () const
function isWizard [2/2]
bool QfAttributeFormModel::isWizard () const
function save
Q_INVOKABLE bool QfAttributeFormModel::save ()
Save the current (already existing) feature
function setFeatureModel
void QfAttributeFormModel::setFeatureModel (
QfFeatureModel * featureModel
)
Protected Functions Documentation
function filterAcceptsRow
virtual bool QfAttributeFormModel::filterAcceptsRow (
int sourceRow,
const QModelIndex & sourceParent
) override const
The documentation for this class was generated from the following file src/gui/qfattributeformmodel.h