Skip to content

Commit 9d04e67

Browse files
committed
Prepare for map item porting
1 parent 87ef5c5 commit 9d04e67

File tree

4 files changed

+663
-0
lines changed

4 files changed

+663
-0
lines changed

src/core/layout/qgslayoutitem.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,16 @@ QRectF QgsLayoutItem::rectWithFrame() const
797797
return rect().adjusted( -frameBleed, -frameBleed, frameBleed, frameBleed );
798798
}
799799

800+
void QgsLayoutItem::moveContent( double, double )
801+
{
802+
803+
}
804+
805+
void QgsLayoutItem::zoomContent( double, QPointF )
806+
{
807+
808+
}
809+
800810
QgsLayoutPoint QgsLayoutItem::applyDataDefinedPosition( const QgsLayoutPoint &position )
801811
{
802812
if ( !mLayout )

src/core/layout/qgslayoutitem.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,21 @@ class CORE_EXPORT QgsLayoutItem : public QgsLayoutObject, public QGraphicsRectIt
513513
*/
514514
virtual QRectF rectWithFrame() const;
515515

516+
/**
517+
* Moves the content of the item, by a specified \a dx and \a dy in layout units.
518+
* The default implementation has no effect.
519+
* \see zoomContent()
520+
*/
521+
virtual void moveContent( double dx, double dy );
522+
523+
/**
524+
* Zooms content of item. Does nothing by default.
525+
* \param factor zoom factor, where > 1 results in a zoom in and < 1 results in a zoom out
526+
* \param point item point for zoom center
527+
* \see moveContent()
528+
*/
529+
virtual void zoomContent( double factor, QPointF point );
530+
516531
public slots:
517532

518533
/**

0 commit comments

Comments
 (0)