-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Add QgsFeatureListComboBox with live-filter-capabilities
- Loading branch information
Showing
12 changed files
with
1,281 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsfeaturefiltermodel.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsFeatureFilterModel : QAbstractItemModel | ||
{ | ||
%Docstring | ||
Provides a list of features based on filter conditions. | ||
Features are fetched asynchronously. | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsfeaturefiltermodel.h" | ||
%End | ||
public: | ||
enum Role | ||
{ | ||
IdentifierValueRole, | ||
ValueRole | ||
}; | ||
|
||
QgsFeatureFilterModel( QObject *parent = 0 ); | ||
~QgsFeatureFilterModel(); | ||
|
||
QgsVectorLayer *sourceLayer() const; | ||
%Docstring | ||
:rtype: QgsVectorLayer | ||
%End | ||
void setSourceLayer( QgsVectorLayer *sourceLayer ); | ||
|
||
QString displayExpression() const; | ||
%Docstring | ||
:rtype: str | ||
%End | ||
void setDisplayExpression( const QString &displayExpression ); | ||
|
||
QString filterValue() const; | ||
%Docstring | ||
:rtype: str | ||
%End | ||
void setFilterValue( const QString &filterValue ); | ||
|
||
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. | ||
:rtype: str | ||
%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 | ||
:rtype: bool | ||
%End | ||
|
||
QString identifierField() const; | ||
%Docstring | ||
:rtype: str | ||
%End | ||
void setIdentifierField( const QString &identifierField ); | ||
|
||
QVariant extraIdentifierValue() const; | ||
%Docstring | ||
:rtype: QVariant | ||
%End | ||
void setExtraIdentifierValue( const QVariant &extraIdentifierValue ); | ||
|
||
int extraIdentifierValueIndex() const; | ||
%Docstring | ||
:rtype: int | ||
%End | ||
|
||
bool extraValueDoesNotExist() const; | ||
%Docstring | ||
:rtype: bool | ||
%End | ||
|
||
signals: | ||
void sourceLayerChanged(); | ||
void displayExpressionChanged(); | ||
void filterValueChanged(); | ||
void filterExpressionChanged(); | ||
void isLoadingChanged(); | ||
void identifierFieldChanged(); | ||
void filterJobCompleted(); | ||
void extraIdentifierValueChanged(); | ||
void extraIdentifierValueIndexChanged( int index ); | ||
void extraValueDoesNotExistChanged(); | ||
void beginUpdate(); | ||
void endUpdate(); | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsfeaturefiltermodel.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
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,104 @@ | ||
/************************************************************************ | ||
* 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 | ||
************************************************************************* | ||
qgsfieldlistcombobox.h - QgsFieldListComboBox | ||
|
||
--------------------- | ||
begin : 10.3.2017 | ||
copyright : (C) 2017 by Matthias Kuhn | ||
email : matthias@opengis.ch | ||
************************************************************************** | ||
* | ||
This program is free software; you can redistribute it and/or modify * | ||
it under the terms of the GNU General Public License as published by * | ||
the Free Software Foundation; either version 2 of the License, or * | ||
(at your option) any later version. * | ||
* | ||
************************************************************************** | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsfeaturelistcombobox.h" | ||
%End | ||
public: | ||
QgsFeatureListComboBox( QWidget *parent = 0 ); | ||
|
||
QgsVectorLayer *sourceLayer() const; | ||
%Docstring | ||
:rtype: QgsVectorLayer | ||
%End | ||
void setSourceLayer( QgsVectorLayer *sourceLayer ); | ||
|
||
QString displayExpression() const; | ||
%Docstring | ||
:rtype: str | ||
%End | ||
void setDisplayExpression( const QString &displayExpression ); | ||
|
||
QString filterExpression() const; | ||
%Docstring | ||
:rtype: str | ||
%End | ||
void setFilterExpression( const QString &filterExpression ); | ||
|
||
QVariant identifierValue() const; | ||
%Docstring | ||
:rtype: QVariant | ||
%End | ||
void setIdentifierValue( const QVariant &identifierValue ); | ||
|
||
QgsFeatureRequest currentFeatureRequest() const; | ||
%Docstring | ||
:rtype: QgsFeatureRequest | ||
%End | ||
|
||
bool allowNull() const; | ||
%Docstring | ||
:rtype: bool | ||
%End | ||
void setAllowNull( bool allowNull ); | ||
|
||
QString identifierField() const; | ||
%Docstring | ||
:rtype: str | ||
%End | ||
void setIdentifierField( const QString &identifierField ); | ||
|
||
QModelIndex currentModelIndex() const; | ||
%Docstring | ||
:rtype: QModelIndex | ||
%End | ||
|
||
virtual void focusOutEvent( QFocusEvent *event ); | ||
|
||
virtual void keyPressEvent( QKeyEvent *event ); | ||
|
||
signals: | ||
void sourceLayerChanged(); | ||
void displayExpressionChanged(); | ||
void filterExpressionChanged(); | ||
void identifierValueChanged(); | ||
void identifierFieldChanged(); | ||
void allowNullChanged(); | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsfeaturelistcombobox.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.