67 CanWriteFaceDatasets = 1 << 0,
68 CanWriteVertexDatasets = 1 << 1,
69 CanWriteEdgeDatasets = 1 << 2,
70 CanWriteMeshData = 1 << 3,
73 Q_ENUM( MeshDriverCapability )
74 Q_DECLARE_FLAGS( MeshDriverCapabilities, MeshDriverCapability )
75 Q_FLAG( MeshDriverCapabilities )
91 const QString &description,
92 const MeshDriverCapabilities &capabilities,
108 const QString &description,
109 const MeshDriverCapabilities &capabilities,
110 const QString &writeDatasetOnFileSuffix,
111 const QString &writeMeshFrameOnFileSuffix,
112 int maxVerticesPerface );
117 MeshDriverCapabilities capabilities() const;
122 QString name() const;
127 QString description() const;
132 QString writeDatasetOnFileSuffix() const;
139 QString writeMeshFrameOnFileSuffix() const;
146 int maximumVerticesCountPerFace() const;
150 QString mDescription;
151 MeshDriverCapabilities mCapabilities;
152 QString mWriteDatasetOnFileSuffix;
153 QString mWriteMeshFrameOnFileSuffix;
154 int mMaxVerticesPerFace = -1;
189 PriorityForUri = 1 << 0,
190 LayerTypesForUri = 1 << 1,
191 QuerySublayers = 1 << 2,
192 CreateDatabase = 1 << 3,
194 Q_DECLARE_FLAGS( ProviderMetadataCapabilities, ProviderMetadataCapability )
203 FileBasedUris = 1 << 0,
204 SaveLayerMetadata = 1 << 1,
205 ParallelCreateProvider = 1 << 2,
207 Q_DECLARE_FLAGS( ProviderCapabilities, ProviderCapability )
221 QgsProviderMetadata( const QString &key, const QString &description, const QString &library = QString() );
246 QString description() const;
253 virtual QIcon icon() const;
275 virtual QList< Qgis::LayerType > supportedLayerTypes()
const;
277 SIP_PYOBJECT supportedLayerTypes() const
SIP_TYPEHINT( List[
Qgis.LayerType] );
281 const QList<
Qgis::LayerType > cppRes = sipCpp->supportedLayerTypes();
283 PyObject *l = PyList_New( cppRes.size() );
289 for (
int i = 0; i < cppRes.size(); ++i )
291 PyObject *eobj = sipConvertFromEnum(
static_cast<int>( cppRes.at( i ) ),
292 sipType_Qgis_LayerType );
299 PyList_SetItem( l, i, eobj );
330 SIP_SKIP Q_DECL_DEPRECATED CreateDataProviderFunction createFunction() const;
336 virtual
void initProvider();
342 virtual
void cleanupProvider();
351 virtual QString filters(
Qgis::FileFilterType type );
375 virtual
int priorityForUri( const QString &uri ) const;
387 virtual QList<
Qgis::LayerType > validLayerTypesForUri( const QString &uri ) const;
405 virtual
bool uriIsBlocklisted( const QString &uri ) const;
428 virtual QStringList sidecarFilesForUri( const QString &uri ) const;
454 virtual QString suggestGroupNameForUri( const QString &uri ) const;
475 static
void setBoolParameter( QVariantMap &uri, const QString ¶meter, const QVariant &value );
483 static
bool boolParameter( const QVariantMap &uri, const QString ¶meter,
bool defaultValue = false );
498 QMap<int, int> &oldToNewAttrIdxMap,
499 QString &errorMessage,
500 const QMap<QString, QVariant> *options );
518 virtual bool createDatabase(
const QString &uri, QString &errorMessage
SIP_OUT );
526 const QString &format,
531 double *geoTransform,
533 const QStringList &createOptions = QStringList() )
SIP_FACTORY;
539 virtual
bool createMeshData(
541 const QString &fileName,
542 const QString &driverName,
549 virtual
bool createMeshData(
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)