diff --git a/python/auto_sip.blacklist b/python/auto_sip.blacklist index e8a681f92ed..049c1ca17c7 100644 --- a/python/auto_sip.blacklist +++ b/python/auto_sip.blacklist @@ -327,11 +327,6 @@ gui/qgscurveeditorwidget.sip gui/qgsdetaileditemdata.sip gui/qgsdetaileditemdelegate.sip gui/qgsdetaileditemwidget.sip -gui/qgsdial.sip -gui/qgsdialog.sip -gui/qgsdockwidget.sip -gui/qgsencodingfiledialog.sip -gui/qgserrordialog.sip gui/qgsexpressionbuilderdialog.sip gui/qgsexpressionbuilderwidget.sip gui/qgsexpressionhighlighter.sip diff --git a/python/core/processing/qgsprocessingalgorithm.sip b/python/core/processing/qgsprocessingalgorithm.sip index 08884804649..f4962a2ae20 100644 --- a/python/core/processing/qgsprocessingalgorithm.sip +++ b/python/core/processing/qgsprocessingalgorithm.sip @@ -10,7 +10,6 @@ - class QgsProcessingAlgorithm { %Docstring diff --git a/python/core/processing/qgsprocessingfeedback.sip b/python/core/processing/qgsprocessingfeedback.sip index 6c882f128bb..f5b19f43442 100644 --- a/python/core/processing/qgsprocessingfeedback.sip +++ b/python/core/processing/qgsprocessingfeedback.sip @@ -9,7 +9,6 @@ - class QgsProcessingFeedback : QgsFeedback { %Docstring diff --git a/python/core/processing/qgsprocessingprovider.sip b/python/core/processing/qgsprocessingprovider.sip index 917caf650de..c54cf42dba2 100644 --- a/python/core/processing/qgsprocessingprovider.sip +++ b/python/core/processing/qgsprocessingprovider.sip @@ -9,7 +9,6 @@ - class QgsProcessingProvider : QObject { %Docstring diff --git a/python/core/processing/qgsprocessingregistry.sip b/python/core/processing/qgsprocessingregistry.sip index 776a6d53d76..8751897fde5 100644 --- a/python/core/processing/qgsprocessingregistry.sip +++ b/python/core/processing/qgsprocessingregistry.sip @@ -9,7 +9,6 @@ - class QgsProcessingRegistry : QObject { %Docstring diff --git a/python/core/processing/qgsprocessingutils.sip b/python/core/processing/qgsprocessingutils.sip index ccae1b5f357..a50864f3019 100644 --- a/python/core/processing/qgsprocessingutils.sip +++ b/python/core/processing/qgsprocessingutils.sip @@ -12,7 +12,6 @@ - class QgsProcessingUtils { %Docstring diff --git a/python/core/qgsaggregatecalculator.sip b/python/core/qgsaggregatecalculator.sip index 925bcf89c1c..e18b947ace8 100644 --- a/python/core/qgsaggregatecalculator.sip +++ b/python/core/qgsaggregatecalculator.sip @@ -11,7 +11,6 @@ - class QgsAggregateCalculator { %Docstring diff --git a/python/core/qgsdatasourceuri.sip b/python/core/qgsdatasourceuri.sip index 69e0aec6f56..4d5fe59a700 100644 --- a/python/core/qgsdatasourceuri.sip +++ b/python/core/qgsdatasourceuri.sip @@ -10,7 +10,6 @@ - class QgsDataSourceUri { %Docstring diff --git a/python/core/qgsdistancearea.sip b/python/core/qgsdistancearea.sip index 5bbe0deca6a..1897d7a6abf 100644 --- a/python/core/qgsdistancearea.sip +++ b/python/core/qgsdistancearea.sip @@ -9,7 +9,6 @@ - class QgsDistanceArea { %Docstring diff --git a/python/core/qgsellipsoidutils.sip b/python/core/qgsellipsoidutils.sip index a47d6e95548..35e67f79a88 100644 --- a/python/core/qgsellipsoidutils.sip +++ b/python/core/qgsellipsoidutils.sip @@ -8,7 +8,6 @@ - class QgsEllipsoidUtils { %Docstring diff --git a/python/gui/qgsdial.sip b/python/gui/qgsdial.sip index 7cfbce1c708..8676c517e08 100644 --- a/python/gui/qgsdial.sip +++ b/python/gui/qgsdial.sip @@ -1,21 +1,48 @@ -class QgsDial: QDial -{ -%TypeHeaderCode -#include -%End +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsdial.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ - QgsDial( QWidget *parent /TransferThis/ = 0 ); + + + +class QgsDial : QDial +{ + +%TypeHeaderCode +#include "qgsdial.h" +%End + public: + + QgsDial( QWidget *parent /TransferThis/ = 0 ); +%Docstring + QgsDial constructor for QgsDial + @param parent parent object +%End void setMinimum( const QVariant &min ); void setMaximum( const QVariant &max ); void setSingleStep( const QVariant &step ); void setValue( const QVariant &value ); QVariant variantValue() const; +%Docstring + :rtype: QVariant +%End signals: - void valueChanged( const QVariant& ); - + void valueChanged( const QVariant & ); protected: - virtual void paintEvent( QPaintEvent * event ); + virtual void paintEvent( QPaintEvent *event ); + }; +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsdial.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsdialog.sip b/python/gui/qgsdialog.sip index 2f32a44e364..964715d83ba 100644 --- a/python/gui/qgsdialog.sip +++ b/python/gui/qgsdialog.sip @@ -1,20 +1,51 @@ -/** \ingroup gui - * A generic dialog with layout and button box - */ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsdialog.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + + class QgsDialog : QDialog { -%TypeHeaderCode -#include +%Docstring + A generic dialog with layout and button box %End +%TypeHeaderCode +#include "qgsdialog.h" +%End public: - QgsDialog( QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags, + + QgsDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags, QDialogButtonBox::StandardButtons buttons = QDialogButtonBox::Close, Qt::Orientation orientation = Qt::Horizontal ); - ~QgsDialog(); +%Docstring + Constructor for QgsDialog. +%End - //! Returns the central layout. Widgets added to it must have this dialog as parent. QVBoxLayout *layout(); - //! Returns the button box. +%Docstring +Returns the central layout. Widgets added to it must have this dialog as parent. + :rtype: QVBoxLayout +%End QDialogButtonBox *buttonBox(); +%Docstring +Returns the button box. + :rtype: QDialogButtonBox +%End + + protected: }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsdialog.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsdockwidget.sip b/python/gui/qgsdockwidget.sip index 253a4567480..6944ddb1055 100644 --- a/python/gui/qgsdockwidget.sip +++ b/python/gui/qgsdockwidget.sip @@ -1,83 +1,108 @@ -/** \ingroup gui - * \class QgsDockWidget - * QDockWidget subclass with more fine-grained control over how the widget is closed or opened. - * \note added in 2.16 - */ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsdockwidget.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + class QgsDockWidget : QDockWidget { -%TypeHeaderCode -#include +%Docstring + QgsDockWidget subclass with more fine-grained control over how the widget is closed or opened. +.. versionadded:: 2.16 %End +%TypeHeaderCode +#include "qgsdockwidget.h" +%End public: - /** Constructor for QgsDockWidget. - * @param parent parent widget - * @param flags window flags - */ - explicit QgsDockWidget( QWidget* parent /TransferThis/ = nullptr, Qt::WindowFlags flags = 0 ); + explicit QgsDockWidget( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0 ); +%Docstring + Constructor for QgsDockWidget. + \param parent parent widget + \param flags window flags +%End - /** Constructor for QgsDockWidget. - * @param title dock title - * @param parent parent widget - * @param flags window flags - */ - explicit QgsDockWidget( const QString &title, QWidget* parent /TransferThis/ = nullptr, Qt::WindowFlags flags = 0 ); + explicit QgsDockWidget( const QString &title, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0 ); +%Docstring + Constructor for QgsDockWidget. + \param title dock title + \param parent parent widget + \param flags window flags +%End public slots: - /** Sets the dock widget as visible to a user, ie both shown and raised to the front. - * @param visible set to true to show the dock to the user, or false to hide the dock. - * When setting a dock as user visible, the dock will be opened (if it is not already - * opened) and raised to the front. - * When setting as hidden, the following logic is used: - * - hiding a dock which is open but not raised (ie hidden by another tab) will have no - * effect, and the dock will still be opened and hidden by the other tab - * - hiding a dock which is open and raised (ie, user visible) will cause the dock to - * be closed - * - hiding a dock which is closed has no effect and raises no signals - * @see isUserVisible() - */ void setUserVisible( bool visible ); +%Docstring + Sets the dock widget as visible to a user, ie both shown and raised to the front. + \param visible set to true to show the dock to the user, or false to hide the dock. + When setting a dock as user visible, the dock will be opened (if it is not already + opened) and raised to the front. + When setting as hidden, the following logic is used: + - hiding a dock which is open but not raised (ie hidden by another tab) will have no + effect, and the dock will still be opened and hidden by the other tab + - hiding a dock which is open and raised (ie, user visible) will cause the dock to + be closed + - hiding a dock which is closed has no effect and raises no signals + \see isUserVisible() +%End - /** Returns true if the dock is both opened and raised to the front (ie not hidden by - * any other tabs. - * @see setUserVisible() - */ bool isUserVisible() const; +%Docstring + Returns true if the dock is both opened and raised to the front (ie not hidden by + any other tabs. + \see setUserVisible() + :rtype: bool +%End protected: virtual void closeEvent( QCloseEvent * ); - virtual void showEvent( QShowEvent* event ); + virtual void showEvent( QShowEvent *event ); signals: - /** Emitted when dock widget is closed. - * @see closedStateChanged() - * @see opened() - */ void closed(); +%Docstring + Emitted when dock widget is closed. + \see closedStateChanged() + \see opened() +%End - /** Emitted when dock widget is closed (or opened). - * @param wasClosed will be true if dock widget was closed, or false if dock widget was opened - * @see closed() - * @see openedStateChanged() - */ void closedStateChanged( bool wasClosed ); +%Docstring + Emitted when dock widget is closed (or opened). + \param wasClosed will be true if dock widget was closed, or false if dock widget was opened + \see closed() + \see openedStateChanged() +%End - /** Emitted when dock widget is opened. - * @see openedStateChanged() - * @see closed() - */ void opened(); +%Docstring + Emitted when dock widget is opened. + \see openedStateChanged() + \see closed() +%End - /** Emitted when dock widget is opened (or closed). - * @param wasOpened will be true if dock widget was opened, or false if dock widget was closed - * @see closedStateChanged() - * @see opened() - */ void openedStateChanged( bool wasOpened ); +%Docstring + Emitted when dock widget is opened (or closed). + \param wasOpened will be true if dock widget was opened, or false if dock widget was closed + \see closedStateChanged() + \see opened() +%End }; +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsdockwidget.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsencodingfiledialog.sip b/python/gui/qgsencodingfiledialog.sip index 2ec2681c255..a502b553753 100644 --- a/python/gui/qgsencodingfiledialog.sip +++ b/python/gui/qgsencodingfiledialog.sip @@ -1,25 +1,58 @@ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsencodingfiledialog.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ -/** A file dialog which lets the user select the preferred encoding type for a data provider*/ -class QgsEncodingFileDialog : QFileDialog + + + +class QgsEncodingFileDialog: QFileDialog { -%TypeHeaderCode -#include +%Docstring + A file dialog which lets the user select the preferred encoding type for a data provider. +* %End +%TypeHeaderCode +#include "qgsencodingfiledialog.h" +%End public: - QgsEncodingFileDialog( QWidget * parent /TransferThis/ = 0, - const QString & caption = QString(), const QString & directory = QString(), - const QString & filter = QString(), const QString & encoding = QString() ); - ~QgsEncodingFileDialog(); - /** Returns a string describing the chosen encoding*/ + + QgsEncodingFileDialog( QWidget *parent /TransferThis/ = 0, + const QString &caption = QString(), const QString &directory = QString(), + const QString &filter = QString(), const QString &encoding = QString() ); +%Docstring + QgsEncodingFileDialog constructor for QgsEncodingFileDialog +%End QString encoding() const; - /** Adds a 'Cancel All' button for the user to click */ +%Docstring +Returns a string describing the chosen encoding + :rtype: str +%End void addCancelAll(); - /** Returns true if the user clicked 'Cancel All' */ +%Docstring +Adds a 'Cancel All' button for the user to click +%End bool cancelAll(); +%Docstring +Returns true if the user clicked 'Cancel All' + :rtype: bool +%End public slots: void saveUsedEncoding(); void pbnCancelAll_clicked(); + }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsencodingfiledialog.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgserrordialog.sip b/python/gui/qgserrordialog.sip index 902fc09420d..b012db2a180 100644 --- a/python/gui/qgserrordialog.sip +++ b/python/gui/qgserrordialog.sip @@ -1,21 +1,46 @@ -class QgsErrorDialog : QDialog +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgserrordialog.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + +class QgsErrorDialog: QDialog { + %TypeHeaderCode -#include +#include "qgserrordialog.h" %End public: - QgsErrorDialog( const QgsError & error, const QString & title, QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags ); - ~QgsErrorDialog(); - /** Show dialog with error - * @param error error - * @param title title - * @param parent parent object - * @param fl widget flags - */ - static void show( const QgsError & error, const QString & title, QWidget *parent = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags ); + QgsErrorDialog( const QgsError &error, const QString &title, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); +%Docstring + QgsErrorDialog constructor for QgsErrorDialog +%End + + static void show( const QgsError &error, const QString &title, QWidget *parent = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); +%Docstring + Show dialog with error + \param error error + \param title title + \param parent parent object + \param fl widget flags +%End public slots: void on_mDetailPushButton_clicked(); void on_mDetailCheckBox_stateChanged( int state ); + }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgserrordialog.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/scripts/sipify.pl b/scripts/sipify.pl index 2fb3b96e89d..250fdd5f740 100755 --- a/scripts/sipify.pl +++ b/scripts/sipify.pl @@ -59,7 +59,7 @@ my $is_override = 0; my %qflag_hash; my $line_count = @lines; -my $line_idx = -1; +my $line_idx = 0; my $line; my @output = (); diff --git a/src/gui/qgsdial.h b/src/gui/qgsdial.h index 8d49d27d1be..d75f4979c69 100644 --- a/src/gui/qgsdial.h +++ b/src/gui/qgsdial.h @@ -18,6 +18,7 @@ #include #include #include "qgis_gui.h" +#include "qgis.h" class QPaintEvent; @@ -28,7 +29,12 @@ class GUI_EXPORT QgsDial : public QDial { Q_OBJECT public: - QgsDial( QWidget *parent = nullptr ); + + /** + * @brief QgsDial constructor for QgsDial + * @param parent parent object + */ + QgsDial( QWidget *parent SIP_TRANSFERTHIS = nullptr ); void setMinimum( const QVariant &min ); void setMaximum( const QVariant &max ); diff --git a/src/gui/qgsdialog.h b/src/gui/qgsdialog.h index 1af54dc29bc..3b054c4b60f 100644 --- a/src/gui/qgsdialog.h +++ b/src/gui/qgsdialog.h @@ -24,6 +24,7 @@ #include #include #include "qgis_gui.h" +#include "qgis.h" /** \ingroup gui * A generic dialog with layout and button box @@ -36,7 +37,7 @@ class GUI_EXPORT QgsDialog : public QDialog /** * Constructor for QgsDialog. */ - QgsDialog( QWidget *parent = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags, + QgsDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags, QDialogButtonBox::StandardButtons buttons = QDialogButtonBox::Close, Qt::Orientation orientation = Qt::Horizontal ); diff --git a/src/gui/qgsdockwidget.h b/src/gui/qgsdockwidget.h index de47ea3c6ae..be9017cf8ed 100644 --- a/src/gui/qgsdockwidget.h +++ b/src/gui/qgsdockwidget.h @@ -19,6 +19,7 @@ #include #include "qgis_gui.h" +#include "qgis.h" /** \ingroup gui * \class QgsDockWidget @@ -36,14 +37,14 @@ class GUI_EXPORT QgsDockWidget : public QDockWidget * \param parent parent widget * \param flags window flags */ - explicit QgsDockWidget( QWidget *parent = nullptr, Qt::WindowFlags flags = 0 ); + explicit QgsDockWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags flags = 0 ); /** Constructor for QgsDockWidget. * \param title dock title * \param parent parent widget * \param flags window flags */ - explicit QgsDockWidget( const QString &title, QWidget *parent = nullptr, Qt::WindowFlags flags = 0 ); + explicit QgsDockWidget( const QString &title, QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags flags = 0 ); public slots: diff --git a/src/gui/qgsencodingfiledialog.h b/src/gui/qgsencodingfiledialog.h index bacf3207492..695c0ed2cb9 100644 --- a/src/gui/qgsencodingfiledialog.h +++ b/src/gui/qgsencodingfiledialog.h @@ -18,6 +18,8 @@ #include #include "qgis_gui.h" +#include "qgis.h" + class QComboBox; class QPushButton; @@ -28,7 +30,11 @@ class GUI_EXPORT QgsEncodingFileDialog: public QFileDialog { Q_OBJECT public: - QgsEncodingFileDialog( QWidget *parent = nullptr, + + /** + * @brief QgsEncodingFileDialog constructor for QgsEncodingFileDialog + */ + QgsEncodingFileDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, const QString &caption = QString(), const QString &directory = QString(), const QString &filter = QString(), const QString &encoding = QString() ); //! Returns a string describing the chosen encoding diff --git a/src/gui/qgserrordialog.h b/src/gui/qgserrordialog.h index 9c448f27d53..dfcd46787c7 100644 --- a/src/gui/qgserrordialog.h +++ b/src/gui/qgserrordialog.h @@ -23,6 +23,7 @@ #include "qgisgui.h" #include "qgserror.h" #include "qgis_gui.h" +#include "qgis.h" /** \ingroup gui * \class QgsErrorDialog @@ -31,7 +32,11 @@ class GUI_EXPORT QgsErrorDialog: public QDialog, private Ui::QgsErrorDialogBase { Q_OBJECT public: - QgsErrorDialog( const QgsError &error, const QString &title, QWidget *parent = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); + + /** + * @brief QgsErrorDialog constructor for QgsErrorDialog + */ + QgsErrorDialog( const QgsError &error, const QString &title, QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); /** Show dialog with error * \param error error