Skip to content

Commit 4b263d6

Browse files
committedSep 30, 2012
and more sip fixes
1 parent 1ed231a commit 4b263d6

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed
 

‎python/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ IF(NOT PYQT4_VERSION_NUM LESS 264194) # 0x040802
6767
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QSETTYPE_CONVERSION)
6868
ENDIF(NOT PYQT4_VERSION_NUM LESS 264194)
6969

70+
IF(PYQT4_VERSION_NUM LESS 264196) # 0x040804
71+
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QLISTCONSTPTR_CONVERSION)
72+
ENDIF(PYQT4_VERSION_NUM LESS 264196)
7073

7174
# core module
7275
FILE(GLOB sip_files_core core/*.sip)

‎python/core/composer/qgscomposition.sip

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class QgsComposition : QGraphicsScene
3535
%TypeHeaderCode
3636
#include <qgscomposition.h>
3737
%End
38+
3839
public:
3940

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

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

110113
/**Return composer items of a specific type*/
111114
// template<class T> void composerItems( QList<T*>& itemList );
@@ -174,8 +177,13 @@ class QgsComposition : QGraphicsScene
174177
@param doc xml document
175178
@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
176179
@param addUndoCommands insert AddItem commands if true (e.g. for copy/paste)
177-
@param pos item position. Optional, take position from xml if 0*/
178-
//void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore, bool addUndoCommands = false, QPointF* pos = 0 );
180+
@param pos item position. Optional, take position from xml if 0
181+
@note not available in python bindings
182+
*/
183+
/*
184+
void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore = 0,
185+
bool addUndoCommands = false, QPointF* pos = 0 );
186+
*/
179187

180188
/**Adds item to z list. Usually called from constructor of QgsComposerItem*/
181189
void addItemToZList( QgsComposerItem* item );
@@ -226,7 +234,7 @@ class QgsComposition : QGraphicsScene
226234
/**Removes multi frame (but does not delete it)*/
227235
void removeMultiFrame( QgsComposerMultiFrame* multiFrame );
228236
/**Adds an arrow item to the graphics scene and advices composer to create a widget for it (through signal)*/
229-
//void addComposerArrow( QgsComposerArrow* arrow );
237+
void addComposerArrow( QgsComposerArrow* arrow );
230238
/**Adds label to the graphics scene and advices composer to create a widget for it (through signal)*/
231239
void addComposerLabel( QgsComposerLabel* label );
232240
/**Adds map to the graphics scene and advices composer to create a widget for it (through signal)*/

‎python/core/conversions.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ which are not wrapped by PyQt:
2222

2323
%Feature QSETINT_CONVERSION
2424
%Feature QSETTYPE_CONVERSION
25+
%Feature QLISTCONSTPTR_CONVERSION
2526

2627
%ModuleHeaderCode
2728

‎src/core/composer/qgscomposition.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene
160160
QList<QgsComposerItem*> selectedComposerItems();
161161

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

166167
/**Return composer items of a specific type

0 commit comments

Comments
 (0)
Please sign in to comment.