Skip to content

Commit 1bfed13

Browse files
committedNov 7, 2017
Port picture item
1 parent 20b9d08 commit 1bfed13

File tree

41 files changed

+3836
-1
lines changed

Some content is hidden

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

41 files changed

+3836
-1
lines changed
 

‎python/core/core_auto.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@
414414
%Include layout/qgslayoutitemmapoverview.sip
415415
%Include layout/qgslayoutitemnodeitem.sip
416416
%Include layout/qgslayoutitempage.sip
417+
%Include layout/qgslayoutitempicture.sip
417418
%Include layout/qgslayoutitempolygon.sip
418419
%Include layout/qgslayoutitempolyline.sip
419420
%Include layout/qgslayoutitemregistry.sip

‎python/core/layout/qgslayoutitem.sip

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ class QgsLayoutItem : QgsLayoutObject, QGraphicsRectItem, QgsLayoutUndoObjectInt
7575
UndoMapGridAnnotationFontColor,
7676
UndoMapGridLineSymbol,
7777
UndoMapGridMarkerSymbol,
78+
UndoPictureRotation,
79+
UndoPictureFillColor,
80+
UndoPictureStrokeColor,
81+
UndoPictureNorthOffset,
82+
UndoCustomCommand,
7883
};
7984

8085
explicit QgsLayoutItem( QgsLayout *layout, bool manageZValue = true );
@@ -696,6 +701,17 @@ class QgsLayoutItem : QgsLayoutObject, QGraphicsRectItem, QgsLayoutUndoObjectInt
696701
.. seealso:: setFixedSize()
697702
%End
698703

704+
virtual QSizeF applyItemSizeConstraint( const QSizeF &targetSize );
705+
%Docstring
706+
Applies any item-specific size constraint handling to a given ``targetSize`` in layout units.
707+
Subclasses can override this method if they need to apply advanced logic regarding item
708+
sizes, which cannot be covered by setFixedSize() or setMinimumSize().
709+
Item size constraints are applied after fixed, minimum and data defined size constraints.
710+
.. seealso:: setFixedSize()
711+
.. seealso:: setMinimumSize()
712+
:rtype: QSizeF
713+
%End
714+
699715
void refreshItemSize();
700716
%Docstring
701717
Refreshes an item's size by rechecking it against any possible item fixed
@@ -798,6 +814,12 @@ class QgsLayoutItem : QgsLayoutObject, QGraphicsRectItem, QgsLayoutUndoObjectInt
798814
:rtype: bool
799815
%End
800816

817+
QgsLayoutSize applyDataDefinedSize( const QgsLayoutSize &size );
818+
%Docstring
819+
Applies any present data defined size overrides to the specified layout ``size``.
820+
:rtype: QgsLayoutSize
821+
%End
822+
801823
};
802824

803825

0 commit comments

Comments
 (0)
Please sign in to comment.