Skip to content
Permalink
Browse files

Add expression constructor to QgsFeatureRequest

  • Loading branch information
m-kuhn committed Oct 31, 2013
1 parent d8e5c2f commit 5cd75663f3270c8d9da387b91b2caa80f608b026
Showing with 11 additions and 0 deletions.
  1. +2 −0 python/core/qgsfeaturerequest.sip
  2. +7 −0 src/core/qgsfeaturerequest.cpp
  3. +2 −0 src/core/qgsfeaturerequest.h
@@ -30,6 +30,8 @@ class QgsFeatureRequest
explicit QgsFeatureRequest( QgsFeatureId fid );
//! construct a request with rectangle filter
explicit QgsFeatureRequest( const QgsRectangle& rect );
//! construct a request with a filter expression
explicit QgsFeatureRequest( const QgsExpression& expression );

FilterType filterType() const;

@@ -42,6 +42,13 @@ QgsFeatureRequest::QgsFeatureRequest( const QgsRectangle& rect )
{
}

QgsFeatureRequest::QgsFeatureRequest( const QgsExpression& expr )
: mFilter( FilterExpression )
, mFilterExpression( new QgsExpression( expr.dump() ) )
, mFlags( 0 )
{
}

QgsFeatureRequest::QgsFeatureRequest( const QgsFeatureRequest &rh )
{
operator=( rh );
@@ -80,6 +80,8 @@ class CORE_EXPORT QgsFeatureRequest
explicit QgsFeatureRequest( QgsFeatureId fid );
//! construct a request with rectangle filter
explicit QgsFeatureRequest( const QgsRectangle& rect );
//! construct a request with a filter expression
explicit QgsFeatureRequest( const QgsExpression& expr );
//! copy constructor
QgsFeatureRequest( const QgsFeatureRequest& rh );

0 comments on commit 5cd7566

Please sign in to comment.
You can’t perform that action at this time.