@@ -99,7 +99,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
99
99
ComposerLabel,
100
100
ComposerLegend,
101
101
ComposerMap,
102
- ComposerPaper, // QgsPaperItem
102
+ ComposerPaper, // QgsPaperItem
103
103
ComposerPicture,
104
104
ComposerScaleBar,
105
105
ComposerShape,
@@ -137,6 +137,8 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
137
137
LowerRight
138
138
};
139
139
140
+ //note - must sync with QgsMapCanvas::WheelAction.
141
+ //TODO - QGIS 3.0 move QgsMapCanvas::WheelAction from GUI->CORE and remove this enum
140
142
/** Modes for zooming item content
141
143
*/
142
144
enum ZoomMode
@@ -161,7 +163,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
161
163
QgsComposerItem( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition /TransferThis/, bool manageZValue = true );
162
164
virtual ~QgsComposerItem();
163
165
164
- /** return correct graphics item type. Added in v1.7 */
166
+ /** return correct graphics item type. */
165
167
virtual int type() const;
166
168
167
169
/**Returns whether this item has been removed from the composition. Items removed
@@ -239,7 +241,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
239
241
void updatePagePos( double newPageWidth, double newPageHeight );
240
242
241
243
/**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 );
243
245
244
246
/**Sets item position and width / height in one go
245
247
@param x item position x
@@ -248,13 +250,12 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
248
250
@param height item height
249
251
@param itemPoint item position mode
250
252
@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 );
254
256
255
257
/**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. */
258
259
ItemPositionMode lastUsedPositionMode();
259
260
260
261
/**Sets this items bound in scene coordinates such that 1 item size units
@@ -269,7 +270,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
269
270
270
271
/**Whether this item has a frame or not.
271
272
* @returns true if there is a frame around this item, otherwise false.
272
- * @note introduced since 1.8
273
273
* @see setFrameEnabled
274
274
* @see frameOutlineWidth
275
275
* @see frameJoinStyle
@@ -279,7 +279,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
279
279
280
280
/**Set whether this item has a frame drawn around it or not.
281
281
* @param drawFrame draw frame
282
- * @note introduced in 1.8
283
282
* @see hasFrame
284
283
* @see setFrameOutlineWidth
285
284
* @see setFrameJoinStyle
@@ -368,7 +367,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
368
367
369
368
/**Whether this item has a Background or not.
370
369
* @returns true if there is a Background around this item, otherwise false.
371
- * @note introduced since 2.0
372
370
* @see setBackgroundEnabled
373
371
* @see backgroundColor
374
372
*/
@@ -377,15 +375,13 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
377
375
/**Set whether this item has a Background drawn around it or not.
378
376
* @param drawBackground draw Background
379
377
* @returns nothing
380
- * @note introduced in 2.0
381
378
* @see hasBackground
382
379
* @see setBackgroundColor
383
380
*/
384
381
void setBackgroundEnabled( const bool drawBackground );
385
382
386
383
/**Gets the background color for this item
387
384
* @returns background color
388
- * @note introduced in 2.0
389
385
* @see setBackgroundColor
390
386
* @see hasBackground
391
387
*/
@@ -394,7 +390,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
394
390
/**Sets the background color for this item
395
391
* @param backgroundColor new background color
396
392
* @returns nothing
397
- * @note introduced in 2.0
398
393
* @see backgroundColor
399
394
* @see setBackgroundEnabled
400
395
*/
@@ -426,7 +421,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
426
421
427
422
/**Returns whether effects (eg blend modes) are enabled for the item
428
423
* @returns true if effects are enabled
429
- * @note introduced in 2.0
430
424
* @see setEffectsEnabled
431
425
* @see transparency
432
426
* @see blendMode
@@ -435,7 +429,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
435
429
436
430
/**Sets whether effects (eg blend modes) are enabled for the item
437
431
* @param effectsEnabled set to true to enable effects
438
- * @note introduced in 2.0
439
432
* @see effectsEnabled
440
433
* @see setTransparency
441
434
* @see setBlendMode
@@ -485,7 +478,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
485
478
double textWidthMillimeters( const QFont& font, const QString& text ) const /Deprecated/;
486
479
487
480
/**Returns the font height of a character in millimeters
488
- * @note this method was added in version 1.7
489
481
* @deprecated use QgsComposerUtils::fontHeightCharacterMM instead
490
482
*/
491
483
double fontHeightCharacterMM( const QFont& font, const QChar& c ) const /Deprecated/;
@@ -519,14 +511,12 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
519
511
520
512
/**Locks / unlocks the item position for mouse drags
521
513
* @param lock set to true to prevent item movement and resizing via the mouse
522
- * @note this method was added in version 1.2
523
514
* @see positionLock
524
515
*/
525
516
void setPositionLock( const bool lock );
526
517
527
518
/**Returns whether position lock for mouse drags is enabled
528
519
* returns true if item is locked for mouse movement and resizing
529
- * @note this method was added in version 1.2
530
520
* @see setPositionLock
531
521
*/
532
522
bool positionLock() const;
@@ -552,21 +542,18 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
552
542
553
543
/**Get item's id (which is not necessarly unique)
554
544
* @returns item id
555
- * @note this method was added in version 1.7
556
545
* @see setId
557
546
*/
558
547
QString id() const;
559
548
560
549
/**Set item's id (which is not necessarly unique)
561
550
* @param id new id for item
562
- * @note this method was added in version 1.7
563
551
* @see id
564
552
*/
565
553
void setId( const QString& id );
566
554
567
555
/**Get item identification name
568
556
* @returns unique item identification string
569
- * @note this method was added in version 2.0
570
557
* @note there is not setter since one can't manually set the id
571
558
* @see id
572
559
* @see setId
@@ -662,7 +649,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
662
649
*/
663
650
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );
664
651
665
-
666
652
protected:
667
653
668
654
//event handlers
@@ -683,7 +669,9 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
683
669
/**Draw background*/
684
670
virtual void drawBackground( QPainter* p );
685
671
686
- /**Draws arrowhead*/
672
+ /**Draws arrowhead
673
+ * @deprecated use QgsComposerUtils::drawArrowHead instead
674
+ */
687
675
void drawArrowHead( QPainter* p, double x, double y, double angle, double arrowHeadWidth ) const;
688
676
689
677
/**Returns angle of the line from p1 to p2 (clockwise, starting at N)*/
@@ -694,14 +682,13 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
694
682
double rectHandlerBorderTolerance() const;
695
683
696
684
/**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
698
685
* @deprecated will be removed in QGIS 3.0
699
686
*/
700
687
double lockSymbolSize() const /Deprecated/;
701
688
702
689
/**Returns the zoom factor of the graphics view.
703
690
@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
+ */
705
692
double horizontalViewScaleFactor() const;
706
693
707
694
//some utility functions
@@ -732,16 +719,16 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
732
719
733
720
/**Calculates corner point after rotation and scaling
734
721
* @deprecated will be removed in QGIS 3.0
735
- */
722
+ */
736
723
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const /Deprecated/;
737
724
738
- /**Calculates corner point after rotation and scaling
725
+ /**Calculates width / height of the bounding box of a rotated rectangle
739
726
* @deprecated will be removed in QGIS 3.0
740
727
*/
741
728
void sizeChangedByRotation( double& width, double& height, double rotation ) /Deprecated/;
742
729
743
730
/**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
745
732
*/
746
733
void sizeChangedByRotation( double& width, double& height ) /Deprecated/;
747
734
0 commit comments