Hi I have been experimenting with QDesigner and loading selectable dynamic user interfaces.
It turns out that it's very easy indeed. As a demo I have done a find- form similar to the leo find tab. Different versions and multiple copies can exist providing there is a good underlying data model. Different versions could be selected using an @setting for each ui component, including the main window. The demo is available as two files findform.py and FindForm.ui at http://leo.leo_hag.mailas.com/ The .ui goes in the leo\plugins directory, and the py file is to be copied into the body of a node, of a qt enabled leo, and run as a script. The demo loads five copies of itself and a change in one is reflected in all the others. I do this by using leo hooks. When a check box is clicked or text typed a hook is called to notify of a change, the controller will respond by calling another hook with the new current state of the save flags/text, widgets register with this hook if they want to track changes. This allows complete decoupling of the gui from the core. It does not matter even if a gui exists or not. I think this is a good model to use for this type of interface. I have attempted to hook this into the leo core, but I am having a little trouble sorting it out at the moment. The text widgets in the leo find pane seem to work well enough, but not the checkboxes.(I haven't wrapped the text widgets yet but that should be easy enough). If you think this approach is worthwhile I will finish it off and also do a spell check panel. I have abandoned my tree efforts, I guess you all know best, I'll look at Edwards post though and see if I can offer any insights gained from my recent experiments. -- hag --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
