Skip to content
Permalink
Browse files

adapt bindings to sip 4.19 (fixes #16071)

(cherry picked from commit 718581f)
  • Loading branch information
jef-n committed Feb 12, 2017
1 parent aba58a2 commit 70f51aeedac0013247457c9274fcef746447796c
@@ -1,5 +1,4 @@
%Module(name=qgis._analysis,
version=0,
keyword_arguments="Optional")

%Import QtCore/QtCoremod.sip
@@ -1,5 +1,4 @@
%Module(name=qgis._networkanalysis,
version=0,
keyword_arguments="Optional")

%Import QtCore/QtCoremod.sip
@@ -745,7 +745,7 @@ template<TYPE>

// QMap<qint64, TYPE> is implemented as a Python dictionary.
template<TYPE>
%MappedType QMap<qint64, TYPE> /DocType="dict-of-qint64-TYPE"/
%MappedType QMap<qint64, TYPE>
{
%TypeHeaderCode
#include <qmap.h>
@@ -1806,7 +1806,7 @@ template <TYPE>
};

// QList<QgsField> is implemented as a Python list of QgsField.
%MappedType QList<QgsField> /DocType="list-of-qgsfield"/
%MappedType QList<QgsField>
{
%TypeHeaderCode
#include <qgsfield.h>
@@ -1911,7 +1911,7 @@ template <TYPE>

%If (QVECTORINT_CONVERSION)
// QVector<int> is implemented as a Python list of integers.
%MappedType QVector<int> /DocType="list-of-int"/
%MappedType QVector<int>
{
%TypeHeaderCode
#include <qvector.h>
@@ -1,5 +1,4 @@
%Module(name=qgis._core,
version=0,
keyword_arguments="Optional")

%Feature QT5_SUPPORT
@@ -15,6 +15,7 @@
class QgsCoordinateTransform : QObject
{
%TypeHeaderCode
extern PyObject *sipExportedExceptions__core[2]; // workaround: sipExportedExceptions__core is only defined in the first sip part
#include <qgscoordinatetransform.h>
%End

@@ -215,5 +216,5 @@ class QgsCoordinateTransform : QObject

signals:
/** Signal when an invalid pj_transform() has occurred */
void invalidTransformInput() const;
void invalidTransformInput() const;
};
@@ -4,7 +4,7 @@ typedef QMap<int, QVariant> QgsAttributeMap;
typedef QVector<QVariant> QgsAttributes;

// QgsAttributes is implemented as a Python list of Python objects.
%MappedType QgsAttributes /DocType="list-of-attributes"/
%MappedType QgsAttributes
{
%TypeHeaderCode
#include <qgsfeature.h>
@@ -1,5 +1,5 @@
// QMap<QgsPalLayerSettings::DataDefinedProperties, QgsDataDefined*> is implemented as a Python dictionary.
%MappedType QMap<QgsPalLayerSettings::DataDefinedProperties, QgsDataDefined*> /DocType="dict-of-QgsPalLayerSettings.DataDefinedProperties-QgsDataDefined*"/
%MappedType QMap<QgsPalLayerSettings::DataDefinedProperties, QgsDataDefined*>
{
%TypeHeaderCode
#include <qmap.h>
@@ -70,5 +70,6 @@ class QgsVectorLayerFeatureIterator : QgsAbstractFeatureIterator
//void updateFeatureGeometry( QgsFeature& f );

private:
QgsVectorLayerFeatureIterator();
QgsVectorLayerFeatureIterator( const QgsVectorLayerFeatureIterator &rhs );

};
@@ -54,7 +54,7 @@ class QgsRasterProjector : QgsRasterInterface

int bandCount() const;

int dataType( int bandNo ) const;
QGis::DataType dataType( int bandNo ) const;

/** \brief set source and destination CRS */
void setCRS( const QgsCoordinateReferenceSystem & theSrcCRS, const QgsCoordinateReferenceSystem & theDestCRS,
@@ -33,6 +33,7 @@ class QgsDateTimeEdit : QDateTimeEdit

protected:
virtual void resizeEvent( QResizeEvent* event );

void mousePressEvent( QMouseEvent*event );
virtual void fixup(QString & input) const;
virtual QValidator::State validate(QString &text, int &pos) const;
};
@@ -58,4 +58,5 @@ class QgsDoubleSpinBox : QDoubleSpinBox
virtual void resizeEvent( QResizeEvent* event );
virtual void changeEvent( QEvent* event );
virtual void paintEvent( QPaintEvent* event );
virtual void fixup(QString & input) const;
};
@@ -58,4 +58,5 @@ class QgsSpinBox : QSpinBox
virtual void resizeEvent( QResizeEvent* event );
virtual void changeEvent( QEvent* event );
virtual void paintEvent( QPaintEvent* event );
virtual void fixup(QString &input) const;
};
@@ -1,5 +1,4 @@
%Module(name=qgis._gui,
version=0,
keyword_arguments="Optional")

%Feature HAVE_QSCI_SIP
@@ -8,7 +8,7 @@ class QgsLongLongValidator : QValidator
QgsLongLongValidator( qint64 bottom, qint64 top, QObject *parent );
~QgsLongLongValidator();

QValidator::State validate( QString &input, int& ) const;
virtual QValidator::State validate( QString &input, int& ) const;

void setBottom( qint64 bottom );
void setTop( qint64 top );
@@ -17,4 +17,6 @@ class QgsLongLongValidator : QValidator

qint64 bottom() const;
qint64 top() const;

virtual void fixup(QString &input) const;
};
@@ -109,7 +109,7 @@ class QgsWMSConfigParser
virtual void setScaleDenominator( double denom ) = 0;
virtual void addExternalGMLData( const QString& layerName, QDomDocument* gmlDoc ) = 0;

virtual QList< QPair< QString, QgsLayerCoordinateTransform > > layerCoordinateTransforms() const = 0;
// virtual QList< QPair< QString, QgsLayerCoordinateTransform > > layerCoordinateTransforms() const = 0;

virtual int nLayers() const = 0;

@@ -63,7 +63,7 @@ class QgsWMSProjectParser : public QgsWMSConfigParser
void setScaleDenominator( double ) /*override*/;
void addExternalGMLData( const QString&, QDomDocument* ) /*override*/ ;

QList< QPair< QString, QgsLayerCoordinateTransform > > layerCoordinateTransforms() const /*override*/ ;
// QList< QPair< QString, QgsLayerCoordinateTransform > > layerCoordinateTransforms() const /*override*/ ;

/** Fills a layer and a style list. The two list have the same number of entries and the style and the layer at a position belong together (similar to the HTTP parameters 'Layers' and 'Styles'. Returns 0 in case of success*/
int layersAndStyles( QStringList& layers, QStringList& styles ) const /*override*/ ;
@@ -1,5 +1,4 @@
%Module(name=qgis._server,
version=0,
keyword_arguments="Optional")


0 comments on commit 70f51ae

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