enable.qt4.image : event handling

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

enable.qt4.image : event handling

Barth
Dear all,

Based on chaco, we have developped a plotting library for data analysis routines. 
Each plot is contained in a figure class, whose __init__ is shown below: 

from enthought.enable.qt4.image import Window
from enthought.chaco.toolbar_plot import ToolbarPlot

class Figure(QtGui.QWidget)


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

enable.qt4.image : event handling

Barth
Based on chaco, we have developped a plotting library for data analysis routines. 
Each plot is contained in a figure class, whose __init__ is shown schameatically below: 

from enthought.enable.qt4.image import Window
from enthought.chaco.toolbar_plot import ToolbarPlot

self.plot=ToolbarPlot()
conainer=HPlotContainer()
container.add(self.plot)

window=Window(self,-1,component=self.container)

I have made another window that allows to manipulate dynamically the padding of self.plot, to ensure that axis ticks and titles are well within the window. 
When i change them, i force a redraw of the plot 

self.plot.request_redraw()
self.container.request_redraw()

But this does not update the padding in the figure. If i want the change to be visible, i need to manually resize the figure window, and in that case, the padding get right. 

I guess in that case that i should run a self.window.paintEvent(event), but i do not know how to launch such an event from the program, and not by user manipulation. 

Can anyone help ? 




_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev