/
qgsmaplayerstyle.sip.in
134 lines (104 loc) · 3.4 KB
/
qgsmaplayerstyle.sip.in
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
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsmaplayerstyle.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsMapLayerStyle
{
%Docstring
Stores style information (renderer, opacity, labeling, diagrams etc.) applicable to a map layer.
Stored data are considered as opaque - it is not possible to access them directly or modify them - it is
only possible to read or write layer's current style.
.. versionadded:: 2.8
%End
%TypeHeaderCode
#include "qgsmaplayerstyle.h"
%End
public:
static const QMetaObject staticMetaObject;
public:
enum StyleCategory
{
LayerConfiguration,
Symbology,
Labels,
Fields,
Forms,
Actions,
MapTips,
Diagrams,
AttributeTable,
Rendering,
CustomProperties,
All
};
typedef QFlags<QgsMapLayerStyle::StyleCategory> StyleCategories;
QgsMapLayerStyle();
%Docstring
construct invalid style
%End
explicit QgsMapLayerStyle( const QString &xmlData );
%Docstring
construct style from QML definition (XML)
%End
bool isValid() const;
%Docstring
Tell whether the style is valid (i.e. there is something stored in it)
%End
void clear();
%Docstring
Remove any stored style data (will get invalid)
%End
QString xmlData() const;
%Docstring
Returns XML content of the style
%End
void readFromLayer( QgsMapLayer *layer );
%Docstring
Store layer's active style information in the instance
%End
void writeToLayer( QgsMapLayer *layer ) const;
%Docstring
Apply stored layer's style information to the layer
%End
void readXml( const QDomElement &styleElement );
%Docstring
Read style configuration (for project file reading)
%End
void writeXml( QDomElement &styleElement ) const;
%Docstring
Write style configuration (for project file writing)
%End
};
QFlags<QgsMapLayerStyle::StyleCategory> operator|(QgsMapLayerStyle::StyleCategory f1, QFlags<QgsMapLayerStyle::StyleCategory> f2);
class QgsMapLayerStyleOverride
{
%Docstring
Restore overridden layer style on destruction.
.. versionadded:: 3.2
%End
%TypeHeaderCode
#include "qgsmaplayerstyle.h"
%End
public:
QgsMapLayerStyleOverride( QgsMapLayer *layer );
%Docstring
Construct a style override object associated with a map layer.
The overridden style will be restored upon object destruction.
%End
~QgsMapLayerStyleOverride();
void setOverrideStyle( const QString &style );
%Docstring
Temporarily apply a different style to the layer. The argument
can be either a style name or a full QML style definition.
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsmaplayerstyle.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/