QGIS/python/gui/qgsattributeformwidget.sip

162 lines
4.2 KiB
Plaintext
Raw Normal View History

2017-11-01 19:44:41 +01:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributeformwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAttributeFormWidget : QWidget /Abstract/
{
2017-11-02 10:20:49 +01:00
%Docstring
2017-12-15 10:36:55 -04:00
Base class for all widgets shown on a QgsAttributeForm.
Consists of the widget which is visible in edit mode as well as the widget visible in search mode.
2017-11-02 10:20:49 +01:00
2017-11-21 08:32:53 +01:00
.. versionadded:: 3.0
2017-11-02 10:20:49 +01:00
%End
2017-11-01 19:44:41 +01:00
%TypeHeaderCode
#include "qgsattributeformwidget.h"
%End
public:
enum Mode
{
DefaultMode,
MultiEditMode,
SearchMode,
AggregateSearchMode,
2017-11-01 19:44:41 +01:00
};
explicit QgsAttributeFormWidget( QgsWidgetWrapper *widget, QgsAttributeForm *form );
2017-11-02 18:06:14 +01:00
%Docstring
2017-12-15 10:36:55 -04:00
A new form widget for the wrapper ``widget`` on ``form``.
2017-11-02 18:06:14 +01:00
%End
2017-11-01 19:44:41 +01:00
virtual void createSearchWidgetWrappers() = 0;
%Docstring
2017-12-15 10:36:55 -04:00
Creates the search widget wrappers for the widget used when the form is in
search mode.
2017-11-01 19:44:41 +01:00
2017-12-15 10:36:55 -04:00
:param context: editor context (not available in Python bindings)
2017-11-01 19:44:41 +01:00
%End
virtual QString currentFilterExpression() const;
2017-11-01 19:44:41 +01:00
%Docstring
2017-12-15 10:36:55 -04:00
Creates an expression matching the current search filter value and
search properties represented in the widget.
:rtype: str
2017-11-01 19:44:41 +01:00
.. versionadded:: 2.16
%End
void setMode( Mode mode );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the current mode for the widget. The widget will adapt its state and visible widgets to
reflect the updated mode. For example, showing multi edit tool buttons if the mode is set to MultiEditMode.
:param mode: widget mode
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`mode()`
2017-11-01 19:44:41 +01:00
%End
Mode mode() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the current mode for the widget.
:rtype: Mode
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setMode()`
2017-11-01 19:44:41 +01:00
%End
QgsVectorLayer *layer();
%Docstring
2017-12-15 10:36:55 -04:00
The layer for which this widget and its form is shown.
:rtype: QgsVectorLayer
2017-11-01 19:44:41 +01:00
%End
QgsAttributeForm *form() const;
%Docstring
2017-12-15 10:36:55 -04:00
The form on which this widget is shown.
:rtype: QgsAttributeForm
2017-11-01 19:44:41 +01:00
%End
void setSearchWidgetWrapper( QgsSearchWidgetWrapper *wrapper );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the search widget wrapper for the widget used when the form is in
search mode.
:param wrapper: search widget wrapper.
.. note::
the search widget wrapper should be created using searchWidgetFrame()
2017-12-15 10:36:55 -04:00
as its parent
.. note::
this method is in place for unit testing only, and is not considered
2017-12-15 10:36:55 -04:00
stable API
%End
void addAdditionalSearchWidgetWrapper( QgsSearchWidgetWrapper *wrapper );
2017-11-02 18:06:14 +01:00
%Docstring
2017-12-15 10:36:55 -04:00
Adds an additional search widget wrapper.
Used to register a secondary search widget as used for "between" searches.
2017-11-02 18:06:14 +01:00
%End
QList< QgsSearchWidgetWrapper * > searchWidgetWrappers();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the search widget wrapper used in this widget. The wrapper must
first be created using createSearchWidgetWrapper()
:rtype: list of QgsSearchWidgetWrapper
.. note::
this method is in place for unit testing only, and is not considered
2017-12-15 10:36:55 -04:00
stable API
%End
void resetSearch();
%Docstring
2017-12-15 10:36:55 -04:00
Resets the search/filter value of the widget.
%End
bool searchWidgetToolButtonVisible() const;
%Docstring
2017-12-15 10:36:55 -04:00
The visibility of the search widget tool button, that allows (de)activating
this search widgte or defines the comparison operator to use.
:rtype: bool
%End
2017-11-21 08:29:02 +01:00
void setSearchWidgetToolButtonVisible( bool searchWidgetToolButtonVisible );
2017-11-21 08:29:02 +01:00
%Docstring
2017-12-15 10:36:55 -04:00
The visibility of the search widget tool button, that allows (de)activating
this search widgte or defines the comparison operator to use.
2017-11-21 08:29:02 +01:00
%End
protected:
2017-11-01 19:44:41 +01:00
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributeformwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/