[PyKDE] Patches for 0.13-pre1 using qt-2.1.1
Pete Ware
ware at cis.ohio-state.edu
Fri Aug 4 14:02:44 BST 2000
The following are some patches. Mostly adding new Qheader functionality.
I've also changed QlistView::insertItem() to transfer ownership so you
don't have to keep a Python reference around.
I made removeChild() use TransferBack but that could easily be wrong.
--pete
-------------- next part --------------
2000-08-2 Pete Ware <ware at cis.ohio-state.edu>
* sip/qscrollview.sip:
* sip/qobject.sip:
have removeChild() transfer ownership to Python. I'm not sure
this is the right thing.
removeChild(QObject */TransferBack/);
* sip/qheader.sip (public): TransferThis to the parent.
Added a number of QT_21X features
void removeLabel (int);
bool isClickEnabled (int = -1) const;
bool isResizeEnabled (int = -1) const;
bool isMovingEnabled () const;
void resizeSection (int, int);
int sectionSize (int) const;
int sectionPos (int) const;
int sectionAt (int) const;
int mapToSection (int) const;
int mapToIndex (int) const;
virtual void moveSection (int, int);
void setSortIndicator (int, bool = true);
void clicked (int);
void pressed (int);
void released (int);
void indexChange (int, int, int);
void paintEvent (QPaintEvent *);
void paintSectionLabel (QPainter *, int, const QRect &);
* sip/qlistview.sip (public): insertItem() transfers the ownership.
Index: sip/qheader.sip
===================================================================
RCS file: /n/gold/6/ware/Private/cvs/PyQt/sip/qheader.sip,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 qheader.sip
87,88c87,88
< QHeader(QWidget * = 0,const char * = 0);
< QHeader(int,QWidget * = 0,const char * = 0);
---
> QHeader(QWidget * /TransferThis/ = 0,const char * = 0);
> QHeader(int,QWidget * /TransferThis/ = 0,const char * = 0);
91a92,94
> %If Version(QT_21x)
> void removeLabel (int);
> %End
102a106,116
> %If Version(QT_21x)
> bool isClickEnabled (int = -1) const;
> bool isResizeEnabled (int = -1) const;
> bool isMovingEnabled () const;
> void resizeSection (int, int);
> int sectionSize (int) const;
> int sectionPos (int) const;
> int sectionAt (int) const;
> %End
> int count() const;
>
107c121
< int count() const;
---
>
110a125,129
> %If Version(QT_21x)
> int mapToSection (int) const;
> int mapToIndex (int) const;
> virtual void moveSection (int, int);
> %End
113a133,135
> %If Version(QT_21x)
> void setSortIndicator (int, bool = true);
> %End
118a141,146
> %If Version(QT_21x)
> void clicked (int);
> void pressed (int);
> void released (int);
> void indexChange (int, int, int);
> %End
123a152,155
> %If Version(QT_21x)
> void paintEvent (QPaintEvent *);
> void paintSectionLabel (QPainter *, int, const QRect &);
> %End
Index: sip/qlistview.sip
===================================================================
RCS file: /n/gold/6/ware/Private/cvs/PyQt/sip/qlistview.sip,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 qlistview.sip
206c206
< virtual void insertItem(QListViewItem *);
---
> virtual void insertItem(QListViewItem */Transfer/);
263a264,267
> %End
> %If Version(QT_2x)
> void setShowSortIndicator( bool );
> bool showSortIndicator() const;
Index: sip/qobject.sip
===================================================================
RCS file: /n/gold/6/ware/Private/cvs/PyQt/sip/qobject.sip,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 qobject.sip
81c81
< virtual void removeChild(QObject *);
---
> virtual void removeChild(QObject */TransferBack/);
238c238
< void removeChild(QObject *);
---
> void removeChild(QObject * /TransferBack/);
Index: sip/qscrollview.sip
===================================================================
RCS file: /n/gold/6/ware/Private/cvs/PyQt/sip/qscrollview.sip,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 qscrollview.sip
55c55
< void removeChild(QWidget *);
---
> void removeChild(QWidget */TransferBack/);
147c147
< void removeChild(QObject *);
---
> void removeChild(QObject */TransferBack/);
211a212,213
> virtual void drawContents (QPainter *);
> void moveContents (int, int);
More information about the PyQt
mailing list