QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Contains utility functions for working with data providers. More...
#include <qgsproviderutils.h>
Public Types | |
enum class | SublayerCompletenessFlag : int { IgnoreUnknownFeatureCount = 1 << 0 , IgnoreUnknownGeometryType = 1 << 1 } |
Flags which control how QgsProviderUtils::sublayerDetailsAreIncomplete() tests for completeness. More... | |
typedef QFlags< SublayerCompletenessFlag > | SublayerCompletenessFlags |
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. | |
static QString | suggestLayerNameFromFilePath (const QString &path) |
Suggests a suitable layer name given only a file path. | |
Contains utility functions for working with data providers.
Definition at line 33 of file qgsproviderutils.h.
typedef QFlags< SublayerCompletenessFlag > QgsProviderUtils::SublayerCompletenessFlags |
Definition at line 45 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 59 of file qgsproviderutils.cpp.