QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Contains utility functions for working with data providers. More...
#include <qgsproviderutils.h>
Public Types | |
enum | SublayerCompletenessFlag : int { SublayerCompletenessFlag::IgnoreUnknownFeatureCount = 1 << 0, SublayerCompletenessFlag::IgnoreUnknownGeometryType = 1 << 1 } |
Flags which control how QgsProviderUtils::sublayerDetailsAreIncomplete() tests for completeness. More... | |
Static Public Member Functions | |
static bool | sublayerDetailsAreIncomplete (const QList< QgsProviderSublayerDetails > &details, QgsProviderUtils::SublayerCompletenessFlags flags=QgsProviderUtils::SublayerCompletenessFlags()) |
Returns true if the sublayer details are incomplete, and require a more in-depth scan. More... | |
static QString | suggestLayerNameFromFilePath (const QString &path) |
Suggests a suitable layer name given only a file path. More... | |
Contains utility functions for working with data providers.
Definition at line 33 of file qgsproviderutils.h.
|
strong |
Flags which control how QgsProviderUtils::sublayerDetailsAreIncomplete() tests for completeness.
Definition at line 40 of file qgsproviderutils.h.
|
static |
Returns true
if the sublayer details are incomplete, and require a more in-depth scan.
For instance, if the details contain any vector sublayers with unknown geometry types then a query with the Qgis::SublayerQueryFlag::ResolveGeometryType flag is required.
The flags argument can be used to control the level of completeness required during the test.
Definition at line 22 of file qgsproviderutils.cpp.
|
static |
Suggests a suitable layer name given only a file path.
Usually this corresponds to the base file name of path (e.g. "rivers" for a path of "c:/my data/water/rivers.shp"). However some data formats which use fixed file paths (such as aigrid files) will instead return the parent directory name (e.g. "rivers" for a path of "c:/my data/water/rivers/hdr.adf").
Definition at line 54 of file qgsproviderutils.cpp.