and more sip fixes

This commit is contained in:
Juergen E. Fischer 2012-09-30 18:18:40 +02:00
parent 1ed231a26d
commit 4b263d6b06
4 changed files with 17 additions and 4 deletions

View File

@ -67,6 +67,9 @@ IF(NOT PYQT4_VERSION_NUM LESS 264194) # 0x040802
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QSETTYPE_CONVERSION) SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QSETTYPE_CONVERSION)
ENDIF(NOT PYQT4_VERSION_NUM LESS 264194) 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 # core module
FILE(GLOB sip_files_core core/*.sip) FILE(GLOB sip_files_core core/*.sip)

View File

@ -35,6 +35,7 @@ class QgsComposition : QGraphicsScene
%TypeHeaderCode %TypeHeaderCode
#include <qgscomposition.h> #include <qgscomposition.h>
%End %End
public: public:
/** \brief Plot type */ /** \brief Plot type */
@ -105,7 +106,9 @@ class QgsComposition : QGraphicsScene
QList<QgsComposerItem*> selectedComposerItems(); QList<QgsComposerItem*> selectedComposerItems();
/**Returns pointers to all composer maps in the scene*/ /**Returns pointers to all composer maps in the scene*/
%If (QLISTCONSTPTR_CONVERSION)
QList<const QgsComposerMap*> composerMapItems() const; QList<const QgsComposerMap*> composerMapItems() const;
%End
/**Return composer items of a specific type*/ /**Return composer items of a specific type*/
// template<class T> void composerItems( QList<T*>& itemList ); // template<class T> void composerItems( QList<T*>& itemList );
@ -174,8 +177,13 @@ class QgsComposition : QGraphicsScene
@param doc xml document @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 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 addUndoCommands insert AddItem commands if true (e.g. for copy/paste)
@param pos item position. Optional, take position from xml if 0*/ @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 ); @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*/ /**Adds item to z list. Usually called from constructor of QgsComposerItem*/
void addItemToZList( QgsComposerItem* item ); void addItemToZList( QgsComposerItem* item );
@ -226,7 +234,7 @@ class QgsComposition : QGraphicsScene
/**Removes multi frame (but does not delete it)*/ /**Removes multi frame (but does not delete it)*/
void removeMultiFrame( QgsComposerMultiFrame* multiFrame ); void removeMultiFrame( QgsComposerMultiFrame* multiFrame );
/**Adds an arrow item to the graphics scene and advices composer to create a widget for it (through signal)*/ /**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)*/ /**Adds label to the graphics scene and advices composer to create a widget for it (through signal)*/
void addComposerLabel( QgsComposerLabel* label ); void addComposerLabel( QgsComposerLabel* label );
/**Adds map to the graphics scene and advices composer to create a widget for it (through signal)*/ /**Adds map to the graphics scene and advices composer to create a widget for it (through signal)*/

View File

@ -22,6 +22,7 @@ which are not wrapped by PyQt:
%Feature QSETINT_CONVERSION %Feature QSETINT_CONVERSION
%Feature QSETTYPE_CONVERSION %Feature QSETTYPE_CONVERSION
%Feature QLISTCONSTPTR_CONVERSION
%ModuleHeaderCode %ModuleHeaderCode

View File

@ -160,7 +160,8 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene
QList<QgsComposerItem*> selectedComposerItems(); QList<QgsComposerItem*> selectedComposerItems();
/**Returns pointers to all composer maps in the scene /**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; QList<const QgsComposerMap*> composerMapItems() const;
/**Return composer items of a specific type /**Return composer items of a specific type