189 PriorityForUri = 1 << 0,
190 LayerTypesForUri = 1 << 1,
191 QuerySublayers = 1 << 2,
192 CreateDatabase = 1 << 3,
203 FileBasedUris = 1 << 0,
204 SaveLayerMetadata = 1 << 1,
205 ParallelCreateProvider = 1 << 2,
220 QgsProviderMetadata( const QString &key, const QString &description, const QString &library = QString() );
243 QString description() const;
250 virtual QIcon icon() const;
272 virtual QList< Qgis::LayerType > supportedLayerTypes()
const;
274 SIP_PYOBJECT supportedLayerTypes() const
SIP_TYPEHINT( List[
Qgis.LayerType] );
278 const QList<
Qgis::LayerType > cppRes = sipCpp->supportedLayerTypes();
280 PyObject *l = PyList_New( cppRes.size() );
286 for (
int i = 0; i < cppRes.size(); ++i )
288 PyObject *eobj = sipConvertFromEnum(
static_cast<int>( cppRes.at( i ) ),
289 sipType_Qgis_LayerType );
296 PyList_SetItem( l, i, eobj );
326 SIP_SKIP Q_DECL_DEPRECATED CreateDataProviderFunction createFunction() const;
332 virtual
void initProvider();
338 virtual
void cleanupProvider();
347 virtual QString filters(
Qgis::FileFilterType type );
371 virtual
int priorityForUri( const QString &uri ) const;
383 virtual QList<
Qgis::LayerType > validLayerTypesForUri( const QString &uri ) const;
401 virtual
bool uriIsBlocklisted( const QString &uri ) const;
424 virtual QStringList sidecarFilesForUri( const QString &uri ) const;
450 virtual QString suggestGroupNameForUri( const QString &uri ) const;
471 static
void setBoolParameter( QVariantMap &uri, const QString ¶meter, const QVariant &value );
479 static
bool boolParameter( const QVariantMap &uri, const QString ¶meter,
bool defaultValue = false );
494 QMap<int, int> &oldToNewAttrIdxMap,
495 QString &errorMessage,
496 const QMap<QString, QVariant> *options );
514 virtual bool createDatabase(
const QString &uri, QString &errorMessage
SIP_OUT );
522 const QString &format,
527 double *geoTransform,
529 const QStringList &createOptions = QStringList() )
SIP_FACTORY;
536 virtual
bool createMeshData(
538 const QString &fileName,
539 const QString &driverName,
541 const QMap<QString, QString> &metadata = QMap<QString, QString>() ) const;
548 virtual
bool createMeshData(
552 const QMap<QString, QString> &metadata = QMap<QString, QString>() ) const;
558 virtual QList<QPair<QString, QString> > pyramidResamplingMethods();
577 virtual QVariantMap decodeUri( const QString &uri ) const;
587 virtual QString encodeUri( const QVariantMap &parts ) const;
600 virtual QString absoluteToRelativeUri( const QString &uri, const
QgsReadWriteContext &context ) const;
613 virtual QString relativeToAbsoluteUri( const QString &uri, const
QgsReadWriteContext &context ) const;
628 virtual
int listStyles( const QString &uri, QStringList &ids, QStringList &names,
629 QStringList &descriptions, QString &errCause );
642 virtual
bool styleExists( const QString &uri, const QString &styleId, QString &errorCause
SIP_OUT );
651 virtual QString getStyleById( const QString &uri, const QString &styleId, QString &errCause );
657 virtual
bool deleteStyleById( const QString &uri, const QString &styleId, QString &errCause );
670 virtual
bool saveStyle( const QString &uri, const QString &qmlStyle, const QString &sldStyle,
671 const QString &styleName, const QString &styleDescription,
672 const QString &uiFileContent,
bool useAsDefault, QString &errCause );
678 virtual QString loadStyle( const QString &uri, QString &errCause );
688 virtual QString loadStoredStyle( const QString &uri, QString &styleName, QString &errCause );
710 virtual
bool createDb( const QString &dbPath, QString &errCause );
760 template <
typename T> QMap<QString, T *>connections(
bool cached =
true );
802 SIP_PYOBJECT __repr__();
804 QString
str = QStringLiteral(
"<QgsProviderMetadata: %1>" ).arg( sipCpp->key() );
805 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
846 template <
class T_prov
ider_conn,
class T_conn> QMap<QString, QgsAbstractProviderConnection *> connectionsProtected(
bool cached =
true )
848 if ( ! cached || mProviderConnections.isEmpty() )
850 qDeleteAll( mProviderConnections );
851 mProviderConnections.clear();
852 const auto connNames { T_conn::connectionList() };
853 for (
const auto &cname : connNames )
855 mProviderConnections.insert( cname,
new T_provider_conn( cname ) );
858 return mProviderConnections;
861 template <
class T_prov
ider_conn>
void deleteConnectionProtected(
const QString &name )
863 T_provider_conn conn( name );
865 mProviderConnections.clear();
866 emit connectionDeleted( name );
870 QMap<QString, QgsAbstractProviderConnection *> mProviderConnections;
882 QString mDescription;
888 CreateDataProviderFunction mCreateFunction =
nullptr;
The class is used as a container of context for various read/write operations on other objects.
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)