mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
fix #2036
git-svn-id: http://svn.osgeo.org/qgis/trunk@11861 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
7dc2cd13aa
commit
f130f103c7
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user