[PyQt] Extending qtproxies for KDE widgets

2011-07-13 Thread Luca Beltrame
Hello, I'm currently mentoring a season of KDE student to improve KDE's UI compiler (pykdeuic4). Currently pykdeuic4[1] monkey patches a compile filter into PyQt's UI compiler and overrides some of qtproxies's string functions to replace tr() calls with KDE's i18n() functions. This approach

Re: [PyQt] Possible bug in SIP

2011-07-13 Thread Tony Lynch
I can work around the issue here by either (1) redeclaring in sip all base class 'virtual' methods in all the derived classes That's not a work around - that's what you are supposed to do, ie. tell SIP about all the implementations. Ah - ok, I've been looking at the sip qt wrappings as

[PyQt] observing attributes in dip

2011-07-13 Thread Lic . José M . Rodriguez Bacallao
why this doesn't work? - i_widget.py - # dip imports from dip.model import Str, Instance # PyQt4 imports from PyQt4 import QtGui # imagis imports from i_action_container import IActionContainer class IWidget(IActionContainer): # the identifier of the widget id = Str()

Re: [PyQt] Extending qtproxies for KDE widgets

2011-07-13 Thread Phil Thompson
On Wed, 13 Jul 2011 16:29:11 +0200, Luca Beltrame ei...@heavensinferno.net wrote: Hello, I'm currently mentoring a season of KDE student to improve KDE's UI compiler (pykdeuic4). Currently pykdeuic4[1] monkey patches a compile filter into PyQt's UI compiler and overrides some of

[PyQt] properties and interfaces with dip 0.3

2011-07-13 Thread Lic . José M . Rodriguez Bacallao
hi folks, may be this is an fool question but, how to implement properties with interface attributes, for example, this doesn't work: class SomeObject(object): def __init__(self, id): self.id = id class ISomething(Interface): id = Str() class Somthing(Interface): _internal

Re: [PyQt] properties and interfaces with dip 0.3

2011-07-13 Thread Phil Thompson
On Wed, 13 Jul 2011 12:09:37 -0400, Lic. José M. Rodriguez Bacallao jmr...@gmail.com wrote: hi folks, may be this is an fool question but, how to implement properties with interface attributes, for example, this doesn't work: class SomeObject(object): def __init__(self, id):

Re: [PyQt] properties and interfaces with dip 0.3

2011-07-13 Thread Lic . José M . Rodriguez Bacallao
yes, I know I can't think in interfaces like base classes but, as I read in documentation that attributes are automatically added to te concrete implementation of the interface, well, look at this sample: class ITest(Interface): id = Str() @implements(ITest) class Test(Model):

Re: [PyQt] properties and interfaces with dip 0.3

2011-07-13 Thread Phil Thompson
On Wed, 13 Jul 2011 13:53:57 -0400, Lic. José M. Rodriguez Bacallao jmr...@gmail.com wrote: yes, I know I can't think in interfaces like base classes but, as I read in documentation that attributes are automatically added to te concrete implementation of the interface, well, look at this

Re: [PyQt] observing attributes in dip

2011-07-13 Thread Phil Thompson
On Wed, 13 Jul 2011 11:32:11 -0400, Lic. José M. Rodriguez Bacallao jmr...@gmail.com wrote: why this doesn't work? - i_widget.py - # dip imports from dip.model import Str, Instance # PyQt4 imports from PyQt4 import QtGui # imagis imports from i_action_container

Re: [PyQt] properties and interfaces with dip 0.3

2011-07-13 Thread Lic . José M . Rodriguez Bacallao
ok, I see now, a couple of questions: 1- and how to use observe function as a decorator 2- there is any way that the observer/setter method of a property be called when setting the initial value On Wed, Jul 13, 2011 at 2:24 PM, Phil Thompson p...@riverbankcomputing.com wrote: On Wed, 13 Jul 2011

Re: [PyQt] properties and interfaces with dip 0.3

2011-07-13 Thread Phil Thompson
On Wed, 13 Jul 2011 14:56:52 -0400, Lic. José M. Rodriguez Bacallao jmr...@gmail.com wrote: ok, I see now, a couple of questions: 1- and how to use observe function as a decorator @observe('id') def on_change(self, change): Note that you don't have to use 'ITest.id'. This is because

Re: [PyQt] properties and interfaces with dip 0.3

2011-07-13 Thread Lic . José M . Rodriguez Bacallao
in this example: class ITest(Interface): id = Str() @implements(ITest) class Test(Model): @ITest.id.getter def id(self): return 'getting id' @ITest.id.setter def id(self, v): print 'setting id' @observe('id') def on_change(self, change):

Re: [PyQt] properties and interfaces with dip 0.3

2011-07-13 Thread Phil Thompson
On Wed, 13 Jul 2011 15:17:48 -0400, Lic. José M. Rodriguez Bacallao jmr...@gmail.com wrote: in this example: class ITest(Interface): id = Str() @implements(ITest) class Test(Model): @ITest.id.getter def id(self): return 'getting id' @ITest.id.setter

Re: [PyQt] properties and interfaces with dip 0.3

2011-07-13 Thread Lic . José M . Rodriguez Bacallao
must the getter method is supposed to be called no, is a getter!!! On Wed, Jul 13, 2011 at 3:49 PM, Phil Thompson p...@riverbankcomputing.com wrote: On Wed, 13 Jul 2011 15:17:48 -0400, Lic. José M. Rodriguez Bacallao jmr...@gmail.com wrote: in this example: class ITest(Interface):     id =

[PyQt] Moving PyQt programs to Python 3

2011-07-13 Thread Algis Kabaila
1. Is it possible to detect which Python version PyQt has been built/compiled? Just as the version of PyQt can be seen from PYQT_VERSION_STR and Qt from QT_VERSION_STR, it would be handy to be able to see version of Python (perhaps it is possible :) 2. I do not know if it is intended to

[PyQt] SIP error -Incorrect number of arguments to python slot

2011-07-13 Thread Vivek Narvekar
Hi all, I am trying to upgrade from SIP3.3 to SIP 4.7.9. I am stuck at one location (in one of the SIP file) where it gives error as - Incorrect number of arguments to python slot What could be the possible reason for this ? Any help would be greatly appreciated. Thank You