Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,664 additions
and
85 deletions.
There are no files selected for viewing
199 changes: 199 additions & 0 deletions
199
python/core/auto_generated/qgsfeaturechoosermodel.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsfeaturechoosermodel.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
class QgsFeatureChooserModel : QAbstractItemModel | ||
{ | ||
%Docstring | ||
Provides a list of features based on filter conditions. | ||
Features are fetched asynchronously. | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsfeaturechoosermodel.h" | ||
%End | ||
public: | ||
|
||
enum Role | ||
{ | ||
ValueRole, | ||
FeatureRole, | ||
FeatureIdRole | ||
}; | ||
|
||
explicit QgsFeatureChooserModel( QObject *parent = 0 ); | ||
%Docstring | ||
Create a new QgsFeatureChooserModel, optionally specifying a ``parent``. | ||
%End | ||
~QgsFeatureChooserModel(); | ||
|
||
QgsVectorLayer *sourceLayer() const; | ||
%Docstring | ||
The source layer from which features will be fetched. | ||
%End | ||
|
||
void setSourceLayer( QgsVectorLayer *sourceLayer ); | ||
%Docstring | ||
The source layer from which features will be fetched. | ||
%End | ||
|
||
QString displayExpression() const; | ||
%Docstring | ||
The display expression will be used for | ||
|
||
- displaying values in the combobox | ||
- filtering based on filterValue | ||
%End | ||
|
||
void setDisplayExpression( const QString &displayExpression ); | ||
%Docstring | ||
The display expression will be used for | ||
|
||
- displaying values in the combobox | ||
- filtering based on filterValue | ||
%End | ||
|
||
QString filterValue() const; | ||
%Docstring | ||
This value will be used to filter the features available from | ||
this model. Whenever a substring of the displayExpression of a feature | ||
matches the filter value, it will be accessible by this model. | ||
%End | ||
|
||
void setFilterValue( const QString &filterValue ); | ||
%Docstring | ||
This value will be used to filter the features available from | ||
this model. Whenever a substring of the displayExpression of a feature | ||
matches the filter value, it will be accessible by this model. | ||
%End | ||
|
||
virtual QModelIndex index( int row, int column, const QModelIndex &parent ) const; | ||
|
||
virtual QModelIndex parent( const QModelIndex &child ) const; | ||
|
||
virtual int rowCount( const QModelIndex &parent ) const; | ||
|
||
virtual int columnCount( const QModelIndex &parent ) const; | ||
|
||
virtual QVariant data( const QModelIndex &index, int role ) const; | ||
|
||
|
||
QString filterExpression() const; | ||
%Docstring | ||
An additional filter expression to apply, next to the filterValue. | ||
Can be used for spatial filtering etc. | ||
%End | ||
|
||
void setFilterExpression( const QString &filterExpression ); | ||
%Docstring | ||
An additional filter expression to apply, next to the filterValue. | ||
Can be used for spatial filtering etc. | ||
%End | ||
|
||
bool isLoading() const; | ||
%Docstring | ||
Indicator if the model is currently performing any feature iteration in the background. | ||
%End | ||
|
||
bool allowNull() const; | ||
%Docstring | ||
Add a NULL entry to the list. | ||
%End | ||
|
||
void setAllowNull( bool allowNull ); | ||
%Docstring | ||
Add a NULL entry to the list. | ||
%End | ||
|
||
QgsFeature currentFeature() const; | ||
|
||
void setCurrentFeature( const QgsFeatureId &featureId ); | ||
%Docstring | ||
Sets the current feature id | ||
%End | ||
|
||
int currentIndex() const; | ||
%Docstring | ||
Returns the current index | ||
%End | ||
|
||
signals: | ||
|
||
void currentIndexChanged( int index ); | ||
%Docstring | ||
Emitted when the current index changed | ||
%End | ||
|
||
void currentFeatureChanged( const QgsFeature &feature ); | ||
%Docstring | ||
Emitted when the current feature changed | ||
%End | ||
|
||
void sourceLayerChanged(); | ||
%Docstring | ||
The source layer from which features will be fetched. | ||
%End | ||
|
||
void displayExpressionChanged(); | ||
%Docstring | ||
The display expression will be used for | ||
|
||
- displaying values in the combobox | ||
- filtering based on filterValue | ||
%End | ||
|
||
void filterValueChanged(); | ||
%Docstring | ||
This value will be used to filter the features available from | ||
this model. Whenever a substring of the displayExpression of a feature | ||
matches the filter value, it will be accessible by this model. | ||
%End | ||
|
||
void filterExpressionChanged(); | ||
%Docstring | ||
An additional filter expression to apply, next to the filterValue. | ||
Can be used for spatial filtering etc. | ||
%End | ||
|
||
void isLoadingChanged(); | ||
%Docstring | ||
Indicator if the model is currently performing any feature iteration in the background. | ||
%End | ||
|
||
void filterJobCompleted(); | ||
%Docstring | ||
Indicates that a filter job has been completed and new data may be available. | ||
%End | ||
|
||
void beginUpdate(); | ||
%Docstring | ||
Notification that the model is about to be changed because a job was completed. | ||
%End | ||
|
||
void endUpdate(); | ||
%Docstring | ||
Notification that the model change is finished. Will always be emitted in sync with beginUpdate. | ||
%End | ||
|
||
void allowNullChanged(); | ||
%Docstring | ||
Add a NULL entry to the list. | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsfeaturechoosermodel.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
|
||
|
||
|
||
|
||
class QgsFeatureFilterModel : QAbstractItemModel | ||
{ | ||
%Docstring | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
150 changes: 150 additions & 0 deletions
150
python/gui/auto_generated/qgsfeaturechooserwidget.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsfeaturechooserwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class QgsFeatureChooserWidget : QWidget | ||
{ | ||
%Docstring | ||
This offers a combobox with autocompleter that allows selecting features from a layer. | ||
|
||
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 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsfeaturechooserwidget.h" | ||
%End | ||
public: | ||
|
||
QgsFeatureChooserWidget( QWidget *parent = 0 ); | ||
%Docstring | ||
Create a new QgsFeatureChooserWidget, optionally specifying a ``parent``. | ||
%End | ||
|
||
QgsVectorLayer *layer() const; | ||
%Docstring | ||
The layer from which features should be listed. | ||
%End | ||
|
||
void setLayer( QgsVectorLayer *layer ); | ||
%Docstring | ||
The layer from which features should be listed. | ||
%End | ||
|
||
void setCurrentFeature( const QgsFeature &feature ); | ||
%Docstring | ||
Sets the current index by using the given feature | ||
%End | ||
|
||
QString displayExpression() const; | ||
%Docstring | ||
The display expression will be used to display features as well as | ||
the value to match the typed text against. | ||
%End | ||
|
||
void setDisplayExpression( const QString &displayExpression ); | ||
%Docstring | ||
The display expression will be used to display features as well as | ||
the value to match the typed text against. | ||
%End | ||
|
||
QString filterExpression() const; | ||
%Docstring | ||
An additional expression to further restrict the available features. | ||
This can be used to integrate additional spatial or other constraints. | ||
%End | ||
|
||
int nullIndex() const; | ||
%Docstring | ||
Returns the current index of the NULL value, or -1 if NULL values are | ||
not allowed. | ||
|
||
.. versionadded:: 3.2 | ||
%End | ||
|
||
void setFilterExpression( const QString &filterExpression ); | ||
%Docstring | ||
An additional expression to further restrict the available features. | ||
This can be used to integrate additional spatial or other constraints. | ||
|
||
TODO! | ||
%End | ||
|
||
bool allowNull() const; | ||
%Docstring | ||
Determines if a NULL value should be available in the list. | ||
%End | ||
|
||
void setAllowNull( bool allowNull ); | ||
%Docstring | ||
Determines if a NULL value should be available in the list. | ||
%End | ||
|
||
QModelIndex currentModelIndex() const; | ||
%Docstring | ||
The index of the currently selected item. | ||
%End | ||
|
||
virtual void focusOutEvent( QFocusEvent *event ); | ||
|
||
|
||
virtual void keyPressEvent( QKeyEvent *event ); | ||
|
||
|
||
signals: | ||
|
||
void modelUpdated(); | ||
%Docstring | ||
The underlying model has been updated. | ||
|
||
.. versionadded:: 3.2 | ||
%End | ||
|
||
void layerChanged(); | ||
%Docstring | ||
The layer from which features should be listed. | ||
%End | ||
|
||
void displayExpressionChanged(); | ||
%Docstring | ||
The display expression will be used to display features as well as | ||
the the value to match the typed text against. | ||
%End | ||
|
||
void filterExpressionChanged(); | ||
%Docstring | ||
An additional expression to further restrict the available features. | ||
This can be used to integrate additional spatial or other constraints. | ||
%End | ||
|
||
void allowNullChanged(); | ||
%Docstring | ||
Determines if a NULL value should be available in the list. | ||
%End | ||
|
||
void currentFeatureChanged( const QgsFeature &feature ); | ||
%Docstring | ||
Sends the feature as soon as it is chosen | ||
%End | ||
|
||
}; | ||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsfeaturechooserwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.