Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
sip sync
  • Loading branch information
jef-n committed May 27, 2014
1 parent 260cff4 commit c4c131e
Show file tree
Hide file tree
Showing 187 changed files with 1,534 additions and 709 deletions.
29 changes: 15 additions & 14 deletions python/analysis/analysis.sip
Expand Up @@ -14,20 +14,21 @@
%Include vector/qgstransectsample.sip
%Include vector/qgszonalstatistics.sip

// // %Include interpolation/Bezier3D.sip
// // %Include interpolation/CloughTocherInterpolator.sip
// // %Include interpolation/DualEdgeTriangulation.sip
// // %Include interpolation/HalfEdge.sip
// // %Include interpolation/LinTriangleInterpolator.sip
// // %Include interpolation/Line3D.sip
// // %Include interpolation/Node.sip
// // %Include interpolation/NormVecDecorator.sip
// // %Include interpolation/ParametricLine.sip
// // %Include interpolation/Point3D.sip
// // %Include interpolation/TriangleInterpolator.sip
// // %Include interpolation/Triangulation.sip
// // %Include interpolation/TriDecorator.sip
// // %Include interpolation/Vector3D.sip
// %Include interpolation/Bezier3D.sip
// %Include interpolation/CloughTocherInterpolator.sip
// %Include interpolation/DualEdgeTriangulation.sip
// %Include interpolation/HalfEdge.sip
// %Include interpolation/LinTriangleInterpolator.sip
// %Include interpolation/Line3D.sip
// %Include interpolation/Node.sip
// %Include interpolation/NormVecDecorator.sip
// %Include interpolation/ParametricLine.sip
// %Include interpolation/Point3D.sip
// %Include interpolation/TriangleInterpolator.sip
// %Include interpolation/Triangulation.sip
// %Include interpolation/TriDecorator.sip
// %Include interpolation/Vector3D.sip

%Include interpolation/qgsgridfilewriter.sip
%Include interpolation/qgsinterpolator.sip
%Include interpolation/qgsidwinterpolator.sip
Expand Down
9 changes: 7 additions & 2 deletions python/analysis/interpolation/DualEdgeTriangulation.sip
Expand Up @@ -25,6 +25,7 @@ class DualEdgeTriangulation: Triangulation
/**Returns the number of the point opposite to the triangle points p1, p2 (which have to be on a halfedge)*/
int getOppositePoint( int p1, int p2 );
/**Finds out, in which triangle the point with coordinates x and y is and assigns the numbers of the vertices to 'n1', 'n2' and 'n3' and the vertices to 'p1', 'p2' and 'p3'*/
//! @note not available in python bindings
// virtual bool getTriangle( double x, double y, Point3D* p1, int* n1, Point3D* p2, int* n2, Point3D* p3, int* n3 );
/**Finds out, in which triangle the point with coordinates x and y is and assigns addresses to the points at the vertices to 'p1', 'p2' and 'p3*/
virtual bool getTriangle( double x, double y, Point3D* p1, Point3D* p2, Point3D* p3 );
Expand Down Expand Up @@ -77,14 +78,18 @@ class DualEdgeTriangulation: Triangulation
unsigned int insertEdge( int dual, int next, int point, bool mbreak, bool forced );
/**inserts a forced segment between the points with the numbers p1 and p2 into the triangulation and returns the number of a HalfEdge belonging to this forced edge or -100 in case of failure*/
int insertForcedSegment( int p1, int p2, bool breakline );
/**Threshold for the leftOfTest to handle numerical instabilities*/
//const static double leftOfTresh=0.00001;
/**Security to prevent endless loops in 'baseEdgeOfTriangle'. It there are more iteration then this number, the point will not be inserted*/
const static int nBaseOfRuns = 300000;
/**Returns the number of an edge which points to the point with number 'point' or -1 if there is an error*/
int baseEdgeOfPoint( int point );
/**returns the number of a HalfEdge from a triangle in which 'point' is in. If the number -10 is returned, this means, that 'point' is outside the convex hull. If -5 is returned, then numerical problems with the leftOfTest occured (and the value of the possible edge is stored in the variable 'mUnstableEdge'. -20 means, that the inserted point is exactly on an edge (the number is stored in the variable 'mEdgeWithPoint'). -25 means, that the point is already in the triangulation (the number of the point is stored in the member 'mTwiceInsPoint'. If -100 is returned, this means that something else went wrong*/
int baseEdgeOfTriangle( Point3D* point );
/**Checks, if 'edge' has to be swapped because of the empty circle criterion. If so, doSwap(...) is called.*/
bool checkSwap( unsigned int edge );
bool checkSwap( unsigned int edge, unsigned int recursivDeep );
/**Swaps 'edge' and test recursively for other swaps (delaunay criterion)*/
void doSwap( unsigned int edge );
void doSwap( unsigned int edge, unsigned int recursivDeep );
/**Swaps 'edge' and does no recursiv testing*/
void doOnlySwap( unsigned int edge );
/**Returns true, if it is possible to swap an edge, otherwise false(concave quad or edge on (or outside) the convex hull)*/
Expand Down
2 changes: 1 addition & 1 deletion python/analysis/interpolation/ParametricLine.sip
Expand Up @@ -26,6 +26,6 @@ class ParametricLine
//virtual bool intersects(ParametricLine* pal);
virtual void remove( int i ) = 0;
//! @note not available in python binding
//virtual void setControlPoly( QVector<Point3D*>* cp ) = 0;
// virtual void setControlPoly( QVector<Point3D*>* cp ) = 0;
virtual void setParent( ParametricLine* paral ) = 0;
};
2 changes: 1 addition & 1 deletion python/analysis/interpolation/Vector3D.sip
Expand Up @@ -13,7 +13,7 @@ class Vector3D
Vector3D( const Vector3D& v );
/**Destructor*/
~Vector3D();
//Vector3D& operator=( const Vector3D& v );
// Vector3D& operator=( const Vector3D& v );
bool operator==( const Vector3D& v );
bool operator!=( const Vector3D& v );
/**Returns the x-component of the vector*/
Expand Down
3 changes: 3 additions & 0 deletions python/analysis/interpolation/qgsinterpolator.sip
Expand Up @@ -36,6 +36,9 @@ class QgsInterpolator
@return 0 in case of success*/
virtual int interpolatePoint( double x, double y, double& result ) = 0;

// @note not available in python bindings
// const QList<LayerData>& layerData() const;

protected:
/**Caches the vertex and value data from the provider. All the vertex data
will be held in virtual memory
Expand Down
1 change: 0 additions & 1 deletion python/analysis/network/qgsdistancearcproperter.sip
Expand Up @@ -8,4 +8,3 @@ class QgsDistanceArcProperter : QgsArcProperter
public:
virtual QVariant property( double distance, const QgsFeature& ) const;
};

1 change: 0 additions & 1 deletion python/analysis/network/qgsgraph.sip
Expand Up @@ -130,4 +130,3 @@ class QgsGraph
*/
int findVertex( const QgsPoint& pt ) const;
};

31 changes: 16 additions & 15 deletions python/core/composer/qgsatlascomposition.sip
Expand Up @@ -21,18 +21,18 @@ public:
* @see setEnabled
*/
bool enabled() const;

/**Sets whether the atlas is enabled
* @param enabled set to true to enable to atlas
* @see enabled
*/
*/
void setEnabled( bool enabled );

/**Returns the map used by the atlas
* @deprecated Use QgsComposerMap::atlasDriven() instead
*/
QgsComposerMap* composerMap() const /Deprecated/;

/**Sets the map used by the atlas
* @deprecated Use QgsComposerMap::setAtlasDriven( true ) instead
*/
Expand All @@ -43,17 +43,18 @@ public:
* @see setHideCoverage
*/
bool hideCoverage() const;

/**Sets whether the coverage layer should be hidden in map items in the composition
* @param hide set to true to hide the coverage layer
* @see hideCoverage
*/
*/
void setHideCoverage( bool hide );

/**Returns whether the atlas map uses a fixed scale
* @deprecated since 2.4 Use QgsComposerMap::atlasScalingMode() instead
*/
bool fixedScale() const /Deprecated/;

/**Sets whether the atlas map should use a fixed scale
* @deprecated since 2.4 Use QgsComposerMap::setAtlasScalingMode() instead
*/
Expand All @@ -63,38 +64,38 @@ public:
* @deprecated Use QgsComposerMap::atlasMargin() instead
*/
float margin() const /Deprecated/;

/**Sets the margin for the atlas map
* @deprecated Use QgsComposerMap::setAtlasMargin( double ) instead
*/
void setMargin( float margin ) /Deprecated/;

/**Returns the filename expression used for generating output filenames for each
/**Returns the filename expression used for generating output filenames for each
* atlas page.
* @returns filename pattern
* @see setFilenamePattern
* @note This property has no effect when exporting to PDF if singleFile() is true
*/
QString filenamePattern() const;

/**Sets the filename expression used for generating output filenames for each
* atlas page.
* @param pattern expression to use for output filenames
* @see filenamePattern
* @note This method has no effect when exporting to PDF if singleFile() is true
*/
*/
void setFilenamePattern( const QString& pattern );

/**Returns the coverage layer used for the atlas features
* @returns atlas coverage layer
* @see setCoverageLayer
*/
QgsVectorLayer* coverageLayer() const;

/**Sets the coverage layer to use for the atlas features
* @param layer vector coverage layer
* @see coverageLayer
*/
*/
void setCoverageLayer( QgsVectorLayer* layer );

/**Returns whether the atlas will be exported to a single file. This is only
Expand All @@ -104,13 +105,13 @@ public:
* @note This property is only used for PDF exports.
*/
bool singleFile() const;

/**Sets whether the atlas should be exported to a single file. This is only
* applicable for PDF exports.
* @param single set to true to export atlas to a single file.
* @see singleFile
* @note This method is only used for PDF exports.
*/
*/
void setSingleFile( bool single );

bool sortFeatures() const;
Expand Down Expand Up @@ -138,7 +139,7 @@ public:
* @see QgsComposerMap::atlasScalingMode
*/
const QVector<double>& predefinedScales() const;

/**Sets the list of predefined scales for the atlas. This is used
* for maps which are set to the predefined atlas scaling mode.
* @param scales a vector of doubles representing predefined scales
Expand Down Expand Up @@ -203,7 +204,7 @@ public:

/**Is emitted when atlas rendering has ended*/
void renderEnded();

/**Is emitted when the current atlas feature changes*/
void featureChanged( QgsFeature* feature );

Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposerframe.sip
Expand Up @@ -23,4 +23,4 @@ class QgsComposerFrame: QgsComposerItem
int type() const;

QgsComposerMultiFrame* multiFrame() const;
};
};
17 changes: 10 additions & 7 deletions python/core/composer/qgscomposerhtml.sip
Expand Up @@ -10,7 +10,7 @@ class QgsComposerHtml: QgsComposerMultiFrame
~QgsComposerHtml();

void setUrl( const QUrl& url );
const QUrl& url() const;
const QUrl& url() const;

QSizeF totalSize() const;
void render( QPainter* p, const QRectF& renderExtent );
Expand All @@ -19,7 +19,10 @@ class QgsComposerHtml: QgsComposerMultiFrame
bool readXML( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );

void addFrame( QgsComposerFrame* frame, bool recalcFrameSizes = true );


//overriden to break frames without dividing lines of text
double findNearbyPageBreak( double yPos );

/**Returns whether html item is using smart breaks. Smart breaks prevent
* the html frame contents from breaking mid-way though a line of text.
* @returns true if html item is using smart breaks
Expand All @@ -34,7 +37,7 @@ class QgsComposerHtml: QgsComposerMultiFrame
* @see useSmartBreaks
*/
void setUseSmartBreaks( bool useSmartBreaks );

/**Sets the maximum distance allowed when calculating where to place page breaks
* in the html. This distance is the maximum amount of empty space allowed
* at the bottom of a frame after calculating the optimum break location. Setting
Expand All @@ -59,12 +62,12 @@ class QgsComposerHtml: QgsComposerMultiFrame
* @see useSmartBreaks
*/
double maxBreakDistance() const;
public slots:

public slots:

/**Reloads the html source from the url and redraws the item.
* @see setUrl
* @see url
*/
void loadHtml();
void loadHtml();
};
32 changes: 20 additions & 12 deletions python/core/composer/qgscomposeritem.sip
Expand Up @@ -87,7 +87,7 @@ class QgsComposerItem : QObject, QGraphicsRectItem
enum ItemType
{
// base class for the items
ComposerItem = 65636, /* UserType + 100 ... SIP does not do arithmetic */
ComposerItem,

// derived classes
ComposerArrow,
Expand Down Expand Up @@ -174,16 +174,22 @@ class QgsComposerItem : QObject, QGraphicsRectItem
virtual void moveContent( double dx, double dy );

/**Zoom content of item. Does nothing per default (but implemented in composer map)
@param delta value from wheel event that describes magnitude and direction (positive /negative number)
@param x x-position of mouse cursor (in item coordinates)
@param y y-position of mouse cursor (in item coordinates)*/
@param delta value from wheel event that describes magnitude and direction (positive /negative number)
@param x x-position of mouse cursor (in item coordinates)
@param y y-position of mouse cursor (in item coordinates)*/
virtual void zoomContent( int delta, double x, double y );

/**Moves the item to a new position (in canvas coordinates)*/
void setItemPosition( double x, double y, ItemPositionMode itemPoint = UpperLeft );

/**Sets item position and width / height in one go
* @param posIncludesFrame set to true if the position and size arguments include the item's frame border
@param x item position x
@param y item position y
@param width item width
@param height item height
@param itemPoint item position mode
@param posIncludesFrame set to true if the position and size arguments include the item's frame border

@note: this method was added in version 1.6*/
void setItemPosition( double x, double y, double width, double height, ItemPositionMode itemPoint = UpperLeft, bool posIncludesFrame = false );

Expand Down Expand Up @@ -236,14 +242,14 @@ class QgsComposerItem : QObject, QGraphicsRectItem
* @see setFrameEnabled
*/
virtual void setFrameOutlineWidth( double outlineWidth );

/** Returns the frame's outline width. Only used if hasFrame is true.
* @returns Frame outline width
* @note introduced in 2.3
* @see hasFrame
* @see setFrameOutlineWidth
*/
double frameOutlineWidth() const;
double frameOutlineWidth() const;

/** Returns the join style used for drawing the item's frame
* @returns Join style for outline frame
Expand All @@ -252,7 +258,6 @@ class QgsComposerItem : QObject, QGraphicsRectItem
* @see setFrameJoinStyle
*/
Qt::PenJoinStyle frameJoinStyle() const;

/** Sets join style used when drawing the item's frame
* @param style Join style for outline frame
* @returns nothing
Expand Down Expand Up @@ -354,7 +359,13 @@ class QgsComposerItem : QObject, QGraphicsRectItem
void drawText( QPainter* p, double x, double y, const QString& text, const QFont& font ) const;

/**Like the above, but with a rectangle for multiline text
* @param flags allows for passing Qt::TextFlags to control appearance of rendered text
* @param p painter to use
* @param rect rectangle to draw into
* @param text text to draw
* @param font font to use
* @param halignment optional horizontal alignment
* @param valignment optional vertical alignment
* @param flags allows for passing Qt::TextFlags to control appearance of rendered text
*/
void drawText( QPainter* p, const QRectF& rect, const QString& text, const QFont& font, Qt::AlignmentFlag halignment = Qt::AlignLeft, Qt::AlignmentFlag valignment = Qt::AlignTop, int flags = Qt::TextWordWrap ) const;

Expand Down Expand Up @@ -481,7 +492,6 @@ class QgsComposerItem : QObject, QGraphicsRectItem

/**Calculates width and hight of the picture (in mm) such that it fits into the item frame with the given rotation*/
bool imageSizeConsideringRotation( double& width, double& height, double rotation ) const;

/**Calculates width and hight of the picture (in mm) such that it fits into the item frame with the given rotation
* @deprecated Use bool imageSizeConsideringRotation( double& width, double& height, double rotation )
* instead
Expand All @@ -498,15 +508,13 @@ class QgsComposerItem : QObject, QGraphicsRectItem

/**Calculates corner point after rotation and scaling*/
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation ) const;

/**Calculates corner point after rotation and scaling
* @deprecated Use bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation )
* instead
*/
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const /Deprecated/;

/**Calculates width / height of the bounding box of a rotated rectangle*/

void sizeChangedByRotation( double& width, double& height, double rotation );
/**Calculates width / height of the bounding box of a rotated rectangle
* @deprecated Use void sizeChangedByRotation( double& width, double& height, double rotation )
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposerlabel.sip
Expand Up @@ -81,7 +81,7 @@ class QgsComposerLabel : QgsComposerItem
* @deprecated Use setItemRotation( double rotation ) instead
*/
virtual void setRotation( double r );

/* Sets rotation for the label */
virtual void setItemRotation( double r );
};

0 comments on commit c4c131e

Please sign in to comment.