QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
qgsrunnableprovidercreator.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsrunnableprovidercreator.h - QgsRunnableProviderCreator
3
4 ---------------------
5 begin : 20.3.2023
6 copyright : (C) 2023 by Vincent Cloarec
7 email : vcloarec at gmail dot com
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16#ifndef QGSRUNNABLEPROVIDERCREATOR_H
17#define QGSRUNNABLEPROVIDERCREATOR_H
18
19#include <QRunnable>
20#include <QObject>
21
22#include "qgsdataprovider.h"
23
24#define SIP_NO_FILE
25
33class QgsRunnableProviderCreator : public QObject, public QRunnable
34{
35 Q_OBJECT
36 public:
37
39 QgsRunnableProviderCreator( const QString &layerId,
40 QString const &providerKey,
41 QString const &dataSource,
44
45 void run() override;
46
53
54 signals:
56 void providerCreated( bool isValid, const QString &layerId );
57
58 private:
59 std::unique_ptr<QgsDataProvider> mDataProvider;
60 QString mLayerId;
61 QString mProviderKey;
62 QString mDataSource;
65};
66
67#endif // QGSRUNNABLEPROVIDERCREATOR_H
QFlags< DataProviderReadFlag > DataProviderReadFlags
Flags which control data provider construction.
Definition qgis.h:450
Abstract base class for spatial data provider implementations.
The QgsRunnableProviderCreator class is used when reading a project to create asynchronously provider...
void providerCreated(bool isValid, const QString &layerId)
Emitted when a provider is created with isValid set to True when the provider is valid.
QgsDataProvider * dataProvider()
Returns the created data provider.
Setting options for creating vector data providers.