Skip to content

Commit

Permalink
Expand documentation for QgsAuxiliaryLayer class
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Oct 9, 2017
1 parent 38e5301 commit 191f2a7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
20 changes: 19 additions & 1 deletion python/core/qgsauxiliarystorage.sip
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,25 @@ class QgsAuxiliaryLayer : QgsVectorLayer
%Docstring


Class allowing to manage the auxiliary storage for a vector layer
Class allowing to manage the auxiliary storage for a vector layer.

Such auxiliary data are data used mostly for the needs of QGIS (symbology)
and have no real interest in being stored with the native raw geospatial
data.

The need arises from the restrictions existing in the manual placement of
labels. Manual placement of labels are possible in QGIS by setting some
labeling properties (X and Y position, and rotation angle optionally) as
being "data-defined", meaning that values come from a column (or an
expression). But setting this up on an existing layer requires either to
add new columns to the source layer, while it is not always possible or
desirable.

This QgsAuxiliaryLayer provides the solution to this limitation. Actually
it's an editable join to the original vector layer with some
synchronisation mechanisms activated such as "Upsert On Edit" or "Delete
Cascade". Thus, auxiliary fields are editable even if the
source layer is not and edition of a joined field is also possible.

.. versionadded:: 3.0
%End
Expand Down
20 changes: 19 additions & 1 deletion src/core/qgsauxiliarystorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,25 @@ typedef QList<QgsAuxiliaryField> QgsAuxiliaryFields;
*
* \ingroup core
*
* \brief Class allowing to manage the auxiliary storage for a vector layer
* Class allowing to manage the auxiliary storage for a vector layer.
*
* Such auxiliary data are data used mostly for the needs of QGIS (symbology)
* and have no real interest in being stored with the native raw geospatial
* data.
*
* The need arises from the restrictions existing in the manual placement of
* labels. Manual placement of labels are possible in QGIS by setting some
* labeling properties (X and Y position, and rotation angle optionally) as
* being "data-defined", meaning that values come from a column (or an
* expression). But setting this up on an existing layer requires either to
* add new columns to the source layer, while it is not always possible or
* desirable.
*
* This QgsAuxiliaryLayer provides the solution to this limitation. Actually
* it's an editable join to the original vector layer with some
* synchronisation mechanisms activated such as "Upsert On Edit" or "Delete
* Cascade". Thus, auxiliary fields are editable even if the
* source layer is not and edition of a joined field is also possible.
*
* \since QGIS 3.0
*/
Expand Down

0 comments on commit 191f2a7

Please sign in to comment.