Skip to content

Commit 009e47e

Browse files
committedJun 20, 2017
fix tests
1 parent eddd258 commit 009e47e

12 files changed

+31
-19
lines changed
 

‎python/core/composer/qgscomposerlabel.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class QgsComposerLabel: QgsComposerItem
1919
#include "qgscomposerlabel.h"
2020
%End
2121
public:
22-
QgsComposerLabel( QgsComposition *composition );
22+
QgsComposerLabel( QgsComposition *composition /TransferThis/ );
2323
~QgsComposerLabel();
2424

2525
virtual int type() const;

‎python/core/composer/qgscomposerlegend.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class QgsComposerLegend : QgsComposerItem
4747
#include "qgscomposerlegend.h"
4848
%End
4949
public:
50-
QgsComposerLegend( QgsComposition *composition );
50+
QgsComposerLegend( QgsComposition *composition /TransferThis/ );
5151

5252
virtual int type() const;
5353
%Docstring

‎python/core/composer/qgscomposermapgrid.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ class QgsComposerMapGrid : QgsComposerMapItem
507507
:rtype: QgsLineSymbol
508508
%End
509509

510-
void setMarkerSymbol( QgsMarkerSymbol *symbol );
510+
void setMarkerSymbol( QgsMarkerSymbol *symbol /Transfer/ );
511511
%Docstring
512512
Sets the marker symbol used for drawing grid points. This is only used for grids with a
513513
QgsComposerMapGrid.Markers style.

‎python/core/composer/qgscomposermapitem.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class QgsComposerMapItemStack
186186

187187
protected:
188188

189-
void addItem( QgsComposerMapItem *item );
189+
void addItem( QgsComposerMapItem *item /Transfer/ );
190190
%Docstring
191191
Adds a new map item to the stack and takes ownership of the item.
192192
The item will be added to the end of the stack, and rendered

‎python/core/composer/qgscomposerpicture.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class QgsComposerPicture: QgsComposerItem
4343
TrueNorth,
4444
};
4545

46-
QgsComposerPicture( QgsComposition *composition );
46+
QgsComposerPicture( QgsComposition *composition /TransferThis/ );
4747

4848
virtual int type() const;
4949
%Docstring

‎python/core/composer/qgscomposition.sip

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,16 @@ Reads settings from xml file
539539
:rtype: bool
540540
%End
541541

542+
void addItemsFromXml( const QDomElement &elem, const QDomDocument &doc,
543+
bool addUndoCommands = false, QPointF *pos = 0, bool pasteInPlace = false );
544+
%Docstring
545+
Add items from XML representation to the graphics scene (for project file reading, pasting items from clipboard)
546+
\param elem items parent element, e.g. \verbatim <Composer> \endverbatim or \verbatim <ComposerItemClipboard> \endverbatim
547+
\param doc xml document
548+
\param addUndoCommands insert AddItem commands if true (e.g. for copy/paste)
549+
\param pos item position. Optional, take position from xml if 0
550+
\param pasteInPlace whether the position should be kept but mapped to the page origin. (the page is the page under to the mouse cursor)
551+
%End
542552

543553
void addItemToZList( QgsComposerItem *item );
544554
%Docstring
@@ -680,6 +690,10 @@ Adds multiframe. The object is owned by QgsComposition until removeMultiFrame is
680690
Removes multi frame (but does not delete it)
681691
%End
682692

693+
void addComposerArrow( QgsComposerArrow *arrow );
694+
%Docstring
695+
Adds an arrow item to the graphics scene and advises composer to create a widget for it (through signal)
696+
%End
683697
void addComposerLabel( QgsComposerLabel *label );
684698
%Docstring
685699
Adds label to the graphics scene and advises composer to create a widget for it (through signal)
@@ -712,11 +726,11 @@ Adds a composer polygon and advises composer to create a widget for it (through
712726
%Docstring
713727
Adds a composer polyline and advises composer to create a widget for it (through signal)
714728
%End
715-
void addComposerHtmlFrame( QgsComposerHtml *html, QgsComposerFrame *frame );
729+
void addComposerHtmlFrame( QgsComposerHtml *html /Transfer/, QgsComposerFrame *frame /Transfer/ );
716730
%Docstring
717731
Adds composer html frame and advises composer to create a widget for it (through signal)
718732
%End
719-
void addComposerTableFrame( QgsComposerAttributeTableV2 *table, QgsComposerFrame *frame );
733+
void addComposerTableFrame( QgsComposerAttributeTableV2 *table /Transfer/, QgsComposerFrame *frame /Transfer/ );
720734
%Docstring
721735
Adds composer tablev2 frame and advises composer to create a widget for it (through signal)
722736
%End

‎src/core/composer/qgscomposerlabel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class CORE_EXPORT QgsComposerLabel: public QgsComposerItem
3333
{
3434
Q_OBJECT
3535
public:
36-
QgsComposerLabel( QgsComposition *composition );
36+
QgsComposerLabel( QgsComposition *composition SIP_TRANSFERTHIS );
3737
~QgsComposerLabel();
3838

3939
//! Return correct graphics item type.

‎src/core/composer/qgscomposerlegend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class CORE_EXPORT QgsComposerLegend : public QgsComposerItem
5959
Q_OBJECT
6060

6161
public:
62-
QgsComposerLegend( QgsComposition *composition );
62+
QgsComposerLegend( QgsComposition *composition SIP_TRANSFERTHIS );
6363

6464
//! Return correct graphics item type.
6565
virtual int type() const override { return ComposerLegend; }

‎src/core/composer/qgscomposermapgrid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ class CORE_EXPORT QgsComposerMapGrid : public QgsComposerMapItem
509509
* \see setLineSymbol
510510
* \see setStyle
511511
*/
512-
void setMarkerSymbol( QgsMarkerSymbol *symbol );
512+
void setMarkerSymbol( QgsMarkerSymbol *symbol SIP_TRANSFER );
513513

514514
/** Gets the marker symbol used for drawing grid points. This is only used for grids with a
515515
* QgsComposerMapGrid::Markers style.

‎src/core/composer/qgscomposermapitem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class CORE_EXPORT QgsComposerMapItemStack
183183
* should be called for the QgsComposerMap to prevent rendering artifacts
184184
* \see removeItem
185185
*/
186-
void addItem( QgsComposerMapItem *item );
186+
void addItem( QgsComposerMapItem *item SIP_TRANSFER );
187187

188188
/** Removes an item from the stack and deletes the corresponding QgsComposerMapItem
189189
* \param itemId id for the QgsComposerMapItem to remove

‎src/core/composer/qgscomposerpicture.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class CORE_EXPORT QgsComposerPicture: public QgsComposerItem
6161
TrueNorth, //!< Align to true north
6262
};
6363

64-
QgsComposerPicture( QgsComposition *composition );
64+
QgsComposerPicture( QgsComposition *composition SIP_TRANSFERTHIS );
6565

6666
//! Return correct graphics item type.
6767
virtual int type() const override { return ComposerPicture; }

‎src/core/composer/qgscomposition.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -489,10 +489,9 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionCo
489489
* \param addUndoCommands insert AddItem commands if true (e.g. for copy/paste)
490490
* \param pos item position. Optional, take position from xml if 0
491491
* \param pasteInPlace whether the position should be kept but mapped to the page origin. (the page is the page under to the mouse cursor)
492-
* \note parameters mapsToRestore, addUndoCommands pos and pasteInPlace not available in Python bindings
493492
*/
494493
void addItemsFromXml( const QDomElement &elem, const QDomDocument &doc,
495-
bool addUndoCommands = false, QPointF *pos = nullptr, bool pasteInPlace = false ) SIP_SKIP;
494+
bool addUndoCommands = false, QPointF *pos = nullptr, bool pasteInPlace = false );
496495

497496
//! Adds item to z list. Usually called from constructor of QgsComposerItem
498497
void addItemToZList( QgsComposerItem *item );
@@ -597,9 +596,8 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionCo
597596
//! Removes multi frame (but does not delete it)
598597
void removeMultiFrame( QgsComposerMultiFrame *multiFrame );
599598

600-
/** Adds an arrow item to the graphics scene and advises composer to create a widget for it (through signal)
601-
\note not available in Python bindings*/
602-
void addComposerArrow( QgsComposerArrow *arrow ) SIP_SKIP;
599+
//! Adds an arrow item to the graphics scene and advises composer to create a widget for it (through signal)
600+
void addComposerArrow( QgsComposerArrow *arrow );
603601
//! Adds label to the graphics scene and advises composer to create a widget for it (through signal)
604602
void addComposerLabel( QgsComposerLabel *label );
605603
//! Adds map to the graphics scene and advises composer to create a widget for it (through signal)
@@ -617,9 +615,9 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionCo
617615
//! Adds a composer polyline and advises composer to create a widget for it (through signal)
618616
void addComposerPolyline( QgsComposerPolyline *polyline );
619617
//! Adds composer html frame and advises composer to create a widget for it (through signal)
620-
void addComposerHtmlFrame( QgsComposerHtml *html, QgsComposerFrame *frame );
618+
void addComposerHtmlFrame( QgsComposerHtml *html SIP_TRANSFER, QgsComposerFrame *frame SIP_TRANSFER );
621619
//! Adds composer tablev2 frame and advises composer to create a widget for it (through signal)
622-
void addComposerTableFrame( QgsComposerAttributeTableV2 *table, QgsComposerFrame *frame );
620+
void addComposerTableFrame( QgsComposerAttributeTableV2 *table SIP_TRANSFER, QgsComposerFrame *frame SIP_TRANSFER );
623621

624622
//! Remove item from the graphics scene. Additionally to QGraphicsScene::removeItem, this function considers undo/redo command
625623
void removeComposerItem( QgsComposerItem *item, const bool createCommand = true, const bool removeGroupItems = true );

0 commit comments

Comments
 (0)
Please sign in to comment.