Ejemplo n.º 1
0
bool QgsAuxiliaryLayer::clear()
{
  bool rc = deleteFeatures( allFeatureIds() );
  commitChanges();
  startEditing();
  return rc;
}
Ejemplo n.º 2
0
bool QgsVectorDataProvider::truncate()
{
  if ( !( capabilities() & DeleteFeatures ) )
    return false;

  QgsFeatureIds toDelete;
  QgsFeatureIterator it = getFeatures( QgsFeatureRequest().setFlags( QgsFeatureRequest::NoGeometry ).setNoAttributes() );
  QgsFeature f;
  while ( it.nextFeature( f ) )
    toDelete << f.id();

  return deleteFeatures( toDelete );
}
/*virtual*/ CharFeatureCollection::~CharFeatureCollection()
{
	deleteFeatures();
	mDataMatrix.clear();
	mImageCharFeatureVec.clear();
}