Skip to content

Commit 191f2a7

Browse files
committedOct 9, 2017
Expand documentation for QgsAuxiliaryLayer class
1 parent 38e5301 commit 191f2a7

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed
 

‎python/core/qgsauxiliarystorage.sip

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,25 @@ class QgsAuxiliaryLayer : QgsVectorLayer
6565
%Docstring
6666

6767

68-
Class allowing to manage the auxiliary storage for a vector layer
68+
Class allowing to manage the auxiliary storage for a vector layer.
69+
70+
Such auxiliary data are data used mostly for the needs of QGIS (symbology)
71+
and have no real interest in being stored with the native raw geospatial
72+
data.
73+
74+
The need arises from the restrictions existing in the manual placement of
75+
labels. Manual placement of labels are possible in QGIS by setting some
76+
labeling properties (X and Y position, and rotation angle optionally) as
77+
being "data-defined", meaning that values come from a column (or an
78+
expression). But setting this up on an existing layer requires either to
79+
add new columns to the source layer, while it is not always possible or
80+
desirable.
81+
82+
This QgsAuxiliaryLayer provides the solution to this limitation. Actually
83+
it's an editable join to the original vector layer with some
84+
synchronisation mechanisms activated such as "Upsert On Edit" or "Delete
85+
Cascade". Thus, auxiliary fields are editable even if the
86+
source layer is not and edition of a joined field is also possible.
6987

7088
.. versionadded:: 3.0
7189
%End

‎src/core/qgsauxiliarystorage.h

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,25 @@ typedef QList<QgsAuxiliaryField> QgsAuxiliaryFields;
9090
*
9191
* \ingroup core
9292
*
93-
* \brief Class allowing to manage the auxiliary storage for a vector layer
93+
* Class allowing to manage the auxiliary storage for a vector layer.
94+
*
95+
* Such auxiliary data are data used mostly for the needs of QGIS (symbology)
96+
* and have no real interest in being stored with the native raw geospatial
97+
* data.
98+
*
99+
* The need arises from the restrictions existing in the manual placement of
100+
* labels. Manual placement of labels are possible in QGIS by setting some
101+
* labeling properties (X and Y position, and rotation angle optionally) as
102+
* being "data-defined", meaning that values come from a column (or an
103+
* expression). But setting this up on an existing layer requires either to
104+
* add new columns to the source layer, while it is not always possible or
105+
* desirable.
106+
*
107+
* This QgsAuxiliaryLayer provides the solution to this limitation. Actually
108+
* it's an editable join to the original vector layer with some
109+
* synchronisation mechanisms activated such as "Upsert On Edit" or "Delete
110+
* Cascade". Thus, auxiliary fields are editable even if the
111+
* source layer is not and edition of a joined field is also possible.
94112
*
95113
* \since QGIS 3.0
96114
*/

0 commit comments

Comments
 (0)
Please sign in to comment.