enaml + chaco example

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

enaml + chaco example

Greg Shikhman
Hi All,

I'm interested in migrating a small existing application that I have that uses traitsui and chaco to using enaml and chaco. I tried to find some up to date examples of such an integration but the few I found seem to be out of date and incompatible with the current branch of the code. Any suggestions on where I should look or how I should get started on a port?

Thanks,
Greg

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

Re: enaml + chaco example

Mike Sarahan
Hi Greg,

Check out the enable canvas widget:


In my own work, I have run into some odd cases where the plot does not show up (image plots in my case.)  I don't know if Enthought/Chris have addressed these.  I have had some luck in applying constraints to every widget EXCEPT the plot widget in a Window/Container.  Forcing hug height seems to be the most important.

Good luck, and do post back with any issues you encounter.

HTH,
Mike


On Sun, Mar 17, 2013 at 9:18 PM, Greg Shikhman <[hidden email]> wrote:
Hi All,

I'm interested in migrating a small existing application that I have that uses traitsui and chaco to using enaml and chaco. I tried to find some up to date examples of such an integration but the few I found seem to be out of date and incompatible with the current branch of the code. Any suggestions on where I should look or how I should get started on a port?

Thanks,
Greg

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



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

Re: enaml + chaco example

Greg Shikhman
Hi Mike,

Thanks for the quick reply. I must've overlooked that example when I originally checked, it works perfectly! Right now I'm working on making my plot update in real time. My prior code used a wx timer but I want to stick to the qt backend for now. I suppose that I'll have to use the equivalent QT facility (QTimer?) before I start() my instance of QtApplication?

Thanks,
Greg


On Mon, Mar 18, 2013 at 1:12 AM, Mike Sarahan <[hidden email]> wrote:
Hi Greg,

Check out the enable canvas widget:


In my own work, I have run into some odd cases where the plot does not show up (image plots in my case.)  I don't know if Enthought/Chris have addressed these.  I have had some luck in applying constraints to every widget EXCEPT the plot widget in a Window/Container.  Forcing hug height seems to be the most important.

Good luck, and do post back with any issues you encounter.

HTH,
Mike


On Sun, Mar 17, 2013 at 9:18 PM, Greg Shikhman <[hidden email]> wrote:
Hi All,

I'm interested in migrating a small existing application that I have that uses traitsui and chaco to using enaml and chaco. I tried to find some up to date examples of such an integration but the few I found seem to be out of date and incompatible with the current branch of the code. Any suggestions on where I should look or how I should get started on a port?

Thanks,
Greg

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



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



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

Re: enaml + chaco example

Corran Webster
Hi Greg,

you could use a QTimer, but there is a generalized timed callback function in enaml.qt.q_pixmap_transition which may be easier to use.  Under the covers it's just wrapping a QTimer, of course.  I don't know if there is a cross-platform way to specify the platform native timed callback.


On Sun, Mar 17, 2013 at 11:36 PM, Greg Shikhman <[hidden email]> wrote:
Hi Mike,

Thanks for the quick reply. I must've overlooked that example when I originally checked, it works perfectly! Right now I'm working on making my plot update in real time. My prior code used a wx timer but I want to stick to the qt backend for now. I suppose that I'll have to use the equivalent QT facility (QTimer?) before I start() my instance of QtApplication?

Thanks,
Greg


On Mon, Mar 18, 2013 at 1:12 AM, Mike Sarahan <[hidden email]> wrote:
Hi Greg,

Check out the enable canvas widget:


In my own work, I have run into some odd cases where the plot does not show up (image plots in my case.)  I don't know if Enthought/Chris have addressed these.  I have had some luck in applying constraints to every widget EXCEPT the plot widget in a Window/Container.  Forcing hug height seems to be the most important.

Good luck, and do post back with any issues you encounter.

HTH,
Mike


On Sun, Mar 17, 2013 at 9:18 PM, Greg Shikhman <[hidden email]> wrote:
Hi All,

I'm interested in migrating a small existing application that I have that uses traitsui and chaco to using enaml and chaco. I tried to find some up to date examples of such an integration but the few I found seem to be out of date and incompatible with the current branch of the code. Any suggestions on where I should look or how I should get started on a port?

Thanks,
Greg

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



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



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



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

Re: enaml + chaco example

Greg Shikhman
Corran,

It seems that that would actually be a more low-level approach than relying on calling set_data() or request_redraw() on a plot. I'm not sure how that interacts with the QPainter/pixmap stuff in q_pixmap_transition.

Greg


On Mon, Mar 18, 2013 at 2:46 AM, Corran Webster <[hidden email]> wrote:
Hi Greg,

you could use a QTimer, but there is a generalized timed callback function in enaml.qt.q_pixmap_transition which may be easier to use.  Under the covers it's just wrapping a QTimer, of course.  I don't know if there is a cross-platform way to specify the platform native timed callback.


On Sun, Mar 17, 2013 at 11:36 PM, Greg Shikhman <[hidden email]> wrote:
Hi Mike,

Thanks for the quick reply. I must've overlooked that example when I originally checked, it works perfectly! Right now I'm working on making my plot update in real time. My prior code used a wx timer but I want to stick to the qt backend for now. I suppose that I'll have to use the equivalent QT facility (QTimer?) before I start() my instance of QtApplication?

Thanks,
Greg


On Mon, Mar 18, 2013 at 1:12 AM, Mike Sarahan <[hidden email]> wrote:
Hi Greg,

Check out the enable canvas widget:


In my own work, I have run into some odd cases where the plot does not show up (image plots in my case.)  I don't know if Enthought/Chris have addressed these.  I have had some luck in applying constraints to every widget EXCEPT the plot widget in a Window/Container.  Forcing hug height seems to be the most important.

Good luck, and do post back with any issues you encounter.

HTH,
Mike


On Sun, Mar 17, 2013 at 9:18 PM, Greg Shikhman <[hidden email]> wrote:
Hi All,

I'm interested in migrating a small existing application that I have that uses traitsui and chaco to using enaml and chaco. I tried to find some up to date examples of such an integration but the few I found seem to be out of date and incompatible with the current branch of the code. Any suggestions on where I should look or how I should get started on a port?

Thanks,
Greg

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



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



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



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



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

Re: enaml + chaco example

Corran Webster
Hi Greg,

I have to apologise - I'll blame it on the lateness of the hour and general fuzz from catching a red-eye back from PyCon - but I had a brain-fart and copied the wrong module name: it should have been enaml.qt.q_deferred_caller

Sorry for any confusion I may have caused.

-- Corran


On Sun, Mar 17, 2013 at 11:54 PM, Greg Shikhman <[hidden email]> wrote:
Corran,

It seems that that would actually be a more low-level approach than relying on calling set_data() or request_redraw() on a plot. I'm not sure how that interacts with the QPainter/pixmap stuff in q_pixmap_transition.

Greg


On Mon, Mar 18, 2013 at 2:46 AM, Corran Webster <[hidden email]> wrote:
Hi Greg,

you could use a QTimer, but there is a generalized timed callback function in enaml.qt.q_pixmap_transition which may be easier to use.  Under the covers it's just wrapping a QTimer, of course.  I don't know if there is a cross-platform way to specify the platform native timed callback.


On Sun, Mar 17, 2013 at 11:36 PM, Greg Shikhman <[hidden email]> wrote:
Hi Mike,

Thanks for the quick reply. I must've overlooked that example when I originally checked, it works perfectly! Right now I'm working on making my plot update in real time. My prior code used a wx timer but I want to stick to the qt backend for now. I suppose that I'll have to use the equivalent QT facility (QTimer?) before I start() my instance of QtApplication?

Thanks,
Greg


On Mon, Mar 18, 2013 at 1:12 AM, Mike Sarahan <[hidden email]> wrote:
Hi Greg,

Check out the enable canvas widget:


In my own work, I have run into some odd cases where the plot does not show up (image plots in my case.)  I don't know if Enthought/Chris have addressed these.  I have had some luck in applying constraints to every widget EXCEPT the plot widget in a Window/Container.  Forcing hug height seems to be the most important.

Good luck, and do post back with any issues you encounter.

HTH,
Mike


On Sun, Mar 17, 2013 at 9:18 PM, Greg Shikhman <[hidden email]> wrote:
Hi All,

I'm interested in migrating a small existing application that I have that uses traitsui and chaco to using enaml and chaco. I tried to find some up to date examples of such an integration but the few I found seem to be out of date and incompatible with the current branch of the code. Any suggestions on where I should look or how I should get started on a port?

Thanks,
Greg

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



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



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



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



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



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

Re: enaml + chaco example

Chris Colbert
there are toolkit abstracted functions for all of this in the enaml.application module:



On Mon, Mar 18, 2013 at 2:59 PM, Corran Webster <[hidden email]> wrote:
Hi Greg,

I have to apologise - I'll blame it on the lateness of the hour and general fuzz from catching a red-eye back from PyCon - but I had a brain-fart and copied the wrong module name: it should have been enaml.qt.q_deferred_caller

Sorry for any confusion I may have caused.

-- Corran


On Sun, Mar 17, 2013 at 11:54 PM, Greg Shikhman <[hidden email]> wrote:
Corran,

It seems that that would actually be a more low-level approach than relying on calling set_data() or request_redraw() on a plot. I'm not sure how that interacts with the QPainter/pixmap stuff in q_pixmap_transition.

Greg


On Mon, Mar 18, 2013 at 2:46 AM, Corran Webster <[hidden email]> wrote:
Hi Greg,

you could use a QTimer, but there is a generalized timed callback function in enaml.qt.q_pixmap_transition which may be easier to use.  Under the covers it's just wrapping a QTimer, of course.  I don't know if there is a cross-platform way to specify the platform native timed callback.


On Sun, Mar 17, 2013 at 11:36 PM, Greg Shikhman <[hidden email]> wrote:
Hi Mike,

Thanks for the quick reply. I must've overlooked that example when I originally checked, it works perfectly! Right now I'm working on making my plot update in real time. My prior code used a wx timer but I want to stick to the qt backend for now. I suppose that I'll have to use the equivalent QT facility (QTimer?) before I start() my instance of QtApplication?

Thanks,
Greg


On Mon, Mar 18, 2013 at 1:12 AM, Mike Sarahan <[hidden email]> wrote:
Hi Greg,

Check out the enable canvas widget:


In my own work, I have run into some odd cases where the plot does not show up (image plots in my case.)  I don't know if Enthought/Chris have addressed these.  I have had some luck in applying constraints to every widget EXCEPT the plot widget in a Window/Container.  Forcing hug height seems to be the most important.

Good luck, and do post back with any issues you encounter.

HTH,
Mike


On Sun, Mar 17, 2013 at 9:18 PM, Greg Shikhman <[hidden email]> wrote:
Hi All,

I'm interested in migrating a small existing application that I have that uses traitsui and chaco to using enaml and chaco. I tried to find some up to date examples of such an integration but the few I found seem to be out of date and incompatible with the current branch of the code. Any suggestions on where I should look or how I should get started on a port?

Thanks,
Greg

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



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



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



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



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



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



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

Re: enaml + chaco example

Greg Shikhman
OK, that looks like the cleanest interface for it. Thank you.

On Mon, Mar 18, 2013 at 8:28 PM, Chris Colbert <[hidden email]> wrote:
there are toolkit abstracted functions for all of this in the enaml.application module:



On Mon, Mar 18, 2013 at 2:59 PM, Corran Webster <[hidden email]> wrote:
Hi Greg,

I have to apologise - I'll blame it on the lateness of the hour and general fuzz from catching a red-eye back from PyCon - but I had a brain-fart and copied the wrong module name: it should have been enaml.qt.q_deferred_caller

Sorry for any confusion I may have caused.

-- Corran


On Sun, Mar 17, 2013 at 11:54 PM, Greg Shikhman <[hidden email]> wrote:
Corran,

It seems that that would actually be a more low-level approach than relying on calling set_data() or request_redraw() on a plot. I'm not sure how that interacts with the QPainter/pixmap stuff in q_pixmap_transition.

Greg


On Mon, Mar 18, 2013 at 2:46 AM, Corran Webster <[hidden email]> wrote:
Hi Greg,

you could use a QTimer, but there is a generalized timed callback function in enaml.qt.q_pixmap_transition which may be easier to use.  Under the covers it's just wrapping a QTimer, of course.  I don't know if there is a cross-platform way to specify the platform native timed callback.


On Sun, Mar 17, 2013 at 11:36 PM, Greg Shikhman <[hidden email]> wrote:
Hi Mike,

Thanks for the quick reply. I must've overlooked that example when I originally checked, it works perfectly! Right now I'm working on making my plot update in real time. My prior code used a wx timer but I want to stick to the qt backend for now. I suppose that I'll have to use the equivalent QT facility (QTimer?) before I start() my instance of QtApplication?

Thanks,
Greg


On Mon, Mar 18, 2013 at 1:12 AM, Mike Sarahan <[hidden email]> wrote:
Hi Greg,

Check out the enable canvas widget:


In my own work, I have run into some odd cases where the plot does not show up (image plots in my case.)  I don't know if Enthought/Chris have addressed these.  I have had some luck in applying constraints to every widget EXCEPT the plot widget in a Window/Container.  Forcing hug height seems to be the most important.

Good luck, and do post back with any issues you encounter.

HTH,
Mike


On Sun, Mar 17, 2013 at 9:18 PM, Greg Shikhman <[hidden email]> wrote:
Hi All,

I'm interested in migrating a small existing application that I have that uses traitsui and chaco to using enaml and chaco. I tried to find some up to date examples of such an integration but the few I found seem to be out of date and incompatible with the current branch of the code. Any suggestions on where I should look or how I should get started on a port?

Thanks,
Greg

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



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



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



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



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



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



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



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