Skip to content

Commit

Permalink
and more sip fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 30, 2012
1 parent 1ed231a commit 4b263d6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions python/CMakeLists.txt
Expand Up @@ -67,6 +67,9 @@ IF(NOT PYQT4_VERSION_NUM LESS 264194) # 0x040802
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QSETTYPE_CONVERSION)
ENDIF(NOT PYQT4_VERSION_NUM LESS 264194)

IF(PYQT4_VERSION_NUM LESS 264196) # 0x040804
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QLISTCONSTPTR_CONVERSION)
ENDIF(PYQT4_VERSION_NUM LESS 264196)

# core module
FILE(GLOB sip_files_core core/*.sip)
Expand Down
14 changes: 11 additions & 3 deletions python/core/composer/qgscomposition.sip
Expand Up @@ -35,6 +35,7 @@ class QgsComposition : QGraphicsScene
%TypeHeaderCode
#include <qgscomposition.h>
%End

public:

/** \brief Plot type */
Expand Down Expand Up @@ -105,7 +106,9 @@ class QgsComposition : QGraphicsScene
QList<QgsComposerItem*> selectedComposerItems();

/**Returns pointers to all composer maps in the scene*/
%If (QLISTCONSTPTR_CONVERSION)
QList<const QgsComposerMap*> composerMapItems() const;
%End

/**Return composer items of a specific type*/
// template<class T> void composerItems( QList<T*>& itemList );
Expand Down Expand Up @@ -174,8 +177,13 @@ class QgsComposition : QGraphicsScene
@param doc xml document
@param mapsToRestore for reading from project file: set preview move 'rectangle' to all maps and save the preview states to show composer maps on demand
@param addUndoCommands insert AddItem commands if true (e.g. for copy/paste)
@param pos item position. Optional, take position from xml if 0*/
//void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore, bool addUndoCommands = false, QPointF* pos = 0 );
@param pos item position. Optional, take position from xml if 0
@note not available in python bindings
*/
/*
void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore = 0,
bool addUndoCommands = false, QPointF* pos = 0 );
*/

/**Adds item to z list. Usually called from constructor of QgsComposerItem*/
void addItemToZList( QgsComposerItem* item );
Expand Down Expand Up @@ -226,7 +234,7 @@ class QgsComposition : QGraphicsScene
/**Removes multi frame (but does not delete it)*/
void removeMultiFrame( QgsComposerMultiFrame* multiFrame );
/**Adds an arrow item to the graphics scene and advices composer to create a widget for it (through signal)*/
//void addComposerArrow( QgsComposerArrow* arrow );
void addComposerArrow( QgsComposerArrow* arrow );
/**Adds label to the graphics scene and advices composer to create a widget for it (through signal)*/
void addComposerLabel( QgsComposerLabel* label );
/**Adds map to the graphics scene and advices composer to create a widget for it (through signal)*/
Expand Down
1 change: 1 addition & 0 deletions python/core/conversions.sip
Expand Up @@ -22,6 +22,7 @@ which are not wrapped by PyQt:

%Feature QSETINT_CONVERSION
%Feature QSETTYPE_CONVERSION
%Feature QLISTCONSTPTR_CONVERSION

%ModuleHeaderCode

Expand Down
3 changes: 2 additions & 1 deletion src/core/composer/qgscomposition.h
Expand Up @@ -160,7 +160,8 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene
QList<QgsComposerItem*> selectedComposerItems();

/**Returns pointers to all composer maps in the scene
*/
@note available in python bindings only with PyQt >= 4.8.4
*/
QList<const QgsComposerMap*> composerMapItems() const;

/**Return composer items of a specific type
Expand Down

0 comments on commit 4b263d6

Please sign in to comment.