On Tue, Aug 6, 2013 at 8:30 AM, Terry Brown <[email protected]> wrote:

If we had a rich text editing widget, be it native PyQt or embedded web
> browser, the most obvious GUI integration would be a QStackedWidget
> http://qt-project.org/doc/qt-4.8/qstackedwidget.html with the existing
> body pane editor, you could just swap between them.


Using QStackedWidget does appear to solve the problem of wasted screen real
estate, provided that the widget (QComboBox or QListWidget) that switches
between views is in the icon area.



> You'd probably run
>  
> in to the same issues that hamper using free-layout to manage multiple
>  
> body editors, i.e. that Leo's body text editor is somewhat of a
> singleton widget, multi-pane body editing not withstanding.
>

Yes.



> Of course
>  
> for prototyping you could always use a separate window / pane, even if
>  
> that would be rejected as a final solution ;-)
>

Yes.

Hmm.  It does look like there is a way forward.  Just create a plugin that
adds a widget to the icon area indicating whether the body pane is a plain
or rich.  This solves several problems:

1. No need for global settings.  Just enable the plugin, or not.

2. No wasted real estate when not using rich text.

3. No need for per-node conventions.  The widget in the icon area suffices.

4. No need to change Leo's core.  The plugin will have to replace Leo's
body pane with a QStackedWidget.  It won't be fun, but it should be doable.

5. No need to worry about the exact widget to be used.  The plugin's author
is responsible for doing all the work.

Having said this, I am not interested in writing the plugin ;-)  My
priority right now, believe it or not, is to get Leo 4.11 a1 out the door.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to