File: qgsmeshlayerlabeling.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (172 lines) | stat: -rw-r--r-- 5,400 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/mesh/qgsmeshlayerlabeling.h                                 *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/








class QgsAbstractMeshLayerLabeling
{
%Docstring(signature="appended")
Abstract base class - its implementations define different approaches to
the labeling of a mesh layer.

.. versionadded:: 3.36
%End

%TypeHeaderCode
#include "qgsmeshlayerlabeling.h"
%End
  public:

    QgsAbstractMeshLayerLabeling();
    virtual ~QgsAbstractMeshLayerLabeling();

    virtual QString type() const = 0;
%Docstring
Unique type string of the labeling configuration implementation
%End

    virtual QgsAbstractMeshLayerLabeling *clone() const = 0 /Factory/;
%Docstring
Returns a new copy of the object
%End


    virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) const = 0;
%Docstring
Returns labeling configuration as XML element
%End

    virtual QStringList subProviders() const;
%Docstring
Gets list of sub-providers within the layer's labeling.
%End

    virtual QgsPalLayerSettings settings( const QString &providerId = QString() ) const = 0;
%Docstring
Gets associated label settings. In case of multiple sub-providers with
different settings, they are identified by their ID.
%End

    virtual void setSettings( QgsPalLayerSettings *settings /Transfer/, const QString &providerId = QString() ) = 0;
%Docstring
Set pal settings for a specific provider (takes ownership).

:param settings: Pal layer settings
:param providerId: The id of the provider
%End

    virtual bool requiresAdvancedEffects() const = 0;
%Docstring
Returns ``True`` if drawing labels requires advanced effects like
composition modes, which could prevent it being used as an isolated
cached image or exported to a vector format.
%End

    virtual void multiplyOpacity( double opacityFactor );
%Docstring
Multiply opacity by ``opacityFactor``.

This method multiplies the opacity of the labeling elements (text,
shadow, buffer etc.) by ``opacity`` effectively changing the opacity of
the whole labeling elements.
%End


    static QgsAbstractMeshLayerLabeling *create( const QDomElement &element, const QgsReadWriteContext &context ) /Factory/;
%Docstring
Try to create instance of an implementation based on the XML data
%End

    virtual void toSld( QDomNode &parent, const QVariantMap &props ) const;
%Docstring
Writes the SE 1.1 TextSymbolizer element based on the current layer
labeling settings
%End

    virtual bool accept( QgsStyleEntityVisitorInterface *visitor ) const;
%Docstring
Accepts the specified symbology ``visitor``, causing it to visit all
symbols associated with the labeling.

Returns ``True`` if the visitor should continue visiting other objects,
or ``False`` if visiting should be canceled.
%End

    static QgsPalLayerSettings defaultSettingsForLayer( const QgsMeshLayer *layer );
%Docstring
Returns the default layer settings to use for the specified mesh
``layer``.
%End

  private:
    QgsAbstractMeshLayerLabeling( const QgsAbstractMeshLayerLabeling &rhs );
};

class QgsMeshLayerSimpleLabeling : QgsAbstractMeshLayerLabeling
{
%Docstring(signature="appended")
Basic implementation of the labeling interface for mesh layer.

.. versionadded:: 3.36
%End

%TypeHeaderCode
#include "qgsmeshlayerlabeling.h"
%End
  public:

    explicit QgsMeshLayerSimpleLabeling( const QgsPalLayerSettings &settings, bool labelFaces = false );
%Docstring
Constructs simple labeling configuration with given initial
``settings``. Labels are placed on mesh vertices unless ``labelFaces``
is ``True``, when they are placed on mesh faces.
%End

    virtual QString type() const;

    virtual QgsMeshLayerSimpleLabeling *clone() const /Factory/;

    virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) const;

    virtual QgsPalLayerSettings settings( const QString &providerId = QString() ) const;

    virtual bool accept( QgsStyleEntityVisitorInterface *visitor ) const;


    virtual void setSettings( QgsPalLayerSettings *settings /Transfer/, const QString &providerId = QString() );

%Docstring
Set pal settings (takes ownership).

:param settings: Pal layer settings
:param providerId: Unused parameter
%End

    virtual bool requiresAdvancedEffects() const;

    virtual void multiplyOpacity( double opacityFactor );

    static QgsMeshLayerSimpleLabeling *create( const QDomElement &element, const QgsReadWriteContext &context );
%Docstring
Create the instance from a DOM element with saved configuration
%End

};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/mesh/qgsmeshlayerlabeling.h                                 *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/