diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index c19885f859cf..09c284626b96 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -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) diff --git a/python/core/composer/qgscomposition.sip b/python/core/composer/qgscomposition.sip index 8c4f918f8384..e3700d881070 100644 --- a/python/core/composer/qgscomposition.sip +++ b/python/core/composer/qgscomposition.sip @@ -35,6 +35,7 @@ class QgsComposition : QGraphicsScene %TypeHeaderCode #include %End + public: /** \brief Plot type */ @@ -105,7 +106,9 @@ class QgsComposition : QGraphicsScene QList selectedComposerItems(); /**Returns pointers to all composer maps in the scene*/ +%If (QLISTCONSTPTR_CONVERSION) QList composerMapItems() const; +%End /**Return composer items of a specific type*/ // template void composerItems( QList& itemList ); @@ -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 ); @@ -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)*/ diff --git a/python/core/conversions.sip b/python/core/conversions.sip index 996170ba0a33..1e247e5044ae 100644 --- a/python/core/conversions.sip +++ b/python/core/conversions.sip @@ -22,6 +22,7 @@ which are not wrapped by PyQt: %Feature QSETINT_CONVERSION %Feature QSETTYPE_CONVERSION +%Feature QLISTCONSTPTR_CONVERSION %ModuleHeaderCode diff --git a/src/core/composer/qgscomposition.h b/src/core/composer/qgscomposition.h index bc6d44dd8145..9958e625317f 100644 --- a/src/core/composer/qgscomposition.h +++ b/src/core/composer/qgscomposition.h @@ -160,7 +160,8 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene QList selectedComposerItems(); /**Returns pointers to all composer maps in the scene - */ + @note available in python bindings only with PyQt >= 4.8.4 + */ QList composerMapItems() const; /**Return composer items of a specific type