Skip to content
Permalink
Browse files
update sip bindings
  • Loading branch information
jef-n committed Jan 26, 2014
1 parent 3c5c7de commit d4e369414b1bbcd6cd1ad23b57eda3e37c94a6ee
Showing with 1,134 additions and 291 deletions.
  1. +1 −1 python/core/composer/qgscomposereffect.sip
  2. +3 −0 python/core/composer/qgscomposeritemgroup.sip
  3. +3 −3 python/core/composer/qgscomposershape.sip
  4. +2 −0 python/core/composer/qgspaperitem.sip
  5. +1 −0 python/core/core.sip
  6. +22 −5 python/core/qgis.sip
  7. +12 −4 python/core/qgsapplication.sip
  8. +15 −15 python/core/qgsattributeaction.sip
  9. +11 −9 python/core/qgscachedfeatureiterator.sip
  10. +10 −8 python/core/qgscoordinatereferencesystem.sip
  11. +22 −2 python/core/qgscoordinatetransform.sip
  12. +5 −2 python/core/qgscrscache.sip
  13. +1 −4 python/core/qgsdatasourceuri.sip
  14. +11 −8 python/core/qgsdiagramrendererv2.sip
  15. +58 −35 python/core/qgsexpression.sip
  16. +50 −13 python/core/qgsfeature.sip
  17. +34 −1 python/core/qgsfeatureiterator.sip
  18. +18 −3 python/core/qgsfeaturerequest.sip
  19. +20 −5 python/core/qgsgeometry.sip
  20. +4 −1 python/core/qgsgml.sip
  21. +5 −0 python/core/qgsgmlschema.sip
  22. +1 −0 python/core/qgsmaptopixel.sip
  23. +6 −0 python/core/qgsnetworkaccessmanager.sip
  24. +4 −4 python/core/qgsogcutils.sip
  25. +1 −3 python/core/qgspallabeling.sip
  26. +2 −11 python/core/qgsproject.sip
  27. +3 −0 python/core/qgsprojectproperty.sip
  28. +3 −0 python/core/qgsproviderregistry.sip
  29. +32 −8 python/core/qgsrenderchecker.sip
  30. +11 −0 python/core/qgsrendercontext.sip
  31. +34 −9 python/core/qgsvectordataprovider.sip
  32. +109 −8 python/core/qgsvectorfilewriter.sip
  33. +29 −4 python/core/qgsvectorlayer.sip
  34. +169 −7 python/core/qgsvectorlayercache.sip
  35. +7 −0 python/core/qgsvectorlayerfeatureiterator.sip
  36. +7 −0 python/core/raster/qgsraster.sip
  37. +12 −6 python/core/raster/qgsrasterblock.sip
  38. +19 −21 python/core/raster/qgsrasterinterface.sip
  39. +1 −4 python/core/raster/qgsrasterlayer.sip
  40. +9 −9 python/core/raster/qgsrasterprojector.sip
  41. +2 −0 python/core/raster/qgsrasterviewport.sip
  42. +1 −4 python/core/raster/qgssinglebandpseudocolorrenderer.sip
  43. +5 −0 python/core/symbology-ng/qgsellipsesymbollayerv2.sip
  44. +15 −1 python/core/symbology-ng/qgsfillsymbollayerv2.sip
  45. +4 −1 python/core/symbology-ng/qgsrendererv2.sip
  46. +3 −2 python/core/symbology-ng/qgssinglesymbolrendererv2.sip
  47. +54 −9 python/core/symbology-ng/qgssvgcache.sip
  48. +53 −2 python/core/symbology-ng/qgssymbollayerv2.sip
  49. +15 −5 python/core/symbology-ng/qgssymbollayerv2utils.sip
  50. +4 −1 python/core/symbology-ng/qgssymbolv2.sip
  51. +26 −4 python/core/symbology-ng/qgsvectorcolorrampv2.sip
  52. +1 −1 python/gui/attributetable/qgsfeaturelistmodel.sip
  53. +8 −1 python/gui/attributetable/qgsfeaturelistview.sip
  54. +2 −0 python/gui/qgscomposerruler.sip
  55. +46 −2 python/gui/qgscomposerview.sip
  56. +3 −1 python/gui/qgsexpressionbuilderdialog.sip
  57. +2 −0 python/gui/qgshighlight.sip
  58. +1 −0 python/gui/qgsmanageconnectionsdialog.sip
  59. +2 −2 python/gui/qgsmaptoolidentify.sip
  60. +2 −0 python/gui/qgsnewhttpconnection.sip
  61. +8 −2 python/gui/qgsoptionsdialogbase.sip
  62. +1 −0 python/gui/qgsrasterlayersaveasdialog.sip
  63. +3 −0 python/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.sip
  64. +4 −0 python/gui/symbology-ng/qgscolorrampcombobox.sip
  65. +6 −0 python/gui/symbology-ng/qgsdatadefinedsymboldialog.sip
  66. +4 −0 python/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.sip
  67. +4 −0 python/gui/symbology-ng/qgsrendererv2widget.sip
  68. +11 −1 python/gui/symbology-ng/qgsrulebasedrendererv2widget.sip
  69. +8 −0 python/gui/symbology-ng/qgssymbollayerv2widget.sip
  70. +1 −1 src/core/qgsapplication.h
  71. +3 −1 src/core/qgscoordinatetransform.h
  72. +0 −1 src/core/qgsdbfilterproxymodel.h
  73. +17 −16 src/core/qgsexpression.h
  74. +2 −1 src/core/qgsfeature.h
  75. +1 −1 src/core/qgsfeaturerequest.h
  76. +1 −1 src/core/qgsgeometry.h
  77. +1 −1 src/core/qgsogcutils.h
  78. +6 −6 src/core/qgsrenderchecker.h
  79. +1 −1 src/core/qgsvectorlayer.h
  80. +1 −1 src/core/raster/qgsrasterblock.h
  81. +27 −1 src/core/symbology-ng/qgssvgcache.h
  82. +1 −1 src/gui/attributetable/qgsfeaturelistmodel.cpp
  83. +1 −1 src/gui/attributetable/qgsfeaturelistmodel.h
  84. +1 −1 src/gui/qgsexpressionbuilderdialog.h
  85. +3 −3 src/gui/qgsexpressionbuilderwidget.h
  86. +1 −1 src/gui/symbology-ng/qgscolorrampcombobox.h
  87. +1 −0 src/gui/symbology-ng/qgsrulebasedrendererv2widget.h
@@ -7,7 +7,7 @@ class QgsComposerEffect : QGraphicsEffect
QgsComposerEffect();
~QgsComposerEffect();

void setCompositionMode( const QPainter::CompositionMode compositionMode );
void setCompositionMode( const QPainter::CompositionMode &compositionMode );

protected:
/** Called whenever source needs to be drawn */
@@ -38,6 +38,9 @@ class QgsComposerItemGroup: QgsComposerItem
signals:
void childItemDeleted( QgsComposerItem* item );

public slots:
void itemDestroyed();

protected:
void drawFrame( QPainter* p );
};
@@ -13,7 +13,7 @@ class QgsComposerShape: QgsComposerItem
Triangle
};

QgsComposerShape( QgsComposition* composition /TransferThis/);
QgsComposerShape( QgsComposition* composition /TransferThis/ );
QgsComposerShape( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition /TransferThis/);
~QgsComposerShape();

@@ -43,7 +43,7 @@ class QgsComposerShape: QgsComposerItem
void setCornerRadius( double radius );
/**Returns the radius for rounded rectangle corners*/
double cornerRadius() const;

/**Sets the QgsFillSymbolV2 used to draw the shape. Must also call setUseSymbolV2( true ) to
* enable drawing with a symbol.
* Note: added in version 2.1*/
@@ -54,7 +54,7 @@ class QgsComposerShape: QgsComposerItem

/**Controls whether the shape should be drawn using a QgsFillSymbolV2.
* Note: Added in v2.1 */
void setUseSymbolV2( bool useSymbolV2 );
void setUseSymbolV2( bool useSymbolV2 );

protected:
/* reimplement drawFrame, since it's not a rect, but a custom shape */
@@ -28,6 +28,8 @@ class QgsPaperItem: QgsComposerItem
*/
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );

virtual void setSceneRect( const QRectF& rectangle );

private:
QgsPaperItem();
/**Set flags and z-value*/
@@ -71,6 +71,7 @@
%Include qgspythonrunner.sip
%Include qgsrectangle.sip
%Include qgsrelation.sip
%Include qgsrelationmanager.sip

This comment has been minimized.

Copy link
@snorfalorpagus

snorfalorpagus Jan 26, 2014

Contributor

Did you forget to add this file to the commit?

This comment has been minimized.

Copy link
@dakcarto

dakcarto Jan 27, 2014

Member

Same issue here. Build fails on Mac due to missing sip file.

%Include qgsrenderchecker.sip
%Include qgsrendercontext.sip
%Include qgsrunprocess.sip
@@ -59,6 +59,12 @@ class QGis
WKBMultiPolygon25D,
};

static WkbType singleType( WkbType type );
static WkbType multiType( WkbType type );
static WkbType flatType( WkbType type );
static bool isSingleType( WkbType type );
static bool isMultiType( WkbType type );
static int wkbDimensions( WkbType type );
enum GeometryType
{
Point,
@@ -68,11 +74,11 @@ class QGis
NoGeometry
};

// TODO: String representation of geometry types (set in qgis.cpp)
// static const char *qgisVectorGeometryType[];
//! description strings for geometry types
static const char *vectorGeometryType( GeometryType type );

//! description strings for feature types
// static const char *qgisFeatureTypes[];
static const char *featureType( WkbType type );

/** Raster data types.
* This is modified and extended copy of GDALDataType.
@@ -97,6 +103,7 @@ class QGis
QImage::Format_ARGB32_Premultiplied */ ARGB32_Premultiplied = 13
};


/** Map units that qgis supports
* @note that QGIS < 1.4 api had only Meters, Feet, Degrees and UnknownUnit
* @note and QGIS >1.8 returns to that
@@ -112,6 +119,7 @@ class QGis
DecimalDegrees = 2, // was 2
DegreesMinutesSeconds = 2, // was 4
DegreesDecimalMinutes = 2, // was 5
NauticalMiles = 7
};

//! Provides the canonical name of the type value
@@ -123,6 +131,8 @@ class QGis
//! Provides translated version of the type value
// Added in version 2.0
static QString tr( QGis::UnitType unit );
//! Returns the conversion factor between the specified units
static double fromUnitToUnitFactor( QGis::UnitType fromUnit, QGis::UnitType toUnit );

//! User defined event types
enum UserEvent
@@ -137,14 +147,16 @@ class QGis
};

static const double DEFAULT_IDENTIFY_RADIUS;

//! Default threshold between map coordinates and device coordinates for map2pixel simplification
static const float DEFAULT_MAPTOPIXEL_THRESHOLD;
};


/** Wkt string that represents a geographic coord sys
* @note added in 1.8 to replace GEOWkt
*/
const QString GEOWKT;

const QString PROJECT_SCALES;

/** PROJ4 string that represents a geographic coord sys */
@@ -184,6 +196,11 @@ const double DEFAULT_LINE_WIDTH;
/** default snapping tolerance for segments (@note added in 1.8) */
const double DEFAULT_SEGMENT_EPSILON;

/** KEEP IN SYNC WITH qgssize defined in qgis.h! */
/** qgssize is used instead of size_t, because size_t is stdlib type, unknown
* by SIP, and it would be hard to define size_t correctly in SIP.
* Currently used "unsigned long long" was introduced in C++11 (2011)
* but it was supported already before C++11 on common platforms.
* "unsigned long long int" gives syntax error in SIP.
* KEEP IN SYNC WITH qgssize defined in SIP! */
typedef unsigned long long qgssize;

@@ -92,7 +92,7 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
* based on the supplied theme name exists. If it does not the theme name will
* be reverted to 'default'.
*/
static void setThemeName( const QString theThemeName );
static void setThemeName( const QString &theThemeName );

/** Set the active theme to the specified theme.
* The theme name should be a single word e.g. 'default','classic'.
@@ -125,6 +125,11 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
*/
static const QString translatorsFilePath();

/*!
Returns the path to the licence file.
*/
static const QString licenceFilePath();

//! Returns the path to the help application.
static const QString helpAppPath();

@@ -202,20 +207,23 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
static const QString libexecPath();

//! Alters prefix path - used by 3rd party apps
static void setPrefixPath( const QString thePrefixPath, bool useDefaultPaths = false );
static void setPrefixPath( const QString &thePrefixPath, bool useDefaultPaths = false );

//! Alters plugin path - used by 3rd party apps
static void setPluginPath( const QString thePluginPath );
static void setPluginPath( const QString &thePluginPath );

//! Alters pkg data path - used by 3rd party apps
static void setPkgDataPath( const QString thePkgDataPath );
static void setPkgDataPath( const QString &thePkgDataPath );

//! Alters default svg paths - used by 3rd party apps. Added in QGIS 1.5
static void setDefaultSvgPaths( const QStringList& pathList );

//! loads providers
static void initQgis();

//! initialise qgis.db
static bool createDB( QString* errorMessage = 0 );

//! deletes provider registry and map layer registry
static void exitQgis();

@@ -29,9 +29,15 @@ class QgsAction
//! Whether to capture output for display when this action is run
bool capture() const;

//! Whether the action is runable on the current platform
bool runable() const;
};

/*! \class QgsAttributeAction
* \brief Storage and management of actions associated with Qgis layer
* attributes.
*/

class QgsAttributeAction
{
%TypeHeaderCode
@@ -54,31 +60,25 @@ class QgsAttributeAction
//! Remove an action at given index
void removeAction( int index );

/*! Does the given values. defaultValueIndex is the index of the
/*! Does the given values. defaultValueIndex is the index of the
* field to be used if the action has a $currfield placeholder.
* @note added in 1.9
* @note not available in python bindings
* @note available in python bindings as doActionFeature
*/
void doActionFeature( int index,
QgsFeature &feat,
int defaultValueIndex = 0 );
%MethodCode
sipCpp->doAction( a0, *a1, a2 );
%End
void doAction( int index,
QgsFeature &feat,
int defaultValueIndex = 0 ) /PyName=doActionFeature/;

/*! Does the action using the expression builder to expand it
* and getting values from the passed feature attribute map.
* substitutionMap is used to pass custom substitutions, to replace
* each key in the map with the associated value
* @note added in 1.9
* @note available in python bindings as doActionFeatureSubstitution
* @note available in python bindings as doActionFeatureWithSubstitution
*/
void doActionFeatureWithSubstitution( int index,
QgsFeature &feat,
const QMap<QString, QVariant> *substitutionMap = 0 );
%MethodCode
sipCpp->doAction( a0, *a1, a2 );
%End
void doAction( int index,
QgsFeature &feat,
const QMap<QString, QVariant> *substitutionMap = 0 ) /PyName=doActionFeatureWithSubstitution/;

//! Removes all actions
void clearActions();
@@ -5,35 +5,37 @@ class QgsCachedFeatureIterator : QgsAbstractFeatureIterator
%End
public:
/**
* @brief
* This constructor creates a feature iterator, that delivers only cached information, based on the
* @link QgsFeatureIds @endlink. No request is made to the backend.
*
* @param vlCache The vector layer cache to use
* @param featureRequest The feature request to answer
* @param featureIds The feature ids to return
*
* @deprecated Use QgsCachedFeatureIterator( QgsVectorLayerCache* vlCache, QgsFeatureRequest featureRequest )
* instead
*/
QgsCachedFeatureIterator( QgsVectorLayerCache* vlCache, QgsFeatureRequest featureRequest, QgsFeatureIds featureIds );

/**
* @brief
* This constructor creates a feature iterator, that delivers all cached features. No request is made to the backend.
*
* @param f
* @return bool
* @param vlCache The vector layer cache to use
* @param featureRequest The feature request to answer
*/
virtual bool nextFeature( QgsFeature& f );
QgsCachedFeatureIterator( QgsVectorLayerCache* vlCache, QgsFeatureRequest featureRequest );

/**
* @brief
* Rewind to the beginning of the iterator
*
* @return bool
* @return bool true if the operation was ok
*/
virtual bool rewind();

/**
* @brief
* Close this iterator. No further features will be available.
*
* @return bool
* @return true if successful
*/
virtual bool close();
};
@@ -71,7 +71,7 @@ class QgsCoordinateReferenceSystem
* @param theWkt The Wkt for the desired spatial reference system.
* @return bool TRUE if success else false
*/
bool createFromWkt( const QString theWkt );
bool createFromWkt( const QString &theWkt );

/*! Set up this srs by fetching the appropriate information from the
* sqlite backend. If the srsid is < 100000, only the system srs.db
@@ -89,7 +89,7 @@ class QgsCoordinateReferenceSystem
* in the parameters member. The reason for this is so that we
* can easily present the user with 'natural language' representation
* of the projection and ellipsoid by looking them up in the srs.bs sqlite
* database. Also having the ellpse and proj elements stripped out
* database. Also having the ellipse and proj elements stripped out
* is helpful to speed up globbing queries (see below).
*
* We try to match the proj string to and srsid using the following logic:
@@ -106,13 +106,10 @@ class QgsCoordinateReferenceSystem
* check for a match in entities that have the same ellps and proj entries so
* that it doesn't munch yer cpu so much.
*
* @note If the srs was not matched, we will create a new entry on the users tbl_srs
* for this srs.
*
* @param theProjString A proj4 format string
* @return bool TRUE if success else false
*/
bool createFromProj4( const QString theProjString );
bool createFromProj4( const QString &theProjString );

/*! Set up this srs from a string definition, by default a WKT definition. Otherwise
* the string defines a authority, followed by a colon, followed by the definition.
@@ -121,7 +118,7 @@ class QgsCoordinateReferenceSystem
* uses the corresponding createFrom... function.
* @param theDefinition A String containing a coordinate reference system definition.
*/
bool createFromString( const QString theDefinition );
bool createFromString( const QString &theDefinition );

/*! Set up this srs from a various text formats.
*
@@ -138,7 +135,7 @@ class QgsCoordinateReferenceSystem
*
* @note added in 1.8
*/
bool createFromUserInput( const QString theDefinition );
bool createFromUserInput( const QString &theDefinition );

/*! Make sure that ESRI WKT import is done properly.
* This is required for proper shapefile CRS import when using gdal>= 1.9.
@@ -215,6 +212,7 @@ class QgsCoordinateReferenceSystem

/** Sets custom function to force valid CRS
* QGIS uses implementation in QgisGui::customSrsValidation
* @note not available in python bindings
*/
// static void setCustomSrsValidation( CUSTOM_CRS_VALIDATION f );

@@ -305,8 +303,12 @@ class QgsCoordinateReferenceSystem
*/
static int syncDb();


/*! Save the proj4-string as a custom CRS
* @returns bool true if success else false
*/
bool saveAsUserCRS( QString name );

/**Returns auth id of related geographic CRS*/
QString geographicCRSAuthId() const;
};

0 comments on commit d4e3694

Please sign in to comment.