Since the majority of users of this class will be exporting
an existing map layer to a data provider, the QgsVectorLayerImport
name is misleading and suggests that this class is designed
just to bring layers "into" QGIS.
Explicitly naming the class "Exporter" should help API users
discover this class.
Also cleanup API and improve docs
This was causing an issue if you tried to access widgets in a form using findChildren
widgets could not be casted to QGIs native types
also sipify QgsFilterLineEdit and QgsRelationEditorWidget
And use wherever custom widgets were being created. Reduces
duplicate code and allows specialised handling for raster
band display/selection to be centralized.
Make maps invalidate cache whenever layer order changes. Cache mode
is now identical to Render mode, so all mode switching has been
removed from composer maps. This should greatly simplify the learning
curve and usability of composer maps.
No longer required - the Cache mode is now performant enough
that we don't have to rely on the old rectangle preview
when desiring responsive composers
This implements an improved version of vector.createVectorWriter
in QgsProcessingUtils. The improved version relies on the
core class QgsVectorLayerImport to create empty layers,
which:
- reduces duplicate code and reuses the mature QgsVectorLayerImport
routines
- avoids manual conversion of field types to destination provider
field types
- potentially allows any writable provider to be used as a feature
sink for algorithms (e.g. output direct to MSSQL/Oracle/db2). This
should work now - it just needs exposing via UI.
The geometry cache was only used for few geometry editing operations anyway. In earlier versions
of QGIS the geometry cache was also used by old snapping classes which have been replaced
by QgsPointLocator that also keeps a spatial index of geometries and it is not rebuilt on every re-render.
Reasons for removal:
- geometry cache was repopulated on every redraw of layers in editing mode, slowing down rendering
- data structure for the cache was a simple map with features accessed by their ID (no spatial index)
- the cache was only getting refreshed for the current view of the main map canvas (not a generic cache)
- not used for snapping anymore where caching was important to avoid roundtrips to data provider
- provider() was renamed to createProvider()
- selectWidget() was renamed to createSelectionWidget()
- providerLibrary() was renamed to createProviderLibrary()
of new memory layers from QgsFields/QgsCoordinateReferenceSystem/etc
Since memory provider cannot use QgsVectorLayerImport we need
another centeralized function for creating new memory layers
without the need to manually create the uri string.
This commit introduces basic support for non-library based
data providers, and moves the memory provider from a library
based provider to a core provider.
The memory provider is used so frequently throughout QGIS that
it has become integral to QGIS functionality and must be
available wherever the QGIS core library is used.
The changes here (while not exposed yet to Python) could potentially
be built on to allow creation of pure Python data providers.
there was an issue in libdxf which includes qgslogger in debug mode
and qgsdebug.h includes qgis.h include qgswkbtypes.h (which geometry directory was not listed in libdxrw included paths)