Skip to content

Commit 9ceb5ce

Browse files
committed
sip sync
1 parent c94b9f3 commit 9ceb5ce

File tree

82 files changed

+397
-815
lines changed

Some content is hidden

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

82 files changed

+397
-815
lines changed

python/analysis/vector/qgsgeometryanalyzer.sip

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class QgsGeometryAnalyzer
1717
@param tolerance (level of simplification)
1818
@param onlySelectedFeatures if true, only selected features are considered, else all the features
1919
@param p progress dialog (or 0 if no progress dialog is to be shown)
20-
@note: added in version 1.4*/
20+
*/
2121
bool simplify( QgsVectorLayer* layer, const QString& shapefileName, double tolerance,
2222
bool onlySelectedFeatures = false, QProgressDialog* p = 0 );
2323

@@ -27,7 +27,7 @@ class QgsGeometryAnalyzer
2727
@param shapefileName path to the output shp
2828
@param onlySelectedFeatures if true, only selected features are considered, else all the features
2929
@param p progress dialog (or 0 if no progress dialog is to be shown)
30-
@note: added in version 1.4*/
30+
*/
3131
bool centroids( QgsVectorLayer* layer, const QString& shapefileName,
3232
bool onlySelectedFeatures = false, QProgressDialog* p = 0 );
3333

@@ -36,7 +36,7 @@ class QgsGeometryAnalyzer
3636
@param shapefileName path to the output shp
3737
@param onlySelectedFeatures if true, only selected features are considered, else all the features
3838
@param p progress dialog (or 0 if no progress dialog is to be shown)
39-
@note: added in version 1.4*/
39+
*/
4040
bool extent( QgsVectorLayer* layer, const QString& shapefileName, bool onlySelectedFeatures = false, QProgressDialog* p = 0 );
4141

4242
/**Create buffers for a vector layer and write it to a new shape file
@@ -47,7 +47,7 @@ class QgsGeometryAnalyzer
4747
@param dissolve if true, merge all the buffers to a big multipolygon
4848
@param bufferDistanceField index of the attribute field that contains the buffer distance (or -1 if all features have the same buffer distance)
4949
@param p progress dialog (or 0 if no progress dialog is to be shown)
50-
@note: added in version 1.3*/
50+
*/
5151
bool buffer( QgsVectorLayer* layer, const QString& shapefileName, double bufferDistance,
5252
bool onlySelectedFeatures = false, bool dissolve = false, int bufferDistanceField = -1, QProgressDialog* p = 0 );
5353

@@ -58,7 +58,7 @@ class QgsGeometryAnalyzer
5858
@param uniqueIdField index of the attribute field that contains the unique convex hull id (or -1 if
5959
all features have the same buffer distance)
6060
@param p progress dialog (or 0 if no progress dialog is to be shown)
61-
@note: added in version 1.4*/
61+
*/
6262
bool convexHull( QgsVectorLayer* layer, const QString& shapefileName, bool onlySelectedFeatures = false,
6363
int uniqueIdField = -1, QProgressDialog* p = 0 );
6464

@@ -69,7 +69,7 @@ class QgsGeometryAnalyzer
6969
@param uniqueIdField index of the attribute field that contains the unique id to dissolve on (or -1 if
7070
all features should be dissolved together)
7171
@param p progress dialog (or 0 if no progress dialog is to be shown)
72-
@note: added in version 1.4*/
72+
*/
7373
bool dissolve( QgsVectorLayer* layer, const QString& shapefileName, bool onlySelectedFeatures = false,
7474
int uniqueIdField = -1, QProgressDialog* p = 0 );
7575

python/analysis/vector/qgsoverlayanalyzer.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class QgsOverlayAnalyzer
1717
@param shapefileName path to the output shp
1818
@param onlySelectedFeatures if true, only selected features are considered, else all the features
1919
@param p progress dialog (or 0 if no progress dialog is to be shown)
20-
@note: added in version 1.4*/
20+
*/
2121
bool intersection( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
2222
const QString& shapefileName, bool onlySelectedFeatures = false,
2323
QProgressDialog* p = 0 );

python/core/composer/qgscomposerarrow.sip

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ class QgsComposerArrow: QgsComposerItem
2626

2727
~QgsComposerArrow();
2828

29-
/**Return composer item type.
30-
* @note added in QGIS 1.7
31-
*/
29+
/** Return composer item type. */
3230
virtual int type() const;
3331

3432
/** \brief Reimplementation of QCanvasItem::paint - draw on canvas */

python/core/composer/qgscomposeritem.sip

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
9999
ComposerLabel,
100100
ComposerLegend,
101101
ComposerMap,
102-
ComposerPaper, // QgsPaperItem
102+
ComposerPaper, // QgsPaperItem
103103
ComposerPicture,
104104
ComposerScaleBar,
105105
ComposerShape,
@@ -137,6 +137,8 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
137137
LowerRight
138138
};
139139

140+
//note - must sync with QgsMapCanvas::WheelAction.
141+
//TODO - QGIS 3.0 move QgsMapCanvas::WheelAction from GUI->CORE and remove this enum
140142
/** Modes for zooming item content
141143
*/
142144
enum ZoomMode
@@ -161,7 +163,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
161163
QgsComposerItem( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition /TransferThis/, bool manageZValue = true );
162164
virtual ~QgsComposerItem();
163165

164-
/** return correct graphics item type. Added in v1.7 */
166+
/** return correct graphics item type. */
165167
virtual int type() const;
166168

167169
/**Returns whether this item has been removed from the composition. Items removed
@@ -239,7 +241,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
239241
void updatePagePos( double newPageWidth, double newPageHeight );
240242

241243
/**Moves the item to a new position (in canvas coordinates)*/
242-
void setItemPosition( double x, double y, ItemPositionMode itemPoint = UpperLeft );
244+
void setItemPosition( double x, double y, ItemPositionMode itemPoint = UpperLeft, int page = -1 );
243245

244246
/**Sets item position and width / height in one go
245247
@param x item position x
@@ -248,13 +250,12 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
248250
@param height item height
249251
@param itemPoint item position mode
250252
@param posIncludesFrame set to true if the position and size arguments include the item's frame border
251-
252-
@note: this method was added in version 1.6*/
253-
void setItemPosition( double x, double y, double width, double height, ItemPositionMode itemPoint = UpperLeft, bool posIncludesFrame = false );
253+
@param page if page > 0, y is interpreted as relative to the origin of the specified page, if page <= 0, y is in absolute canvas coordinates
254+
*/
255+
void setItemPosition( double x, double y, double width, double height, ItemPositionMode itemPoint = UpperLeft, bool posIncludesFrame = false, int page = -1 );
254256

255257
/**Returns item's last used position mode.
256-
@note: This property has no effect on actual's item position, which is always the top-left corner.
257-
@note: this method was added in version 2.0*/
258+
@note: This property has no effect on actual's item position, which is always the top-left corner. */
258259
ItemPositionMode lastUsedPositionMode();
259260

260261
/**Sets this items bound in scene coordinates such that 1 item size units
@@ -269,7 +270,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
269270

270271
/**Whether this item has a frame or not.
271272
* @returns true if there is a frame around this item, otherwise false.
272-
* @note introduced since 1.8
273273
* @see setFrameEnabled
274274
* @see frameOutlineWidth
275275
* @see frameJoinStyle
@@ -279,7 +279,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
279279

280280
/**Set whether this item has a frame drawn around it or not.
281281
* @param drawFrame draw frame
282-
* @note introduced in 1.8
283282
* @see hasFrame
284283
* @see setFrameOutlineWidth
285284
* @see setFrameJoinStyle
@@ -368,7 +367,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
368367

369368
/**Whether this item has a Background or not.
370369
* @returns true if there is a Background around this item, otherwise false.
371-
* @note introduced since 2.0
372370
* @see setBackgroundEnabled
373371
* @see backgroundColor
374372
*/
@@ -377,15 +375,13 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
377375
/**Set whether this item has a Background drawn around it or not.
378376
* @param drawBackground draw Background
379377
* @returns nothing
380-
* @note introduced in 2.0
381378
* @see hasBackground
382379
* @see setBackgroundColor
383380
*/
384381
void setBackgroundEnabled( const bool drawBackground );
385382

386383
/**Gets the background color for this item
387384
* @returns background color
388-
* @note introduced in 2.0
389385
* @see setBackgroundColor
390386
* @see hasBackground
391387
*/
@@ -394,7 +390,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
394390
/**Sets the background color for this item
395391
* @param backgroundColor new background color
396392
* @returns nothing
397-
* @note introduced in 2.0
398393
* @see backgroundColor
399394
* @see setBackgroundEnabled
400395
*/
@@ -426,7 +421,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
426421

427422
/**Returns whether effects (eg blend modes) are enabled for the item
428423
* @returns true if effects are enabled
429-
* @note introduced in 2.0
430424
* @see setEffectsEnabled
431425
* @see transparency
432426
* @see blendMode
@@ -435,7 +429,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
435429

436430
/**Sets whether effects (eg blend modes) are enabled for the item
437431
* @param effectsEnabled set to true to enable effects
438-
* @note introduced in 2.0
439432
* @see effectsEnabled
440433
* @see setTransparency
441434
* @see setBlendMode
@@ -485,7 +478,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
485478
double textWidthMillimeters( const QFont& font, const QString& text ) const /Deprecated/;
486479

487480
/**Returns the font height of a character in millimeters
488-
* @note this method was added in version 1.7
489481
* @deprecated use QgsComposerUtils::fontHeightCharacterMM instead
490482
*/
491483
double fontHeightCharacterMM( const QFont& font, const QChar& c ) const /Deprecated/;
@@ -519,14 +511,12 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
519511

520512
/**Locks / unlocks the item position for mouse drags
521513
* @param lock set to true to prevent item movement and resizing via the mouse
522-
* @note this method was added in version 1.2
523514
* @see positionLock
524515
*/
525516
void setPositionLock( const bool lock );
526517

527518
/**Returns whether position lock for mouse drags is enabled
528519
* returns true if item is locked for mouse movement and resizing
529-
* @note this method was added in version 1.2
530520
* @see setPositionLock
531521
*/
532522
bool positionLock() const;
@@ -552,21 +542,18 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
552542

553543
/**Get item's id (which is not necessarly unique)
554544
* @returns item id
555-
* @note this method was added in version 1.7
556545
* @see setId
557546
*/
558547
QString id() const;
559548

560549
/**Set item's id (which is not necessarly unique)
561550
* @param id new id for item
562-
* @note this method was added in version 1.7
563551
* @see id
564552
*/
565553
void setId( const QString& id );
566554

567555
/**Get item identification name
568556
* @returns unique item identification string
569-
* @note this method was added in version 2.0
570557
* @note there is not setter since one can't manually set the id
571558
* @see id
572559
* @see setId
@@ -662,7 +649,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
662649
*/
663650
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );
664651

665-
666652
protected:
667653

668654
//event handlers
@@ -683,7 +669,9 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
683669
/**Draw background*/
684670
virtual void drawBackground( QPainter* p );
685671

686-
/**Draws arrowhead*/
672+
/**Draws arrowhead
673+
* @deprecated use QgsComposerUtils::drawArrowHead instead
674+
*/
687675
void drawArrowHead( QPainter* p, double x, double y, double angle, double arrowHeadWidth ) const;
688676

689677
/**Returns angle of the line from p1 to p2 (clockwise, starting at N)*/
@@ -694,14 +682,13 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
694682
double rectHandlerBorderTolerance() const;
695683

696684
/**Returns the size of the lock symbol depending on the composer zoom level and the item size
697-
* @note: this function was introduced in version 1.2
698685
* @deprecated will be removed in QGIS 3.0
699686
*/
700687
double lockSymbolSize() const /Deprecated/;
701688

702689
/**Returns the zoom factor of the graphics view.
703690
@return the factor or -1 in case of error (e.g. graphic view does not exist)
704-
@note: this function was introduced in version 1.2*/
691+
*/
705692
double horizontalViewScaleFactor() const;
706693

707694
//some utility functions
@@ -732,16 +719,16 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
732719

733720
/**Calculates corner point after rotation and scaling
734721
* @deprecated will be removed in QGIS 3.0
735-
*/
722+
*/
736723
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const /Deprecated/;
737724

738-
/**Calculates corner point after rotation and scaling
725+
/**Calculates width / height of the bounding box of a rotated rectangle
739726
* @deprecated will be removed in QGIS 3.0
740727
*/
741728
void sizeChangedByRotation( double& width, double& height, double rotation ) /Deprecated/;
742729

743730
/**Calculates width / height of the bounding box of a rotated rectangle
744-
* @deprecated will be removed in QGIS 3.0
731+
* @deprecated will be removed in QGIS 3.0
745732
*/
746733
void sizeChangedByRotation( double& width, double& height ) /Deprecated/;
747734

python/core/composer/qgscomposerlabel.sip

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class QgsComposerLabel : QgsComposerItem
1010
QgsComposerLabel( QgsComposition *composition /TransferThis/);
1111
~QgsComposerLabel();
1212

13-
/** return correct graphics item type. Added in v1.7 */
13+
/** return correct graphics item type. */
1414
virtual int type() const;
1515

1616
/** \brief Reimplementation of QCanvasItem::paint*/
@@ -25,8 +25,7 @@ class QgsComposerLabel : QgsComposerItem
2525
int htmlState();
2626
void setHtmlState( int state );
2727

28-
/**Returns the text as it appears on screen (with replaced data field)
29-
@note this function was added in version 1.2*/
28+
/**Returns the text as it appears on screen (with replaced data field) */
3029
QString displayText() const;
3130

3231
/** Sets the current feature, the current layer and a list of local variable substitutions for evaluating expressions */
@@ -101,11 +100,9 @@ class QgsComposerLabel : QgsComposerItem
101100
*/
102101
void setMarginY( const double margin );
103102

104-
/**Sets text color
105-
@note: this function was added in version 1.4*/
103+
/**Sets text color */
106104
void setFontColor( const QColor& c );
107-
/**Get font color
108-
@note: this function was added in version 1.4*/
105+
/**Get font color */
109106
QColor fontColor() const;
110107

111108
/** stores state in Dom element
@@ -137,11 +134,5 @@ class QgsComposerLabel : QgsComposerItem
137134
virtual void setFrameOutlineWidth( const double outlineWidth );
138135

139136
public slots:
140-
/* Sets rotation for the label
141-
* @deprecated Use setItemRotation( double rotation ) instead
142-
*/
143-
virtual void setRotation( double r );
144-
145-
/* Sets rotation for the label */
146-
virtual void setItemRotation( double r );
137+
void refreshExpressionContext();
147138
};

0 commit comments

Comments
 (0)