QGIS/python/gui/qgsfeaturelistcombobox.sip

179 lines
4.8 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsfeaturelistcombobox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsFeatureListComboBox : QComboBox
{
%Docstring
2017-12-15 10:36:55 -04:00
This offers a combobox with autocompleter that allows selecting features from a layer.
2017-10-25 01:44:11 +02:00
2017-12-15 10:36:55 -04:00
It will show up to 100 entries at a time. The entries can be chosen based on the displayExpression
and whenever text is typed into the combobox, the completer and popup will adjust to features matching the typed text.
2017-10-25 01:44:11 +02:00
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgsfeaturelistcombobox.h"
%End
public:
2017-10-25 15:10:10 +02:00
QgsFeatureListComboBox( QWidget *parent = 0 );
2017-10-25 15:10:10 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Create a new QgsFeatureListComboBox, optionally specifying a ``parent``.
2017-10-25 15:10:10 +02:00
%End
QgsVectorLayer *sourceLayer() const;
%Docstring
2017-12-15 10:36:55 -04:00
The layer from which features should be listed.
:rtype: QgsVectorLayer
%End
2017-10-25 01:44:11 +02:00
void setSourceLayer( QgsVectorLayer *sourceLayer );
2017-10-25 01:44:11 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The layer from which features should be listed.
2017-10-25 01:44:11 +02:00
%End
QString displayExpression() const;
%Docstring
2017-12-15 10:36:55 -04:00
The display expression will be used to display features as well as
the the value to match the typed text against.
:rtype: str
%End
2017-10-25 01:44:11 +02:00
void setDisplayExpression( const QString &displayExpression );
2017-10-25 01:44:11 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The display expression will be used to display features as well as
the the value to match the typed text against.
2017-10-25 01:44:11 +02:00
%End
QString filterExpression() const;
%Docstring
2017-12-15 10:36:55 -04:00
An additional expression to further restrict the available features.
This can be used to integrate additional spatial or other constraints.
:rtype: str
%End
2017-10-25 01:44:11 +02:00
void setFilterExpression( const QString &filterExpression );
2017-10-25 01:44:11 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
An additional expression to further restrict the available features.
This can be used to integrate additional spatial or other constraints.
2017-10-25 01:44:11 +02:00
2017-12-15 10:36:55 -04:00
TODO!
2017-10-25 01:44:11 +02:00
%End
QVariant identifierValue() const;
%Docstring
2017-12-15 10:36:55 -04:00
The identifier value of the currently selected feature. A value from the
identifierField.
:rtype: QVariant
%End
2017-10-25 01:44:11 +02:00
void setIdentifierValue( const QVariant &identifierValue );
2017-10-25 01:44:11 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The identifier value of the currently selected feature. A value from the
identifierField.
2017-10-25 01:44:11 +02:00
%End
QgsFeatureRequest currentFeatureRequest() const;
%Docstring
2017-12-15 10:36:55 -04:00
Shorthand for getting a feature request to query the currently selected
feature.
:rtype: QgsFeatureRequest
%End
bool allowNull() const;
%Docstring
2017-12-15 10:36:55 -04:00
Determines if a NULL value should be available in the list.
:rtype: bool
%End
2017-10-25 01:44:11 +02:00
void setAllowNull( bool allowNull );
2017-10-25 01:44:11 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Determines if a NULL value should be available in the list.
2017-10-25 01:44:11 +02:00
%End
QString identifierField() const;
%Docstring
2017-12-15 10:36:55 -04:00
Field name that will be used to uniquely identify the current feature.
Normally the primary key of the layer.
:rtype: str
%End
2017-10-25 01:44:11 +02:00
void setIdentifierField( const QString &identifierField );
2017-10-25 01:44:11 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Field name that will be used to uniquely identify the current feature.
Normally the primary key of the layer.
2017-10-25 01:44:11 +02:00
%End
QModelIndex currentModelIndex() const;
%Docstring
2017-12-15 10:36:55 -04:00
The index of the currently selected item.
:rtype: QModelIndex
%End
virtual void focusOutEvent( QFocusEvent *event );
virtual void keyPressEvent( QKeyEvent *event );
signals:
2017-10-25 01:44:11 +02:00
void sourceLayerChanged();
2017-10-25 01:44:11 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The layer from which features should be listed.
2017-10-25 01:44:11 +02:00
%End
void displayExpressionChanged();
2017-10-25 01:44:11 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The display expression will be used to display features as well as
the the value to match the typed text against.
2017-10-25 01:44:11 +02:00
%End
void filterExpressionChanged();
2017-10-25 01:44:11 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
An additional expression to further restrict the available features.
This can be used to integrate additional spatial or other constraints.
2017-10-25 01:44:11 +02:00
%End
void identifierValueChanged();
2017-10-25 01:44:11 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The identifier value of the currently selected feature. A value from the
identifierField.
2017-10-25 01:44:11 +02:00
%End
void identifierFieldChanged();
2017-10-25 01:44:11 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Field name that will be used to uniquely identify the current feature.
Normally the primary key of the layer.
2017-10-25 01:44:11 +02:00
%End
void allowNullChanged();
2017-10-25 01:44:11 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Determines if a NULL value should be available in the list.
2017-10-25 01:44:11 +02:00
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsfeaturelistcombobox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/