QGIS API Documentation
3.2.0-Bonn (bc43194)
|
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;. More... | |
void | setIsMixed (bool mixed) |
Sets whether the widget should be displayed in a "mixed values" mode. More... | |
Signals | |
void | valueChanged (const QVariant &value) |
Emitted when the widget's value changes. More... | |
Public Member Functions | |
QgsAttributeFormEditorWidget (QgsEditorWidgetWrapper *editorWidget, const QString &widgetType, QgsAttributeForm *form) | |
Constructor for QgsAttributeFormEditorWidget. More... | |
~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. More... | |
QVariant | currentValue () const |
Returns the current value of the attached editor widget. More... | |
bool | hasChanged () const |
Returns true if the widget's value has been changed since it was initialized. More... | |
void | initialize (const QVariant &initialValue, bool mixedValues=false) |
Resets the widget to an initial value. More... | |
void | setConstraintResultVisible (bool editable) |
Set the constraint result lable visible or invisible according to the layer editable status. More... | |
void | setConstraintStatus (const QString &constraint, const QString &description, const QString &err, QgsEditorWidgetWrapper::ConstraintResult result) |
Set the constraint status for this widget. More... | |
Public Member Functions inherited from QgsAttributeFormWidget | |
QgsAttributeFormWidget (QgsWidgetWrapper *widget, QgsAttributeForm *form) | |
A new form widget for the wrapper widget on form. More... | |
void | addAdditionalSearchWidgetWrapper (QgsSearchWidgetWrapper *wrapper) |
Adds an additional search widget wrapper. More... | |
virtual QString | currentFilterExpression () const |
Creates an expression matching the current search filter value and search properties represented in the widget. More... | |
QgsAttributeForm * | form () const |
The form on which this widget is shown. More... | |
QgsVectorLayer * | layer () |
The layer for which this widget and its form is shown. More... | |
Mode | mode () const |
Returns the current mode for the widget. More... | |
void | resetSearch () |
Resets the search/filter value of the widget. More... | |
QWidget * | searchWidgetFrame () |
Returns the widget which should be used as a parent during construction of the search widget wrapper. More... | |
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. More... | |
QList< QgsSearchWidgetWrapper *> | searchWidgetWrappers () |
Returns the search widget wrapper used in this widget. More... | |
void | setMode (Mode mode) |
Sets the current mode for the widget. More... | |
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. More... | |
void | setSearchWidgetWrapper (QgsSearchWidgetWrapper *wrapper) |
Sets the search widget wrapper for the widget used when the form is in search mode. More... | |
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. More... | |
QWidget * | searchPage () const |
Returns a pointer to the search page widget. More... | |
QStackedWidget * | stack () const |
Returns a pointer to the stacked widget managing edit and search page. More... | |
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 42 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 31 of file qgsattributeformeditorwidget.cpp.
|
override |
Definition at line 65 of file qgsattributeformeditorwidget.cpp.
|
slot |
Called when field values have been committed;.
Definition at line 125 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 71 of file qgsattributeformeditorwidget.cpp.
QVariant QgsAttributeFormEditorWidget::currentValue | ( | ) | const |
Returns the current value of the attached editor widget.
Definition at line 151 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 |
||
) |
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 |
Definition at line 137 of file qgsattributeformeditorwidget.cpp.
void QgsAttributeFormEditorWidget::setConstraintResultVisible | ( | bool | editable | ) |
Set the constraint result lable visible or invisible according to the layer editable status.
Definition at line 112 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 91 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 117 of file qgsattributeformeditorwidget.cpp.
|
signal |
Emitted when the widget's value changes.
value | new widget value |