26#include "moc_qgsprovidersublayertask.cpp"
31 , mIncludeSystemTables( includeSystemTables )
38 , mProviderKey( providerKey )
39 , mIncludeSystemTables( includeSystemTables )
53 mFeedback = std::make_unique< QgsFeedback >();
56 if ( mIncludeSystemTables )
59 QList<QgsProviderSublayerDetails> res;
60 if ( mProviderKey.isEmpty() )
@ IncludeSystemTables
Include system or internal tables (these are not included by default).
@ OpenLayersToResolveDescriptions
Attempt to open layers in order to resolve layer descriptions. May be slow and should never be done i...
@ CountFeatures
Count features in vector sublayers.
@ ResolveGeometryType
Attempt to resolve the geometry type for vector sublayers.
QFlags< SublayerQueryFlag > SublayerQueryFlags
Sublayer query flags.
QList< QgsProviderSublayerDetails > querySublayers(const QString &uri, Qgis::SublayerQueryFlags flags=Qgis::SublayerQueryFlags(), QgsFeedback *feedback=nullptr) const
Queries the specified uri and returns a list of any valid sublayers found in the dataset which can be...
static QgsProviderRegistry * instance(const QString &pluginPath=QString())
Means of accessing canonical single instance.
QgsProviderMetadata * providerMetadata(const QString &providerKey) const
Returns metadata of the provider or nullptr if not found.
QList< QgsProviderSublayerDetails > results() const
Returns the sublayer details as calculated by the task.
void cancel() override
Notifies the task that it should terminate.
QgsProviderSublayerTask(const QString &uri, bool includeSystemTables=false)
Constructor for QgsProviderSublayerTask, which retrieves sublayer details for the specified uri.
~QgsProviderSublayerTask() override
bool run() override
Performs the task's operation.
A convenience class that simplifies locking and unlocking QReadWriteLocks.
Flags flags() const
Returns the flags associated with the task.
virtual void cancel()
Notifies the task that it should terminate.
QgsTask(const QString &description=QString(), QgsTask::Flags flags=AllFlags)
Constructor for QgsTask.
@ CanCancel
Task can be canceled.
@ CancelWithoutPrompt
Task can be canceled without any users prompts, e.g. when closing a project or QGIS.
@ Silent
Don't show task updates (such as completion/failure messages) as operating-system level notifications...