Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
- updated const variables on the qgsvector header.
- Removed dataItem_t pointer from qgsdataitem bindings.
- Put back qobject_cast.
- Loading branch information
|
@@ -11,7 +11,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
typedef QgsDataItem *dataItem_t( QString, QgsDataItem * ); |
|
|
|
|
|
class QgsDataItem : QObject |
|
|
{ |
|
@@ -25,22 +24,22 @@ class QgsDataItem : QObject |
|
|
%End |
|
|
|
|
|
%ConvertToSubClassCode |
|
|
if ( sipCpp->inherits( "QgsLayerItem" ) ) |
|
|
sipType = sipType_QgsLayerItem; |
|
|
if ( sipCpp->inherits( "QgsErrorItem" ) ) |
|
|
sipType = sipType_QgsErrorItem; |
|
|
if ( sipCpp->inherits( "QgsDirectoryItem" ) ) |
|
|
sipType = sipType_QgsDirectoryItem; |
|
|
if ( sipCpp->inherits( "QgsFavoritesItem" ) ) |
|
|
sipType = sipType_QgsFavoritesItem; |
|
|
if ( sipCpp->inherits( "QgsZipItem" ) ) |
|
|
sipType = sipType_QgsZipItem; |
|
|
if ( sipCpp->inherits( "QgsDataCollectionItem" ) ) |
|
|
sipType = sipType_QgsDataCollectionItem; |
|
|
if ( sipCpp->inherits( "QgsProjectItem" ) ) |
|
|
sipType = sipType_QgsProjectItem; |
|
|
else |
|
|
sipType = 0; |
|
|
if (qobject_cast<QgsLayerItem*>(sipCpp)) |
|
|
sipType = sipType_QgsLayerItem; |
|
|
else if (qobject_cast<QgsErrorItem*>(sipCpp)) |
|
|
sipType = sipType_QgsErrorItem; |
|
|
else if (qobject_cast<QgsDirectoryItem*>(sipCpp)) |
|
|
sipType = sipType_QgsDirectoryItem; |
|
|
else if (qobject_cast<QgsFavoritesItem*>(sipCpp)) |
|
|
sipType = sipType_QgsFavoritesItem; |
|
|
else if (qobject_cast<QgsZipItem*>(sipCpp)) |
|
|
sipType = sipType_QgsZipItem; |
|
|
else if (qobject_cast<QgsDataCollectionItem*>(sipCpp)) |
|
|
sipType = sipType_QgsDataCollectionItem; |
|
|
else if (qobject_cast<QgsProjectItem*>(sipCpp)) |
|
|
sipType = sipType_QgsProjectItem; |
|
|
else |
|
|
sipType = 0; |
|
|
%End |
|
|
public: |
|
|
enum Type |
|
|
|
@@ -67,21 +67,21 @@ Swaps the sign of the x and y components of the vector. |
|
|
:rtype: QgsVector |
|
|
%End |
|
|
|
|
|
QgsVector &operator+=( QgsVector other ); |
|
|
QgsVector &operator+=( const QgsVector other ); |
|
|
%Docstring |
|
|
Adds another vector to this vector in place. |
|
|
.. versionadded:: 3.0 |
|
|
:rtype: QgsVector |
|
|
%End |
|
|
|
|
|
QgsVector operator-( QgsVector other ) const; |
|
|
QgsVector operator-( const QgsVector other ) const; |
|
|
%Docstring |
|
|
Subtracts another vector to this vector. |
|
|
.. versionadded:: 3.0 |
|
|
:rtype: QgsVector |
|
|
%End |
|
|
|
|
|
QgsVector &operator-=( QgsVector other ); |
|
|
QgsVector &operator-=( const QgsVector other ); |
|
|
%Docstring |
|
|
Subtracts another vector to this vector in place. |
|
|
.. versionadded:: 3.0 |
|
|
|
@@ -37,7 +37,7 @@ class QgsDataProvider; |
|
|
class QgsDataItem; |
|
|
class QgsAnimatedIcon; |
|
|
|
|
|
typedef QgsDataItem *dataItem_t( QString, QgsDataItem * ); |
|
|
typedef QgsDataItem *dataItem_t( QString, QgsDataItem * ) SIP_SKIP; |
|
|
|
|
|
/** \ingroup core |
|
|
* Base class for all items in the model. |
|
@@ -48,22 +48,22 @@ class CORE_EXPORT QgsDataItem : public QObject |
|
|
|
|
|
#ifdef SIP_RUN |
|
|
SIP_CONVERT_TO_SUBCLASS_CODE |
|
|
if ( sipCpp->inherits( "QgsLayerItem" ) ) |
|
|
sipType = sipType_QgsLayerItem; |
|
|
if ( sipCpp->inherits( "QgsErrorItem" ) ) |
|
|
sipType = sipType_QgsErrorItem; |
|
|
if ( sipCpp->inherits( "QgsDirectoryItem" ) ) |
|
|
sipType = sipType_QgsDirectoryItem; |
|
|
if ( sipCpp->inherits( "QgsFavoritesItem" ) ) |
|
|
sipType = sipType_QgsFavoritesItem; |
|
|
if ( sipCpp->inherits( "QgsZipItem" ) ) |
|
|
sipType = sipType_QgsZipItem; |
|
|
if ( sipCpp->inherits( "QgsDataCollectionItem" ) ) |
|
|
sipType = sipType_QgsDataCollectionItem; |
|
|
if ( sipCpp->inherits( "QgsProjectItem" ) ) |
|
|
sipType = sipType_QgsProjectItem; |
|
|
else |
|
|
sipType = 0; |
|
|
if (qobject_cast<QgsLayerItem*>(sipCpp)) |
|
|
sipType = sipType_QgsLayerItem; |
|
|
else if (qobject_cast<QgsErrorItem*>(sipCpp)) |
|
|
sipType = sipType_QgsErrorItem; |
|
|
else if (qobject_cast<QgsDirectoryItem*>(sipCpp)) |
|
|
sipType = sipType_QgsDirectoryItem; |
|
|
else if (qobject_cast<QgsFavoritesItem*>(sipCpp)) |
|
|
sipType = sipType_QgsFavoritesItem; |
|
|
else if (qobject_cast<QgsZipItem*>(sipCpp)) |
|
|
sipType = sipType_QgsZipItem; |
|
|
else if (qobject_cast<QgsDataCollectionItem*>(sipCpp)) |
|
|
sipType = sipType_QgsDataCollectionItem; |
|
|
else if (qobject_cast<QgsProjectItem*>(sipCpp)) |
|
|
sipType = sipType_QgsProjectItem; |
|
|
else |
|
|
sipType = 0; |
|
|
SIP_END |
|
|
#endif |
|
|
|
|
|
|
@@ -67,19 +67,19 @@ class CORE_EXPORT QgsVector |
|
|
* Adds another vector to this vector in place. |
|
|
* \since QGIS 3.0 |
|
|
*/ |
|
|
QgsVector &operator+=( QgsVector other ); |
|
|
QgsVector &operator+=( const QgsVector other ); |
|
|
|
|
|
/** |
|
|
* Subtracts another vector to this vector. |
|
|
* \since QGIS 3.0 |
|
|
*/ |
|
|
QgsVector operator-( QgsVector other ) const; |
|
|
QgsVector operator-( const QgsVector other ) const; |
|
|
|
|
|
/** |
|
|
* Subtracts another vector to this vector in place. |
|
|
* \since QGIS 3.0 |
|
|
*/ |
|
|
QgsVector &operator-=( QgsVector other ); |
|
|
QgsVector &operator-=( const QgsVector other ); |
|
|
|
|
|
/** Returns the length of the vector. |
|
|
*/ |
|
|