Skip to content
Permalink
Browse files

Prepare for map item porting

  • Loading branch information
nyalldawson committed Oct 18, 2017
1 parent 87ef5c5 commit 9d04e679a2b4e069841adfe52ed87070f2abb41b
@@ -797,6 +797,16 @@ QRectF QgsLayoutItem::rectWithFrame() const
return rect().adjusted( -frameBleed, -frameBleed, frameBleed, frameBleed );
}

void QgsLayoutItem::moveContent( double, double )
{

}

void QgsLayoutItem::zoomContent( double, QPointF )
{

}

QgsLayoutPoint QgsLayoutItem::applyDataDefinedPosition( const QgsLayoutPoint &position )
{
if ( !mLayout )
@@ -513,6 +513,21 @@ class CORE_EXPORT QgsLayoutItem : public QgsLayoutObject, public QGraphicsRectIt
*/
virtual QRectF rectWithFrame() const;

/**
* Moves the content of the item, by a specified \a dx and \a dy in layout units.
* The default implementation has no effect.
* \see zoomContent()
*/
virtual void moveContent( double dx, double dy );

/**
* Zooms content of item. Does nothing by default.
* \param factor zoom factor, where > 1 results in a zoom in and < 1 results in a zoom out
* \param point item point for zoom center
* \see moveContent()
*/
virtual void zoomContent( double factor, QPointF point );

public slots:

/**

0 comments on commit 9d04e67

Please sign in to comment.
You can’t perform that action at this time.