File: qgslayoutitemwidget.sip.in

package info (click to toggle)
qgis 3.40.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,183,672 kB
  • sloc: cpp: 1,595,771; python: 372,544; 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: 161
file content (223 lines) | stat: -rw-r--r-- 6,455 bytes parent folder | download | duplicates (12)
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/layout/qgslayoutitemwidget.h                                 *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsLayoutConfigObject : QObject
{
%Docstring(signature="appended")
An object for property widgets for layout items. All layout config type
widgets should contain this object.

If you are creating a new :py:class:`QgsLayoutItem` configuration
widget, you should instead inherit from
:py:class:`QgsLayoutItemBaseWidget` (rather then directly working with
:py:class:`QgsLayoutConfigObject`).
%End

%TypeHeaderCode
#include "qgslayoutitemwidget.h"
%End
  public:
    QgsLayoutConfigObject( QWidget *parent /TransferThis/, QgsLayoutObject *layoutObject );
%Docstring
Constructor for QgsLayoutConfigObject, linked with the specified
``layoutObject``.
%End

    void initializeDataDefinedButton( QgsPropertyOverrideButton *button, QgsLayoutObject::DataDefinedProperty key );
%Docstring
Registers a data defined ``button``, setting up its initial value,
connections and description. The corresponding property ``key`` must be
specified.
%End

    void updateDataDefinedButton( QgsPropertyOverrideButton *button );
%Docstring
Updates a data defined button to reflect the item's current properties.
%End

    QgsVectorLayer *coverageLayer() const;
%Docstring
Returns the current layout context coverage layer (if set).
%End

    QgsLayoutAtlas *layoutAtlas() const;
%Docstring
Returns the atlas for the layout, if available
%End


};

class QgsLayoutItemBaseWidget : QgsPanelWidget
{
%Docstring(signature="appended")
A base class for property widgets for layout items. All layout item
widgets should inherit from this base class.
%End

%TypeHeaderCode
#include "qgslayoutitemwidget.h"
%End
  public:
    QgsLayoutItemBaseWidget( QWidget *parent /TransferThis/, QgsLayoutObject *layoutObject );
%Docstring
Constructor for QgsLayoutItemBaseWidget, linked with the specified
``layoutObject``.
%End

    QgsLayoutObject *layoutObject();
%Docstring
Returns the layout object associated with this widget.
%End

    bool setItem( QgsLayoutItem *item );
%Docstring
Sets the current ``item`` to show in the widget. If ``True`` is
returned, ``item`` was an acceptable type for display in this widget and
the widget has been updated to match ``item``'s properties.

If ``False`` is returned, then the widget could not be successfully
updated to show the properties of ``item``.
%End

    virtual void setReportTypeString( const QString &string );
%Docstring
Sets the ``string`` to use to describe the current report type (e.g.
"atlas" or "report"). Subclasses which display this text to users should
override this and update their widget labels accordingly.
%End

    virtual void setDesignerInterface( QgsLayoutDesignerInterface *iface );
%Docstring
Sets the the layout designer interface in which the widget is being
shown.

.. versionadded:: 3.6
%End

    virtual void setMasterLayout( QgsMasterLayoutInterface *masterLayout );
%Docstring
Sets the master layout associated with the item.

.. versionadded:: 3.10
%End

  protected:
    void registerDataDefinedButton( QgsPropertyOverrideButton *button, QgsLayoutObject::DataDefinedProperty property );
%Docstring
Registers a data defined ``button``, setting up its initial value,
connections and description. The corresponding property ``key`` must be
specified.
%End

    void updateDataDefinedButton( QgsPropertyOverrideButton *button );
%Docstring
Updates a previously registered data defined button to reflect the
item's current properties.
%End

    QgsVectorLayer *coverageLayer() const;
%Docstring
Returns the current layout context coverage layer (if set).
%End

    virtual bool setNewItem( QgsLayoutItem *item );
%Docstring
Attempts to update the widget to show the properties for the specified
``item``.

Subclasses can override this if they support changing items in place.

Implementations must return ``True`` if the item was accepted and the
widget was updated.
%End

    QgsLayoutAtlas *layoutAtlas() const;
%Docstring
Returns the atlas for the layout (if available)
%End

};


class QgsLayoutItemPropertiesWidget : QWidget
{
%Docstring(signature="appended")
A widget for controlling the common properties of layout items (e.g.
position and size, background, stroke, frame). This widget can be
embedded into other layout item widgets.
%End

%TypeHeaderCode
#include "qgslayoutitemwidget.h"
%End
  public:
    QgsLayoutItemPropertiesWidget( QWidget *parent, QgsLayoutItem *item );
%Docstring
Constructs a QgsLayoutItemPropertiesWidget with a ``parent`` and for the
given layout ``item``.
%End

    QgsLayoutItem::ReferencePoint positionMode() const;
%Docstring
Returns the position mode
%End

    void showBackgroundGroup( bool showGroup );
%Docstring
Determines if the background of the group box shall be shown
%End

    void showFrameGroup( bool showGroup );
%Docstring
Determines if the frame of the group box shall be shown
%End

    void setItem( QgsLayoutItem *item );
%Docstring
Sets the layout item
%End

    void setMasterLayout( QgsMasterLayoutInterface *masterLayout );
%Docstring
Sets the master layout associated with the item.

.. versionadded:: 3.10
%End

    void updateVariables();
%Docstring
Updates the variables widget, refreshing the values of variables shown.

.. versionadded:: 3.10
%End

  protected slots:
    void initializeDataDefinedButtons();
%Docstring
Initializes data defined buttons to current atlas coverage layer
%End
    void populateDataDefinedButtons();
%Docstring
Sets data defined button state to match item
%End

};


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