Skip to content
Permalink
Browse files

[sip] handle Deprecated annotations

some additional fixes in headers too
  • Loading branch information
3nids committed May 24, 2017
1 parent 694c811 commit 30a7e44d5713a8e83bdc5ffc6afbf69406837bad
@@ -2053,6 +2053,7 @@ EXPAND_AS_DEFINED = "SIP_ABSTRACT" \
"SIP_ARRAY" \
"SIP_ARRAYSIZE" \
"SIP_CONVERT_TO_SUBCLASS_CODE" \
"SIP_DEPRECATED" \
"SIP_END" \
"SIP_FACTORY" \
"SIP_FEATURE" \
@@ -541,7 +541,7 @@ Unregister a previously registered action. (e.g. when plugin is going to be unlo
%End


virtual void openURL( const QString &url, bool useQgisDocDirectory = true ) = 0;
virtual void openURL( const QString &url, bool useQgisDocDirectory = true ) = 0 /Deprecated/;
%Docstring
Open a url in the users browser. By default the QGIS doc directory is used
as the base for the URL. To open a URL that is not relative to the installed
@@ -554,7 +554,6 @@ Unregister a previously registered action. (e.g. when plugin is going to be unlo




virtual QMenu *projectMenu() = 0;
%Docstring
:rtype: QMenu
@@ -34,7 +34,7 @@ class QgsActionMenu : QMenu
ActionData( const QgsAction &action, QgsFeatureId featureId, QgsMapLayer *mapLayer );
ActionData( QgsMapLayerAction *action, QgsFeatureId featureId, QgsMapLayer *mapLayer );

ActionType actionType;
QgsActionMenu::ActionType actionType;
QVariant actionData;
QgsFeatureId featureId;
QgsMapLayer *mapLayer;
@@ -34,8 +34,10 @@ class QgsAttributeForm : QWidget
FilterOr,
};

explicit QgsAttributeForm( QgsVectorLayer *vl, const QgsFeature &feature = QgsFeature(),
const QgsAttributeEditorContext &context = QgsAttributeEditorContext(), QWidget *parent = 0 );
explicit QgsAttributeForm( QgsVectorLayer *vl,
const QgsFeature &feature = QgsFeature(),
const QgsAttributeEditorContext &context = QgsAttributeEditorContext(),
QWidget *parent /TransferThis/ = 0 );
~QgsAttributeForm();

const QgsFeature &feature();
@@ -131,17 +133,6 @@ class QgsAttributeForm : QWidget
\param value The new value of the attribute.
%End

void beforeSave( bool &ok );
%Docstring
Will be emitted before the feature is saved. Use this signal to perform sanity checks.
You can set the parameter ok to false to notify the form that you don't want it to be saved.
If you want the form to be saved, leave the parameter untouched.

\param ok Set this parameter to false if you don't want the form to be saved
.. note::

not available in Python bindings
%End

void featureSaved( const QgsFeature &feature );
%Docstring
@@ -41,6 +41,17 @@ class QgsAttributeFormEditorWidget : QWidget

~QgsAttributeFormEditorWidget();

void createSearchWidgetWrappers( const QString &widgetId, int fieldIdx,
const QVariantMap &config );

%Docstring
Creates the search widget wrappers for the widget used when the form is in
search mode.
\param widgetId id of the widget type to create a search wrapper for
\param fieldIdx index of field associated with widget
\param config configuration which should be used for the widget creation
\param context editor context (not available in Python bindings)
%End

void setMode( Mode mode );
%Docstring
@@ -22,7 +22,7 @@ class QgsBusyIndicatorDialog : QDialog
%End
public:

QgsBusyIndicatorDialog( const QString &message = "", QWidget *parent = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
QgsBusyIndicatorDialog( const QString &message = "", QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
%Docstring
Constructor
Modal busy indicator dialog with no buttons.
@@ -149,6 +149,7 @@ ()
$line =~ s/\bSIP_ABSTRACT\b/\/Abstract\//;
$line =~ s/\bSIP_ARRAY\b/\/Array\//g;
$line =~ s/\bSIP_ARRAYSIZE\b/\/ArraySize\//g;
$line =~ s/\bSIP_DEPRECATED\b/\/Deprecated\//g;
$line =~ s/\bSIP_FACTORY\b/\/Factory\//;
$line =~ s/\bSIP_IN\b/\/In\//g;
$line =~ s/\bSIP_INOUT\b/\/In,Out\//g;
@@ -81,6 +81,11 @@
*/
#define SIP_NODEFAULTCTORS

/*
* http://pyqt.sourceforge.net/Docs/sip4/annotations.html?highlight=deprecated#function-annotation-Deprecated
*/
#define SIP_DEPRECATED

/*
* discard line
*/
@@ -434,7 +434,7 @@ class GUI_EXPORT QgisInterface : public QObject
#ifndef Q_MOC_RUN
Q_DECL_DEPRECATED
#endif
virtual void openURL( const QString &url, bool useQgisDocDirectory = true ) = 0;
virtual void openURL( const QString &url, bool useQgisDocDirectory = true ) = 0 SIP_DEPRECATED;


/** Accessors for inserting items into menus and toolbars.
@@ -51,7 +51,7 @@ class GUI_EXPORT QgsActionMenu : public QMenu
ActionData( const QgsAction &action, QgsFeatureId featureId, QgsMapLayer *mapLayer );
ActionData( QgsMapLayerAction *action, QgsFeatureId featureId, QgsMapLayer *mapLayer );

ActionType actionType;
QgsActionMenu::ActionType actionType;
QVariant actionData;
QgsFeatureId featureId;
QgsMapLayer *mapLayer = nullptr;
@@ -61,8 +61,10 @@ class GUI_EXPORT QgsAttributeForm : public QWidget
FilterOr, //!< Filter should be combined using "OR"
};

explicit QgsAttributeForm( QgsVectorLayer *vl, const QgsFeature &feature = QgsFeature(),
const QgsAttributeEditorContext &context = QgsAttributeEditorContext(), QWidget *parent = nullptr );
explicit QgsAttributeForm( QgsVectorLayer *vl,
const QgsFeature &feature = QgsFeature(),
const QgsAttributeEditorContext &context = QgsAttributeEditorContext(),
QWidget *parent SIP_TRANSFERTHIS = nullptr );
~QgsAttributeForm();

const QgsFeature &feature() { return mFeature; }
@@ -169,7 +171,7 @@ class GUI_EXPORT QgsAttributeForm : public QWidget
* \param ok Set this parameter to false if you don't want the form to be saved
* \note not available in Python bindings
*/
void beforeSave( bool &ok );
void beforeSave( bool &ok ) SIP_SKIP;

/**
* Is emitted, when a feature is changed or added
@@ -72,7 +72,7 @@ class GUI_EXPORT QgsAttributeFormEditorWidget : public QWidget
*/
void createSearchWidgetWrappers( const QString &widgetId, int fieldIdx,
const QVariantMap &config,
const QgsAttributeEditorContext &context = QgsAttributeEditorContext() ) SIP_SKIP;
const QgsAttributeEditorContext &context SIP_PYARGREMOVE = QgsAttributeEditorContext() );

/** Sets the current mode for the widget. The widget will adapt its state and visible widgets to
* reflect the updated mode. For example, showing multi edit tool buttons if the mode is set to MultiEditMode.
@@ -23,6 +23,7 @@
#include <QDialog>
#include <QLabel>
#include "qgis_gui.h"
#include "qgis_sip.h"


/** \ingroup gui
@@ -40,7 +41,7 @@ class GUI_EXPORT QgsBusyIndicatorDialog : public QDialog
* \param parent parent object (owner)
* \param fl widget flags
*/
QgsBusyIndicatorDialog( const QString &message = "", QWidget *parent = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
QgsBusyIndicatorDialog( const QString &message = "", QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );

QString message() const { return mMessage; }
void setMessage( const QString &message );

0 comments on commit 30a7e44

Please sign in to comment.
You can’t perform that action at this time.