Skip to content

Commit 563e7c1

Browse files
committedMay 24, 2017
sipify gui part 3
1 parent cc5e713 commit 563e7c1

25 files changed

+1049
-468
lines changed
 

‎python/auto_sip.blacklist

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,6 @@ gui/qgscompoundcolorwidget.sip
141141
gui/qgsconfigureshortcutsdialog.sip
142142
gui/qgscustomdrophandler.sip
143143
gui/qgscurveeditorwidget.sip
144-
gui/qgsdetaileditemdata.sip
145-
gui/qgsdetaileditemdelegate.sip
146-
gui/qgsdetaileditemwidget.sip
147-
gui/qgsexpressionbuilderdialog.sip
148-
gui/qgsexpressionbuilderwidget.sip
149-
gui/qgsexpressionhighlighter.sip
150-
gui/qgsexpressionlineedit.sip
151-
gui/qgsexpressionselectiondialog.sip
152-
gui/qgsextentgroupbox.sip
153-
gui/qgsfeatureselectiondlg.sip
154-
gui/qgsfieldvalidator.sip
155-
gui/qgsfieldvalueslineedit.sip
156-
gui/qgsfiledropedit.sip
157-
gui/qgsfloatingwidget.sip
158-
gui/qgsfocuswatcher.sip
159-
gui/qgsformannotation.sip
160144
gui/qgsmaptip.sip
161145
gui/qgsmaptool.sip
162146
gui/qgsmaptooladvanceddigitizing.sip

‎python/gui/qgsdetaileditemdata.sip

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsdetaileditemdata.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
112
class QgsDetailedItemData
213
{
3-
%TypeHeaderCode
4-
#include <qgsdetaileditemdata.h>
14+
%Docstring
15+
This class is the data only representation of a
16+
QgsDetailedItemWidget, designed to be used in custom views.
517
%End
618

19+
%TypeHeaderCode
20+
#include "qgsdetaileditemdata.h"
21+
%End
722
public:
823
QgsDetailedItemData();
924
void setTitle( const QString &title );
@@ -13,20 +28,57 @@ class QgsDetailedItemData
1328
void setCheckable( const bool flag );
1429
void setChecked( const bool flag );
1530
void setEnabled( bool flag );
16-
/** This is a hint to the delegate to render using
17-
* a widget rather than manually painting every
18-
* part of the list item.
19-
* @note the delegate may completely ignore this
20-
* depending on the delegate implementation.
21-
*/
31+
2232
void setRenderAsWidget( bool flag );
33+
%Docstring
34+
This is a hint to the delegate to render using
35+
a widget rather than manually painting every
36+
part of the list item.
37+
.. note::
38+
39+
the delegate may completely ignore this
40+
depending on the delegate implementation.
41+
%End
2342

2443
QString title() const;
44+
%Docstring
45+
:rtype: str
46+
%End
2547
QString detail() const;
48+
%Docstring
49+
:rtype: str
50+
%End
2651
QString category() const;
52+
%Docstring
53+
:rtype: str
54+
%End
2755
QPixmap icon() const;
56+
%Docstring
57+
:rtype: QPixmap
58+
%End
2859
bool isCheckable() const;
60+
%Docstring
61+
:rtype: bool
62+
%End
2963
bool isChecked() const;
64+
%Docstring
65+
:rtype: bool
66+
%End
3067
bool isEnabled() const;
68+
%Docstring
69+
:rtype: bool
70+
%End
3171
bool isRenderedAsWidget() const;
72+
%Docstring
73+
:rtype: bool
74+
%End
75+
3276
};
77+
78+
/************************************************************************
79+
* This file has been generated automatically from *
80+
* *
81+
* src/gui/qgsdetaileditemdata.h *
82+
* *
83+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
84+
************************************************************************/
Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,61 @@
1-
/** \ingroup gui
2-
* A custom model/view delegate that can display an icon, heading
3-
* and detail sections.
4-
* @see also QgsDetailedItemData
5-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsdetaileditemdelegate.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
612
class QgsDetailedItemDelegate : QAbstractItemDelegate
713
{
8-
%TypeHeaderCode
9-
#include <qgsdetaileditemdelegate.h>
14+
%Docstring
15+
A custom model/view delegate that can display an icon, heading
16+
and detail sections.
17+
.. seealso:: also QgsDetailedItemData
1018
%End
1119

20+
%TypeHeaderCode
21+
#include "qgsdetaileditemdelegate.h"
22+
%End
1223
public:
1324
QgsDetailedItemDelegate( QObject *parent /TransferThis/ = 0 );
1425
~QgsDetailedItemDelegate();
15-
/** Reimplement for parent class */
16-
void paint( QPainter * painter,
17-
const QStyleOptionViewItem & option,
26+
virtual void paint( QPainter *painter,
27+
const QStyleOptionViewItem &option,
1828
const QModelIndex &index ) const;
19-
/** Reimplement for parent class */
20-
QSize sizeHint( const QStyleOptionViewItem & option,
29+
%Docstring
30+
Reimplement for parent class
31+
%End
32+
virtual QSize sizeHint( const QStyleOptionViewItem &option,
2133
const QModelIndex &index ) const;
34+
%Docstring
35+
Reimplement for parent class
36+
:rtype: QSize
37+
%End
2238

2339
void setVerticalSpacing( int value );
2440

2541
int verticalSpacing() const;
42+
%Docstring
43+
:rtype: int
44+
%End
2645

2746
void setHorizontalSpacing( int value );
2847

2948
int horizontalSpacing() const;
49+
%Docstring
50+
:rtype: int
51+
%End
52+
3053
};
54+
55+
/************************************************************************
56+
* This file has been generated automatically from *
57+
* *
58+
* src/gui/qgsdetaileditemdelegate.h *
59+
* *
60+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
61+
************************************************************************/

‎python/gui/qgsdetaileditemwidget.sip

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsdetaileditemwidget.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
111
class QgsDetailedItemWidget : QWidget
212
{
13+
%Docstring
14+
A widget renderer for detailed item views.
15+
.. seealso:: also QgsDetailedItem and QgsDetailedItemData.
16+
%End
17+
318
%TypeHeaderCode
4-
#include <qgsdetaileditemwidget.h>
19+
#include "qgsdetaileditemwidget.h"
520
%End
621
public:
722
QgsDetailedItemWidget( QWidget *parent /TransferThis/ = 0 );
8-
~QgsDetailedItemWidget();
923
void setData( const QgsDetailedItemData &data );
1024
void setChecked( bool flag );
1125
};
26+
27+
/************************************************************************
28+
* This file has been generated automatically from *
29+
* *
30+
* src/gui/qgsdetaileditemwidget.h *
31+
* *
32+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
33+
************************************************************************/
Lines changed: 60 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,84 @@
1-
/** A generic dialog for building expression strings
2-
* @remarks This class also shows an example on how to use QgsExpressionBuilderWidget
3-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsexpressionbuilderdialog.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
411
class QgsExpressionBuilderDialog : QDialog
512
{
6-
%TypeHeaderCode
7-
#include <qgsexpressionbuilderdialog.h>
13+
%Docstring
14+
A generic dialog for building expression strings
15+
@remarks This class also shows an example on how to use QgsExpressionBuilderWidget
816
%End
917

18+
%TypeHeaderCode
19+
#include "qgsexpressionbuilderdialog.h"
20+
%End
1021
public:
11-
QgsExpressionBuilderDialog( QgsVectorLayer* layer, const QString& startText = QString(), QWidget* parent /TransferThis/ = NULL, const QString& key = "generic",
22+
QgsExpressionBuilderDialog( QgsVectorLayer *layer,
23+
const QString &startText = QString(),
24+
QWidget *parent /TransferThis/ = 0,
25+
const QString &key = "generic",
1226
const QgsExpressionContext &context = QgsExpressionContext() );
1327

14-
/** The builder widget that is used by the dialog */
1528
QgsExpressionBuilderWidget *expressionBuilder();
29+
%Docstring
30+
The builder widget that is used by the dialog
31+
:rtype: QgsExpressionBuilderWidget
32+
%End
1633

1734
void setExpressionText( const QString &text );
1835

1936
QString expressionText();
37+
%Docstring
38+
:rtype: str
39+
%End
2040

21-
/** Returns the expression context for the dialog. The context is used for the expression
22-
* preview result and for populating the list of available functions and variables.
23-
* @see setExpressionContext
24-
* @note added in QGIS 2.12
25-
*/
2641
QgsExpressionContext expressionContext() const;
42+
%Docstring
43+
Returns the expression context for the dialog. The context is used for the expression
44+
preview result and for populating the list of available functions and variables.
45+
.. seealso:: setExpressionContext
46+
.. versionadded:: 2.12
47+
:rtype: QgsExpressionContext
48+
%End
2749

28-
/** Sets the expression context for the dialog. The context is used for the expression
29-
* preview result and for populating the list of available functions and variables.
30-
* @param context expression context
31-
* @see expressionContext
32-
* @note added in QGIS 2.12
33-
*/
3450
void setExpressionContext( const QgsExpressionContext &context );
51+
%Docstring
52+
Sets the expression context for the dialog. The context is used for the expression
53+
preview result and for populating the list of available functions and variables.
54+
\param context expression context
55+
.. seealso:: expressionContext
56+
.. versionadded:: 2.12
57+
%End
3558

36-
/** Sets geometry calculator used in distance/area calculations. */
3759
void setGeomCalculator( const QgsDistanceArea &da );
60+
%Docstring
61+
Sets geometry calculator used in distance/area calculations.
62+
%End
3863

3964
protected:
40-
/**
41-
* Is called when the dialog get accepted or rejected
42-
* Used to save geometry
43-
*
44-
* @param r result value (unused)
45-
*/
65+
4666
virtual void done( int r );
67+
%Docstring
68+
Is called when the dialog get accepted or rejected
69+
Used to save geometry
70+
71+
\param r result value (unused)
72+
%End
4773

4874
virtual void accept();
75+
4976
};
77+
78+
/************************************************************************
79+
* This file has been generated automatically from *
80+
* *
81+
* src/gui/qgsexpressionbuilderdialog.h *
82+
* *
83+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
84+
************************************************************************/
Lines changed: 186 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
/** An expression item that can be used in the QgsExpressionBuilderWidget tree.
2-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsexpressionbuilderwidget.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
313
class QgsExpressionItem : QStandardItem
414
{
5-
%TypeHeaderCode
6-
#include <qgsexpressionbuilderwidget.h>
15+
%Docstring
16+
An expression item that can be used in the QgsExpressionBuilderWidget tree.
717
%End
818

19+
%TypeHeaderCode
20+
#include "qgsexpressionbuilderwidget.h"
21+
%End
922
public:
1023
enum ItemType
1124
{
@@ -14,194 +27,258 @@ class QgsExpressionItem : QStandardItem
1427
ExpressionNode
1528
};
1629

17-
QgsExpressionItem( const QString& label,
18-
const QString& expressionText,
19-
const QString& helpText,
30+
QgsExpressionItem( const QString &label,
31+
const QString &expressionText,
32+
const QString &helpText,
2033
QgsExpressionItem::ItemType itemType = ExpressionNode );
2134

22-
QgsExpressionItem( const QString& label,
23-
const QString& expressionText,
35+
QgsExpressionItem( const QString &label,
36+
const QString &expressionText,
2437
QgsExpressionItem::ItemType itemType = ExpressionNode );
2538

2639
QString getExpressionText() const;
40+
%Docstring
41+
:rtype: str
42+
%End
2743

28-
/** Get the help text that is associated with this expression item.
29-
*
30-
* @return The help text.
31-
*/
3244
QString getHelpText() const;
33-
/** Set the help text for the current item
34-
*
35-
* @note The help text can be set as a html string.
36-
*/
45+
%Docstring
46+
Get the help text that is associated with this expression item.
47+
48+
:return: The help text.
49+
:rtype: str
50+
%End
51+
3752
void setHelpText( const QString &helpText );
53+
%Docstring
54+
Set the help text for the current item
55+
56+
.. note::
57+
58+
The help text can be set as a html string.
59+
%End
3860

39-
/** Get the type of expression item, e.g., header, field, ExpressionNode.
40-
*
41-
* @return The QgsExpressionItem::ItemType
42-
*/
4361
QgsExpressionItem::ItemType getItemType() const;
62+
%Docstring
63+
Get the type of expression item, e.g., header, field, ExpressionNode.
64+
65+
:return: The QgsExpressionItem.ItemType
66+
:rtype: QgsExpressionItem.ItemType
67+
%End
4468

45-
//! Custom sort order role
4669
static const int CUSTOM_SORT_ROLE;
47-
//! Item type role
70+
%Docstring
71+
Custom sort order role
72+
%End
4873
static const int ITEM_TYPE_ROLE;
74+
%Docstring
75+
Item type role
76+
%End
77+
4978
};
5079

51-
/** Search proxy used to filter the QgsExpressionBuilderWidget tree.
52-
* The default search for a tree model only searches top level this will handle one
53-
* level down
54-
*/
5580
class QgsExpressionItemSearchProxy : QSortFilterProxyModel
5681
{
57-
%TypeHeaderCode
58-
#include <qgsexpressionbuilderwidget.h>
82+
%Docstring
83+
Search proxy used to filter the QgsExpressionBuilderWidget tree.
84+
The default search for a tree model only searches top level this will handle one
85+
level down
5986
%End
6087

88+
%TypeHeaderCode
89+
#include "qgsexpressionbuilderwidget.h"
90+
%End
6191
public:
6292
QgsExpressionItemSearchProxy();
6393

64-
bool filterAcceptsRow( int source_row, const QModelIndex &source_parent ) const;
94+
virtual bool filterAcceptsRow( int source_row, const QModelIndex &source_parent ) const;
95+
6596

6697
protected:
6798

68-
bool lessThan( const QModelIndex &left, const QModelIndex &right ) const;
99+
virtual bool lessThan( const QModelIndex &left, const QModelIndex &right ) const;
100+
69101
};
70102

71103

72-
/** A reusable widget that can be used to build a expression string.
73-
* See QgsExpressionBuilderDialog for example of usage.
74-
*/
75104
class QgsExpressionBuilderWidget : QWidget
76105
{
77-
%TypeHeaderCode
78-
#include <qgsexpressionbuilderwidget.h>
106+
%Docstring
107+
A reusable widget that can be used to build a expression string.
108+
See QgsExpressionBuilderDialog for example of usage.
79109
%End
80110

111+
%TypeHeaderCode
112+
#include "qgsexpressionbuilderwidget.h"
113+
%End
81114
public:
115+
82116
QgsExpressionBuilderWidget( QWidget *parent /TransferThis/ = 0 );
117+
%Docstring
118+
Create a new expression builder widget with an optional parent.
119+
%End
83120
~QgsExpressionBuilderWidget();
84121

85-
/** Sets layer in order to get the fields and values
86-
* @note this needs to be called before calling loadFieldNames().
87-
*/
88122
void setLayer( QgsVectorLayer *layer );
123+
%Docstring
124+
Sets layer in order to get the fields and values
125+
.. note::
126+
127+
this needs to be called before calling loadFieldNames().
128+
%End
89129

90-
/** Loads all the field names from the layer.
91-
* @remarks Should this really be public couldn't we just do this for the user?
92-
*/
93130
void loadFieldNames();
131+
%Docstring
132+
Loads all the field names from the layer.
133+
@remarks Should this really be public couldn't we just do this for the user?
134+
%End
94135

95136
void loadFieldNames( const QgsFields &fields );
96137

97-
/** Loads field names and values from the specified map.
98-
* @note The field values must be quoted appropriately if they are strings.
99-
* @note added in QGIS 2.12
100-
*/
101138
void loadFieldsAndValues( const QMap<QString, QStringList> &fieldValues );
139+
%Docstring
140+
Loads field names and values from the specified map.
141+
.. note::
142+
143+
The field values must be quoted appropriately if they are strings.
144+
.. versionadded:: 2.12
145+
%End
102146

103-
/** Sets geometry calculator used in distance/area calculations. */
104147
void setGeomCalculator( const QgsDistanceArea &da );
148+
%Docstring
149+
Sets geometry calculator used in distance/area calculations.
150+
%End
105151

106-
/** Gets the expression string that has been set in the expression area.
107-
* @returns The expression as a string. */
108152
QString expressionText();
153+
%Docstring
154+
Gets the expression string that has been set in the expression area.
155+
:return: The expression as a string. *
156+
:rtype: str
157+
%End
109158

110-
/** Sets the expression string for the widget */
111159
void setExpressionText( const QString &expression );
160+
%Docstring
161+
Sets the expression string for the widget
162+
%End
112163

113-
/** Returns the expression context for the widget. The context is used for the expression
114-
* preview result and for populating the list of available functions and variables.
115-
* @see setExpressionContext
116-
* @note added in QGIS 2.12
117-
*/
118164
QgsExpressionContext expressionContext() const;
165+
%Docstring
166+
Returns the expression context for the widget. The context is used for the expression
167+
preview result and for populating the list of available functions and variables.
168+
.. seealso:: setExpressionContext
169+
.. versionadded:: 2.12
170+
:rtype: QgsExpressionContext
171+
%End
119172

120-
/** Sets the expression context for the widget. The context is used for the expression
121-
* preview result and for populating the list of available functions and variables.
122-
* @param context expression context
123-
* @see expressionContext
124-
* @note added in QGIS 2.12
125-
*/
126173
void setExpressionContext( const QgsExpressionContext &context );
174+
%Docstring
175+
Sets the expression context for the widget. The context is used for the expression
176+
preview result and for populating the list of available functions and variables.
177+
\param context expression context
178+
.. seealso:: expressionContext
179+
.. versionadded:: 2.12
180+
%End
127181

128-
/** Registers a node item for the expression builder.
129-
* @param group The group the item will be show in the tree view. If the group doesn't exsit it will be created.
130-
* @param label The label that is show to the user for the item in the tree.
131-
* @param expressionText The text that is inserted into the expression area when the user double clicks on the item.
132-
* @param helpText The help text that the user will see when item is selected.
133-
* @param type The type of the expression item.
134-
* @param highlightedItem set to true to make the item highlighted, which inserts a bold copy of the item at the top level
135-
* @param sortOrder sort ranking for item
136-
*/
137-
void registerItem( const QString& group, const QString& label, const QString& expressionText,
138-
const QString& helpText = "",
182+
void registerItem( const QString &group, const QString &label, const QString &expressionText,
183+
const QString &helpText = "",
139184
QgsExpressionItem::ItemType type = QgsExpressionItem::ExpressionNode,
140185
bool highlightedItem = false, int sortOrder = 1 );
186+
%Docstring
187+
Registers a node item for the expression builder.
188+
\param group The group the item will be show in the tree view. If the group doesn't exsit it will be created.
189+
\param label The label that is show to the user for the item in the tree.
190+
\param expressionText The text that is inserted into the expression area when the user double clicks on the item.
191+
\param helpText The help text that the user will see when item is selected.
192+
\param type The type of the expression item.
193+
\param highlightedItem set to true to make the item highlighted, which inserts a bold copy of the item at the top level
194+
\param sortOrder sort ranking for item
195+
%End
141196

142197
bool isExpressionValid();
198+
%Docstring
199+
:rtype: bool
200+
%End
143201

144-
/**
145-
* Adds the current expression to the given collection.
146-
* By default it is saved to the collection "generic".
147-
*/
148202
void saveToRecent( const QString &collection = "generic" );
203+
%Docstring
204+
Adds the current expression to the given collection.
205+
By default it is saved to the collection "generic".
206+
%End
149207

150-
/**
151-
* Loads the recent expressions from the given collection.
152-
* By default it is loaded from the collection "generic".
153-
*/
154208
void loadRecent( const QString &collection = "generic" );
209+
%Docstring
210+
Loads the recent expressions from the given collection.
211+
By default it is loaded from the collection "generic".
212+
%End
155213

156-
/** Create a new file in the function editor
157-
*/
158214
void newFunctionFile( const QString &fileName = "scratch" );
215+
%Docstring
216+
Create a new file in the function editor
217+
%End
159218

160-
/** Save the current function editor text to the given file.
161-
*/
162219
void saveFunctionFile( QString fileName );
220+
%Docstring
221+
Save the current function editor text to the given file.
222+
%End
163223

164-
/** Load code from the given file into the function editor
165-
*/
166224
void loadCodeFromFile( QString path );
225+
%Docstring
226+
Load code from the given file into the function editor
227+
%End
167228

168-
/** Load code into the function editor
169-
*/
170229
void loadFunctionCode( const QString &code );
230+
%Docstring
231+
Load code into the function editor
232+
%End
171233

172-
/** Update the list of function files found at the given path
173-
*/
174234
void updateFunctionFileList( const QString &path );
235+
%Docstring
236+
Update the list of function files found at the given path
237+
%End
175238

176239
public slots:
177240

178-
/**
179-
* Load sample values into the sample value area
180-
*/
181241
void loadSampleValues();
242+
%Docstring
243+
Load sample values into the sample value area
244+
%End
182245

183-
/**
184-
* Load all unique values from the set layer into the sample area
185-
*/
186246
void loadAllValues();
247+
%Docstring
248+
Load all unique values from the set layer into the sample area
249+
%End
187250

188-
/**
189-
* Auto save the current Python function code.
190-
*/
191251
void autosave();
252+
%Docstring
253+
Auto save the current Python function code.
254+
%End
192255

193-
/**
194-
* Enabled or disable auto saving. When enabled Python scripts will be auto saved
195-
* when text changes.
196-
* @param enabled True to enable auto saving.
197-
*/
198256
void setAutoSave( bool enabled );
257+
%Docstring
258+
Enabled or disable auto saving. When enabled Python scripts will be auto saved
259+
when text changes.
260+
\param enabled True to enable auto saving.
261+
%End
199262

200263
signals:
201-
/** Emitted when the user changes the expression in the widget.
202-
* Users of this widget should connect to this signal to decide if to let the user
203-
* continue.
204-
* @param isValid Is true if the expression the user has typed is valid.
205-
*/
264+
206265
void expressionParsed( bool isValid );
266+
%Docstring
267+
Emitted when the user changes the expression in the widget.
268+
Users of this widget should connect to this signal to decide if to let the user
269+
continue.
270+
\param isValid Is true if the expression the user has typed is valid.
271+
%End
272+
273+
protected:
274+
void showEvent( QShowEvent *e );
275+
207276
};
277+
278+
/************************************************************************
279+
* This file has been generated automatically from *
280+
* *
281+
* src/gui/qgsexpressionbuilderwidget.h *
282+
* *
283+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
284+
************************************************************************/
Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,35 @@
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsexpressionhighlighter.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
113
class QgsExpressionHighlighter : QSyntaxHighlighter
214
{
15+
316
%TypeHeaderCode
417
#include "qgsexpressionhighlighter.h"
518
%End
6-
719
public:
820
QgsExpressionHighlighter( QTextDocument *parent = 0 );
921
void addFields( const QStringList &fieldList );
1022

1123
protected:
12-
void highlightBlock( const QString &text );
24+
virtual void highlightBlock( const QString &text );
25+
26+
1327
};
28+
29+
/************************************************************************
30+
* This file has been generated automatically from *
31+
* *
32+
* src/gui/qgsexpressionhighlighter.h *
33+
* *
34+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
35+
************************************************************************/

‎python/gui/qgsexpressionlineedit.sip

Lines changed: 95 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,130 @@
1-
/** \ingroup gui
2-
* @class QgsExpressionLineEdit
3-
* @brief The QgsExpressionLineEdit widget includes a line edit for entering expressions
4-
* together with a button to open the expression creation dialog.
5-
*
6-
* This widget is designed for use in contexts where no layer fields are available for
7-
* use in an expression. In contexts where the expression is directly associated with
8-
* a layer and fields can be used, then QgsFieldExpressionWidget is a more appropriate
9-
* choice as it gives users direct access to select fields from a drop down list.
10-
* @note added in QGIS 3.0
11-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsexpressionlineedit.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
1211

1312
class QgsExpressionLineEdit : QWidget
1413
{
14+
%Docstring
15+
The QgsExpressionLineEdit widget includes a line edit for entering expressions
16+
together with a button to open the expression creation dialog.
17+
18+
This widget is designed for use in contexts where no layer fields are available for
19+
use in an expression. In contexts where the expression is directly associated with
20+
a layer and fields can be used, then QgsFieldExpressionWidget is a more appropriate
21+
choice as it gives users direct access to select fields from a drop down list.
22+
23+
QgsExpressionLineEdit also supports a multiline editor mode which is useful where
24+
more space is available for the widget, but where QgsExpressionBuilderWidget
25+
is too complex or large for use.
26+
27+
.. versionadded:: 3.0
28+
%End
29+
1530
%TypeHeaderCode
1631
#include "qgsexpressionlineedit.h"
1732
%End
18-
1933
public:
2034

21-
/**
22-
* Constructor for QgsExpressionLineEdit.
23-
* @param parent parent widget
24-
*/
2535
explicit QgsExpressionLineEdit( QWidget *parent /TransferThis/ = 0 );
26-
/** Sets the title used in the expression builder dialog
27-
* @param title dialog title
28-
* @see expressionDialogTitle()
29-
*/
36+
%Docstring
37+
Constructor for QgsExpressionLineEdit.
38+
\param parent parent widget
39+
%End
40+
3041
void setExpressionDialogTitle( const QString &title );
42+
%Docstring
43+
Sets the title used in the expression builder dialog
44+
\param title dialog title
45+
.. seealso:: expressionDialogTitle()
46+
%End
3147

32-
/** Returns the title used for the expression dialog.
33-
* @see setExpressionDialogTitle()
34-
*/
3548
QString expressionDialogTitle() const;
49+
%Docstring
50+
Returns the title used for the expression dialog.
51+
.. seealso:: setExpressionDialogTitle()
52+
:rtype: str
53+
%End
3654

37-
/** Sets whether the widget should show a multiline text editor.
38-
* @param multiLine set to true to show multiline editor, or false
39-
* to show single line editor (the default).
40-
*/
4155
void setMultiLine( bool multiLine );
56+
%Docstring
57+
Sets whether the widget should show a multiline text editor.
58+
\param multiLine set to true to show multiline editor, or false
59+
to show single line editor (the default).
60+
%End
4261

43-
/** Set the geometry calculator used in the expression dialog.
44-
* @param distanceArea calculator
45-
*/
4662
void setGeomCalculator( const QgsDistanceArea &distanceArea );
63+
%Docstring
64+
Set the geometry calculator used in the expression dialog.
65+
\param distanceArea calculator
66+
%End
4767

48-
/** Sets a layer associated with the widget. Required in order to get the fields and values
49-
* from the layer.
50-
* @param layer vector layer
51-
*/
5268
void setLayer( QgsVectorLayer *layer );
69+
%Docstring
70+
Sets a layer associated with the widget. Required in order to get the fields and values
71+
from the layer.
72+
This will also automatically register the layer as expression context generator if
73+
no generator has been set before or the previous layer has been used as generator.
74+
75+
.. seealso:: registerExpressionContextGenerator
76+
%End
5377

54-
/** Returns the current expression shown in the widget.
55-
* @see setExpression()
56-
*/
5778
QString expression() const;
79+
%Docstring
80+
Returns the current expression shown in the widget.
81+
.. seealso:: setExpression()
82+
:rtype: str
83+
%End
5884

59-
/**
60-
* Returns true if the current expression is valid.
61-
* @param expressionError will be set to any generated error message if specified
62-
*/
6385
bool isValidExpression( QString *expressionError /Out/ = 0 ) const;
86+
%Docstring
87+
Returns true if the current expression is valid.
88+
\param expressionError will be set to any generated error message if specified
89+
:rtype: bool
90+
%End
6491

65-
/**
66-
* Register an expression context generator class that will be used to retrieve
67-
* an expression context for the widget.
68-
* @param generator A QgsExpressionContextGenerator class that will be used to
69-
* create an expression context when required.
70-
*/
7192
void registerExpressionContextGenerator( const QgsExpressionContextGenerator *generator );
93+
%Docstring
94+
Register an expression context generator class that will be used to retrieve
95+
an expression context for the widget.
96+
\param generator A QgsExpressionContextGenerator class that will be used to
97+
create an expression context when required.
98+
%End
7299

73100
signals:
74101

75-
/** Emitted when the expression is changed.
76-
* @param expression new expression
77-
*/
78102
void expressionChanged( const QString &expression );
103+
%Docstring
104+
Emitted when the expression is changed.
105+
\param expression new expression
106+
%End
79107

80108
public slots:
81109

82-
/** Sets the current expression to show in the widget.
83-
* @param expression expression string
84-
* @see expression()
85-
*/
86110
void setExpression( const QString &expression );
111+
%Docstring
112+
Sets the current expression to show in the widget.
113+
\param expression expression string
114+
.. seealso:: expression()
115+
%End
87116

88117
protected:
89-
void changeEvent( QEvent *event );
118+
119+
virtual void changeEvent( QEvent *event );
120+
121+
90122
};
123+
124+
/************************************************************************
125+
* This file has been generated automatically from *
126+
* *
127+
* src/gui/qgsexpressionlineedit.h *
128+
* *
129+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
130+
************************************************************************/
Lines changed: 74 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,98 @@
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsexpressionselectiondialog.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
113
class QgsExpressionSelectionDialog : QDialog
214
{
15+
%Docstring
16+
This class offers a dialog to change feature selections.
17+
To do so, a QgsExpressionBuilderWidget is shown in a dialog.
18+
It offers the possibilities to create a new selection, add to the current selection
19+
remove from the current selection or select within the current selection.
20+
%End
21+
322
%TypeHeaderCode
4-
#include <qgsexpressionselectiondialog.h>
23+
#include "qgsexpressionselectiondialog.h"
524
%End
625
public:
7-
/**
8-
* Creates a new selection dialog.
9-
* @param layer The layer on which the selection is to be performed.
10-
* @param startText A default expression text to be applied (Defaults to empty)
11-
* @param parent parent object (owner)
12-
*/
26+
1327
QgsExpressionSelectionDialog( QgsVectorLayer *layer, const QString &startText = QString(), QWidget *parent /TransferThis/ = 0 );
28+
%Docstring
29+
Creates a new selection dialog.
30+
\param layer The layer on which the selection is to be performed.
31+
\param startText A default expression text to be applied (Defaults to empty)
32+
\param parent parent object (owner)
33+
%End
1434

15-
/**
16-
* The builder widget that is used by the dialog
17-
* @return The builder widget that is used by the dialog
18-
*/
1935
QgsExpressionBuilderWidget *expressionBuilder();
36+
%Docstring
37+
The builder widget that is used by the dialog
38+
:return: The builder widget that is used by the dialog
39+
:rtype: QgsExpressionBuilderWidget
40+
%End
2041

21-
/**
22-
* Sets the current expression text
23-
* @param text the expression text to set
24-
*/
2542
void setExpressionText( const QString &text );
43+
%Docstring
44+
Sets the current expression text
45+
\param text the expression text to set
46+
%End
2647

27-
/**
28-
* Returns the current expression text
29-
* @return The expression text
30-
*/
3148
QString expressionText();
49+
%Docstring
50+
Returns the current expression text
51+
:return: The expression text
52+
:rtype: str
53+
%End
3254

33-
/**
34-
*Sets geometry calculator used in distance/area calculations.
35-
*/
3655
void setGeomCalculator( const QgsDistanceArea &da );
56+
%Docstring
57+
Sets geometry calculator used in distance/area calculations.
58+
%End
3759

38-
/** Sets the message bar to display feedback from the dialog. This is used when zooming to
39-
* features to display the count of selected features.
40-
* @param messageBar target message bar
41-
* @note added in QGIS 3.0
42-
*/
4360
void setMessageBar( QgsMessageBar *messageBar );
61+
%Docstring
62+
Sets the message bar to display feedback from the dialog. This is used when zooming to
63+
features to display the count of selected features.
64+
\param messageBar target message bar
65+
.. versionadded:: 3.0
66+
%End
4467

45-
/**
46-
* Sets a map canvas associated with the dialog.
47-
* @note added in QGIS 3.0
48-
*/
4968
void setMapCanvas( QgsMapCanvas *canvas );
69+
%Docstring
70+
Sets a map canvas associated with the dialog.
71+
.. versionadded:: 3.0
72+
%End
5073

5174
protected:
52-
/**
53-
* Implementation for closeEvent
54-
* Saves the window geometry
55-
* @param closeEvent Event object. Unused.
56-
*/
75+
5776
virtual void closeEvent( QCloseEvent *closeEvent );
77+
%Docstring
78+
Implementation for closeEvent
79+
Saves the window geometry
80+
\param closeEvent Event object. Unused.
81+
%End
5882

59-
/**
60-
* Implementation for done (default behavior when pressing esc)
61-
* Calls close, so the window geometry gets saved and the object deleted.
62-
* @param r Result value. Unused.
63-
*/
6483
virtual void done( int r );
84+
%Docstring
85+
Implementation for done (default behavior when pressing esc)
86+
Calls close, so the window geometry gets saved and the object deleted.
87+
\param r Result value. Unused.
88+
%End
89+
6590
};
91+
92+
/************************************************************************
93+
* This file has been generated automatically from *
94+
* *
95+
* src/gui/qgsexpressionselectiondialog.h *
96+
* *
97+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
98+
************************************************************************/

‎python/gui/qgsextentgroupbox.sip

Lines changed: 87 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,116 @@
1-
/**
2-
* Collapsible group box for configuration of extent, typically for a save operation.
3-
*
4-
* Besides allowing the user to enter the extent manually, it comes with options to use
5-
* original extent or extent defined by the current view in map canvas.
6-
*
7-
* When using the widget, make sure to call setOriginalExtent(), setCurrentExtent() and setOutputCrs() during initialization.
8-
*
9-
* @note added in 2.4
10-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsextentgroupbox.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
1113
class QgsExtentGroupBox : QgsCollapsibleGroupBox
1214
{
15+
%Docstring
16+
Collapsible group box for configuration of extent, typically for a save operation.
17+
18+
Besides allowing the user to enter the extent manually, it comes with options to use
19+
original extent or extent defined by the current view in map canvas.
20+
21+
When using the widget, make sure to call setOriginalExtent(), setCurrentExtent() and setOutputCrs() during initialization.
22+
23+
.. versionadded:: 2.4
24+
%End
25+
1326
%TypeHeaderCode
14-
#include <qgsextentgroupbox.h>
27+
#include "qgsextentgroupbox.h"
1528
%End
1629
public:
1730
explicit QgsExtentGroupBox( QWidget *parent /TransferThis/ = 0 );
1831

1932
enum ExtentState
2033
{
21-
OriginalExtent, //!< layer's extent
22-
CurrentExtent, //!< map canvas extent
23-
UserExtent, //!< extent manually entered/modified by the user
34+
OriginalExtent,
35+
CurrentExtent,
36+
UserExtent,
2437
};
2538

26-
//! Setup original extent - should be called as part of initialization
2739
void setOriginalExtent( const QgsRectangle &originalExtent, const QgsCoordinateReferenceSystem &originalCrs );
40+
%Docstring
41+
Setup original extent - should be called as part of initialization
42+
%End
2843

2944
QgsRectangle originalExtent() const;
45+
%Docstring
46+
:rtype: QgsRectangle
47+
%End
3048
const QgsCoordinateReferenceSystem &originalCrs() const;
49+
%Docstring
50+
:rtype: QgsCoordinateReferenceSystem
51+
%End
3152

32-
//! Setup current extent - should be called as part of initialization (or whenever current extent changes)
3353
void setCurrentExtent( const QgsRectangle &currentExtent, const QgsCoordinateReferenceSystem &currentCrs );
54+
%Docstring
55+
Setup current extent - should be called as part of initialization (or whenever current extent changes)
56+
%End
3457

3558
QgsRectangle currentExtent() const;
59+
%Docstring
60+
:rtype: QgsRectangle
61+
%End
3662
const QgsCoordinateReferenceSystem &currentCrs() const;
63+
%Docstring
64+
:rtype: QgsCoordinateReferenceSystem
65+
%End
3766

38-
//! Set the output CRS - may need to be used for transformation from original/current extent.
39-
//! Should be called as part of initialization and whenever the the output CRS is changed
4067
void setOutputCrs( const QgsCoordinateReferenceSystem &outputCrs );
68+
%Docstring
69+
Should be called as part of initialization and whenever the the output CRS is changed
70+
%End
4171

42-
//! Get the resulting extent - in output CRS coordinates
4372
QgsRectangle outputExtent() const;
73+
%Docstring
74+
Get the resulting extent - in output CRS coordinates
75+
:rtype: QgsRectangle
76+
%End
4477

4578
QgsExtentGroupBox::ExtentState extentState() const;
79+
%Docstring
80+
:rtype: QgsExtentGroupBox.ExtentState
81+
%End
4682

47-
//! Set base part of title of the group box (will be appended with extent state)
48-
//! @note added in 2.12
4983
void setTitleBase( const QString &title );
50-
//! Set base part of title of the group box (will be appended with extent state)
51-
//! @note added in 2.12
84+
%Docstring
85+
.. versionadded:: 2.12
86+
%End
5287
QString titleBase() const;
88+
%Docstring
89+
.. versionadded:: 2.12
90+
:rtype: str
91+
%End
5392

5493
public slots:
55-
//! set output extent to be the same as original extent (may be transformed to output CRS)
5694
void setOutputExtentFromOriginal();
95+
%Docstring
96+
set output extent to be the same as original extent (may be transformed to output CRS)
97+
%End
5798

58-
//! set output extent to be the same as current extent (may be transformed to output CRS)
5999
void setOutputExtentFromCurrent();
100+
%Docstring
101+
set output extent to be the same as current extent (may be transformed to output CRS)
102+
%End
60103

61-
//! set output extent to custom extent (may be transformed to output CRS)
62104
void setOutputExtentFromUser( const QgsRectangle &extent, const QgsCoordinateReferenceSystem &crs );
105+
%Docstring
106+
set output extent to custom extent (may be transformed to output CRS)
107+
%End
63108

64109
signals:
65-
//! emitted when extent is changed
66110
void extentChanged( const QgsRectangle &r );
111+
%Docstring
112+
emitted when extent is changed
113+
%End
67114

68115
protected slots:
69116

@@ -78,4 +125,17 @@ class QgsExtentGroupBox : QgsCollapsibleGroupBox
78125
void setOutputExtent( const QgsRectangle &r, const QgsCoordinateReferenceSystem &srcCrs, QgsExtentGroupBox::ExtentState state );
79126
void setOutputExtentFromLineEdit();
80127
void updateTitle();
128+
129+
130+
131+
132+
81133
};
134+
135+
/************************************************************************
136+
* This file has been generated automatically from *
137+
* *
138+
* src/gui/qgsextentgroupbox.h *
139+
* *
140+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
141+
************************************************************************/

‎python/gui/qgsfeatureselectiondlg.sip

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
/***************************************************************************
2-
qgsfeatureselectiondlg.sip
3-
--------------------------------------
4-
Date : 30.11.2015
5-
Copyright : (C) 2015 Matthias Kuhn
6-
Email : matthias at opengis dot ch
7-
***************************************************************************
8-
* *
9-
* This program is free software; you can redistribute it and/or modify *
10-
* it under the terms of the GNU General Public License as published by *
11-
* the Free Software Foundation; either version 2 of the License, or *
12-
* (at your option) any later version. *
13-
* *
14-
***************************************************************************/
15-
16-
// This is required for the ConvertToSubClassCode to work properly
17-
// so RTTI for casting is available in the whole module.
18-
%ModuleCode
19-
#include "qgsfeatureselectiondlg.h"
20-
%End
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsfeatureselectiondlg.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
2111

2212
class QgsFeatureSelectionDlg : QDialog
2313
{
14+
2415
%TypeHeaderCode
2516
#include "qgsfeatureselectiondlg.h"
2617
%End
2718

2819
%ConvertToSubClassCode
29-
if ( qobject_cast<QgsFeatureSelectionDlg*>( sipCpp ) )
30-
sipType = sipType_QgsFeatureSelectionDlg;
31-
else
32-
sipType = 0;
20+
if ( qobject_cast<QgsFeatureSelectionDlg *>( sipCpp ) )
21+
sipType = sipType_QgsFeatureSelectionDlg;
22+
else
23+
sipType = 0;
3324
%End
34-
3525
public:
3626
explicit QgsFeatureSelectionDlg( QgsVectorLayer *vl, QgsAttributeEditorContext &context, QWidget *parent /TransferThis/ = 0 );
3727

38-
/**
39-
* Get the selected features
40-
*
41-
* @return The selected feature ids
42-
*/
4328
const QgsFeatureIds &selectedFeatures();
29+
%Docstring
30+
Get the selected features
31+
32+
:return: The selected feature ids
33+
:rtype: QgsFeatureIds
34+
%End
4435

45-
/**
46-
* Set the selected features
47-
* @param ids The feature ids to select
48-
*/
4936
void setSelectedFeatures( const QgsFeatureIds &ids );
37+
%Docstring
38+
Set the selected features
39+
\param ids The feature ids to select
40+
%End
41+
5042
};
43+
44+
/************************************************************************
45+
* This file has been generated automatically from *
46+
* *
47+
* src/gui/qgsfeatureselectiondlg.h *
48+
* *
49+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
50+
************************************************************************/

‎python/gui/qgsfieldvalidator.sip

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,38 @@
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsfieldvalidator.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
111

212
class QgsFieldValidator : QValidator
313
{
14+
415
%TypeHeaderCode
5-
#include <qgsfieldvalidator.h>
16+
#include "qgsfieldvalidator.h"
617
%End
7-
818
public:
919
QgsFieldValidator( QObject *parent, const QgsField &field, const QString &defaultValue, const QString &dateFormat = "yyyy-MM-dd" );
1020
~QgsFieldValidator();
1121

12-
virtual State validate( QString & /Constrained/, int & /In,Out/) const = 0;
13-
virtual void fixup( QString & /Constrained/) const;
22+
virtual State validate( QString &SIP_CONSTRAINED, int &/In,Out/ ) const;
23+
virtual void fixup( QString & ) const;
1424

1525
QString dateFormat() const;
26+
%Docstring
27+
:rtype: str
28+
%End
29+
1630
};
31+
32+
/************************************************************************
33+
* This file has been generated automatically from *
34+
* *
35+
* src/gui/qgsfieldvalidator.h *
36+
* *
37+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
38+
************************************************************************/

‎python/gui/qgsfieldvalueslineedit.sip

Lines changed: 66 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,90 @@
1-
/** \class QgsFieldValuesLineEdit
2-
* \ingroup gui
3-
* A line edit with an autocompleter which takes unique values from a vector layer's fields.
4-
* The autocompleter is populated from the vector layer in the background to ensure responsive
5-
* interaction with the widget.
6-
* \note added in QGIS 3.0
7-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsfieldvalueslineedit.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
813
class QgsFieldValuesLineEdit: QgsFilterLineEdit
914
{
15+
%Docstring
16+
A line edit with an autocompleter which takes unique values from a vector layer's fields.
17+
The autocompleter is populated from the vector layer in the background to ensure responsive
18+
interaction with the widget.
19+
.. versionadded:: 3.0
20+
%End
21+
1022
%TypeHeaderCode
11-
#include <qgsfieldvalueslineedit.h>
23+
#include "qgsfieldvalueslineedit.h"
1224
%End
1325
public:
1426

15-
/** Constructor for QgsFieldValuesLineEdit
16-
* @param parent parent widget
17-
*/
1827
QgsFieldValuesLineEdit( QWidget *parent /TransferThis/ = 0 );
28+
%Docstring
29+
Constructor for QgsFieldValuesLineEdit
30+
\param parent parent widget
31+
%End
1932

2033
virtual ~QgsFieldValuesLineEdit();
2134

22-
/** Sets the layer containing the field that values will be shown from.
23-
* @param layer vector layer
24-
* @see layer()
25-
* @see setAttributeIndex()
26-
*/
2735
void setLayer( QgsVectorLayer *layer );
36+
%Docstring
37+
Sets the layer containing the field that values will be shown from.
38+
\param layer vector layer
39+
.. seealso:: layer()
40+
.. seealso:: setAttributeIndex()
41+
%End
2842

29-
/** Returns the layer containing the field that values will be shown from.
30-
* @see setLayer()
31-
* @see attributeIndex()
32-
*/
3343
QgsVectorLayer *layer() const;
44+
%Docstring
45+
Returns the layer containing the field that values will be shown from.
46+
.. seealso:: setLayer()
47+
.. seealso:: attributeIndex()
48+
:rtype: QgsVectorLayer
49+
%End
3450

35-
/** Sets the attribute index for the field containing values to show in the widget.
36-
* @param index index of attribute
37-
* @see attributeIndex()
38-
* @see setLayer()
39-
*/
4051
void setAttributeIndex( int index );
52+
%Docstring
53+
Sets the attribute index for the field containing values to show in the widget.
54+
\param index index of attribute
55+
.. seealso:: attributeIndex()
56+
.. seealso:: setLayer()
57+
%End
4158

42-
/** Returns the attribute index for the field containing values shown in the widget.
43-
* @see setAttributeIndex()
44-
* @see layer()
45-
*/
4659
int attributeIndex() const;
60+
%Docstring
61+
Returns the attribute index for the field containing values shown in the widget.
62+
.. seealso:: setAttributeIndex()
63+
.. seealso:: layer()
64+
:rtype: int
65+
%End
4766

4867
signals:
4968

50-
/** Emitted when the layer associated with the widget changes.
51-
* @param layer vector layer
52-
*/
5369
void layerChanged( QgsVectorLayer *layer );
70+
%Docstring
71+
Emitted when the layer associated with the widget changes.
72+
\param layer vector layer
73+
%End
5474

55-
/** Emitted when the field associated with the widget changes.
56-
* @param index new attribute index for field
57-
*/
5875
void attributeIndexChanged( int index );
76+
%Docstring
77+
Emitted when the field associated with the widget changes.
78+
\param index new attribute index for field
79+
%End
80+
5981
};
82+
83+
84+
/************************************************************************
85+
* This file has been generated automatically from *
86+
* *
87+
* src/gui/qgsfieldvalueslineedit.h *
88+
* *
89+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
90+
************************************************************************/

‎python/gui/qgsfiledropedit.sip

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,71 @@
1-
/** \ingroup gui
2-
* A line edit for capturing file names that can have files dropped onto
3-
* it via drag & drop.
4-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsfiledropedit.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
510
class QgsFileDropEdit: QLineEdit
611
{
12+
%Docstring
13+
A line edit for capturing file names that can have files dropped onto
14+
it via drag & drop.
15+
16+
Dropping can be limited to files only, files with a specific extension
17+
or directories only. By default, dropping is limited to files only.
18+
%End
19+
720
%TypeHeaderCode
8-
#include <qgsfiledropedit.h>
21+
#include "qgsfiledropedit.h"
922
%End
1023
public:
1124
QgsFileDropEdit( QWidget *parent /TransferThis/ = 0 );
12-
virtual ~QgsFileDropEdit();
1325

1426
bool isDirOnly() const;
27+
%Docstring
28+
:rtype: bool
29+
%End
30+
1531
void setDirOnly( bool isDirOnly );
32+
%Docstring
33+
Limit drops to directories.
34+
%End
1635

1736
bool isFileOnly() const;
37+
%Docstring
38+
:rtype: bool
39+
%End
40+
1841
void setFileOnly( bool isFileOnly );
42+
%Docstring
43+
Limit drops to files.
44+
%End
1945

2046
QString suffixFilter() const;
47+
%Docstring
48+
:rtype: str
49+
%End
50+
2151
void setSuffixFilter( const QString &suffix );
52+
%Docstring
53+
Limit drops to files with specified extension.
54+
%End
2255

2356
protected:
2457

2558
virtual void dragEnterEvent( QDragEnterEvent *event );
2659
virtual void dragLeaveEvent( QDragLeaveEvent *event );
2760
virtual void dropEvent( QDropEvent *event );
2861
virtual void paintEvent( QPaintEvent *e );
62+
2963
};
64+
65+
/************************************************************************
66+
* This file has been generated automatically from *
67+
* *
68+
* src/gui/qgsfiledropedit.h *
69+
* *
70+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
71+
************************************************************************/

‎python/gui/qgsfloatingwidget.sip

Lines changed: 91 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,126 @@
1-
/** \ingroup gui
2-
* \class QgsFloatingWidget
3-
* A QWidget subclass for creating widgets which float outside of the normal Qt layout
4-
* system. Floating widgets use an "anchor widget" to determine how they are anchored
5-
* within their parent widget.
6-
* \note Added in version 2.16
7-
*/
8-
9-
class QgsFloatingWidget : QWidget
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsfloatingwidget.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
class QgsFloatingWidget: QWidget
1013
{
11-
%TypeHeaderCode
12-
#include <qgsfloatingwidget.h>
14+
%Docstring
15+
A QWidget subclass for creating widgets which float outside of the normal Qt layout
16+
system. Floating widgets use an "anchor widget" to determine how they are anchored
17+
within their parent widget.
18+
.. versionadded:: 3.0
1319
%End
1420

21+
%TypeHeaderCode
22+
#include "qgsfloatingwidget.h"
23+
%End
1524
public:
1625

17-
//! Reference points for anchoring widget position
1826
enum AnchorPoint
1927
{
20-
TopLeft, //!< Top-left of widget
21-
TopMiddle, //!< Top center of widget
22-
TopRight, //!< Top-right of widget
23-
MiddleLeft, //!< Middle left of widget
24-
Middle, //!< Middle of widget
25-
MiddleRight, //!< Middle right of widget
26-
BottomLeft, //!< Bottom-left of widget
27-
BottomMiddle, //!< Bottom center of widget
28-
BottomRight, //!< Bottom-right of widget
28+
TopLeft,
29+
TopMiddle,
30+
TopRight,
31+
MiddleLeft,
32+
Middle,
33+
MiddleRight,
34+
BottomLeft,
35+
BottomMiddle,
36+
BottomRight,
2937
};
3038

31-
/** Constructor for QgsFloatingWidget.
32-
* @param parent parent widget
33-
*/
3439
QgsFloatingWidget( QWidget *parent /TransferThis/ = 0 );
40+
%Docstring
41+
Constructor for QgsFloatingWidget.
42+
\param parent parent widget
43+
%End
3544

36-
/** Sets the widget to "anchor" the floating widget to. The floating widget will be repositioned whenever the
37-
* anchor widget moves or is resized so that it maintains the same relative position to the anchor widget.
38-
* @param widget anchor widget. Both the floating widget and the anchor widget must share some common parent.
39-
* @see anchorWidget()
40-
*/
4145
void setAnchorWidget( QWidget *widget );
46+
%Docstring
47+
Sets the widget to "anchor" the floating widget to. The floating widget will be repositioned whenever the
48+
anchor widget moves or is resized so that it maintains the same relative position to the anchor widget.
49+
\param widget anchor widget. Both the floating widget and the anchor widget must share some common parent.
50+
.. seealso:: anchorWidget()
51+
%End
4252

43-
/** Returns the widget that the floating widget is "anchored" tto. The floating widget will be repositioned whenever the
44-
* anchor widget moves or is resized so that it maintains the same relative position to the anchor widget.
45-
* @see setAnchorWidget()
46-
*/
4753
QWidget *anchorWidget();
54+
%Docstring
55+
Returns the widget that the floating widget is "anchored" tto. The floating widget will be repositioned whenever the
56+
anchor widget moves or is resized so that it maintains the same relative position to the anchor widget.
57+
.. seealso:: setAnchorWidget()
58+
:rtype: QWidget
59+
%End
4860

49-
/** Returns the floating widget's anchor point, which corresponds to the point on the widget which should remain
50-
* fixed in the same relative position whenever the widget's parent is resized or moved.
51-
* @see setAnchorPoint()
52-
*/
5361
AnchorPoint anchorPoint() const;
62+
%Docstring
63+
Returns the floating widget's anchor point, which corresponds to the point on the widget which should remain
64+
fixed in the same relative position whenever the widget's parent is resized or moved.
65+
.. seealso:: setAnchorPoint()
66+
:rtype: AnchorPoint
67+
%End
5468

55-
/** Sets the floating widget's anchor point, which corresponds to the point on the widget which should remain
56-
* fixed in the same relative position whenever the widget's parent is resized or moved.
57-
* @param point anchor point
58-
* @see anchorPoint()
59-
*/
6069
void setAnchorPoint( AnchorPoint point );
70+
%Docstring
71+
Sets the floating widget's anchor point, which corresponds to the point on the widget which should remain
72+
fixed in the same relative position whenever the widget's parent is resized or moved.
73+
\param point anchor point
74+
.. seealso:: anchorPoint()
75+
%End
6176

62-
/** Returns the anchor widget's anchor point, which corresponds to the point on the anchor widget which
63-
* the floating widget should "attach" to. The floating widget should remain fixed in the same relative position
64-
* to this anchor widget whenever the widget's parent is resized or moved.
65-
* @see setAnchorWidgetPoint()
66-
*/
6777
AnchorPoint anchorWidgetPoint() const;
78+
%Docstring
79+
Returns the anchor widget's anchor point, which corresponds to the point on the anchor widget which
80+
the floating widget should "attach" to. The floating widget should remain fixed in the same relative position
81+
to this anchor widget whenever the widget's parent is resized or moved.
82+
.. seealso:: setAnchorWidgetPoint()
83+
:rtype: AnchorPoint
84+
%End
6885

69-
/** Returns the anchor widget's anchor point, which corresponds to the point on the anchor widget which
70-
* the floating widget should "attach" to. The floating widget should remain fixed in the same relative position
71-
* to this anchor widget whenever the widget's parent is resized or moved.
72-
* @see setAnchorWidgetPoint()
73-
*/
7486
void setAnchorWidgetPoint( AnchorPoint point );
87+
%Docstring
88+
Returns the anchor widget's anchor point, which corresponds to the point on the anchor widget which
89+
the floating widget should "attach" to. The floating widget should remain fixed in the same relative position
90+
to this anchor widget whenever the widget's parent is resized or moved.
91+
.. seealso:: setAnchorWidgetPoint()
92+
%End
7593

7694
signals:
7795

78-
//! Emitted when the anchor widget changes
7996
void anchorWidgetChanged( QWidget *widget );
97+
%Docstring
98+
Emitted when the anchor widget changes
99+
%End
80100

81-
//! Emitted when the anchor point changes
82101
void anchorPointChanged( AnchorPoint point );
102+
%Docstring
103+
Emitted when the anchor point changes
104+
%End
83105

84-
//! Emitted when the anchor widget point changes
85106
void anchorWidgetPointChanged( AnchorPoint point );
107+
%Docstring
108+
Emitted when the anchor widget point changes
109+
%End
86110

87111
protected:
88-
void showEvent( QShowEvent *e );
112+
virtual void showEvent( QShowEvent *e );
113+
89114
virtual void paintEvent( QPaintEvent *e );
90115

91116
};
117+
118+
119+
120+
/************************************************************************
121+
* This file has been generated automatically from *
122+
* *
123+
* src/gui/qgsfloatingwidget.h *
124+
* *
125+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
126+
************************************************************************/

‎python/gui/qgsfocuswatcher.sip

Lines changed: 46 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,62 @@
1-
/** \ingroup gui
2-
* \class QgsFocusWatcher
3-
* A event filter for watching for focus events on a parent object. Usually QObjects must
4-
* subclass and override methods like focusOutEvent to handle focus events. Using this class
5-
* as an event filter avoids the need to subclass objects and the focus events can be directly
6-
* caught using the emitted signals.
7-
* \note added in 2.16
8-
*/
9-
10-
class QgsFocusWatcher: QObject
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsfocuswatcher.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
class QgsFocusWatcher : QObject
1113
{
12-
%TypeHeaderCode
13-
#include <qgsfocuswatcher.h>
14+
%Docstring
15+
A event filter for watching for focus events on a parent object. Usually QObjects must
16+
subclass and override methods like focusOutEvent to handle focus events. Using this class
17+
as an event filter avoids the need to subclass objects and the focus events can be directly
18+
caught using the emitted signals.
19+
.. versionadded:: 2.16
1420
%End
1521

16-
public:
22+
%TypeHeaderCode
23+
#include "qgsfocuswatcher.h"
24+
%End
25+
public:
1726

18-
/** Constructor for QgsFocusWatcher.
19-
* @param parent parent widget to catch focus events for. This class will automatically be
20-
* installed as an event filter for parent.
21-
*/
2227
explicit QgsFocusWatcher( QObject *parent /TransferThis/ );
28+
%Docstring
29+
Constructor for QgsFocusWatcher.
30+
\param parent parent widget to catch focus events for. This class will automatically be
31+
installed as an event filter for parent.
32+
%End
2333

2434
virtual bool eventFilter( QObject *obj, QEvent *event );
2535

2636
signals:
2737

28-
/** Emitted when parent object's focus changes.
29-
* @param focused true if object gained focus, false if object lost focus
30-
*/
3138
void focusChanged( bool focused );
39+
%Docstring
40+
Emitted when parent object's focus changes.
41+
\param focused true if object gained focus, false if object lost focus
42+
%End
3243

33-
//! Emitted when parent object gains focus.
3444
void focusIn();
45+
%Docstring
46+
Emitted when parent object gains focus.
47+
%End
3548

36-
//! Emitted when parent object loses focus.
3749
void focusOut();
50+
%Docstring
51+
Emitted when parent object loses focus.
52+
%End
53+
3854
};
55+
56+
/************************************************************************
57+
* This file has been generated automatically from *
58+
* *
59+
* src/gui/qgsfocuswatcher.h *
60+
* *
61+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
62+
************************************************************************/

‎python/gui/qgsformannotation.sip

Lines changed: 56 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,78 @@
1-
class QgsFormAnnotation : QgsAnnotation
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsformannotation.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
class QgsFormAnnotation: QgsAnnotation
213
{
14+
%Docstring
15+
An annotation item that embeds a designer form showing the feature attribute
16+
.. versionadded:: 3.0
17+
%End
18+
319
%TypeHeaderCode
4-
#include <qgsformannotation.h>
20+
#include "qgsformannotation.h"
521
%End
622
public:
723

824
QgsFormAnnotation( QObject *parent /TransferThis/ = 0 );
25+
%Docstring
26+
Constructor for QgsFormAnnotation.
27+
%End
928

1029
virtual QgsFormAnnotation *clone() const /Factory/;
1130

12-
QSizeF minimumFrameSize() const;
31+
32+
virtual QSizeF minimumFrameSize() const;
33+
1334
QSizeF preferredFrameSize() const;
35+
%Docstring
36+
Returns the optimal frame size
37+
:rtype: QSizeF
38+
%End
1439

1540
void setDesignerForm( const QString &uiFile );
41+
%Docstring
42+
Sets the path to the Qt Designer UI file to show in the annotation.
43+
.. seealso:: designerForm()
44+
%End
45+
1646
QString designerForm() const;
47+
%Docstring
48+
Returns the path to the Qt Designer UI file to show in the annotation.
49+
.. seealso:: setDesignerForm()
50+
:rtype: str
51+
%End
1752

18-
virtual void writeXml( QDomElement& elem, QDomDocument & doc, const QgsReadWriteContext &context ) const;
19-
virtual void readXml( const QDomElement& itemElem, const QgsReadWriteContext &context );
53+
virtual void writeXml( QDomElement &elem, QDomDocument &doc, const QgsReadWriteContext &context ) const;
54+
virtual void readXml( const QDomElement &itemElem, const QgsReadWriteContext &context );
55+
56+
virtual void setAssociatedFeature( const QgsFeature &feature );
2057

21-
void setAssociatedFeature( const QgsFeature &feature );
2258

2359
static QgsFormAnnotation *create() /Factory/;
60+
%Docstring
61+
Returns a new QgsFormAnnotation object.
62+
:rtype: QgsFormAnnotation
63+
%End
2464

2565
protected:
2666

27-
void renderAnnotation( QgsRenderContext &context, QSizeF size ) const;
67+
virtual void renderAnnotation( QgsRenderContext &context, QSizeF size ) const;
68+
2869

2970
};
71+
72+
/************************************************************************
73+
* This file has been generated automatically from *
74+
* *
75+
* src/gui/qgsformannotation.h *
76+
* *
77+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
78+
************************************************************************/

‎src/gui/qgsdetaileditemwidget.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
* A widget renderer for detailed item views.
2727
* \see also QgsDetailedItem and QgsDetailedItemData.
2828
*/
29-
class GUI_EXPORT QgsDetailedItemWidget :
30-
public QWidget, private Ui::QgsDetailedItemWidgetBase
29+
class GUI_EXPORT QgsDetailedItemWidget : public QWidget, private Ui::QgsDetailedItemWidgetBase
3130
{
3231
Q_OBJECT
3332
public:

‎src/gui/qgsexpressionbuilderdialog.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ class GUI_EXPORT QgsExpressionBuilderDialog : public QDialog, private Ui::QgsExp
2929
Q_OBJECT
3030

3131
public:
32-
QgsExpressionBuilderDialog( QgsVectorLayer *layer, const QString &startText = QString(), QWidget *parent = nullptr, const QString &key = "generic",
32+
QgsExpressionBuilderDialog( QgsVectorLayer *layer,
33+
const QString &startText = QString(),
34+
QWidget *parent SIP_TRANSFERTHIS = nullptr,
35+
const QString &key = "generic",
3336
const QgsExpressionContext &context = QgsExpressionContext() );
3437

3538
//! The builder widget that is used by the dialog

‎src/gui/qgsexpressionbuilderwidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class QgsExpressionHighlighter;
3535
/** \ingroup gui
3636
* An expression item that can be used in the QgsExpressionBuilderWidget tree.
3737
*/
38-
class QgsExpressionItem : public QStandardItem
38+
class GUI_EXPORT QgsExpressionItem : public QStandardItem
3939
{
4040
public:
4141
enum ItemType

‎src/gui/qgsextentgroupbox.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class GUI_EXPORT QgsExtentGroupBox : public QgsCollapsibleGroupBox, private Ui::
7070
//! Get the resulting extent - in output CRS coordinates
7171
QgsRectangle outputExtent() const;
7272

73-
ExtentState extentState() const { return mExtentState; }
73+
QgsExtentGroupBox::ExtentState extentState() const { return mExtentState; }
7474

7575
//! Set base part of title of the group box (will be appended with extent state)
7676
//! \since QGIS 2.12
@@ -103,7 +103,7 @@ class GUI_EXPORT QgsExtentGroupBox : public QgsCollapsibleGroupBox, private Ui::
103103
void groupBoxClicked();
104104

105105
protected:
106-
void setOutputExtent( const QgsRectangle &r, const QgsCoordinateReferenceSystem &srcCrs, ExtentState state );
106+
void setOutputExtent( const QgsRectangle &r, const QgsCoordinateReferenceSystem &srcCrs, QgsExtentGroupBox::ExtentState state );
107107
void setOutputExtentFromLineEdit();
108108
void updateTitle();
109109

‎src/gui/qgsfeatureselectiondlg.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ class QgsGenericFeatureSelectionManager;
2727
*/
2828
class GUI_EXPORT QgsFeatureSelectionDlg : public QDialog, private Ui::QgsFeatureSelectionDlg
2929
{
30+
31+
#ifdef SIP_RUN
32+
SIP_CONVERT_TO_SUBCLASS_CODE
33+
if ( qobject_cast<QgsFeatureSelectionDlg *>( sipCpp ) )
34+
sipType = sipType_QgsFeatureSelectionDlg;
35+
else
36+
sipType = 0;
37+
SIP_END
38+
#endif
39+
3040
Q_OBJECT
3141

3242
public:

‎src/gui/qgsfieldvalidator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class GUI_EXPORT QgsFieldValidator : public QValidator
3737
QgsFieldValidator( QObject *parent, const QgsField &field, const QString &defaultValue, const QString &dateFormat = "yyyy-MM-dd" );
3838
~QgsFieldValidator();
3939

40-
virtual State validate( QString &, int & ) const override;
40+
virtual State validate( QString &SIP_CONSTRAINED, int &SIP_INOUT ) const override;
4141
virtual void fixup( QString & ) const override;
4242

4343
QString dateFormat() const { return mDateFormat; }

‎src/gui/qgsfieldvalueslineedit.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929

3030
class QgsFloatingWidget;
3131

32+
33+
#ifndef SIP_RUN
34+
3235
// just internal guff - definitely not for exposing to public API!
3336
///@cond PRIVATE
3437

@@ -109,6 +112,8 @@ class QgsFieldValuesLineEditValuesGatherer: public QThread
109112

110113
///@endcond
111114

115+
#endif
116+
112117
/** \class QgsFieldValuesLineEdit
113118
* \ingroup gui
114119
* A line edit with an autocompleter which takes unique values from a vector layer's fields.

‎src/gui/qgsfloatingwidget.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ class GUI_EXPORT QgsFloatingWidget: public QWidget
128128

129129
};
130130

131+
132+
#ifndef SIP_RUN
133+
131134
/// @cond PRIVATE
132135

133136
class QgsFloatingWidgetEventFilter: public QObject
@@ -149,4 +152,6 @@ class QgsFloatingWidgetEventFilter: public QObject
149152

150153
/// @endcond
151154

155+
#endif
156+
152157
#endif // QGSFLOATINGWIDGET_H

0 commit comments

Comments
 (0)
Please sign in to comment.