25 QString
const &description,
26 QString
const &library )
28 , mDescription( description )
34 , mDescription( description )
35 , mCreateFunction( createFunc )
40 qDeleteAll( mProviderConnections );
60 return mCreateFunction;
80 return QList<QgsMeshDriverMetadata>();
85 if ( mCreateFunction )
87 return mCreateFunction( uri, options );
105 bool, QMap<int, int> &,
106 QString &errorMessage,
const QMap<QString, QVariant> * )
108 errorMessage = QObject::tr(
"Provider %1 has no %2 method" ).arg(
key(), QStringLiteral(
"createEmptyLayer" ) );
109 return QgsVectorLayerExporter::ExportError::ErrProviderUnsupportedFeature;
113 const QString &,
const QString &,
117 const QStringList & )
124 return QList<QPair<QString, QString> >();
129 return QList<QgsDataItemProvider *>();
133 QStringList &, QString &errCause )
135 errCause = QObject::tr(
"Provider %1 has no %2 method" ).arg(
key(), QStringLiteral(
"listStyles" ) );
141 errCause = QObject::tr(
"Provider %1 has no %2 method" ).arg(
key(), QStringLiteral(
"getStyleById" ) );
147 errCause = QObject::tr(
"Provider %1 has no %2 method" ).arg(
key(), QStringLiteral(
"deleteStyleById" ) );
152 const QString &,
const QString &,
bool, QString &errCause )
154 errCause = QObject::tr(
"Provider %1 has no %2 method" ).arg(
key(), QStringLiteral(
"saveStyle" ) );
160 errCause = QObject::tr(
"Provider %1 has no %2 method" ).arg(
key(), QStringLiteral(
"loadStyle" ) );
166 errCause = QObject::tr(
"Provider %1 has no %2 method" ).arg(
key(), QStringLiteral(
"createDb" ) );
183 return connections<QgsAbstractDatabaseProviderConnection>( cached ) ;
188 const QMap<QString, QgsAbstractProviderConnection *> constConns {
connections( cached ) };
189 const QStringList constKeys { constConns.keys( ) };
190 for (
const QString &
key : constKeys )
194 return constConns.value(
key );
209 Q_UNUSED( configuration );
222 Q_UNUSED( connection )
231 mProviderConnections.clear();
238 QMap<QString, T *> result;
240 const QStringList constConnKeys { constConns.keys() };
241 for (
const auto &
c : constConnKeys )
243 T *casted {
static_cast<T *
>( constConns.value(
c ) ) };
246 result.insert(
c, casted );
255 : mName( name ), mDescription( description ), mCapabilities( capabilities )
261 return mCapabilities;
virtual void store(const QString &name) const =0
Stores the connection in the settings.
DataType
Raster data types.
Container of fields for a vector layer.
Abstract base class for spatial data provider implementations.
The QgsAbstractProviderConnection provides an interface for data provider connections.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
Type
The WKB type describes the number of dimensions a geometry has.
Setting options for creating vector data providers.
This class allows including a set of layers in a database-side transaction, provided the layer data p...
This class represents a coordinate reference system (CRS).
Custom exception class for provider connection related exceptions.
Base class for raster data providers.