On 2009-05-10 22:11-0400 Hazen Babcock wrote:

> Alan W. Irwin wrote:
>> On 2009-05-10 17:07-0400 Hazen Babcock wrote:
>> 
>> The rewrite should keep in mind that we provide access to the PLplot API
>> from many computer languages _and also_ applications written for specific
>> graphical toolkits such as GTK+, cairo, Qt, PyQt (yes, there is such an
>> independent effort), Tk, and wxWidgets.  To give you some background on
>> this, our examples of such graphical toolkit applications are
>> 
>> examples/c/extXdrawable_demo.c (GTK+ application demonstrating the
>>                    X drawable capability of xcairo)
>> examples/c/ext-cairo-test.c (cairo)
>> examples/c/plplotcanvas_animation.c (deprecated GTK+)
>> examples/c/plplotcanvas_demo.c (deprecated GTK+)
>> examples/c++/qt_example.cpp (Qt)
>> examples/c++/wxPLplotDemo.cpp (wxwidgets)
>> examples/python/prova.py (pyqt)
>
> Interesting. Does "prova.py" work for you? Judging from the import statements 
> it seems to be vintage PyQt3 or earlier.
> I've been using PyQt a lot recently and I've been working on how to use the 
> Qt driver in PyQt without much success. Perhaps there is a SIP expert on the 
> list who might have some ideas about how to proceed?

It's been quite a while since I checked prova.py, but I just tried it now,
and it still works (except for a segfault when you exit).  I assume you will
try it for yourself as well.  When you do that, you will notice it's only a
proof of concept, with a lot of current limitations (difficult to understand
comments since it was written by a native Italian speaker, Hershey fonts,
clumsy management of which python example to run, no paging, etc), and as
you say vintage PyQt code presumably not taking advantage of modern PyQt
capabilities.

Currently, prova.py uses -dev xwin via the plplot.plsdev("xwin") call in the
the qplplot.py module which prova.py imports. I tried changing to
plplot.plsdev("qtwidget").  That still worked, but that plplot.plsdev call
may be bypassed since the fonts were still the ugly looking Hershey fonts.
However, in case qtwidget already is mostly working with prova.py, you might
want to investigate this approach further to see whether the general methods
used in prova.py and qplplot.py give you some hints to allow you access to
the qt device driver from PyQt.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to