23#include "moc_qgsattributesformtreeviewindicatorprovider.cpp"
25using namespace Qt::StringLiterals;
36 for (
int i = indexFrom; i <= indexTo; ++i )
54std::unique_ptr<QgsAttributesFormTreeViewIndicator> QgsAttributesFormTreeViewIndicatorProvider::newIndicator(
QgsAttributesFormItem *item )
56 auto indicator = std::make_unique<QgsAttributesFormTreeViewIndicator>(
this );
58 indicator->setToolTip( tooltipText( item ) );
66 if ( acceptsItem( item ) )
75 indicator->setToolTip( tooltipText( item ) );
86 removeItemIndicator( item );
101 indicator->deleteLater();
180 bool hardConstraint =
false;
186 hardConstraint =
true;
190 if ( !hardConstraint )
196 hardConstraint =
true;
201 if ( !hardConstraint )
207 hardConstraint =
true;
212 return hardConstraint ? u
"/field_indicators/mIndicatorConstraintHard.svg"_s : u
"/field_indicators/mIndicatorConstraint.svg"_s;
238 tooltipText += !constraints.constraintDescription().isEmpty() ? u
"\n "_s + constraints.constraintDescription() : QString();
264 QString iconName = u
"/field_indicators/mIndicatorDefaultValue.svg"_s;
270 iconName = u
"/field_indicators/mIndicatorDefaultValueApplyOnUpdate.svg"_s;
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
QgsFieldConstraintIndicatorProvider(QgsAttributesFormBaseView *view)
Constructor for QgsFieldConstraintIndicatorProvider.
Stores information about constraints which may be present on a field.
@ ConstraintStrengthHard
Constraint must be honored before feature can be accepted.
@ ConstraintOriginNotSet
Constraint is not set.
@ ConstraintOriginProvider
Constraint was set at data provider.
Constraint
Constraints which may be present on a field.
@ ConstraintNotNull
Field may not be null.
@ ConstraintUnique
Field must have a unique value.
@ ConstraintExpression
Field has an expression constraint set. See constraintExpression().
QgsFieldDefaultValueIndicatorProvider(QgsAttributesFormBaseView *view)
Constructor for QgsFieldDefaultValueIndicatorProvider.