Skip to content

Commit c4c131e

Browse files
committed
sip sync
1 parent 260cff4 commit c4c131e

File tree

187 files changed

+1534
-709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+1534
-709
lines changed

python/analysis/analysis.sip

+15-14
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,21 @@
1414
%Include vector/qgstransectsample.sip
1515
%Include vector/qgszonalstatistics.sip
1616

17-
// // %Include interpolation/Bezier3D.sip
18-
// // %Include interpolation/CloughTocherInterpolator.sip
19-
// // %Include interpolation/DualEdgeTriangulation.sip
20-
// // %Include interpolation/HalfEdge.sip
21-
// // %Include interpolation/LinTriangleInterpolator.sip
22-
// // %Include interpolation/Line3D.sip
23-
// // %Include interpolation/Node.sip
24-
// // %Include interpolation/NormVecDecorator.sip
25-
// // %Include interpolation/ParametricLine.sip
26-
// // %Include interpolation/Point3D.sip
27-
// // %Include interpolation/TriangleInterpolator.sip
28-
// // %Include interpolation/Triangulation.sip
29-
// // %Include interpolation/TriDecorator.sip
30-
// // %Include interpolation/Vector3D.sip
17+
// %Include interpolation/Bezier3D.sip
18+
// %Include interpolation/CloughTocherInterpolator.sip
19+
// %Include interpolation/DualEdgeTriangulation.sip
20+
// %Include interpolation/HalfEdge.sip
21+
// %Include interpolation/LinTriangleInterpolator.sip
22+
// %Include interpolation/Line3D.sip
23+
// %Include interpolation/Node.sip
24+
// %Include interpolation/NormVecDecorator.sip
25+
// %Include interpolation/ParametricLine.sip
26+
// %Include interpolation/Point3D.sip
27+
// %Include interpolation/TriangleInterpolator.sip
28+
// %Include interpolation/Triangulation.sip
29+
// %Include interpolation/TriDecorator.sip
30+
// %Include interpolation/Vector3D.sip
31+
3132
%Include interpolation/qgsgridfilewriter.sip
3233
%Include interpolation/qgsinterpolator.sip
3334
%Include interpolation/qgsidwinterpolator.sip

python/analysis/interpolation/DualEdgeTriangulation.sip

+7-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class DualEdgeTriangulation: Triangulation
2525
/**Returns the number of the point opposite to the triangle points p1, p2 (which have to be on a halfedge)*/
2626
int getOppositePoint( int p1, int p2 );
2727
/**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'*/
28+
//! @note not available in python bindings
2829
// virtual bool getTriangle( double x, double y, Point3D* p1, int* n1, Point3D* p2, int* n2, Point3D* p3, int* n3 );
2930
/**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*/
3031
virtual bool getTriangle( double x, double y, Point3D* p1, Point3D* p2, Point3D* p3 );
@@ -77,14 +78,18 @@ class DualEdgeTriangulation: Triangulation
7778
unsigned int insertEdge( int dual, int next, int point, bool mbreak, bool forced );
7879
/**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*/
7980
int insertForcedSegment( int p1, int p2, bool breakline );
81+
/**Threshold for the leftOfTest to handle numerical instabilities*/
82+
//const static double leftOfTresh=0.00001;
83+
/**Security to prevent endless loops in 'baseEdgeOfTriangle'. It there are more iteration then this number, the point will not be inserted*/
84+
const static int nBaseOfRuns = 300000;
8085
/**Returns the number of an edge which points to the point with number 'point' or -1 if there is an error*/
8186
int baseEdgeOfPoint( int point );
8287
/**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*/
8388
int baseEdgeOfTriangle( Point3D* point );
8489
/**Checks, if 'edge' has to be swapped because of the empty circle criterion. If so, doSwap(...) is called.*/
85-
bool checkSwap( unsigned int edge );
90+
bool checkSwap( unsigned int edge, unsigned int recursivDeep );
8691
/**Swaps 'edge' and test recursively for other swaps (delaunay criterion)*/
87-
void doSwap( unsigned int edge );
92+
void doSwap( unsigned int edge, unsigned int recursivDeep );
8893
/**Swaps 'edge' and does no recursiv testing*/
8994
void doOnlySwap( unsigned int edge );
9095
/**Returns true, if it is possible to swap an edge, otherwise false(concave quad or edge on (or outside) the convex hull)*/

python/analysis/interpolation/ParametricLine.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ class ParametricLine
2626
//virtual bool intersects(ParametricLine* pal);
2727
virtual void remove( int i ) = 0;
2828
//! @note not available in python binding
29-
//virtual void setControlPoly( QVector<Point3D*>* cp ) = 0;
29+
// virtual void setControlPoly( QVector<Point3D*>* cp ) = 0;
3030
virtual void setParent( ParametricLine* paral ) = 0;
3131
};

python/analysis/interpolation/Vector3D.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Vector3D
1313
Vector3D( const Vector3D& v );
1414
/**Destructor*/
1515
~Vector3D();
16-
//Vector3D& operator=( const Vector3D& v );
16+
// Vector3D& operator=( const Vector3D& v );
1717
bool operator==( const Vector3D& v );
1818
bool operator!=( const Vector3D& v );
1919
/**Returns the x-component of the vector*/

python/analysis/interpolation/qgsinterpolator.sip

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ class QgsInterpolator
3636
@return 0 in case of success*/
3737
virtual int interpolatePoint( double x, double y, double& result ) = 0;
3838

39+
// @note not available in python bindings
40+
// const QList<LayerData>& layerData() const;
41+
3942
protected:
4043
/**Caches the vertex and value data from the provider. All the vertex data
4144
will be held in virtual memory

python/analysis/network/qgsdistancearcproperter.sip

-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ class QgsDistanceArcProperter : QgsArcProperter
88
public:
99
virtual QVariant property( double distance, const QgsFeature& ) const;
1010
};
11-

python/analysis/network/qgsgraph.sip

-1
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,3 @@ class QgsGraph
130130
*/
131131
int findVertex( const QgsPoint& pt ) const;
132132
};
133-

python/core/composer/qgsatlascomposition.sip

+16-15
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ public:
2121
* @see setEnabled
2222
*/
2323
bool enabled() const;
24-
24+
2525
/**Sets whether the atlas is enabled
2626
* @param enabled set to true to enable to atlas
2727
* @see enabled
28-
*/
28+
*/
2929
void setEnabled( bool enabled );
3030

3131
/**Returns the map used by the atlas
3232
* @deprecated Use QgsComposerMap::atlasDriven() instead
3333
*/
3434
QgsComposerMap* composerMap() const /Deprecated/;
35-
35+
3636
/**Sets the map used by the atlas
3737
* @deprecated Use QgsComposerMap::setAtlasDriven( true ) instead
3838
*/
@@ -43,17 +43,18 @@ public:
4343
* @see setHideCoverage
4444
*/
4545
bool hideCoverage() const;
46-
46+
4747
/**Sets whether the coverage layer should be hidden in map items in the composition
4848
* @param hide set to true to hide the coverage layer
4949
* @see hideCoverage
50-
*/
50+
*/
5151
void setHideCoverage( bool hide );
5252

5353
/**Returns whether the atlas map uses a fixed scale
5454
* @deprecated since 2.4 Use QgsComposerMap::atlasScalingMode() instead
5555
*/
5656
bool fixedScale() const /Deprecated/;
57+
5758
/**Sets whether the atlas map should use a fixed scale
5859
* @deprecated since 2.4 Use QgsComposerMap::setAtlasScalingMode() instead
5960
*/
@@ -63,38 +64,38 @@ public:
6364
* @deprecated Use QgsComposerMap::atlasMargin() instead
6465
*/
6566
float margin() const /Deprecated/;
66-
67+
6768
/**Sets the margin for the atlas map
6869
* @deprecated Use QgsComposerMap::setAtlasMargin( double ) instead
6970
*/
7071
void setMargin( float margin ) /Deprecated/;
7172

72-
/**Returns the filename expression used for generating output filenames for each
73+
/**Returns the filename expression used for generating output filenames for each
7374
* atlas page.
7475
* @returns filename pattern
7576
* @see setFilenamePattern
7677
* @note This property has no effect when exporting to PDF if singleFile() is true
7778
*/
7879
QString filenamePattern() const;
79-
80+
8081
/**Sets the filename expression used for generating output filenames for each
8182
* atlas page.
8283
* @param pattern expression to use for output filenames
8384
* @see filenamePattern
8485
* @note This method has no effect when exporting to PDF if singleFile() is true
85-
*/
86+
*/
8687
void setFilenamePattern( const QString& pattern );
8788

8889
/**Returns the coverage layer used for the atlas features
8990
* @returns atlas coverage layer
9091
* @see setCoverageLayer
9192
*/
9293
QgsVectorLayer* coverageLayer() const;
93-
94+
9495
/**Sets the coverage layer to use for the atlas features
9596
* @param layer vector coverage layer
9697
* @see coverageLayer
97-
*/
98+
*/
9899
void setCoverageLayer( QgsVectorLayer* layer );
99100

100101
/**Returns whether the atlas will be exported to a single file. This is only
@@ -104,13 +105,13 @@ public:
104105
* @note This property is only used for PDF exports.
105106
*/
106107
bool singleFile() const;
107-
108+
108109
/**Sets whether the atlas should be exported to a single file. This is only
109110
* applicable for PDF exports.
110111
* @param single set to true to export atlas to a single file.
111112
* @see singleFile
112113
* @note This method is only used for PDF exports.
113-
*/
114+
*/
114115
void setSingleFile( bool single );
115116

116117
bool sortFeatures() const;
@@ -138,7 +139,7 @@ public:
138139
* @see QgsComposerMap::atlasScalingMode
139140
*/
140141
const QVector<double>& predefinedScales() const;
141-
142+
142143
/**Sets the list of predefined scales for the atlas. This is used
143144
* for maps which are set to the predefined atlas scaling mode.
144145
* @param scales a vector of doubles representing predefined scales
@@ -203,7 +204,7 @@ public:
203204

204205
/**Is emitted when atlas rendering has ended*/
205206
void renderEnded();
206-
207+
207208
/**Is emitted when the current atlas feature changes*/
208209
void featureChanged( QgsFeature* feature );
209210

python/core/composer/qgscomposerframe.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ class QgsComposerFrame: QgsComposerItem
2323
int type() const;
2424

2525
QgsComposerMultiFrame* multiFrame() const;
26-
};
26+
};

python/core/composer/qgscomposerhtml.sip

+10-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class QgsComposerHtml: QgsComposerMultiFrame
1010
~QgsComposerHtml();
1111

1212
void setUrl( const QUrl& url );
13-
const QUrl& url() const;
13+
const QUrl& url() const;
1414

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

2121
void addFrame( QgsComposerFrame* frame, bool recalcFrameSizes = true );
22-
22+
23+
//overriden to break frames without dividing lines of text
24+
double findNearbyPageBreak( double yPos );
25+
2326
/**Returns whether html item is using smart breaks. Smart breaks prevent
2427
* the html frame contents from breaking mid-way though a line of text.
2528
* @returns true if html item is using smart breaks
@@ -34,7 +37,7 @@ class QgsComposerHtml: QgsComposerMultiFrame
3437
* @see useSmartBreaks
3538
*/
3639
void setUseSmartBreaks( bool useSmartBreaks );
37-
40+
3841
/**Sets the maximum distance allowed when calculating where to place page breaks
3942
* in the html. This distance is the maximum amount of empty space allowed
4043
* at the bottom of a frame after calculating the optimum break location. Setting
@@ -59,12 +62,12 @@ class QgsComposerHtml: QgsComposerMultiFrame
5962
* @see useSmartBreaks
6063
*/
6164
double maxBreakDistance() const;
62-
63-
public slots:
64-
65+
66+
public slots:
67+
6568
/**Reloads the html source from the url and redraws the item.
6669
* @see setUrl
6770
* @see url
6871
*/
69-
void loadHtml();
72+
void loadHtml();
7073
};

python/core/composer/qgscomposeritem.sip

+20-12
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class QgsComposerItem : QObject, QGraphicsRectItem
8787
enum ItemType
8888
{
8989
// base class for the items
90-
ComposerItem = 65636, /* UserType + 100 ... SIP does not do arithmetic */
90+
ComposerItem,
9191

9292
// derived classes
9393
ComposerArrow,
@@ -174,16 +174,22 @@ class QgsComposerItem : QObject, QGraphicsRectItem
174174
virtual void moveContent( double dx, double dy );
175175

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

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

185185
/**Sets item position and width / height in one go
186-
* @param posIncludesFrame set to true if the position and size arguments include the item's frame border
186+
@param x item position x
187+
@param y item position y
188+
@param width item width
189+
@param height item height
190+
@param itemPoint item position mode
191+
@param posIncludesFrame set to true if the position and size arguments include the item's frame border
192+
187193
@note: this method was added in version 1.6*/
188194
void setItemPosition( double x, double y, double width, double height, ItemPositionMode itemPoint = UpperLeft, bool posIncludesFrame = false );
189195

@@ -236,14 +242,14 @@ class QgsComposerItem : QObject, QGraphicsRectItem
236242
* @see setFrameEnabled
237243
*/
238244
virtual void setFrameOutlineWidth( double outlineWidth );
239-
245+
240246
/** Returns the frame's outline width. Only used if hasFrame is true.
241247
* @returns Frame outline width
242248
* @note introduced in 2.3
243249
* @see hasFrame
244250
* @see setFrameOutlineWidth
245251
*/
246-
double frameOutlineWidth() const;
252+
double frameOutlineWidth() const;
247253

248254
/** Returns the join style used for drawing the item's frame
249255
* @returns Join style for outline frame
@@ -252,7 +258,6 @@ class QgsComposerItem : QObject, QGraphicsRectItem
252258
* @see setFrameJoinStyle
253259
*/
254260
Qt::PenJoinStyle frameJoinStyle() const;
255-
256261
/** Sets join style used when drawing the item's frame
257262
* @param style Join style for outline frame
258263
* @returns nothing
@@ -354,7 +359,13 @@ class QgsComposerItem : QObject, QGraphicsRectItem
354359
void drawText( QPainter* p, double x, double y, const QString& text, const QFont& font ) const;
355360

356361
/**Like the above, but with a rectangle for multiline text
357-
* @param flags allows for passing Qt::TextFlags to control appearance of rendered text
362+
* @param p painter to use
363+
* @param rect rectangle to draw into
364+
* @param text text to draw
365+
* @param font font to use
366+
* @param halignment optional horizontal alignment
367+
* @param valignment optional vertical alignment
368+
* @param flags allows for passing Qt::TextFlags to control appearance of rendered text
358369
*/
359370
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;
360371

@@ -481,7 +492,6 @@ class QgsComposerItem : QObject, QGraphicsRectItem
481492

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

499509
/**Calculates corner point after rotation and scaling*/
500510
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation ) const;
501-
502511
/**Calculates corner point after rotation and scaling
503512
* @deprecated Use bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation )
504513
* instead
505514
*/
506515
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const /Deprecated/;
507516

508517
/**Calculates width / height of the bounding box of a rotated rectangle*/
509-
510518
void sizeChangedByRotation( double& width, double& height, double rotation );
511519
/**Calculates width / height of the bounding box of a rotated rectangle
512520
* @deprecated Use void sizeChangedByRotation( double& width, double& height, double rotation )

python/core/composer/qgscomposerlabel.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class QgsComposerLabel : QgsComposerItem
8181
* @deprecated Use setItemRotation( double rotation ) instead
8282
*/
8383
virtual void setRotation( double r );
84-
84+
8585
/* Sets rotation for the label */
8686
virtual void setItemRotation( double r );
8787
};

0 commit comments

Comments
 (0)