Re: [pksampler-devel] CLAM and PK widgets
Status: Beta
Brought to you by:
patrickkidd
From: David <dg...@iu...> - 2007-04-12 01:49:02
|
On Dijous 12 Abril 2007, Patrick Stinson wrote: > Are you working on a project written in python?=20 No, it is C++. Although we want to provide bindings soon. > If so, I would suggest=20 > that you keep as much code in python as possible! Yes, i understand why. Now i have to take a look at the features you added= =20 since the original port i did in 2004. Afortunatelly, C++ code is nearly as= =20 tiny and simple as Python code. Any way i just need being able to load the plugin, and just rely on the=20 AbstractButton and AbstractSlider interface, so i would like to check if i= =20 the new announced PyQt feature (python designer plugins) really works. > I developed an interesting way to do this in designer in C++. It is > kind of complicated, though. > > I have a basic subclass for each standard widget like knob and button. > They all have myStyle, myObject, and myValue (not the real names - the > real names have our code name in them), string properties declared > with Q_PROPERTY. When a plugin widget is loaded, the host wrapper > checks all children with QWidget::findChildren() that have the myStyle > property, and creates the appropriate style and sets it on the widget. > It took me a while to write the styles, but know that I know the > proper enums and virtual functions (hint: read qwindowsstyle.cpp and > qcommonstyle.cpp for QWidget subclass usage, in that order) it's > rpetty easy to write a style. > > PyQt doesn't support QStyle subclasses because of a casting problem - > that's why I wrote my simple custom classes. My classes expect the > pixmaps to be in a certain format (not so unreasonable), and the > subclasses are all centered around a pythonic way to set a pixmap path > on a widget easily. I don't know how this integrates into your > project. > > What are your requirements for your widgets? do you just want to > display pixmaps widgets from a designer form?=20 Well, i think that the current approach we are taking is more suited for ou= r=20 purposes. Just a property with the base name for the pixmap. Our project is= a=20 prototyping tool, as i told you. We want to allow a maximum flexibility=20 without programming. A user can build his own interface and bind it to a=20 processing core which is also constructed by another visual tool, the=20 NetworkEditor. Check the newer development snapshots. They have been=20 assembled using pixmap widgets from the designer plugin. http://clam.iua.upf.edu/wikis/clam/index.php/Development_screenshots =46or the pixmap widgets i would like to have a fast way they can change th= e=20 image without compilation, that's why i made it a property. In fact, I don't like my current property implementation. I would like a=20 pixmap property so you can use the resource dialog, but then i don't know h= ow=20 to get the file name from the pixmap in order to extrapolate the other name= s.=20 I also would like to provide some default implementations classes not=20 requiring to setup any property. But definitely this approach is more=20 flexible than building a QStyle. I would like also that our users could have your povray based widget=20 construction kit available on a handy place. So that they can generate new= =20 widgets easily. I have to talk more to you about that. I am not a povray=20 expert. Also debian and your programs' dependencies are in some kind of=20 trouble. Which ditribution are you programming on? > You can do whatever you=20 > want with my code, just leave a reference somewhere that says you > learned something from me so I can get hired again when I quit my > current job. Of course. Thanks. And when you need to be hired, feel free to refer our=20 project as a success history for your developments. Definitely, we are goin= g=20 to use it a lot. :-) > On 4/11/07, David Garc=EDa Garz=F3n <dg...@iu...> wrote: > > Hi, patrick and any one on the list. > > > > I am working on a C++ designer plugin version of pk widgets to integrate > > them with CLAM audio application prototyping framework. The framework > > allows you to visually build audio applications by prototyping the audio > > core with a patch tool and the interface with Qt Designer. > > > > I just ported some of the pkwidgets: a generic button and a generic > > slider. Both offer properties to base pixmap from the designer interfac= e. > > [2] They really look nice!! > > > > I am open to any collaboration, to split the widgets from CLAM as an > > independent library or check the new PyQt4 method to build plugins in > > python (published today!). I know we also share some interests on VST/Qt > > integration so drop us a line. > > > > > > -- > > David Garc=EDa Garz=F3n > > (Work) dgarcia at iua dot upf anotherdot es > > (Home) vokimon at telefonica adot net > > http://www.iua.upf.edu/~dgarcia > > > > -----------------------------------------------------------------------= =2D- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > > your opinions on IT & business topics through brief surveys-and earn ca= sh > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID= =3DDEVDEV > > _______________________________________________ > > pksampler-devel mailing list > > pks...@li... > > https://lists.sourceforge.net/lists/listinfo/pksampler-devel =2D-=20 David Garc=EDa Garz=F3n (Work) dgarcia at iua dot upf anotherdot es (Home) vokimon at telefonica adot net http://www.iua.upf.edu/~dgarcia |