Skip to content
Permalink
Browse files
isValid() function for the wfs provider
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6054 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Nov 6, 2006
1 parent a4c7d41 commit dde9fa67d0b59623fd86273a10ccd6f7cfaa146a
Showing with 8 additions and 6 deletions.
  1. +6 −6 src/providers/wfs/qgswfsprovider.cpp
  2. +2 −0 src/providers/wfs/qgswfsprovider.h
@@ -36,18 +36,18 @@ static const QString TEXT_PROVIDER_DESCRIPTION = "WFS data provider";
static const QString WFS_NAMESPACE = "http://www.opengis.net/wfs";
static const QString GML_NAMESPACE = "http://www.opengis.net/gml";

QgsWFSProvider::QgsWFSProvider(const QString& uri): QgsVectorDataProvider(uri), mUseIntersect(false), mSourceSRS(0), mSelectedFeatures(0), mFeatureCount(0)
QgsWFSProvider::QgsWFSProvider(const QString& uri): QgsVectorDataProvider(uri), mUseIntersect(false), mSourceSRS(0), mSelectedFeatures(0), mFeatureCount(0), mValid(true)
{
if(getFeature(uri) == 0)
{
//provider valid
mValid = true;
//set spatial filter to the whole extent
select(&mExtent, false);
}
else
{
//provider invalid
mValid = false;
}
//set spatial filter to the whole extent
select(&mExtent, false);
}

QgsWFSProvider::~QgsWFSProvider()
@@ -233,7 +233,7 @@ QgsRect* QgsWFSProvider::extent()

bool QgsWFSProvider::isValid()
{
return true;
return mValid;
}

void QgsWFSProvider::select(QgsRect *mbr, bool useIntersect)
@@ -99,6 +99,8 @@ class QgsWFSProvider: public QgsVectorDataProvider
The position in the vector is equal to the position of an attribute in the layers attribute vector*/
std::vector< std::pair<QString, QString> > mMinMaxCash;
int mFeatureCount;
/**Flag if provider is valid*/
bool mValid;

/**Goes through all the features and their attributes and populates mMinMaxCash with entries*/
void fillMinMaxCash();

0 comments on commit dde9fa6

Please sign in to comment.