Skip to content
Permalink
Browse files

fix tests

  • Loading branch information
3nids committed Jun 20, 2017
1 parent eddd258 commit 009e47e36920ed3b39b2b53f1bc9bd23d0b3ea23
@@ -19,7 +19,7 @@ class QgsComposerLabel: QgsComposerItem
#include "qgscomposerlabel.h"
%End
public:
QgsComposerLabel( QgsComposition *composition );
QgsComposerLabel( QgsComposition *composition /TransferThis/ );
~QgsComposerLabel();

virtual int type() const;
@@ -47,7 +47,7 @@ class QgsComposerLegend : QgsComposerItem
#include "qgscomposerlegend.h"
%End
public:
QgsComposerLegend( QgsComposition *composition );
QgsComposerLegend( QgsComposition *composition /TransferThis/ );

virtual int type() const;
%Docstring
@@ -507,7 +507,7 @@ class QgsComposerMapGrid : QgsComposerMapItem
:rtype: QgsLineSymbol
%End

void setMarkerSymbol( QgsMarkerSymbol *symbol );
void setMarkerSymbol( QgsMarkerSymbol *symbol /Transfer/ );
%Docstring
Sets the marker symbol used for drawing grid points. This is only used for grids with a
QgsComposerMapGrid.Markers style.
@@ -186,7 +186,7 @@ class QgsComposerMapItemStack

protected:

void addItem( QgsComposerMapItem *item );
void addItem( QgsComposerMapItem *item /Transfer/ );
%Docstring
Adds a new map item to the stack and takes ownership of the item.
The item will be added to the end of the stack, and rendered
@@ -43,7 +43,7 @@ class QgsComposerPicture: QgsComposerItem
TrueNorth,
};

QgsComposerPicture( QgsComposition *composition );
QgsComposerPicture( QgsComposition *composition /TransferThis/ );

virtual int type() const;
%Docstring
@@ -539,6 +539,16 @@ Reads settings from xml file
:rtype: bool
%End

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

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

void addComposerArrow( QgsComposerArrow *arrow );
%Docstring
Adds an arrow item to the graphics scene and advises composer to create a widget for it (through signal)
%End
void addComposerLabel( QgsComposerLabel *label );
%Docstring
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
%Docstring
Adds a composer polyline and advises composer to create a widget for it (through signal)
%End
void addComposerHtmlFrame( QgsComposerHtml *html, QgsComposerFrame *frame );
void addComposerHtmlFrame( QgsComposerHtml *html /Transfer/, QgsComposerFrame *frame /Transfer/ );
%Docstring
Adds composer html frame and advises composer to create a widget for it (through signal)
%End
void addComposerTableFrame( QgsComposerAttributeTableV2 *table, QgsComposerFrame *frame );
void addComposerTableFrame( QgsComposerAttributeTableV2 *table /Transfer/, QgsComposerFrame *frame /Transfer/ );
%Docstring
Adds composer tablev2 frame and advises composer to create a widget for it (through signal)
%End
@@ -33,7 +33,7 @@ class CORE_EXPORT QgsComposerLabel: public QgsComposerItem
{
Q_OBJECT
public:
QgsComposerLabel( QgsComposition *composition );
QgsComposerLabel( QgsComposition *composition SIP_TRANSFERTHIS );
~QgsComposerLabel();

//! Return correct graphics item type.
@@ -59,7 +59,7 @@ class CORE_EXPORT QgsComposerLegend : public QgsComposerItem
Q_OBJECT

public:
QgsComposerLegend( QgsComposition *composition );
QgsComposerLegend( QgsComposition *composition SIP_TRANSFERTHIS );

//! Return correct graphics item type.
virtual int type() const override { return ComposerLegend; }
@@ -509,7 +509,7 @@ class CORE_EXPORT QgsComposerMapGrid : public QgsComposerMapItem
* \see setLineSymbol
* \see setStyle
*/
void setMarkerSymbol( QgsMarkerSymbol *symbol );
void setMarkerSymbol( QgsMarkerSymbol *symbol SIP_TRANSFER );

/** Gets the marker symbol used for drawing grid points. This is only used for grids with a
* QgsComposerMapGrid::Markers style.
@@ -183,7 +183,7 @@ class CORE_EXPORT QgsComposerMapItemStack
* should be called for the QgsComposerMap to prevent rendering artifacts
* \see removeItem
*/
void addItem( QgsComposerMapItem *item );
void addItem( QgsComposerMapItem *item SIP_TRANSFER );

/** Removes an item from the stack and deletes the corresponding QgsComposerMapItem
* \param itemId id for the QgsComposerMapItem to remove
@@ -61,7 +61,7 @@ class CORE_EXPORT QgsComposerPicture: public QgsComposerItem
TrueNorth, //!< Align to true north
};

QgsComposerPicture( QgsComposition *composition );
QgsComposerPicture( QgsComposition *composition SIP_TRANSFERTHIS );

//! Return correct graphics item type.
virtual int type() const override { return ComposerPicture; }
@@ -489,10 +489,9 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionCo
* \param addUndoCommands insert AddItem commands if true (e.g. for copy/paste)
* \param pos item position. Optional, take position from xml if 0
* \param pasteInPlace whether the position should be kept but mapped to the page origin. (the page is the page under to the mouse cursor)
* \note parameters mapsToRestore, addUndoCommands pos and pasteInPlace not available in Python bindings
*/
void addItemsFromXml( const QDomElement &elem, const QDomDocument &doc,
bool addUndoCommands = false, QPointF *pos = nullptr, bool pasteInPlace = false ) SIP_SKIP;
bool addUndoCommands = false, QPointF *pos = nullptr, bool pasteInPlace = false );

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

/** Adds an arrow item to the graphics scene and advises composer to create a widget for it (through signal)
\note not available in Python bindings*/
void addComposerArrow( QgsComposerArrow *arrow ) SIP_SKIP;
//! Adds an arrow item to the graphics scene and advises composer to create a widget for it (through signal)
void addComposerArrow( QgsComposerArrow *arrow );
//! Adds label to the graphics scene and advises composer to create a widget for it (through signal)
void addComposerLabel( QgsComposerLabel *label );
//! 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
//! Adds a composer polyline and advises composer to create a widget for it (through signal)
void addComposerPolyline( QgsComposerPolyline *polyline );
//! Adds composer html frame and advises composer to create a widget for it (through signal)
void addComposerHtmlFrame( QgsComposerHtml *html, QgsComposerFrame *frame );
void addComposerHtmlFrame( QgsComposerHtml *html SIP_TRANSFER, QgsComposerFrame *frame SIP_TRANSFER );
//! Adds composer tablev2 frame and advises composer to create a widget for it (through signal)
void addComposerTableFrame( QgsComposerAttributeTableV2 *table, QgsComposerFrame *frame );
void addComposerTableFrame( QgsComposerAttributeTableV2 *table SIP_TRANSFER, QgsComposerFrame *frame SIP_TRANSFER );

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

0 comments on commit 009e47e

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