|
QGIS API Documentation 3.99.0-Master (f78f5286a64)
|
A widget consisting of both an editor widget and additional widgets for controlling the behavior of the editor widget depending on a number of possible modes. More...
#include <qgsattributeformeditorwidget.h>

Public Slots | |
| void | changesCommitted () |
| Called when field values have been committed;. | |
| void | setIsMixed (bool mixed) |
| Sets whether the widget should be displayed in a "mixed values" mode. | |
Signals | |
| Q_DECL_DEPRECATED void | valueChanged (const QVariant &value) |
| Emitted when the widget's value changes. | |
| void | valuesChanged (const QVariant &value, const QVariantList &additionalFieldValues) |
| Emitted when the widget's value changes. | |
Public Member Functions | |
| QgsAttributeFormEditorWidget (QgsEditorWidgetWrapper *editorWidget, const QString &widgetType, QgsAttributeForm *form) | |
| Constructor for QgsAttributeFormEditorWidget. | |
| ~QgsAttributeFormEditorWidget () override | |
| void | createSearchWidgetWrappers (const QgsAttributeEditorContext &context=QgsAttributeEditorContext()) override |
| Creates the search widget wrappers for the widget used when the form is in search mode. | |
| QVariant | currentValue () const |
| Returns the current value of the attached editor widget. | |
| QgsEditorWidgetWrapper * | editorWidget () const |
| Returns the editor widget wrapper. | |
| bool | hasChanged () const |
Returns true if the widget's value has been changed since it was initialized. | |
| void | initialize (const QVariant &initialValue, bool mixedValues=false, const QVariantList &additionalFieldValues=QVariantList()) |
| Resets the widget to an initial value. | |
| void | setConstraintResultVisible (bool editable) |
| Set the constraint result label visible or invisible according to the layer editable status. | |
| void | setConstraintStatus (const QString &constraint, const QString &description, const QString &err, QgsEditorWidgetWrapper::ConstraintResult result) |
| Set the constraint status for this widget. | |
Public Member Functions inherited from QgsAttributeFormWidget | |
| QgsAttributeFormWidget (QgsWidgetWrapper *widget, QgsAttributeForm *form) | |
| A new form widget for the wrapper widget on form. | |
| ~QgsAttributeFormWidget () override | |
| void | addAdditionalSearchWidgetWrapper (QgsSearchWidgetWrapper *wrapper) |
| Adds an additional search widget wrapper. | |
| virtual QString | currentFilterExpression () const |
| Creates an expression matching the current search filter value and search properties represented in the widget. | |
| QgsAttributeForm * | form () const |
| The form on which this widget is shown. | |
| QgsVectorLayer * | layer () |
| The layer for which this widget and its form is shown. | |
| Mode | mode () const |
| Returns the current mode for the widget. | |
| void | resetSearch () |
| Resets the search/filter value of the widget. | |
| QWidget * | searchWidgetFrame () |
| Returns the widget which should be used as a parent during construction of the search widget wrapper. | |
| bool | searchWidgetToolButtonVisible () const |
| The visibility of the search widget tool button, that allows (de)activating this search widgte or defines the comparison operator to use. | |
| QList< QgsSearchWidgetWrapper * > | searchWidgetWrappers () |
| Returns the search widget wrapper used in this widget. | |
| void | setMode (Mode mode) |
| Sets the current mode for the widget. | |
| void | setSearchWidgetToolButtonVisible (bool searchWidgetToolButtonVisible) |
| The visibility of the search widget tool button, that allows (de)activating this search widgte or defines the comparison operator to use. | |
| void | setSearchWidgetWrapper (QgsSearchWidgetWrapper *wrapper) |
| Sets the search widget wrapper for the widget used when the form is in search mode. | |
Friends | |
| class | TestQgsAttributeForm |
Additional Inherited Members | |
Public Types inherited from QgsAttributeFormWidget | |
| enum | Mode { DefaultMode , MultiEditMode , SearchMode , AggregateSearchMode } |
| Widget modes. More... | |
Protected Member Functions inherited from QgsAttributeFormWidget | |
| QWidget * | editPage () const |
| Returns a pointer to the EDIT page widget. | |
| QWidget * | searchPage () const |
| Returns a pointer to the search page widget. | |
| void | setVisiblePageForMode (QgsAttributeFormWidget::Mode mode) |
| Sets the visible page in the widget to the page matching the specified mode. | |
| QStackedWidget * | stack () const |
| Returns a pointer to the stacked widget managing edit and search page. | |
A widget consisting of both an editor widget and additional widgets for controlling the behavior of the editor widget depending on a number of possible modes.
For instance, if the parent attribute form is in the multi edit mode, this widget will show both the editor widget and a tool button for controlling the multi edit results.
Definition at line 43 of file qgsattributeformeditorwidget.h.
|
explicit |
Constructor for QgsAttributeFormEditorWidget.
| editorWidget | associated editor widget wrapper (for default/edit modes) |
| widgetType | the type identifier of the widget passed in the wrapper |
| form | parent attribute form |
Definition at line 32 of file qgsattributeformeditorwidget.cpp.
|
override |
Definition at line 66 of file qgsattributeformeditorwidget.cpp.
|
slot |
Called when field values have been committed;.
Definition at line 128 of file qgsattributeformeditorwidget.cpp.
|
overridevirtual |
Creates the search widget wrappers for the widget used when the form is in search mode.
| context | editor context (not available in Python bindings) |
Implements QgsAttributeFormWidget.
Definition at line 72 of file qgsattributeformeditorwidget.cpp.
| QVariant QgsAttributeFormEditorWidget::currentValue | ( | ) | const |
Returns the current value of the attached editor widget.
Definition at line 158 of file qgsattributeformeditorwidget.cpp.
| QgsEditorWidgetWrapper * QgsAttributeFormEditorWidget::editorWidget | ( | ) | const |
Returns the editor widget wrapper.
Definition at line 115 of file qgsattributeformeditorwidget.cpp.
|
inline |
Returns true if the widget's value has been changed since it was initialized.
Definition at line 73 of file qgsattributeformeditorwidget.h.
| void QgsAttributeFormEditorWidget::initialize | ( | const QVariant & | initialValue, |
| bool | mixedValues = false, |
||
| const QVariantList & | additionalFieldValues = QVariantList() |
||
| ) |
Resets the widget to an initial value.
| initialValue | initial value to show in widget |
| mixedValues | set to true to initially show the mixed values state |
| additionalFieldValues | a variant map of additional field names with their corresponding values |
Definition at line 142 of file qgsattributeformeditorwidget.cpp.
| void QgsAttributeFormEditorWidget::setConstraintResultVisible | ( | bool | editable | ) |
Set the constraint result label visible or invisible according to the layer editable status.
Definition at line 110 of file qgsattributeformeditorwidget.cpp.
| void QgsAttributeFormEditorWidget::setConstraintStatus | ( | const QString & | constraint, |
| const QString & | description, | ||
| const QString & | err, | ||
| QgsEditorWidgetWrapper::ConstraintResult | result | ||
| ) |
Set the constraint status for this widget.
Definition at line 89 of file qgsattributeformeditorwidget.cpp.
|
slot |
Sets whether the widget should be displayed in a "mixed values" mode.
| mixed | set to true to show in a mixed values state |
Definition at line 120 of file qgsattributeformeditorwidget.cpp.
|
signal |
Emitted when the widget's value changes.
| value | new widget value |
|
signal |
Emitted when the widget's value changes.
| value | new widget value |
| additionalFieldValues | of the potential additional fields |
|
friend |
Definition at line 155 of file qgsattributeformeditorwidget.h.