Skip to content
Permalink
Browse files

fix #2036

git-svn-id: http://svn.osgeo.org/qgis/trunk@11861 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Oct 28, 2009
1 parent 7dc2cd1 commit f130f103c71beaa45da4f9c98923a497de90756a
@@ -66,6 +66,11 @@ class QgsDataProvider : QObject
*/
virtual bool setSubsetString(QString subset);

/**
* provider supports setting of subset strings
* @note added in 1.4
*/
virtual bool supportsSubsetString();

/**
* Returns the subset definition string (typically sql) currently in
@@ -438,7 +438,7 @@ void QgsVectorLayerProperties::reset( void )
// on the builder. If the ability to enter a query directly into the box is required,
// a mechanism to check it must be implemented.
txtSubsetSQL->setEnabled( false );
pbnQueryBuilder->setEnabled( true );
pbnQueryBuilder->setEnabled( layer && layer->dataProvider() && layer->dataProvider()->supportsSubsetString() );

//get field list for display field combo
const QgsFieldMap& myFields = layer->pendingFields();
@@ -121,6 +121,12 @@ class CORE_EXPORT QgsDataProvider : public QObject
}


/**
* provider supports setting of subset strings
* @note added in 1.4
*/
virtual bool supportsSubsetString() { return false; }

/**
* Returns the subset definition string (typically sql) currently in
* use by the layer and used by the provider to limit the feature set.
@@ -95,6 +95,8 @@ class QgsOgrProvider : public QgsVectorDataProvider
/** Accessor for sql where clause used to limit dataset */
virtual QString subsetString();

virtual bool supportsSubsetString() { return true; }

/** mutator for sql where clause used to limit dataset size */
virtual bool setSubsetString( QString theSQL );

@@ -255,6 +255,8 @@ class QgsPostgresProvider : public QgsVectorDataProvider
/** mutator for sql where clause used to limit dataset size */
bool setSubsetString( QString theSQL );

virtual bool supportsSubsetString() { return true; }

/**Returns a bitmask containing the supported capabilities*/
int capabilities() const;

@@ -81,6 +81,8 @@ class QgsSpatiaLiteProvider: public QgsVectorDataProvider
/** mutator for sql where clause used to limit dataset size */
virtual bool setSubsetString( QString theSQL );

virtual bool supportsSubsetString() { return true; }

/** Select features based on a bounding rectangle. Features can be retrieved with calls to nextFeature.
* @param fetchAttributes list of attributes which should be fetched
* @param rect spatial filter

0 comments on commit f130f10

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