Skip to content

Commit 5867414

Browse files
committedJun 9, 2017
sipify gui effects + layertree
1 parent 2454e56 commit 5867414

11 files changed

+459
-255
lines changed
 

‎python/auto_sip.blacklist

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ gui/symbology-ng/qgssymbolslistwidget.sip
7373
gui/symbology-ng/qgssymbolselectordialog.sip
7474
gui/symbology-ng/qgssymbolwidgetcontext.sip
7575
gui/symbology-ng/qgsvectorfieldsymbollayerwidget.sip
76-
gui/effects/qgseffectdrawmodecombobox.sip
77-
gui/effects/qgseffectstackpropertieswidget.sip
78-
gui/effects/qgspainteffectpropertieswidget.sip
79-
gui/effects/qgspainteffectwidget.sip
80-
gui/layertree/qgslayertreeview.sip
8176
analysis/vector/qgsgeometryanalyzer.sip
8277
analysis/vector/qgsgeometrysnapper.sip
8378
analysis/vector/qgspointsample.sip
Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,48 @@
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/effects/qgseffectdrawmodecombobox.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
110

2-
/** \ingroup gui
3-
* \class QgsEffectDrawModeComboBox
4-
* \brief A combo box allowing selection of paint effect draw modes
5-
*
6-
* \note Added in version 2.9
7-
*/
811

912
class QgsEffectDrawModeComboBox : QComboBox
1013
{
11-
%TypeHeaderCode
12-
#include <qgseffectdrawmodecombobox.h>
14+
%Docstring
15+
A combo box allowing selection of paint effect draw modes
16+
17+
.. versionadded:: 2.9
1318
%End
1419

20+
%TypeHeaderCode
21+
#include "qgseffectdrawmodecombobox.h"
22+
%End
1523
public:
1624

17-
QgsEffectDrawModeComboBox( QWidget *parent /TransferThis/ = NULL );
25+
QgsEffectDrawModeComboBox( QWidget *parent /TransferThis/ = 0 );
1826

19-
/** Returns the currently selected draw mode for the combo box
20-
* @returns current draw mode
21-
*/
2227
QgsPaintEffect::DrawMode drawMode() const;
28+
%Docstring
29+
Returns the currently selected draw mode for the combo box
30+
:return: current draw mode
31+
:rtype: QgsPaintEffect.DrawMode
32+
%End
2333

24-
/** Sets the currently selected draw mode for the combo box
25-
* @param drawMode selected draw mode
26-
*/
2734
void setDrawMode( QgsPaintEffect::DrawMode drawMode );
35+
%Docstring
36+
Sets the currently selected draw mode for the combo box
37+
\param drawMode selected draw mode
38+
%End
2839

2940
};
3041

42+
/************************************************************************
43+
* This file has been generated automatically from *
44+
* *
45+
* src/gui/effects/qgseffectdrawmodecombobox.h *
46+
* *
47+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
48+
************************************************************************/
Lines changed: 158 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,190 +1,235 @@
1-
/** \ingroup gui
2-
* \class QgsEffectStackPropertiesWidget
3-
* \brief A widget for modifying the properties of a QgsEffectStack, including adding
4-
* and reordering effects within the stack.
5-
*
6-
* \note Added in version 2.9
7-
* \see QgsEffectStack
8-
* \see QgsEffectStackPropertiesDialog
9-
* \see QgsEffectStackCompactWidget
10-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/effects/qgseffectstackpropertieswidget.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
1113

1214
class QgsEffectStackPropertiesWidget : QgsPanelWidget
1315
{
14-
%TypeHeaderCode
15-
#include <qgseffectstackpropertieswidget.h>
16+
%Docstring
17+
A widget for modifying the properties of a QgsEffectStack, including adding
18+
and reordering effects within the stack.
19+
20+
.. versionadded:: 2.9
21+
.. seealso:: QgsEffectStack
22+
.. seealso:: QgsEffectStackPropertiesDialog
23+
.. seealso:: QgsEffectStackCompactWidget
1624
%End
1725

26+
%TypeHeaderCode
27+
#include "qgseffectstackpropertieswidget.h"
28+
%End
1829
public:
1930

20-
/** QgsEffectStackPropertiesWidget constructor
21-
* @param stack QgsEffectStack to modify in the widget
22-
* @param parent parent widget
23-
*/
2431
QgsEffectStackPropertiesWidget( QgsEffectStack *stack, QWidget *parent /TransferThis/ = 0 );
32+
%Docstring
33+
QgsEffectStackPropertiesWidget constructor
34+
\param stack QgsEffectStack to modify in the widget
35+
\param parent parent widget
36+
%End
2537

2638
~QgsEffectStackPropertiesWidget();
2739

28-
/** Returns effect stack attached to the widget
29-
* @returns QgsEffectStack modified by the widget
30-
*/
3140
QgsEffectStack *stack();
41+
%Docstring
42+
Returns effect stack attached to the widget
43+
:return: QgsEffectStack modified by the widget
44+
:rtype: QgsEffectStack
45+
%End
3246

33-
/** Sets the picture to use for effect previews for the dialog
34-
* @param picture preview picture
35-
*/
3647
void setPreviewPicture( const QPicture &picture );
48+
%Docstring
49+
Sets the picture to use for effect previews for the dialog
50+
\param picture preview picture
51+
%End
3752

3853
public slots:
3954

40-
/** Moves the currently selected effect down in the stack.
41-
*/
4255
void moveEffectDown();
56+
%Docstring
57+
Moves the currently selected effect down in the stack.
58+
%End
4359

44-
/** Moves the currently selected effect up in the stack.
45-
*/
4660
void moveEffectUp();
61+
%Docstring
62+
Moves the currently selected effect up in the stack.
63+
%End
4764

48-
/** Adds a new effect to the stack.
49-
*/
5065
void addEffect();
66+
%Docstring
67+
Adds a new effect to the stack.
68+
%End
5169

52-
/** Removes the currently selected effect from the stack.
53-
*/
5470
void removeEffect();
71+
%Docstring
72+
Removes the currently selected effect from the stack.
73+
%End
5574

56-
/** Updates the widget when the selected effect changes type.
57-
*/
5875
void effectChanged();
76+
%Docstring
77+
Updates the widget when the selected effect changes type.
78+
%End
5979

60-
/** Updates the effect preview icon.
61-
*/
6280
void updatePreview();
81+
%Docstring
82+
Updates the effect preview icon.
83+
%End
6384

64-
/** Updates the effect stack when the currently selected effect changes properties.
65-
* @param newEffect new effect to replace existing effect at selected position within the stack.
66-
*/
6785
void changeEffect( QgsPaintEffect *newEffect );
86+
%Docstring
87+
Updates the effect stack when the currently selected effect changes properties.
88+
\param newEffect new effect to replace existing effect at selected position within the stack.
89+
%End
6890

6991
protected:
7092

71-
/** Refreshes the widget to reflect the current state of the stack.
72-
*/
93+
7394
void loadStack();
95+
%Docstring
96+
Refreshes the widget to reflect the current state of the stack.
97+
%End
7498

75-
/** Refreshes the widget to reflect the current state of a specified stack.
76-
* @param stack QgsEffectStack for widget
77-
*/
7899
void loadStack( QgsEffectStack *stack );
100+
%Docstring
101+
Refreshes the widget to reflect the current state of a specified stack.
102+
\param stack QgsEffectStack for widget
103+
%End
79104

80-
/** Enables or disables widgets depending on the selected effect within the stack.
81-
*/
82105
void updateUi();
106+
%Docstring
107+
Enables or disables widgets depending on the selected effect within the stack.
108+
%End
83109

84-
/** Returns the currently selected effect within the stack.
85-
* @note not available in python bindings
86-
*/
87-
//EffectItem *currentEffectItem();
88110

89-
/** Moves the currently selected effect within the stack by a specified offset
90-
*/
91111
void moveEffectByOffset( int offset );
112+
%Docstring
113+
Moves the currently selected effect within the stack by a specified offset
114+
%End
92115

93-
/** Sets the effect properties widget
94-
*/
95116
void setWidget( QWidget *widget );
117+
%Docstring
118+
Sets the effect properties widget
119+
%End
96120

97121
};
98122

99123

100-
/** \ingroup gui
101-
* \class QgsEffectStackPropertiesDialog
102-
* \brief A dialog for modifying the properties of a QgsEffectStack, including adding
103-
* and reordering effects within the stack.
104-
*
105-
* \note Added in version 2.9
106-
* \see QgsEffectStack
107-
* \see QgsEffectStackPropertiesWidget
108-
* \see QgsEffectStackCompactWidget
109-
*/
110124

111-
class QgsEffectStackPropertiesDialog : QgsDialog
125+
class QgsEffectStackPropertiesDialog: QgsDialog
112126
{
113-
%TypeHeaderCode
114-
#include <qgseffectstackpropertieswidget.h>
127+
%Docstring
128+
A dialog for modifying the properties of a QgsEffectStack, including adding
129+
and reordering effects within the stack.
130+
131+
.. versionadded:: 2.9
132+
.. seealso:: QgsEffectStack
133+
.. seealso:: QgsEffectStackPropertiesWidget
134+
.. seealso:: QgsEffectStackCompactWidget
115135
%End
116136

137+
%TypeHeaderCode
138+
#include "qgseffectstackpropertieswidget.h"
139+
%End
117140
public:
118141

119-
/** QgsEffectStackPropertiesDialog constructor
120-
* @param stack QgsEffectStack to modify in the dialog
121-
* @param parent parent widget
122-
* @param f window flags
123-
*/
124-
QgsEffectStackPropertiesDialog( QgsEffectStack *stack, QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags &f = 0 );
125-
~QgsEffectStackPropertiesDialog();
126-
127-
/** Returns effect stack attached to the dialog
128-
* @returns QgsEffectStack modified by the dialog
129-
*/
142+
QgsEffectStackPropertiesDialog( QgsEffectStack *stack, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags f = 0 );
143+
%Docstring
144+
QgsEffectStackPropertiesDialog constructor
145+
\param stack QgsEffectStack to modify in the dialog
146+
\param parent parent widget
147+
\param f window flags
148+
%End
149+
130150
QgsEffectStack *stack();
151+
%Docstring
152+
Returns effect stack attached to the dialog
153+
:return: QgsEffectStack modified by the dialog
154+
:rtype: QgsEffectStack
155+
%End
131156

132-
/** Sets the picture to use for effect previews for the dialog
133-
* @param picture preview picture
134-
*/
135157
void setPreviewPicture( const QPicture &picture );
158+
%Docstring
159+
Sets the picture to use for effect previews for the dialog
160+
\param picture preview picture
161+
%End
162+
163+
protected:
164+
136165

137166
};
138167

139-
/** \ingroup gui
140-
* \class QgsEffectStackCompactWidget
141-
* \brief A small widget consisting of a check box for enabling/disabling an effect stack
142-
* and a button for opening an effect stack customisation dialog.
143-
*
144-
* \note Added in version 2.9
145-
* \see QgsEffectStack
146-
* \see QgsEffectStackPropertiesWidget
147-
* \see QgsEffectStackPropertiesDialog
148-
*/
149-
150-
class QgsEffectStackCompactWidget : QgsPanelWidget
168+
169+
170+
class QgsEffectStackCompactWidget: QgsPanelWidget
151171
{
172+
%Docstring
173+
A small widget consisting of a check box for enabling/disabling an effect stack
174+
and a button for opening an effect stack customisation dialog.
175+
176+
.. versionadded:: 2.9
177+
.. seealso:: QgsEffectStack
178+
.. seealso:: QgsEffectStackPropertiesWidget
179+
.. seealso:: QgsEffectStackPropertiesDialog
180+
%End
181+
152182
%TypeHeaderCode
153-
#include <qgseffectstackpropertieswidget.h>
183+
#include "qgseffectstackpropertieswidget.h"
154184
%End
155185
public:
156186

157-
/** QgsEffectStackCompactWidget constructor
158-
* @param parent parent widget
159-
* @param effect QgsPaintEffect for modification by the widget. If the effect
160-
* is not a QgsEffectStack, it will be automatically converted to an effect
161-
* stack consisting of the original effect
162-
*/
163187
QgsEffectStackCompactWidget( QWidget *parent /TransferThis/ = 0, QgsPaintEffect *effect = 0 );
188+
%Docstring
189+
QgsEffectStackCompactWidget constructor
190+
\param parent parent widget
191+
\param effect QgsPaintEffect for modification by the widget. If the effect
192+
is not a QgsEffectStack, it will be automatically converted to an effect
193+
stack consisting of the original effect
194+
%End
164195
~QgsEffectStackCompactWidget();
165196

166-
/** Sets paint effect attached to the widget
167-
* @param effect QgsPaintEffect for modification by the widget. If the effect
168-
* is not a QgsEffectStack, it will be automatically converted to an effect
169-
* stack consisting of the original effect
170-
* @see paintEffect
171-
*/
172197
void setPaintEffect( QgsPaintEffect *effect );
198+
%Docstring
199+
Sets paint effect attached to the widget,
200+
\param effect QgsPaintEffect for modification by the widget. If the effect
201+
is not a QgsEffectStack, it will be automatically converted to an effect
202+
stack consisting of the original effect
203+
.. seealso:: paintEffect
204+
%End
173205

174-
/** Returns paint effect attached to the widget
175-
* @returns QgsPaintEffect modified by the widget
176-
* @see setPaintEffect
177-
*/
178206
QgsPaintEffect *paintEffect() const;
207+
%Docstring
208+
Returns paint effect attached to the widget
209+
:return: QgsPaintEffect modified by the widget
210+
.. seealso:: setPaintEffect
211+
:rtype: QgsPaintEffect
212+
%End
179213

180-
/** Sets the picture to use for effect previews for the dialog
181-
* @param picture preview picture
182-
*/
183214
void setPreviewPicture( const QPicture &picture );
215+
%Docstring
216+
Sets the picture to use for effect previews for the dialog
217+
\param picture preview picture
218+
%End
184219

185220
signals:
186221

187-
/** Emitted when the paint effect properties change
188-
*/
189222
void changed();
223+
%Docstring
224+
Emitted when the paint effect properties change
225+
%End
226+
190227
};
228+
229+
/************************************************************************
230+
* This file has been generated automatically from *
231+
* *
232+
* src/gui/effects/qgseffectstackpropertieswidget.h *
233+
* *
234+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
235+
************************************************************************/
Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,66 @@
1-
/** \ingroup gui
2-
* \class QgsPaintEffectPropertiesWidget
3-
* \brief A widget which modifies the properties of a QgsPaintEffect
4-
*
5-
* \note Added in version 2.9
6-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/effects/qgspainteffectpropertieswidget.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
713

814
class QgsPaintEffectPropertiesWidget : QWidget
915
{
10-
%TypeHeaderCode
11-
#include <qgspainteffectpropertieswidget.h>
16+
%Docstring
17+
A widget which modifies the properties of a QgsPaintEffect
18+
19+
.. versionadded:: 2.9
1220
%End
1321

22+
%TypeHeaderCode
23+
#include "qgspainteffectpropertieswidget.h"
24+
%End
1425
public:
1526

16-
/** QgsPaintEffectPropertiesWidget constructor
17-
* @param effect QgsPaintEffect to modify in the widget
18-
* @param parent parent widget
19-
*/
20-
QgsPaintEffectPropertiesWidget( QgsPaintEffect *effect, QWidget *parent /TransferThis/ = NULL );
27+
QgsPaintEffectPropertiesWidget( QgsPaintEffect *effect, QWidget *parent /TransferThis/ = 0 );
28+
%Docstring
29+
QgsPaintEffectPropertiesWidget constructor
30+
\param effect QgsPaintEffect to modify in the widget
31+
\param parent parent widget
32+
%End
2133

2234
public slots:
2335

24-
/** Update widget when effect type changes
25-
*/
2636
void effectTypeChanged();
37+
%Docstring
38+
Update widget when effect type changes
39+
%End
2740

28-
/** Emits the changed signal
29-
*/
3041
void emitSignalChanged();
42+
%Docstring
43+
Emits the changed signal
44+
%End
3145

3246
signals:
3347

34-
/** Emitted when paint effect properties changes
35-
*/
3648
void changed();
49+
%Docstring
50+
Emitted when paint effect properties changes
51+
%End
3752

38-
/** Emitted when paint effect type changes
39-
*/
4053
void changeEffect( QgsPaintEffect *effect );
54+
%Docstring
55+
Emitted when paint effect type changes
56+
%End
4157

4258
};
4359

60+
/************************************************************************
61+
* This file has been generated automatically from *
62+
* *
63+
* src/gui/effects/qgspainteffectpropertieswidget.h *
64+
* *
65+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
66+
************************************************************************/
Lines changed: 82 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,172 @@
1-
/** \ingroup gui
2-
* \class QgsPaintEffectWidget
3-
* \brief Base class for effect properties widgets.
4-
*
5-
* \note Added in version 2.9
6-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/effects/qgspainteffectwidget.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
713

814
class QgsPaintEffectWidget : QWidget
915
{
10-
%TypeHeaderCode
11-
#include <qgspainteffectwidget.h>
16+
%Docstring
17+
Base class for effect properties widgets.
18+
19+
.. versionadded:: 2.9
1220
%End
1321

22+
%TypeHeaderCode
23+
#include "qgspainteffectwidget.h"
24+
%End
1425
public:
1526
QgsPaintEffectWidget( QWidget *parent /TransferThis/ = 0 );
16-
virtual ~QgsPaintEffectWidget();
1727

18-
/**
19-
* Sets the paint effect to modify with the widget
20-
* @param effect paint effect
21-
*/
2228
virtual void setPaintEffect( QgsPaintEffect *effect ) = 0;
29+
%Docstring
30+
Sets the paint effect to modify with the widget
31+
\param effect paint effect
32+
%End
2333

2434
signals:
2535

26-
/**
27-
* Emitted when properties of the effect are changed through the widget
28-
*/
2936
void changed();
37+
%Docstring
38+
Emitted when properties of the effect are changed through the widget
39+
%End
3040

3141
};
3242

3343

44+
3445
class QgsDrawSourceWidget : QgsPaintEffectWidget
3546
{
47+
3648
%TypeHeaderCode
37-
#include <qgspainteffectwidget.h>
49+
#include "qgspainteffectwidget.h"
3850
%End
39-
4051
public:
41-
QgsDrawSourceWidget( QWidget *parent /TransferThis/ = NULL );
52+
QgsDrawSourceWidget( QWidget *parent /TransferThis/ = 0 );
4253

4354
static QgsPaintEffectWidget *create() /Factory/;
55+
%Docstring
56+
:rtype: QgsPaintEffectWidget
57+
%End
4458

4559
virtual void setPaintEffect( QgsPaintEffect *effect );
4660

4761
};
4862

63+
64+
65+
4966
class QgsBlurWidget : QgsPaintEffectWidget
5067
{
68+
5169
%TypeHeaderCode
52-
#include <qgspainteffectwidget.h>
70+
#include "qgspainteffectwidget.h"
5371
%End
54-
5572
public:
56-
QgsBlurWidget( QWidget *parent /TransferThis/ = NULL );
73+
QgsBlurWidget( QWidget *parent /TransferThis/ = 0 );
5774

5875
static QgsPaintEffectWidget *create() /Factory/;
76+
%Docstring
77+
:rtype: QgsPaintEffectWidget
78+
%End
5979

6080
virtual void setPaintEffect( QgsPaintEffect *effect );
6181

6282
};
6383

84+
85+
86+
6487
class QgsShadowEffectWidget : QgsPaintEffectWidget
6588
{
89+
6690
%TypeHeaderCode
67-
#include <qgspainteffectwidget.h>
91+
#include "qgspainteffectwidget.h"
6892
%End
69-
7093
public:
71-
QgsShadowEffectWidget( QWidget *parent /TransferThis/ = NULL );
94+
QgsShadowEffectWidget( QWidget *parent /TransferThis/ = 0 );
7295

7396
static QgsPaintEffectWidget *create() /Factory/;
97+
%Docstring
98+
:rtype: QgsPaintEffectWidget
99+
%End
74100

75101
virtual void setPaintEffect( QgsPaintEffect *effect );
76102

77103
};
78104

105+
106+
79107
class QgsGlowWidget : QgsPaintEffectWidget
80108
{
109+
81110
%TypeHeaderCode
82-
#include <qgspainteffectwidget.h>
111+
#include "qgspainteffectwidget.h"
83112
%End
84-
85113
public:
86-
QgsGlowWidget( QWidget *parent /TransferThis/ = NULL );
114+
QgsGlowWidget( QWidget *parent /TransferThis/ = 0 );
87115

88116
static QgsPaintEffectWidget *create() /Factory/;
117+
%Docstring
118+
:rtype: QgsPaintEffectWidget
119+
%End
89120

90121
virtual void setPaintEffect( QgsPaintEffect *effect );
122+
91123
};
92124

93125

94126
class QgsTransformWidget : QgsPaintEffectWidget
95127
{
128+
96129
%TypeHeaderCode
97-
#include <qgspainteffectwidget.h>
130+
#include "qgspainteffectwidget.h"
98131
%End
99-
100132
public:
101-
QgsTransformWidget( QWidget *parent /TransferThis/ = NULL );
133+
QgsTransformWidget( QWidget *parent /TransferThis/ = 0 );
102134

103135
static QgsPaintEffectWidget *create() /Factory/;
136+
%Docstring
137+
:rtype: QgsPaintEffectWidget
138+
%End
104139

105140
virtual void setPaintEffect( QgsPaintEffect *effect );
106141

107142
};
108143

144+
145+
109146
class QgsColorEffectWidget : QgsPaintEffectWidget
110147
{
148+
111149
%TypeHeaderCode
112-
#include <qgspainteffectwidget.h>
150+
#include "qgspainteffectwidget.h"
113151
%End
114-
115152
public:
116-
QgsColorEffectWidget( QWidget *parent /TransferThis/ = NULL );
153+
QgsColorEffectWidget( QWidget *parent = 0 );
117154

118155
static QgsPaintEffectWidget *create() /Factory/;
156+
%Docstring
157+
:rtype: QgsPaintEffectWidget
158+
%End
119159

120160
virtual void setPaintEffect( QgsPaintEffect *effect );
121161

122162
};
123163

124164

165+
166+
/************************************************************************
167+
* This file has been generated automatically from *
168+
* *
169+
* src/gui/effects/qgspainteffectwidget.h *
170+
* *
171+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
172+
************************************************************************/
Lines changed: 131 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,155 @@
1-
/**
2-
* The QgsLayerTreeView class extends QTreeView and provides some additional functionality
3-
* when working with a layer tree.
4-
*
5-
* The view updates expanded state of layer tree nodes and also listens to changes
6-
* to expanded states in the layer tree.
7-
*
8-
* The view keeps track of the current layer and emits a signal when the current layer has changed.
9-
*
10-
* Allows the client to specify a context menu provider with custom actions. Also it comes
11-
* with a set of default actions that can be used when building context menu.
12-
*
13-
* @see QgsLayerTreeModel
14-
* @note added in 2.4
15-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/layertree/qgslayertreeview.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
1612
class QgsLayerTreeView : QTreeView
1713
{
14+
%Docstring
15+
The QgsLayerTreeView class extends QTreeView and provides some additional functionality
16+
when working with a layer tree.
17+
18+
The view updates expanded state of layer tree nodes and also listens to changes
19+
to expanded states in the layer tree.
20+
21+
The view keeps track of the current layer and emits a signal when the current layer has changed.
22+
23+
Allows the client to specify a context menu provider with custom actions. Also it comes
24+
with a set of default actions that can be used when building context menu.
25+
26+
.. seealso:: QgsLayerTreeModel
27+
.. versionadded:: 2.4
28+
%End
29+
1830
%TypeHeaderCode
19-
#include <qgslayertreeview.h>
31+
#include "qgslayertreeview.h"
2032
%End
2133

2234
%ConvertToSubClassCode
23-
if (sipCpp->inherits("QgsLayerTreeView"))
24-
sipType = sipType_QgsLayerTreeView;
25-
else
26-
sipType = 0;
35+
if ( sipCpp->inherits( "QgsLayerTreeView" ) )
36+
sipType = sipType_QgsLayerTreeView;
37+
else
38+
sipType = 0;
2739
%End
28-
2940
public:
3041
explicit QgsLayerTreeView( QWidget *parent /TransferThis/ = 0 );
3142
~QgsLayerTreeView();
3243

33-
//! Overridden setModel() from base class. Only QgsLayerTreeModel is an acceptable model.
3444
virtual void setModel( QAbstractItemModel *model );
45+
%Docstring
46+
Overridden setModel() from base class. Only QgsLayerTreeModel is an acceptable model.
47+
%End
3548

36-
//! Get access to the model casted to QgsLayerTreeModel
3749
QgsLayerTreeModel *layerTreeModel() const;
50+
%Docstring
51+
Get access to the model casted to QgsLayerTreeModel
52+
:rtype: QgsLayerTreeModel
53+
%End
3854

39-
//! Get access to the default actions that may be used with the tree view
4055
QgsLayerTreeViewDefaultActions *defaultActions();
56+
%Docstring
57+
Get access to the default actions that may be used with the tree view
58+
:rtype: QgsLayerTreeViewDefaultActions
59+
%End
4160

42-
//! Set provider for context menu. Takes ownership of the instance
4361
void setMenuProvider( QgsLayerTreeViewMenuProvider *menuProvider /Transfer/ );
44-
//! Return pointer to the context menu provider. May be null
62+
%Docstring
63+
Set provider for context menu. Takes ownership of the instance
64+
%End
4565
QgsLayerTreeViewMenuProvider *menuProvider() const;
66+
%Docstring
67+
Return pointer to the context menu provider. May be null
68+
:rtype: QgsLayerTreeViewMenuProvider
69+
%End
4670

47-
//! Get currently selected layer. May be null
4871
QgsMapLayer *currentLayer() const;
49-
//! Set currently selected layer. Null pointer will deselect any layer.
72+
%Docstring
73+
Get currently selected layer. May be null
74+
:rtype: QgsMapLayer
75+
%End
5076
void setCurrentLayer( QgsMapLayer *layer );
77+
%Docstring
78+
Set currently selected layer. Null pointer will deselect any layer.
79+
%End
5180

52-
//! Get current node. May be null
5381
QgsLayerTreeNode *currentNode() const;
54-
//! Get current group node. If a layer is current node, the function will return parent group. May be null.
82+
%Docstring
83+
Get current node. May be null
84+
:rtype: QgsLayerTreeNode
85+
%End
5586
QgsLayerTreeGroup *currentGroupNode() const;
87+
%Docstring
88+
Get current group node. If a layer is current node, the function will return parent group. May be null.
89+
:rtype: QgsLayerTreeGroup
90+
%End
5691

57-
/** Get current legend node. May be null if current node is not a legend node.
58-
* @note added in QGIS 2.14
59-
*/
6092
QgsLayerTreeModelLegendNode *currentLegendNode() const;
93+
%Docstring
94+
Get current legend node. May be null if current node is not a legend node.
95+
.. versionadded:: 2.14
96+
:rtype: QgsLayerTreeModelLegendNode
97+
%End
6198

62-
//! Return list of selected nodes
63-
//! @arg skipInternal If true, will ignore nodes which have an ancestor in the selection
64-
QList<QgsLayerTreeNode*> selectedNodes( bool skipInternal = false ) const;
65-
//! Return list of selected nodes filtered to just layer nodes
66-
QList<QgsLayerTreeLayer*> selectedLayerNodes() const;
99+
QList<QgsLayerTreeNode *> selectedNodes( bool skipInternal = false ) const;
100+
%Docstring
101+
@arg skipInternal If true, will ignore nodes which have an ancestor in the selection
102+
:rtype: list of QgsLayerTreeNode
103+
%End
104+
QList<QgsLayerTreeLayer *> selectedLayerNodes() const;
105+
%Docstring
106+
Return list of selected nodes filtered to just layer nodes
107+
:rtype: list of QgsLayerTreeLayer
108+
%End
67109

68-
//! Get list of selected layers
69-
QList<QgsMapLayer*> selectedLayers() const;
110+
QList<QgsMapLayer *> selectedLayers() const;
111+
%Docstring
112+
Get list of selected layers
113+
:rtype: list of QgsMapLayer
114+
%End
70115

71116
public slots:
72-
//! Force refresh of layer symbology. Normally not needed as the changes of layer's renderer are monitored by the model
73117
void refreshLayerSymbology( const QString &layerId );
118+
%Docstring
119+
Force refresh of layer symbology. Normally not needed as the changes of layer's renderer are monitored by the model
120+
%End
74121

75-
//! Enhancement of QTreeView::expandAll() that also records expanded state in layer tree nodes
76-
//! @note added in QGIS 2.18
77122
void expandAllNodes();
123+
%Docstring
124+
.. versionadded:: 2.18
125+
%End
78126

79-
//! Enhancement of QTreeView::collapseAll() that also records expanded state in layer tree nodes
80-
//! @note added in QGIS 2.18
81127
void collapseAllNodes();
128+
%Docstring
129+
.. versionadded:: 2.18
130+
%End
82131

83132
signals:
84-
//! Emitted when a current layer is changed
85133
void currentLayerChanged( QgsMapLayer *layer );
134+
%Docstring
135+
Emitted when a current layer is changed
136+
%End
86137

87138
protected:
88-
void contextMenuEvent( QContextMenuEvent *event );
139+
virtual void contextMenuEvent( QContextMenuEvent *event );
140+
89141

90142
void updateExpandedStateFromNode( QgsLayerTreeNode *node );
91143

92144
QgsMapLayer *layerForIndex( const QModelIndex &index ) const;
145+
%Docstring
146+
:rtype: QgsMapLayer
147+
%End
148+
149+
virtual void mouseReleaseEvent( QMouseEvent *event );
150+
151+
virtual void keyPressEvent( QKeyEvent *event );
152+
93153

94154
protected slots:
95155

@@ -101,25 +161,39 @@ class QgsLayerTreeView : QTreeView
101161
void onCurrentChanged();
102162
void onExpandedChanged( QgsLayerTreeNode *node, bool expanded );
103163
void onModelReset();
164+
165+
protected:
104166
};
105167

106168

107-
/**
108-
* Implementation of this interface can be implemented to allow QgsLayerTreeView
109-
* instance to provide custom context menus (opened upon right-click).
110-
*
111-
* @see QgsLayerTreeView
112-
* @note added in 2.4
113-
*/
114169
class QgsLayerTreeViewMenuProvider
115170
{
116-
%TypeHeaderCode
117-
#include <qgslayertreeview.h>
171+
%Docstring
172+
Implementation of this interface can be implemented to allow QgsLayerTreeView
173+
instance to provide custom context menus (opened upon right-click).
174+
175+
.. seealso:: QgsLayerTreeView
176+
.. versionadded:: 2.4
118177
%End
119178

179+
%TypeHeaderCode
180+
#include "qgslayertreeview.h"
181+
%End
120182
public:
121183
virtual ~QgsLayerTreeViewMenuProvider();
122184

123-
//! Return a newly created menu instance (or null pointer on error)
124185
virtual QMenu *createContextMenu() = 0 /Factory/;
186+
%Docstring
187+
Return a newly created menu instance (or null pointer on error)
188+
:rtype: QMenu
189+
%End
125190
};
191+
192+
193+
/************************************************************************
194+
* This file has been generated automatically from *
195+
* *
196+
* src/gui/layertree/qgslayertreeview.h *
197+
* *
198+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
199+
************************************************************************/

‎src/gui/effects/qgseffectdrawmodecombobox.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class GUI_EXPORT QgsEffectDrawModeComboBox : public QComboBox
3333

3434
public:
3535

36-
QgsEffectDrawModeComboBox( QWidget *parent = nullptr );
36+
QgsEffectDrawModeComboBox( QWidget *parent SIP_TRANSFERTHIS = nullptr );
3737

3838
/** Returns the currently selected draw mode for the combo box
3939
* \returns current draw mode

‎src/gui/effects/qgseffectstackpropertieswidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class GUI_EXPORT QgsEffectStackPropertiesDialog: public QgsDialog
158158
* \param parent parent widget
159159
* \param f window flags
160160
*/
161-
QgsEffectStackPropertiesDialog( QgsEffectStack *stack, QWidget *parent = nullptr, Qt::WindowFlags f = 0 );
161+
QgsEffectStackPropertiesDialog( QgsEffectStack *stack, QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags f = 0 );
162162

163163
/** Returns effect stack attached to the dialog
164164
* \returns QgsEffectStack modified by the dialog

‎src/gui/effects/qgspainteffectpropertieswidget.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "ui_qgseffectpropertieswidget.h"
2020
#include "qgis_gui.h"
21+
#include "qgis_sip.h"
2122

2223
class QgsPaintEffect;
2324

@@ -39,7 +40,7 @@ class GUI_EXPORT QgsPaintEffectPropertiesWidget : public QWidget, private Ui::Ef
3940
* \param effect QgsPaintEffect to modify in the widget
4041
* \param parent parent widget
4142
*/
42-
QgsPaintEffectPropertiesWidget( QgsPaintEffect *effect, QWidget *parent = nullptr );
43+
QgsPaintEffectPropertiesWidget( QgsPaintEffect *effect, QWidget *parent SIP_TRANSFERTHIS = nullptr );
4344

4445
public slots:
4546

‎src/gui/effects/qgspainteffectwidget.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class GUI_EXPORT QgsPaintEffectWidget : public QWidget
4141
Q_OBJECT
4242

4343
public:
44-
QgsPaintEffectWidget( QWidget *parent = nullptr ) : QWidget( parent ) {}
44+
QgsPaintEffectWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr ) : QWidget( parent ) {}
4545

4646
/**
4747
* Sets the paint effect to modify with the widget
@@ -70,7 +70,7 @@ class GUI_EXPORT QgsDrawSourceWidget : public QgsPaintEffectWidget, private Ui::
7070
Q_OBJECT
7171

7272
public:
73-
QgsDrawSourceWidget( QWidget *parent = nullptr );
73+
QgsDrawSourceWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
7474

7575
static QgsPaintEffectWidget *create() SIP_FACTORY { return new QgsDrawSourceWidget(); }
7676

@@ -102,7 +102,7 @@ class GUI_EXPORT QgsBlurWidget : public QgsPaintEffectWidget, private Ui::Widget
102102
Q_OBJECT
103103

104104
public:
105-
QgsBlurWidget( QWidget *parent = nullptr );
105+
QgsBlurWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
106106

107107
static QgsPaintEffectWidget *create() SIP_FACTORY { return new QgsBlurWidget(); }
108108

@@ -136,7 +136,7 @@ class GUI_EXPORT QgsShadowEffectWidget : public QgsPaintEffectWidget, private Ui
136136
Q_OBJECT
137137

138138
public:
139-
QgsShadowEffectWidget( QWidget *parent = nullptr );
139+
QgsShadowEffectWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
140140

141141
static QgsPaintEffectWidget *create() SIP_FACTORY { return new QgsShadowEffectWidget(); }
142142

@@ -171,7 +171,7 @@ class GUI_EXPORT QgsGlowWidget : public QgsPaintEffectWidget, private Ui::Widget
171171
Q_OBJECT
172172

173173
public:
174-
QgsGlowWidget( QWidget *parent = nullptr );
174+
QgsGlowWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
175175

176176
static QgsPaintEffectWidget *create() SIP_FACTORY { return new QgsGlowWidget(); }
177177

@@ -206,7 +206,7 @@ class GUI_EXPORT QgsTransformWidget : public QgsPaintEffectWidget, private Ui::W
206206
Q_OBJECT
207207

208208
public:
209-
QgsTransformWidget( QWidget *parent = nullptr );
209+
QgsTransformWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
210210

211211
static QgsPaintEffectWidget *create() SIP_FACTORY { return new QgsTransformWidget(); }
212212

‎tests/src/python/acceptable_missing_doc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"QgsTextAnnotationItem": ["QgsTextAnnotationItem(QgsMapCanvas *canvas)"],
108108
"QgsStyle": ["symbolSaved(const QString &name, QgsSymbol *symbol)"],
109109
"QgsMarkerLineSymbolLayer": ["markerAngle(const QPolygonF &points, bool isRing, int vertex)", "renderPolylineInterval(const QPolygonF &points, QgsSymbolRenderContext &context)", "setIntervalMapUnitScale(const QgsMapUnitScale &scale)", "renderPolylineVertex(const QPolygonF &points, QgsSymbolRenderContext &context, Placement placement=Vertex)", "QgsMarkerLineSymbolLayer(bool rotateMarker=DEFAULT_MARKERLINE_ROTATE, double interval=DEFAULT_MARKERLINE_INTERVAL)", "intervalUnit() const ", "setIntervalUnit(QgsSymbol::OutputUnit unit)", "intervalMapUnitScale() const ", "renderPolylineCentral(const QPolygonF &points, QgsSymbolRenderContext &context)"],
110-
"QgsEffectDrawModeComboBox": ["QgsEffectDrawModeComboBox(QWidget *parent=nullptr)"],
110+
"QgsEffectDrawModeComboBox": ["QgsEffectDrawModeComboBox(QWidget *parent SIP_TRANSFERTHIS=nullptr)"],
111111
"CharacterWidget": ["updateFontMerging(bool enable)", "characterSelected(QChar character)", "updateColumns(int cols)", "setCharacter(QChar character)", "getColumns() const ", "getSquareSize() const "],
112112
"QgsVector": ["rotateBy(double rot) const ", "perpVector() const ", "x() const ", "operator*(QgsVector v) const ", "angle(QgsVector v) const ", "operator*(double scalar) const ", "length() const ", "normal() const ", "operator/(double scalar) const ", "y() const ", "QgsVector(double x, double y)"],
113113
"QgsSymbolLayer": ["setOutputUnit(QgsSymbol::OutputUnit unit)", "QgsSymbolLayer(QgsSymbol::SymbolType type, bool locked=false)", "dxfOffset(const QgsDxfExport &e, QgsSymbolRenderContext &context) const ", "writeDxf(QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext *context, const QgsFeature *f, QPointF shift=QPointF(0.0, 0.0)) const ", "stopRender(QgsSymbolRenderContext &context)=0", "dxfBrushColor(QgsSymbolRenderContext &context) const ", "renderingPass() const ", "setLocked(bool locked)", "setRenderingPass(int renderingPass)", "ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const ", "outputUnit() const ", "toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const ", "startRender(QgsSymbolRenderContext &context)=0", "dxfWidth(const QgsDxfExport &e, QgsSymbolRenderContext &context) const ", "subSymbol()", "dxfBrushStyle() const ", "dxfCustomDashPattern(QgsSymbol::OutputUnit &unit) const ", "mapUnitScale() const ", "dxfColor(QgsSymbolRenderContext &context) const ", "dxfPenStyle() const ", "setMapUnitScale(const QgsMapUnitScale &scale)", "type() const ", "isLocked() const ", "drawPreviewIcon(QgsSymbolRenderContext &context, QSize size)=0"],

0 commit comments

Comments
 (0)
Please sign in to comment.