Class AttributeFormModel
ClassList > AttributeFormModel
Inherits the following classes: QSortFilterProxyModel
Public Types
| Type | Name |
|---|---|
| enum | FeatureRoles |
Public Properties
| Type | Name |
|---|---|
| property bool | constraintsHardValid |
| property bool | constraintsSoftValid |
| property FeatureModel * | featureModel |
| property bool | hasRemembrance |
| property bool | hasTabs |
Public Signals
| Type | Name |
|---|---|
| signal void | constraintsHardValidChanged |
| signal void | constraintsSoftValidChanged |
| signal void | featureChanged |
| signal void | featureModelChanged |
| signal void | hasRemembranceChanged |
| signal void | hasTabsChanged |
Public Functions
| Type | Name |
|---|---|
| AttributeFormModel (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) |
| bool | constraintsHardValid () const |
| bool | constraintsSoftValid () const |
| Q_INVOKABLE bool | create () |
| Q_INVOKABLE void | deactivateAllRememberValues () Deactivate all available value that can be remembered and reused. |
| Q_INVOKABLE bool | deleteFeature () |
| FeatureModel * | featureModel () const |
| bool | hasRemembrance () const |
| bool | hasTabs () const |
| Q_INVOKABLE bool | save () |
| void | setFeatureModel (FeatureModel * featureModel) |
Protected Functions
| Type | Name |
|---|---|
| virtual bool | filterAcceptsRow (int source_row, const QModelIndex & source_parent) override const |
Public Types Documentation
enum FeatureRoles
enum AttributeFormModel::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 AttributeFormModel::constraintsHardValid;
property constraintsSoftValid [1/2]
bool AttributeFormModel::constraintsSoftValid;
property featureModel [1/2]
FeatureModel * AttributeFormModel::featureModel;
property hasRemembrance [1/2]
bool AttributeFormModel::hasRemembrance;
property hasTabs [1/2]
bool AttributeFormModel::hasTabs;
Public Signals Documentation
signal constraintsHardValidChanged
void AttributeFormModel::constraintsHardValidChanged;
signal constraintsSoftValidChanged
void AttributeFormModel::constraintsSoftValidChanged;
signal featureChanged
void AttributeFormModel::featureChanged;
signal featureModelChanged
void AttributeFormModel::featureModelChanged;
signal hasRemembranceChanged
void AttributeFormModel::hasRemembranceChanged;
signal hasTabsChanged
void AttributeFormModel::hasTabsChanged;
Public Functions Documentation
function AttributeFormModel
explicit AttributeFormModel::AttributeFormModel (
QObject * parent=nullptr
)
function activateAllRememberValues
Activate all available value that can be remembered and reused.
Q_INVOKABLE void AttributeFormModel::activateAllRememberValues ()
function applyFeatureModel
Applies feature model data such as attribute values, constraints, visibility to the attribute form model.
Q_INVOKABLE void AttributeFormModel::applyFeatureModel ()
function applyParentDefaultValues
Applies default values linked to a parent feature.
Q_INVOKABLE void AttributeFormModel::applyParentDefaultValues ()
function applyRelationshipDefaultValues
Applies default values linked to relationships.
Q_INVOKABLE void AttributeFormModel::applyRelationshipDefaultValues ()
function attribute
Q_INVOKABLE QVariant AttributeFormModel::attribute (
const QString & name
)
Get the attribute of the current feature by name
Parameters:
namethe name of the attribute
Returns:
value of the attribute
function constraintsHardValid [2/2]
bool AttributeFormModel::constraintsHardValid () const
function constraintsSoftValid [2/2]
bool AttributeFormModel::constraintsSoftValid () const
function create
Q_INVOKABLE bool AttributeFormModel::create ()
Create the current (not existing yet) feature
function deactivateAllRememberValues
Deactivate all available value that can be remembered and reused.
Q_INVOKABLE void AttributeFormModel::deactivateAllRememberValues ()
function deleteFeature
Q_INVOKABLE bool AttributeFormModel::deleteFeature ()
Delete the current feature
function featureModel [2/2]
FeatureModel * AttributeFormModel::featureModel () const
function hasRemembrance [2/2]
bool AttributeFormModel::hasRemembrance () const
function hasTabs [2/2]
bool AttributeFormModel::hasTabs () const
function save
Q_INVOKABLE bool AttributeFormModel::save ()
Save the current (already existing) feature
function setFeatureModel
void AttributeFormModel::setFeatureModel (
FeatureModel * featureModel
)
Protected Functions Documentation
function filterAcceptsRow
virtual bool AttributeFormModel::filterAcceptsRow (
int source_row,
const QModelIndex & source_parent
) override const
The documentation for this class was generated from the following file src/core/attributeformmodel.h