Layer translator class for mapping layers. More...
layerTranslator() | |
void | clear() |
void | invert() |
void | mapAll(int to_layer) |
void | mapLayer(int from_layer, int to_layer) |
int | map(int from_layer) |
This class is used for the layer mapping functions is the classes class drawingField and class cell. A single instance of the class will define layer mapping for any available layer. After construction of the class an identical mapping is set for all layers.
Example:
layerTranslator t;
t.mapLayer(18,19);
t.mapLayer(19,18);
layout->drawing->mapLayer(&t);
Creates a layerTranslator instance with an identical mapping for all layers.
Reset the mapp to with an identical mapping for all layers. (introduced with release 20181119)
The layer translationg is inverted. For example if the class contains a single mapping from layer 1 to layer 2, the inverted class will contain a single mapping from layer 2 to layer 1.
Sets the mapping of all layer to to_layer.
Sets a mapping of from_layer to to_layer.
Returns: the resulting layer transformation of the from_layer