19 #ifndef QGSPROVIDERREGISTRY_H
20 #define QGSPROVIDERREGISTRY_H
29 #include "qgis_core.h"
107 Q_DECL_DEPRECATED QString library(
const QString &providerKey )
const SIP_DEPRECATED;
110 QString pluginList(
bool asHtml =
false )
const;
115 QDir libraryDirectory()
const;
118 void setLibraryDirectory(
const QDir &path );
148 const QString &dataSource,
150 QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() )
SIP_TRANSFERBACK;
158 Q_DECL_DEPRECATED
int providerCapabilities( const QString &providerKey ) const
SIP_DEPRECATED;
165 SIP_SKIP Qgis::VectorExportResult createEmptyLayer( const QString &providerKey, const QString &uri, const
QgsFields &fields,
QgsWkbTypes::Type wkbType, const
QgsCoordinateReferenceSystem &srs,
bool overwrite, QMap<
int,
int> &oldToNewAttrIdxMap, QString &errorMessage, const QMap<QString, QVariant> *options );
174 const QString &providerKey,
176 const QString &format,
179 int width,
int height,
180 double *geoTransform,
182 const QStringList &createOptions = QStringList() )
SIP_FACTORY;
189 QList<QPair<QString, QString> > pyramidResamplingMethods( const QString &providerKey );
199 QVariantMap decodeUri( const QString &providerKey, const QString &uri );
210 QString encodeUri( const QString &providerKey, const QVariantMap &parts );
232 int listStyles( const QString &providerKey,
236 QStringList &descriptions,
251 bool styleExists( const QString &providerKey, const QString &uri, const QString &styleId, QString &errorCause
SIP_OUT );
260 QString getStyleById( const QString &providerKey, const QString &uri, const QString &styleId, QString &errCause );
266 bool deleteStyleById( const QString &providerKey, const QString &uri, const QString &styleId, QString &errCause );
273 bool saveStyle( const QString &providerKey, const QString &uri, const QString &qmlStyle, const QString &sldStyle,
274 const QString &styleName, const QString &styleDescription,
275 const QString &uiFileContent,
bool useAsDefault, QString &errCause );
281 QString loadStyle( const QString &providerKey, const QString &uri, QString &errCause );
304 bool createDb( const QString &providerKey, const QString &dbPath, QString &errCause );
322 Q_DECL_DEPRECATED QFunctionPointer function( const QString &providerKey, const QString &functionName ) const
SIP_DEPRECATED;
336 QStringList providerList() const;
365 : mMetadata( metadata )
366 , mLayerTypes( layerTypes )
378 QList<QgsMapLayerType>
layerTypes()
const {
return mLayerTypes; }
381 SIP_PYOBJECT __repr__();
383 QString
str = QStringLiteral(
"<QgsProviderRegistry.ProviderCandidateDetails: %1>" ).arg( sipCpp->metadata()->key() );
384 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
391 QList< QgsMapLayerType > mLayerTypes;
411 QList< QgsProviderRegistry::ProviderCandidateDetails > preferredProvidersForUri(
const QString &uri )
const;
434 UnusableUriDetails(
const QString &uri = QString(),
const QString &warning = QString(),
const QList< QgsMapLayerType > &layerTypes = QList< QgsMapLayerType >() )
437 , layerTypes( layerTypes )
462 SIP_PYOBJECT __repr__();
464 QString
str = QStringLiteral(
"<QgsProviderRegistry.UnusableUriDetails: %1>" ).arg( sipCpp->warning );
465 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
493 virtual bool matchesUri(
const QString &uri )
const = 0;
555 bool shouldDeferUriForOtherProviders(
const QString &uri,
const QString &providerKey )
const;
570 bool uriIsBlocklisted(
const QString &uri )
const;
583 QList< QgsProviderSublayerDetails > querySublayers(
const QString &uri, Qgis::SublayerQueryFlags flags = Qgis::SublayerQueryFlags(),
QgsFeedback *feedback =
nullptr )
const;
595 QString fileVectorFilters()
const;
609 QString fileRasterFilters()
const;
624 QString fileMeshFilters()
const;
636 QString fileMeshDatasetFilters()
const;
650 QString filePointCloudFilters()
const;
653 QString databaseDrivers()
const;
655 QString directoryDrivers()
const;
657 QString protocolDrivers()
const;
662 Q_DECL_DEPRECATED
void registerGuis( QWidget *widget )
SIP_DEPRECATED;
690 QDir mLibraryDirectory;
701 QString mVectorFileFilters;
706 QString mRasterFileFilters;
711 QString mMeshFileFilters;
716 QString mMeshDatasetFileFilters;
721 QString mPointCloudFileFilters;
729 QString mDatabaseDrivers;
736 QString mDirectoryDrivers;
744 QString mProtocolDrivers;
746 QList< UnusableUriHandlerInterface * > mUnusableUriHandlers;
751 static bool exists();
757 #endif //QGSPROVIDERREGISTRY_H