Re: [PyKDE] Sip wishlist item: Parameter typechecking enhancement

2005-07-18 Thread Nigel Stewart



   Bar(Foo & /GetWrapper/);
   Bar(Foo & /PassWrapper/);   ??


No. I think this is too specialised a requirement to justify automating it.


Just to explain our motivation for having this...

We have a container that can intermix C++ and
python wrapped Foo in a way that observes
python reference counting for python-side
items, deletion for dynamically allocated
C++ items, and no deletion of items
managed elsewhere.  This results in nice
consistant behaviour across C++ and Python
code, but means some Python C API creeping
into our own framework.

The GetWrapper annotation certainly helps
minimise what our MethodCode needs
to deal with, perhaps we're being a bit too
far on the bleeding edge making our
framework so python-friendly...

With thanks,

Nigel Stewart



___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] [eric3] file/class browser

2005-07-18 Thread Detlev Offenbach
Am Sonntag, 17. Juli 2005 21:48 schrieb Diez B. Roggisch:
> > How should the editor know, which class a variable belongs to. Python is
> > a dynamically typed language. This means, that the type of an object is
> > determined at runtime. This is a very big difference to C++ or Java,
> > where a scanner can parse the source and determine the type of an object
> > even before the code is compiled.
>
> I'm pretty well aware of that - but I'm talking about visiting a file
> via the tabs, detecting code in it like
>
> self.foobar()
>
> and then one wants to visit foobar - which is located in the same file.
> So syncing the classbrowser with the currently visited file is nice. No
> reflection/type inference here.
>
> > Somebody recommended to make a toolbar with an entry for the search
> > expression and a find and find next button. The search should use the
> > flags set last time the search dialog was used. How about that?
>
> The important part for me would be that it's fully Key-operated - in
> emacs, I press C-s for forward search, then start typing which does
> incrementally search. Pressing C-c twice makes the last search
> expression appear. C-r does the same backwards.
>
> Displaying the search term in a toolbar is ok, but the advantage of the
> minibuffer-style is that it occupies precious screenspace only when needed.
>
> >>And the ability to search forward/backward from the current cursor
> >>position with possible wrap arounds instead of always beginning at the
> >>top would also be great. Any chances for this?
> >
> > That is in. Just select the backwards checkbox and select Find Again (or
> > press F3).
>
> It's not about searching backward, but about searching from the cursor
> position - instead of the beginnig, which is AFAIK the eric behaviour
> .I'm on my mac now and haven't eric running, so I can't check that out -
> but I was annoyed by that, and usually I know how to operate GUIs so I'd
> seen an option that changes that behaviour - I hope at least.

Search next does exactly that. It searches the entered string starting at the 
cursor position.

>
>
> Regards,
>
> Diez

Detlev
-- 
Detlev Offenbach
[EMAIL PROTECTED]

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Problems with a port of C++/Qt book to Python

2005-07-18 Thread mbouchar

Douglas Soares de Andrade wrote:


Hi !

Im trying to make a port of the book C++ GUI programming with Qt to Python. I 
alrealdy did the first chapter, but i tried to port the example in the 
section Subclassing Qt, but i have no success. 


Some part of the cpp code is a little complicated to me, as this example:

FindDialog::FindDialog(QWidget *parent, const char *name) : QDialog(parent, 
name)


As i understood, it is a implementation of the constructor, but i cant get the 
idea in how to port it to python.


Can someone here can help me or translate this example to python, so i will do 
the rest, since it is most equal in the rest of the book.


The code is here:

http://www.unilestemg.br/find.tar.gz

Thank you all so much for any help.

 


FindDialog::FindDialog(QWidget *parent, const char *name) : QDialog(parent,

name)

---

def __init__(self, parent, name):
  QDialog.__init__(self, parent, name)

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Problems with a port of C++/Qt book to Python

2005-07-18 Thread Eron Lloyd
On Monday 18 July 2005 11:01 am, Douglas Soares de Andrade wrote:
> Hi !
>
> Im trying to make a port of the book C++ GUI programming with Qt to Python.
> I alrealdy did the first chapter, but i tried to port the example in the
> section Subclassing Qt, but i have no success.
>
> Some part of the cpp code is a little complicated to me, as this example:
>
> FindDialog::FindDialog(QWidget *parent, const char *name) : QDialog(parent,
> name)
>
> As i understood, it is a implementation of the constructor, but i cant get
> the idea in how to port it to python.
>
> Can someone here can help me or translate this example to python, so i will
> do the rest, since it is most equal in the rest of the book.
>
> The code is here:
>
> http://www.unilestemg.br/find.tar.gz
>
> Thank you all so much for any help.

Hi Douglas,

Quite an ambitious project! What you see there is a typical class constructor. 
In PyQt, you would want something along the lines of:

class FindDialog(QDialog):
def __init__(self, parent, name):
QDialog.__init__(self, parent, name)

What it is doing is defining the FindDialog constructor, accepting the 
arguments parent and name, initializing its superclass QDialog, and passing 
it the two arguments.

There is quite a bit of complicated C++ in the later chapters. Are you going 
to be able to handle it? What would be nice is a detailed translation guide 
for Qt/C++ to PyQt/Python. I started something along those lines, building on 
the work done in the appendix of the PyQt book. On that thought, it probably 
would be a better idea to update the PyQt book, and perhaps begin reshaping 
it for (Py)Qt4!

Eron

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Problems with a port of C++/Qt book to Python

2005-07-18 Thread mbouchar

Douglas Soares de Andrade wrote:


Hi !

Another problem:

What about this construction ?

class FindDialog :  public QDialog
{
Q_OBJECT

public:
FindDialog(QWidget *parent, const char *name = 0);

All is clear for me, but what about the Q_OBJECT macro ? How to use it in 
PyQt ?


 

Just remove it. This macro is used to tell qmake to use moc (trolltech 
preprocessor) for the specified class.


Another thing... 

How to use the tr() function ? 
 

I really don't know. pyuic seems to create his own wrapper for 
translation with :

   def __tr(self,s,c = None):
   return qApp.translate("FGenOptionsBase",s,c)
in each class

How to use this setCaption() in the code below, do i have to use self, or 
QDialog ? 
 

self.setCaption() or QDialog.setCaption(self) are the same, except if 
you subclassed setCaption.


I recomment using self.setCaption()


And, in the connect line, what to do with the this keyword ?

 


You replace this with self.

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


[PyKDE] Problems with a port of C++/Qt book to Python

2005-07-18 Thread Douglas Soares de Andrade
Hi !

Im trying to make a port of the book C++ GUI programming with Qt to Python. I 
alrealdy did the first chapter, but i tried to port the example in the 
section Subclassing Qt, but i have no success. 

Some part of the cpp code is a little complicated to me, as this example:

FindDialog::FindDialog(QWidget *parent, const char *name) : QDialog(parent, 
name)

As i understood, it is a implementation of the constructor, but i cant get the 
idea in how to port it to python.

Can someone here can help me or translate this example to python, so i will do 
the rest, since it is most equal in the rest of the book.

The code is here:

http://www.unilestemg.br/find.tar.gz

Thank you all so much for any help.

-- 
Douglas Soares de Andrade
dsa at unilestemg.br
UnilesteMG - www.unilestemg.br
ICQ, MSN = 76277921, douglas at tuxfamily.org

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Sip wishlist item: Parameter typechecking enhancement

2005-07-18 Thread Phil Thompson
On Monday 18 July 2005 5:43 pm, Nigel Stewart wrote:
> >>In a nutshell, I want a wrapped constructor to pass
> >>a wrapped Foo as a PyObject parameter, but I'd prefer
> >>sip to do the typecheck that PyObject is a Foo, rather
> >>than trying to deal with it on the C++ side.
> >
> > How about the GetWrapper annotation?
>
>   Nearly!
>
>   Annotating the parameter with GetWrapper
>   makes the PyObject available as a0Wrapper,
>   and doing the type check...
>
>   ...but a0 is being passed as the argument,
>   rather than a0Wrapper.
>
>   Is there a way to avoid maintaining
>   method code to pass q0Wrapper
>   rather than a0?
>
>  > Bar(Foo & /GetWrapper/);
> >
> > Bar(Foo & /PassWrapper/);   ??

No. I think this is too specialised a requirement to justify automating it.

Phil

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Sip wishlist item: Parameter typechecking enhancement

2005-07-18 Thread Nigel Stewart

Just for the record, here is the solution that
is working for us with sip 4.1.1.  It is far
better than needing to worry in C++ about the
PyObject parameter not being a Foo wrapper...

Nigel



...

Bar(Foo & /GetWrapper/, const QString &, const QString & = QString::null);
%MethodCode
sipCpp = new Bar(a0Wrapper,*a1,*a2);
%End

...

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Problems with a port of C++/Qt book to Python

2005-07-18 Thread Jim Bublitz
On Monday 18 July 2005 08:48, Douglas Soares de Andrade wrote:
> Hi !
>
> Another problem:
>
> What about this construction ?
>
> class FindDialog :  public QDialog
> {
>   Q_OBJECT
>
>   public:
>   FindDialog(QWidget *parent, const char *name = 0);
>
> All is clear for me, but what about the Q_OBJECT macro ? How to use it in
> PyQt ?

It's not required in Python/PyQt

> Another thing...
>
> How to use the tr() function ?

Any QObject descendant inherits it from QObject:

self.tr ( ... )

in your example below. It's also a static member of QObject, so you could also 
use:

   QObject.tr ( ... )

any place. connect () works the same way.

> How to use this setCaption() in the code below, do i have to use self, or
> QDialog ?

   self.setCaption ( ... )

> And, in the connect line, what to do with the this keyword ?

If the object calling connect is a QObject descendant (all QWidgets are), 
then:

self.connect ( ... )

will work. You can also do this:

 lineEdit = new QLineEdit(this);
 lineEdit.connect (lineEdit, SIGNAL ("textChanged (const QString &)"),   
 self.slotTextChanged)

Also note the PyQt syntax - the signal name and arguments are enclosed in 
quotes, and the complete argument list (including &, *, etc) is used; the 
slot is any callable Python method or function.


> FindDialog::FindDialog(QWidget *parent, const char *name)

# don't forget the imports
from qt import QDialog,  QLabel, QLineEdit, QCheckBox, QPushButton,  SIGNAL,\   
 QObject

class FindDialog (QWidget):
>
> : QDialog(parent, name)

def  __init__ (self, parent, name):
QDialog.__init__  (self, parent, name)
>
> {
> setCaption(tr("Find"));

self.setCaption (self.tr ("Find"))
>
> label = new QLabel(tr("Find &what:"), this);

label = QLabel (self.tr  ("Find &what:"), self)

> lineEdit = new QLineEdit(this);

lineEdit = QLineEdit (self)

> label->setBuddy(lineEdit);

label.setBuddy (lineEdit)

> caseCheckBox = new QCheckBox(tr("Match &case"), this);

caseCheckBox = QCheckBox (self.tr ("Match &case"), self)

> backwardCheckBox = new QCheckBox(tr("Search &backward"), this);

backwardCheckBox = QCheckBox (self.tr ("Search &backward"), self)
>
> findButton = new QPushButton(tr("&Find"), this);

findButton = QPushButton (self.tr ("&Find"), self)

> findButton->setDefault(true);

findButton.setDefault (True)  # note capitalization here and next line

> findButton->setEnabled(false);

findButton.setEnabled (False)
>
> closeButton = new QPushButton(tr("Close"), this);

closeButton = QPushButton (self.tr ("Close"), self)
>
> connect(lineEdit, SIGNAL(textChanged(const QString &)),
> this, SLOT(enableFindButton(const QString &)));


# three different ways to call connect - any should work (and it's better to
# be consistent); all assume slot is a member of this class

self.connect (lineEdit, SIGNAL ("textChanged (const QString&)"),
self.enableFindButton)  

> connect(findButton, SIGNAL(clicked()),
> this, SLOT(findClicked()));

findButton.connect (findButton, SIGNAL ("clicked ()"),
 self.findClicked)

> connect(closeButton, SIGNAL(clicked()),
> this, SLOT(close()));

QObject.connect (closeButton, SIGNAL ("clicked ()"), self.close)

Jim

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Problems with a port of C++/Qt book to Python

2005-07-18 Thread Douglas Soares de Andrade
Hi !

Another problem:

What about this construction ?

class FindDialog :  public QDialog
{
Q_OBJECT

public:
FindDialog(QWidget *parent, const char *name = 0);

All is clear for me, but what about the Q_OBJECT macro ? How to use it in 
PyQt ?

Another thing... 

How to use the tr() function ? 
How to use this setCaption() in the code below, do i have to use self, or 
QDialog ? 
And, in the connect line, what to do with the this keyword ?

FindDialog::FindDialog(QWidget *parent, const char *name)
: QDialog(parent, name)
{
setCaption(tr("Find"));

label = new QLabel(tr("Find &what:"), this);
lineEdit = new QLineEdit(this);
label->setBuddy(lineEdit);

caseCheckBox = new QCheckBox(tr("Match &case"), this);
backwardCheckBox = new QCheckBox(tr("Search &backward"), this);

findButton = new QPushButton(tr("&Find"), this);
findButton->setDefault(true);
findButton->setEnabled(false);

closeButton = new QPushButton(tr("Close"), this);

connect(lineEdit, SIGNAL(textChanged(const QString &)),
this, SLOT(enableFindButton(const QString &)));
connect(findButton, SIGNAL(clicked()),
this, SLOT(findClicked()));
connect(closeButton, SIGNAL(clicked()),
this, SLOT(close()));


Thanks for all the help !


Em Seg 18 Jul 2005 18:07, Eron Lloyd escreveu:
> On Monday 18 July 2005 11:01 am, Douglas Soares de Andrade wrote:
> > Hi !
> >
> > Im trying to make a port of the book C++ GUI programming with Qt to
> > Python. I alrealdy did the first chapter, but i tried to port the example
> > in the section Subclassing Qt, but i have no success.
> >
> > Some part of the cpp code is a little complicated to me, as this example:
> >
> > FindDialog::FindDialog(QWidget *parent, const char *name) :
> > QDialog(parent, name)
> >
> > As i understood, it is a implementation of the constructor, but i cant
> > get the idea in how to port it to python.
> >
> > Can someone here can help me or translate this example to python, so i
> > will do the rest, since it is most equal in the rest of the book.
> >
> > The code is here:
> >
> > http://www.unilestemg.br/find.tar.gz
> >
> > Thank you all so much for any help.
>
> Hi Douglas,
>
> Quite an ambitious project! What you see there is a typical class
> constructor. In PyQt, you would want something along the lines of:
>
> class FindDialog(QDialog):
> def __init__(self, parent, name):
> QDialog.__init__(self, parent, name)
>
> What it is doing is defining the FindDialog constructor, accepting the
> arguments parent and name, initializing its superclass QDialog, and passing
> it the two arguments.
>
> There is quite a bit of complicated C++ in the later chapters. Are you
> going to be able to handle it? What would be nice is a detailed translation
> guide for Qt/C++ to PyQt/Python. I started something along those lines,
> building on the work done in the appendix of the PyQt book. On that
> thought, it probably would be a better idea to update the PyQt book, and
> perhaps begin reshaping it for (Py)Qt4!
>
> Eron
>
> ___
> PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

-- 
Douglas Soares de Andrade
dsa at unilestemg.br
UnilesteMG - www.unilestemg.br
ICQ, MSN = 76277921, douglas at tuxfamily.org

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Problems with a port of C++/Qt book to Python

2005-07-18 Thread Douglas Soares de Andrade
Hi Eron !

> Quite an ambitious project! 

But there is a urgent need for initiatives like that, all of us know that Qt 
is better today than gtk. But i see that when new people comes to or ground 
they are almost always lost, without knowing where to go.

This is a tentative of solving this, and feeding then with some info.

> What you see there is a typical class 
> constructor. In PyQt, you would want something along the lines of:

> class FindDialog(QDialog):
> def __init__(self, parent, name):
> QDialog.__init__(self, parent, name)

> What it is doing is defining the FindDialog constructor, accepting the
> arguments parent and name, initializing its superclass QDialog, and passing
> it the two arguments.

Understood. Im not yet so much confident with this C++ constructions, but i 
want to sharp this skill with this project.

> There is quite a bit of complicated C++ in the later chapters. Are you
> going to be able to handle it? 

I will study and search to see if i can solve by myself, if not, i will need 
help of the list.

> What would be nice is a detailed translation 
> guide for Qt/C++ to PyQt/Python. 

Yes, i really miss it.

> I started something along those lines, 
> building on the work done in the appendix of the PyQt book. On that
> thought, it probably would be a better idea to update the PyQt book, and
> perhaps begin reshaping it for (Py)Qt4!

Yes. You right. 
Thank you very much for the help !

-- 
Douglas Soares de Andrade
dsa at unilestemg.br
UnilesteMG - www.unilestemg.br
ICQ, MSN = 76277921, douglas at tuxfamily.org

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Sip wishlist item: Parameter typechecking enhancement

2005-07-18 Thread Nigel Stewart



In a nutshell, I want a wrapped constructor to pass
a wrapped Foo as a PyObject parameter, but I'd prefer
sip to do the typecheck that PyObject is a Foo, rather
than trying to deal with it on the C++ side.


How about the GetWrapper annotation?


Nearly!

Annotating the parameter with GetWrapper
makes the PyObject available as a0Wrapper,
and doing the type check...

...but a0 is being passed as the argument,
rather than a0Wrapper.

Is there a way to avoid maintaining
method code to pass q0Wrapper
rather than a0?

> Bar(Foo & /GetWrapper/);


Bar(Foo & /PassWrapper/);   ??


Nigel

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Sip wishlist item: Parameter typechecking enhancement

2005-07-18 Thread Phil Thompson
On Monday 18 July 2005 5:15 pm, Nigel Stewart wrote:
>  > I'm not clear what it is you are really doing, but you can specify
>  > something similar...
>  > Bar(SIP_PYOBJECT) [(Foo &)];
>  > ...but you still might have to provide %MethodCode.
>
> Phil,
>
> I delved back into the Sip documentation:
>
> method ::= type name ( [argument-list] ) [const]
>  [exceptions] [= 0] [function-annotations] [c++-signature]
>  ; [%MethodCode]
>
> c++-signature ::= [ type ( [argument-list] )]
>
> I can't find any explanation of the c++-signature in
> the documentation, but I'll dig around and see if
> it helps.

The argument-list is the Python signature (ie. how the Python programmer will 
call it). The c++-signature is the real C++ signature. If it is ommitted it 
is assumed to be the same as the Python signature.

> In a nutshell, I want a wrapped constructor to pass
> a wrapped Foo as a PyObject parameter, but I'd prefer
> sip to do the typecheck that PyObject is a Foo, rather
> than trying to deal with it on the C++ side.

How about the GetWrapper annotation?

Phil

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Sip wishlist item: Parameter typechecking enhancement

2005-07-18 Thread Nigel Stewart

> I'm not clear what it is you are really doing, but you can specify
> something similar...
> Bar(SIP_PYOBJECT) [(Foo &)];
> ...but you still might have to provide %MethodCode.

Phil,

I delved back into the Sip documentation:

method ::= type name ( [argument-list] ) [const]
[exceptions] [= 0] [function-annotations] [c++-signature]
; [%MethodCode]

c++-signature ::= [ type ( [argument-list] )]

I can't find any explanation of the c++-signature in
the documentation, but I'll dig around and see if
it helps.

In a nutshell, I want a wrapped constructor to pass
a wrapped Foo as a PyObject parameter, but I'd prefer
sip to do the typecheck that PyObject is a Foo, rather
than trying to deal with it on the C++ side.

Nigel

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] [eric3] file/class browser

2005-07-18 Thread Cedric BRINER
> > > > 1) how can I do to use the ``window>project browser'' on a
> > > > site-package.
> > >
> > > Just use the built in file browser. You can even have it remember the
> > > sqlobject site-package and display it on the top level.
> >
> > great .
> > how do you do that eric remember it ?
> 
> Just use the context menu over the directory you want to remember and select 
> "Add as toplevel directory". Alternatively you may use "New toplevel 
> directory" of the context menu and select it via a directory selection 
> dialog.
ok, I was using eric from sarge which was the 3.6.5 version. I upgraded to the 
3.7.1
and now I sew what you are talking about.

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re[2]: [PyKDE] BlackAdder?

2005-07-18 Thread Wolfgang Keller
Hello,

> so if i buy the BlackAdder business licence i would get BlackAdder +
> PyQt +Qt3 with it?

minus the right to use Qt from C++, yes.

> So  if it is good software or not i could leave BlackAdder alone and
> use  eric+pyqt+qt  to produce closed sourcecode, since i would get a
> nonexpensive qt+pyqt license. Is that correct?

Well, if I pay for BlackAdder, it may be interesting to use it as well...

Sincerely,

Wolfgang Keller

-- 
P.S.: My From-address is correct


___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] branching, PyKDE major versions

2005-07-18 Thread Phil Thompson
> I am curious. I have noticed, or it has been brought to my attention,
> that it it has become a bit unusual that the PyQt source package
> supports all versions of qt, back to 2.3. In the interest of writing
> sip code for qt 4, Is there any particular reason why all qt versions
> are supported in one package? wouldn't it be a good idea to branch
> the project at least at major versions?

PyQt supports all versions of Qt back to 1.44. All versions are supprted
in one package because it's easier for me to do it that way. There was a
time when the code generated by SIP supported all versions of Qt (through
millions of #if's) but that was in the days when I didn't distribute the
.sip files.

> It looks to me like there are enough symantic differences in qt4 that
> now would be a good time to consider such a change. The reason I'm
> bringing this up is that the thought had crossed my mind to help in
> writing some of the sip code for qt4, but having looked at the <=3
> code (size, version compensation, and I'm a little reluctant to. If
> we were looking at schlepping sip code from pyqt3.x to  pyqt4.x, and
> writing appropriate new code, it would look a little more attractive.

However, PyQt4 will be different as it is being written using something
called MetaSIP. This is a GUI tool (written using PyQt of course) that
parses the C++ header files and creates a database of the whole API. It
allows you to enable/disable individual classes/functions of the API,
annotate individual arguments etc, and spits out .sip files. It can also
compare different versions of an API and generate the necessary %If
directives.

I'm not going to bother moving PyQt3 to MetaSIP as Qt 3.x is now very
mature and it's just not worth it. However, I do anticipate that PyQt4,
PyQt5 etc will all be built from the same MetaSIP database.

Phil

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Sip wishlist item: Parameter typechecking enhancement

2005-07-18 Thread Phil Thompson
>
>> Ideally, we would be able to do some kind of annotation
>> that the parameter is Foo, but should be passed to the
>> PyObject version of the constructor:
>>
>> class Bar
>> {
>> public:
>> Bar(Foo & /PyObject/);
>> ...
>> }
>
> Hello all,
>
> In our integration of Python with C++ we're sometimes
> doing python reference counting integrated into our
> native C++ data structures.  Is what we're doing
> relatively unusual, compared to the majority of
> PyQt/sip based applications?

I'm not clear what it is you are really doing, but you can specify
something similar...

Bar(SIP_PYOBJECT) [(Foo &)];

...but you still might have to provide %MethodCode.

Phil

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde