From: Pierre R. <pie...@gm...> - 2012-03-19 21:08:39
|
Hi all, Is anyone interested in including the Matplotlib QtDesigner plugin which I wrote for Python(x,y)? The code is quite simple and hasn't evolved for a while now (3 years) but apparently it is still appreciated by users even outside Python(x,y). Here are the two files which are necessary to make this plugin work: http://code.google.com/p/pythonxy/source/browse/src/python/matplotlib/QtDesigner_Plugins/matplotlibwidget.py http://code.google.com/p/pythonxy/source/browse/src/python/matplotlib/QtDesigner_Plugins/PyQt4/plugins/designer/python/matplotlibplugin.py The directory struture also has its importance: http://code.google.com/p/pythonxy/source/browse/#hg%2Fsrc%2Fpython%2Fmatplotlib%2FQtDesigner_Plugins Cheers, Pierre ---------- Message transféré ---------- De : todd rme <tod...@gm...> Date : 11 mars 2012 12:14 Objet : [python(x,y)] Upstream Matplotlib Qt Designer Plugin À : "python(x,y)" <pyt...@go...> I notice that python(x,y) has a matplotlib plugin for Qt Designer. I think this would be very helpful for general users of matplotlib outside of python(x,y). Is there any possibility of submitting this plugin upstream for inclusion with the official matplotlib release? That way people who aren't using python(x,y) (for instance Linux users who are using their official distribution python packages) could benefit from the plugin as well. Thank you very much. -Todd -- You received this message because you are subscribed to the Google Groups "python(x,y)" group. To post to this group, send email to pyt...@go.... To unsubscribe from this group, send email to pyt...@go.... For more options, visit this group at http://groups.google.com/group/pythonxy?hl=en. |
From: todd r. <tod...@gm...> - 2012-03-23 10:11:30
|
I've included this in openSUSE's matplotlib packages, it seems to work great. -Todd On Mon, Mar 19, 2012 at 10:08 PM, Pierre Raybaut <pie...@gm...> wrote: > Hi all, > > Is anyone interested in including the Matplotlib QtDesigner plugin > which I wrote for Python(x,y)? > > The code is quite simple and hasn't evolved for a while now (3 years) > but apparently it is still appreciated by users even outside > Python(x,y). > > Here are the two files which are necessary to make this plugin work: > http://code.google.com/p/pythonxy/source/browse/src/python/matplotlib/QtDesigner_Plugins/matplotlibwidget.py > http://code.google.com/p/pythonxy/source/browse/src/python/matplotlib/QtDesigner_Plugins/PyQt4/plugins/designer/python/matplotlibplugin.py > > The directory struture also has its importance: > http://code.google.com/p/pythonxy/source/browse/#hg%2Fsrc%2Fpython%2Fmatplotlib%2FQtDesigner_Plugins > > Cheers, > Pierre > > ---------- Message transféré ---------- > De : todd rme <tod...@gm...> > Date : 11 mars 2012 12:14 > Objet : [python(x,y)] Upstream Matplotlib Qt Designer Plugin > À : "python(x,y)" <pyt...@go...> > > > I notice that python(x,y) has a matplotlib plugin for Qt Designer. I > think this would be very helpful for general users of matplotlib > outside of python(x,y). Is there any possibility of submitting this > plugin upstream for inclusion with the official matplotlib release? > That way people who aren't using python(x,y) (for instance Linux users > who are using their official distribution python packages) could > benefit from the plugin as well. Thank you very much. > > -Todd > > -- > You received this message because you are subscribed to the Google > Groups "python(x,y)" group. > To post to this group, send email to pyt...@go.... > To unsubscribe from this group, send email to > pyt...@go.... > For more options, visit this group at > http://groups.google.com/group/pythonxy?hl=en. |
From: todd r. <tod...@gm...> - 2012-03-25 10:42:45
|
On Mon, Mar 19, 2012 at 10:08 PM, Pierre Raybaut <pie...@gm...> wrote: > Hi all, > > Is anyone interested in including the Matplotlib QtDesigner plugin > which I wrote for Python(x,y)? > > The code is quite simple and hasn't evolved for a while now (3 years) > but apparently it is still appreciated by users even outside > Python(x,y). > > Here are the two files which are necessary to make this plugin work: > http://code.google.com/p/pythonxy/source/browse/src/python/matplotlib/QtDesigner_Plugins/matplotlibwidget.py > http://code.google.com/p/pythonxy/source/browse/src/python/matplotlib/QtDesigner_Plugins/PyQt4/plugins/designer/python/matplotlibplugin.py > > The directory struture also has its importance: > http://code.google.com/p/pythonxy/source/browse/#hg%2Fsrc%2Fpython%2Fmatplotlib%2FQtDesigner_Plugins > > Cheers, > Pierre I have been looking at the matplotlib widget code. It is very helpful for putting a widget inside PyQt4 windows. However, it is lacking any signals and slots to let you easily connect other Qt4 widgets with the matplotlib one. Particularly in Qt Designer, using signals and slots to connect widgets together is very convenient. I am willing to implement signals and slots, but I need some advice on the best approach. So far I see three different approaches that may work: 1. The simplest is just to manually add slots for common commands in the widget. I would also probably add some signals for things like mouse clicks. However, this requires manually creating the signals and slots, and will break if matplotlib changes any of its api. I would also need to decide whether to use the matplotlib function naming rules or the Qt4 ones (or both, since I can give the same signal multiple names). 2. Integrate the signals and slots directly into matplotlib. This would probably involve somehow having matplotlib functions exposed as signals and/or slots, probably somewhere in the PyQt4/pyside backend. It would probably entail separating the PyQt4/pyside backend into a PyQt4/pyside widget and a PyQt4/pyside window that contains that widget. All the interaction between settings, buttons, etc would use signals and slots internally. Users could then use the widget in other contexts besides the window, and use the same signals and slots the window uses. This would also eliminate the need for a separate widget to be used for Qt Designer. It would still require manually specifying the signals and slots. I haven't looked in much detail, but this is probably not that much more difficult than 1. 3. Make PyQt4 backend use widgets for everything. Each object would have all of its functions exposed as signals and slots, and all would be usable in Qt Designer. If I understand it correctly, the PyQt4 backend uses Agg for the actual painting, so this would require implementing an entire new backend, so is probably not a good choice initially. Either approach would be |