Skip to content

Commit c183285

Browse files
committedApr 25, 2017
sipify batch
* QgsDial * QgsDialog * QgsDockWidget * QgsEncodingFileDialog * QgsErrorDialog
1 parent 448d2fd commit c183285

21 files changed

+257
-111
lines changed
 

‎python/auto_sip.blacklist

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,6 @@ gui/qgscurveeditorwidget.sip
327327
gui/qgsdetaileditemdata.sip
328328
gui/qgsdetaileditemdelegate.sip
329329
gui/qgsdetaileditemwidget.sip
330-
gui/qgsdial.sip
331-
gui/qgsdialog.sip
332-
gui/qgsdockwidget.sip
333-
gui/qgsencodingfiledialog.sip
334-
gui/qgserrordialog.sip
335330
gui/qgsexpressionbuilderdialog.sip
336331
gui/qgsexpressionbuilderwidget.sip
337332
gui/qgsexpressionhighlighter.sip

‎python/core/processing/qgsprocessingalgorithm.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111

1212

13-
1413
class QgsProcessingAlgorithm
1514
{
1615
%Docstring

‎python/core/processing/qgsprocessingfeedback.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010

1111

12-
1312
class QgsProcessingFeedback : QgsFeedback
1413
{
1514
%Docstring

‎python/core/processing/qgsprocessingprovider.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010

1111

12-
1312
class QgsProcessingProvider : QObject
1413
{
1514
%Docstring

‎python/core/processing/qgsprocessingregistry.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010

1111

12-
1312
class QgsProcessingRegistry : QObject
1413
{
1514
%Docstring

‎python/core/processing/qgsprocessingutils.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313

1414

15-
1615
class QgsProcessingUtils
1716
{
1817
%Docstring

‎python/core/qgsaggregatecalculator.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212

1313

14-
1514
class QgsAggregateCalculator
1615
{
1716
%Docstring

‎python/core/qgsdatasourceuri.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111

1212

13-
1413
class QgsDataSourceUri
1514
{
1615
%Docstring

‎python/core/qgsdistancearea.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010

1111

12-
1312
class QgsDistanceArea
1413
{
1514
%Docstring

‎python/core/qgsellipsoidutils.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99

1010

11-
1211
class QgsEllipsoidUtils
1312
{
1413
%Docstring

‎python/gui/qgsdial.sip

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,48 @@
1-
class QgsDial: QDial
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsdial.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
class QgsDial : QDial
213
{
14+
315
%TypeHeaderCode
4-
#include <qgsdial.h>
16+
#include "qgsdial.h"
517
%End
18+
public:
619

7-
QgsDial( QWidget *parent /TransferThis/ = 0 );
20+
QgsDial( QWidget *parent /TransferThis/ = 0 );
21+
%Docstring
22+
QgsDial constructor for QgsDial
23+
@param parent parent object
24+
%End
825

926
void setMinimum( const QVariant &min );
1027
void setMaximum( const QVariant &max );
1128
void setSingleStep( const QVariant &step );
1229
void setValue( const QVariant &value );
1330
QVariant variantValue() const;
31+
%Docstring
32+
:rtype: QVariant
33+
%End
1434

1535
signals:
16-
void valueChanged( const QVariant& );
17-
36+
void valueChanged( const QVariant & );
1837

1938
protected:
20-
virtual void paintEvent( QPaintEvent * event );
39+
virtual void paintEvent( QPaintEvent *event );
40+
2141
};
42+
/************************************************************************
43+
* This file has been generated automatically from *
44+
* *
45+
* src/gui/qgsdial.h *
46+
* *
47+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
48+
************************************************************************/

‎python/gui/qgsdialog.sip

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,51 @@
1-
/** \ingroup gui
2-
* A generic dialog with layout and button box
3-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsdialog.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
413
class QgsDialog : QDialog
514
{
6-
%TypeHeaderCode
7-
#include <qgsdialog.h>
15+
%Docstring
16+
A generic dialog with layout and button box
817
%End
918

19+
%TypeHeaderCode
20+
#include "qgsdialog.h"
21+
%End
1022
public:
11-
QgsDialog( QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags,
23+
24+
QgsDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags,
1225
QDialogButtonBox::StandardButtons buttons = QDialogButtonBox::Close,
1326
Qt::Orientation orientation = Qt::Horizontal );
14-
~QgsDialog();
27+
%Docstring
28+
Constructor for QgsDialog.
29+
%End
1530

16-
//! Returns the central layout. Widgets added to it must have this dialog as parent.
1731
QVBoxLayout *layout();
18-
//! Returns the button box.
32+
%Docstring
33+
Returns the central layout. Widgets added to it must have this dialog as parent.
34+
:rtype: QVBoxLayout
35+
%End
1936
QDialogButtonBox *buttonBox();
37+
%Docstring
38+
Returns the button box.
39+
:rtype: QDialogButtonBox
40+
%End
41+
42+
protected:
2043
};
44+
45+
/************************************************************************
46+
* This file has been generated automatically from *
47+
* *
48+
* src/gui/qgsdialog.h *
49+
* *
50+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
51+
************************************************************************/

‎python/gui/qgsdockwidget.sip

Lines changed: 78 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,108 @@
1-
/** \ingroup gui
2-
* \class QgsDockWidget
3-
* QDockWidget subclass with more fine-grained control over how the widget is closed or opened.
4-
* \note added in 2.16
5-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsdockwidget.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
611

712
class QgsDockWidget : QDockWidget
813
{
9-
%TypeHeaderCode
10-
#include <qgsdockwidget.h>
14+
%Docstring
15+
QgsDockWidget subclass with more fine-grained control over how the widget is closed or opened.
16+
.. versionadded:: 2.16
1117
%End
1218

19+
%TypeHeaderCode
20+
#include "qgsdockwidget.h"
21+
%End
1322
public:
1423

15-
/** Constructor for QgsDockWidget.
16-
* @param parent parent widget
17-
* @param flags window flags
18-
*/
19-
explicit QgsDockWidget( QWidget* parent /TransferThis/ = nullptr, Qt::WindowFlags flags = 0 );
24+
explicit QgsDockWidget( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0 );
25+
%Docstring
26+
Constructor for QgsDockWidget.
27+
\param parent parent widget
28+
\param flags window flags
29+
%End
2030

21-
/** Constructor for QgsDockWidget.
22-
* @param title dock title
23-
* @param parent parent widget
24-
* @param flags window flags
25-
*/
26-
explicit QgsDockWidget( const QString &title, QWidget* parent /TransferThis/ = nullptr, Qt::WindowFlags flags = 0 );
31+
explicit QgsDockWidget( const QString &title, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0 );
32+
%Docstring
33+
Constructor for QgsDockWidget.
34+
\param title dock title
35+
\param parent parent widget
36+
\param flags window flags
37+
%End
2738

2839
public slots:
2940

30-
/** Sets the dock widget as visible to a user, ie both shown and raised to the front.
31-
* @param visible set to true to show the dock to the user, or false to hide the dock.
32-
* When setting a dock as user visible, the dock will be opened (if it is not already
33-
* opened) and raised to the front.
34-
* When setting as hidden, the following logic is used:
35-
* - hiding a dock which is open but not raised (ie hidden by another tab) will have no
36-
* effect, and the dock will still be opened and hidden by the other tab
37-
* - hiding a dock which is open and raised (ie, user visible) will cause the dock to
38-
* be closed
39-
* - hiding a dock which is closed has no effect and raises no signals
40-
* @see isUserVisible()
41-
*/
4241
void setUserVisible( bool visible );
42+
%Docstring
43+
Sets the dock widget as visible to a user, ie both shown and raised to the front.
44+
\param visible set to true to show the dock to the user, or false to hide the dock.
45+
When setting a dock as user visible, the dock will be opened (if it is not already
46+
opened) and raised to the front.
47+
When setting as hidden, the following logic is used:
48+
- hiding a dock which is open but not raised (ie hidden by another tab) will have no
49+
effect, and the dock will still be opened and hidden by the other tab
50+
- hiding a dock which is open and raised (ie, user visible) will cause the dock to
51+
be closed
52+
- hiding a dock which is closed has no effect and raises no signals
53+
\see isUserVisible()
54+
%End
4355

44-
/** Returns true if the dock is both opened and raised to the front (ie not hidden by
45-
* any other tabs.
46-
* @see setUserVisible()
47-
*/
4856
bool isUserVisible() const;
57+
%Docstring
58+
Returns true if the dock is both opened and raised to the front (ie not hidden by
59+
any other tabs.
60+
\see setUserVisible()
61+
:rtype: bool
62+
%End
4963

5064
protected:
5165

5266
virtual void closeEvent( QCloseEvent * );
53-
virtual void showEvent( QShowEvent* event );
67+
virtual void showEvent( QShowEvent *event );
5468

5569
signals:
5670

57-
/** Emitted when dock widget is closed.
58-
* @see closedStateChanged()
59-
* @see opened()
60-
*/
6171
void closed();
72+
%Docstring
73+
Emitted when dock widget is closed.
74+
\see closedStateChanged()
75+
\see opened()
76+
%End
6277

63-
/** Emitted when dock widget is closed (or opened).
64-
* @param wasClosed will be true if dock widget was closed, or false if dock widget was opened
65-
* @see closed()
66-
* @see openedStateChanged()
67-
*/
6878
void closedStateChanged( bool wasClosed );
79+
%Docstring
80+
Emitted when dock widget is closed (or opened).
81+
\param wasClosed will be true if dock widget was closed, or false if dock widget was opened
82+
\see closed()
83+
\see openedStateChanged()
84+
%End
6985

70-
/** Emitted when dock widget is opened.
71-
* @see openedStateChanged()
72-
* @see closed()
73-
*/
7486
void opened();
87+
%Docstring
88+
Emitted when dock widget is opened.
89+
\see openedStateChanged()
90+
\see closed()
91+
%End
7592

76-
/** Emitted when dock widget is opened (or closed).
77-
* @param wasOpened will be true if dock widget was opened, or false if dock widget was closed
78-
* @see closedStateChanged()
79-
* @see opened()
80-
*/
8193
void openedStateChanged( bool wasOpened );
94+
%Docstring
95+
Emitted when dock widget is opened (or closed).
96+
\param wasOpened will be true if dock widget was opened, or false if dock widget was closed
97+
\see closedStateChanged()
98+
\see opened()
99+
%End
82100

83101
};
102+
/************************************************************************
103+
* This file has been generated automatically from *
104+
* *
105+
* src/gui/qgsdockwidget.h *
106+
* *
107+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
108+
************************************************************************/

‎python/gui/qgsencodingfiledialog.sip

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,58 @@
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsencodingfiledialog.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
18

2-
/** A file dialog which lets the user select the preferred encoding type for a data provider*/
3-
class QgsEncodingFileDialog : QFileDialog
9+
10+
11+
12+
class QgsEncodingFileDialog: QFileDialog
413
{
5-
%TypeHeaderCode
6-
#include <qgsencodingfiledialog.h>
14+
%Docstring
15+
A file dialog which lets the user select the preferred encoding type for a data provider.
16+
*
717
%End
818

19+
%TypeHeaderCode
20+
#include "qgsencodingfiledialog.h"
21+
%End
922
public:
10-
QgsEncodingFileDialog( QWidget * parent /TransferThis/ = 0,
11-
const QString & caption = QString(), const QString & directory = QString(),
12-
const QString & filter = QString(), const QString & encoding = QString() );
13-
~QgsEncodingFileDialog();
14-
/** Returns a string describing the chosen encoding*/
23+
24+
QgsEncodingFileDialog( QWidget *parent /TransferThis/ = 0,
25+
const QString &caption = QString(), const QString &directory = QString(),
26+
const QString &filter = QString(), const QString &encoding = QString() );
27+
%Docstring
28+
QgsEncodingFileDialog constructor for QgsEncodingFileDialog
29+
%End
1530
QString encoding() const;
16-
/** Adds a 'Cancel All' button for the user to click */
31+
%Docstring
32+
Returns a string describing the chosen encoding
33+
:rtype: str
34+
%End
1735
void addCancelAll();
18-
/** Returns true if the user clicked 'Cancel All' */
36+
%Docstring
37+
Adds a 'Cancel All' button for the user to click
38+
%End
1939
bool cancelAll();
40+
%Docstring
41+
Returns true if the user clicked 'Cancel All'
42+
:rtype: bool
43+
%End
2044

2145
public slots:
2246
void saveUsedEncoding();
2347

2448
void pbnCancelAll_clicked();
49+
2550
};
51+
52+
/************************************************************************
53+
* This file has been generated automatically from *
54+
* *
55+
* src/gui/qgsencodingfiledialog.h *
56+
* *
57+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
58+
************************************************************************/

‎python/gui/qgserrordialog.sip

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,46 @@
1-
class QgsErrorDialog : QDialog
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgserrordialog.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
class QgsErrorDialog: QDialog
213
{
14+
315
%TypeHeaderCode
4-
#include <qgserrordialog.h>
16+
#include "qgserrordialog.h"
517
%End
618
public:
7-
QgsErrorDialog( const QgsError & error, const QString & title, QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags );
8-
~QgsErrorDialog();
919

10-
/** Show dialog with error
11-
* @param error error
12-
* @param title title
13-
* @param parent parent object
14-
* @param fl widget flags
15-
*/
16-
static void show( const QgsError & error, const QString & title, QWidget *parent = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags );
20+
QgsErrorDialog( const QgsError &error, const QString &title, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
21+
%Docstring
22+
QgsErrorDialog constructor for QgsErrorDialog
23+
%End
24+
25+
static void show( const QgsError &error, const QString &title, QWidget *parent = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
26+
%Docstring
27+
Show dialog with error
28+
\param error error
29+
\param title title
30+
\param parent parent object
31+
\param fl widget flags
32+
%End
1733

1834
public slots:
1935
void on_mDetailPushButton_clicked();
2036
void on_mDetailCheckBox_stateChanged( int state );
37+
2138
};
39+
40+
/************************************************************************
41+
* This file has been generated automatically from *
42+
* *
43+
* src/gui/qgserrordialog.h *
44+
* *
45+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
46+
************************************************************************/

‎scripts/sipify.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ sub processDoxygenLine
5959
my %qflag_hash;
6060

6161
my $line_count = @lines;
62-
my $line_idx = -1;
62+
my $line_idx = 0;
6363
my $line;
6464
my @output = ();
6565

‎src/gui/qgsdial.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <QDial>
1919
#include <QVariant>
2020
#include "qgis_gui.h"
21+
#include "qgis.h"
2122

2223
class QPaintEvent;
2324

@@ -28,7 +29,12 @@ class GUI_EXPORT QgsDial : public QDial
2829
{
2930
Q_OBJECT
3031
public:
31-
QgsDial( QWidget *parent = nullptr );
32+
33+
/**
34+
* @brief QgsDial constructor for QgsDial
35+
* @param parent parent object
36+
*/
37+
QgsDial( QWidget *parent SIP_TRANSFERTHIS = nullptr );
3238

3339
void setMinimum( const QVariant &min );
3440
void setMaximum( const QVariant &max );

‎src/gui/qgsdialog.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <QDialogButtonBox>
2525
#include <QLayout>
2626
#include "qgis_gui.h"
27+
#include "qgis.h"
2728

2829
/** \ingroup gui
2930
* A generic dialog with layout and button box
@@ -36,7 +37,7 @@ class GUI_EXPORT QgsDialog : public QDialog
3637
/**
3738
* Constructor for QgsDialog.
3839
*/
39-
QgsDialog( QWidget *parent = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags,
40+
QgsDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags,
4041
QDialogButtonBox::StandardButtons buttons = QDialogButtonBox::Close,
4142
Qt::Orientation orientation = Qt::Horizontal );
4243

‎src/gui/qgsdockwidget.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <QDockWidget>
2121
#include "qgis_gui.h"
22+
#include "qgis.h"
2223

2324
/** \ingroup gui
2425
* \class QgsDockWidget
@@ -36,14 +37,14 @@ class GUI_EXPORT QgsDockWidget : public QDockWidget
3637
* \param parent parent widget
3738
* \param flags window flags
3839
*/
39-
explicit QgsDockWidget( QWidget *parent = nullptr, Qt::WindowFlags flags = 0 );
40+
explicit QgsDockWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags flags = 0 );
4041

4142
/** Constructor for QgsDockWidget.
4243
* \param title dock title
4344
* \param parent parent widget
4445
* \param flags window flags
4546
*/
46-
explicit QgsDockWidget( const QString &title, QWidget *parent = nullptr, Qt::WindowFlags flags = 0 );
47+
explicit QgsDockWidget( const QString &title, QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags flags = 0 );
4748

4849
public slots:
4950

‎src/gui/qgsencodingfiledialog.h

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

1919
#include <QFileDialog>
2020
#include "qgis_gui.h"
21+
#include "qgis.h"
22+
2123
class QComboBox;
2224
class QPushButton;
2325

@@ -28,7 +30,11 @@ class GUI_EXPORT QgsEncodingFileDialog: public QFileDialog
2830
{
2931
Q_OBJECT
3032
public:
31-
QgsEncodingFileDialog( QWidget *parent = nullptr,
33+
34+
/**
35+
* @brief QgsEncodingFileDialog constructor for QgsEncodingFileDialog
36+
*/
37+
QgsEncodingFileDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr,
3238
const QString &caption = QString(), const QString &directory = QString(),
3339
const QString &filter = QString(), const QString &encoding = QString() );
3440
//! Returns a string describing the chosen encoding

‎src/gui/qgserrordialog.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "qgisgui.h"
2424
#include "qgserror.h"
2525
#include "qgis_gui.h"
26+
#include "qgis.h"
2627

2728
/** \ingroup gui
2829
* \class QgsErrorDialog
@@ -31,7 +32,11 @@ class GUI_EXPORT QgsErrorDialog: public QDialog, private Ui::QgsErrorDialogBase
3132
{
3233
Q_OBJECT
3334
public:
34-
QgsErrorDialog( const QgsError &error, const QString &title, QWidget *parent = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
35+
36+
/**
37+
* @brief QgsErrorDialog constructor for QgsErrorDialog
38+
*/
39+
QgsErrorDialog( const QgsError &error, const QString &title, QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
3540

3641
/** Show dialog with error
3742
* \param error error

0 commit comments

Comments
 (0)
Please sign in to comment.