Skip to content
Permalink
Browse files
[sipify] handle constrained annotation
  • Loading branch information
3nids committed May 24, 2017
1 parent 563e7c1 commit f5e66dd227199cfafc2683429fd0d3c626d6ec23
@@ -2052,6 +2052,7 @@ PREDEFINED =
EXPAND_AS_DEFINED = "SIP_ABSTRACT" \
"SIP_ARRAY" \
"SIP_ARRAYSIZE" \
"SIP_CONSTRAINED" \
"SIP_CONVERT_TO_SUBCLASS_CODE" \
"SIP_DEPRECATED" \
"SIP_END" \
@@ -9,6 +9,12 @@



// This is required for the ConvertToSubClassCode to work properly
// so RTTI for casting is available in the whole module.
%ModuleCode
#include "qgsfeatureselectiondlg.h"
%End

class QgsFeatureSelectionDlg : QDialog
{

@@ -19,8 +19,8 @@ class QgsFieldValidator : QValidator
QgsFieldValidator( QObject *parent, const QgsField &field, const QString &defaultValue, const QString &dateFormat = "yyyy-MM-dd" );
~QgsFieldValidator();

virtual State validate( QString &SIP_CONSTRAINED, int &/In,Out/ ) const;
virtual void fixup( QString & ) const;
virtual State validate( QString &s /Constrained/, int &i /In,Out/ ) const;
virtual void fixup( QString &s /Constrained/ ) const;

QString dateFormat() const;
%Docstring
@@ -150,6 +150,7 @@ ()
$line =~ s/\bSIP_ARRAY\b/\/Array\//g;
$line =~ s/\bSIP_ARRAYSIZE\b/\/ArraySize\//g;
$line =~ s/\bSIP_DEPRECATED\b/\/Deprecated\//g;
$line =~ s/\bSIP_CONSTRAINED\b/\/Constrained\//g;
$line =~ s/\bSIP_FACTORY\b/\/Factory\//;
$line =~ s/\bSIP_IN\b/\/In\//g;
$line =~ s/\bSIP_INOUT\b/\/In,Out\//g;
@@ -86,6 +86,11 @@
*/
#define SIP_DEPRECATED

/*
* http://pyqt.sourceforge.net/Docs/sip4/annotations.html?highlight=constrained#argument-annotation-Constrained
*/
#define SIP_CONSTRAINED

/*
* discard line
*/
@@ -22,6 +22,14 @@ class QgsGenericFeatureSelectionManager;
#include "qgis.h"
#include "qgis_gui.h"

#ifdef SIP_RUN
// This is required for the ConvertToSubClassCode to work properly
// so RTTI for casting is available in the whole module.
% ModuleCode
#include "qgsfeatureselectiondlg.h"
% End
#endif

/** \ingroup gui
* \class QgsFeatureSelectionDlg
*/
@@ -37,8 +37,8 @@ class GUI_EXPORT QgsFieldValidator : public QValidator
QgsFieldValidator( QObject *parent, const QgsField &field, const QString &defaultValue, const QString &dateFormat = "yyyy-MM-dd" );
~QgsFieldValidator();

virtual State validate( QString &SIP_CONSTRAINED, int &SIP_INOUT ) const override;
virtual void fixup( QString & ) const override;
virtual State validate( QString &s SIP_CONSTRAINED, int &i SIP_INOUT ) const override;
virtual void fixup( QString &s SIP_CONSTRAINED ) const override;

QString dateFormat() const { return mDateFormat; }

@@ -86,7 +86,7 @@
"QgsVectorGradientColorRampDialog": ["setItemStopColor(const QColor &newColor)", "setColor1(const QColor &color)", "stopDoubleClicked(QTreeWidgetItem *item, int column)", "setStopColor(QTreeWidgetItem *item, const QColor &color)", "QgsVectorGradientColorRampDialog(QgsVectorGradientColorRamp *ramp, QWidget *parent=nullptr)", "setColor2(const QColor &color)", "addStop()", "toggledStops(bool on)", "removeStop()", "updateStops()", "updatePreview()"],
"QgsCptCityColorRampDialog": ["clearCopyingInfo()", "showAll()", "saveAsGradientRamp() const ", "updatePreview(bool clear=false)", "setTreeModel(QgsCptCityBrowserModel *model)", "updateCopyingInfo(const QMap< QString, QString > &copyingMap)", "QgsCptCityColorRampDialog(QgsCptCityColorRamp *ramp, QWidget *parent=nullptr)", "updateTreeView(QgsCptCityDataItem *item, bool resetRamp=true)", "onFinished()", "updateRamp()", "populateVariants()", "updateListWidget(QgsCptCityDataItem *item)", "selectedName() const "],
"QgsComposerMouseHandles": ["SnapGuideMode", "composition()", "QgsComposerMouseHandles(QgsComposition *composition)", "setComposition(QgsComposition *c)", "ItemPositionMode"],
"QgsExpressionBuilderDialog": ["QgsExpressionBuilderDialog(QgsVectorLayer *layer, const QString &startText=QString(), QWidget *parent=nullptr, const QString &key=\"generic\", const QgsExpressionContext &context=QgsExpressionContext())", "expressionText()", "setExpressionText(const QString &text)"],
"QgsExpressionBuilderDialog": ["QgsExpressionBuilderDialog(QgsVectorLayer *layer, const QString &startText=QString(), QWidget *parent SIP_TRANSFERTHIS=nullptr, const QString &key=\"generic\", const QgsExpressionContext &context=QgsExpressionContext())", "expressionText()", "setExpressionText(const QString &text)"],
"QgsProviderMetadata": ["QgsProviderMetadata(const QString &_key, const QString &_description, const QString &_library)"],
"QgsAbstractFeatureIteratorFromSource": ["QgsAbstractFeatureIteratorFromSource(T *source, bool ownSource, const QgsFeatureRequest &request)"],
"pal::PolygonCostCalculator": ["PolygonCostCalculator(LabelPosition *lp)", "update(pal::PointSet *pset)", "getCost()", "getLabel()"],
@@ -607,7 +607,7 @@
"QgsRasterBandStats": ["Stats"],
"QgsFeatureSelectionModel": ["setFeatureSelectionManager(QgsIFeatureSelectionManager *featureSelectionManager)", "QgsFeatureSelectionModel(QAbstractItemModel *model, QgsFeatureModel *featureModel, QgsIFeatureSelectionManager *featureSelectionHandler, QObject *parent)"],
"QgsComposerMultiFrameCommand": ["multiFrame() const ", "saveAfterState()", "previousState() const ", "checkFirstRun()", "QgsComposerMultiFrameCommand(QgsComposerMultiFrame *multiFrame, const QString &text, QUndoCommand *parent=0)", "restoreState(QDomDocument &stateDoc)", "afterState() const ", "savePreviousState()", "saveState(QDomDocument &stateDoc)"],
"QgsExtentGroupBox": ["extentState() const ", "currentCrs() const ", "setOutputExtentFromLineEdit()", "setOutputExtent(const QgsRectangle &r, const QgsCoordinateReferenceSystem &srcCrs, ExtentState state)", "updateTitle()", "ExtentState", "originalCrs() const ", "QgsExtentGroupBox(QWidget *parent=0)", "groupBoxClicked()", "originalExtent() const ", "currentExtent() const "],
"QgsExtentGroupBox": ["extentState() const ", "currentCrs() const ", "setOutputExtentFromLineEdit()", "setOutputExtent(const QgsRectangle &r, const QgsCoordinateReferenceSystem &srcCrs, QgsExtentGroupBox::ExtentState state)", "updateTitle()", "ExtentState", "originalCrs() const ", "QgsExtentGroupBox(QWidget *parent=0)", "groupBoxClicked()", "originalExtent() const ", "currentExtent() const "],
"QgsComposerAttributeTableCompare": ["operator()(const QgsAttributeMap &m1, const QgsAttributeMap &m2)"],
"QgsSpinBox": ["ClearValueMode", "showClearButton() const ", "QgsSpinBox(QWidget *parent=nullptr)"],
"QgsComposerItem": ["beginItemCommand(const QString &text)", "endItemCommand()", "ItemType", "removeItems()", "deleteHAlignSnapItem()", "deleteVAlignSnapItem()", "ItemPositionMode", "cancelCommand()", "deleteAlignItems()"],

0 comments on commit f5e66dd

Please sign in to comment.