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