On Thu, Aug 9, 2018 at 7:57 AM, vitalije <vitali...@gmail.com> wrote:

What I meant is that it can help to calculate the top_position.
>

Yes.  This is a surprisingly interesting and subtle task.  There are
important, design choices involved. Most users will be only subliminally
aware of those choices.

For example, a quick experiment shows that Leo never scrolls the outline
pane when expanding or contracting nodes, even if contracting a node leaves
blank area in the outline pane.

> An advantage of using
> QGraphicsScene and its items is that you can draw tree starting at any
> given node.
>

I don't want to give up the convenience of QTreeWidget, but you remind us
all that Qt has some heavyweight drawing capabilities.  Many of us were
excited by Joe Orr's demos.

Another quick experiment shows that Terry's Easter Egg interface does not,
at present, support any graphics pane.  Leo should support such a thing,
together with python bindings for drawing. These bindings probably come for
free with pyqt.

> I have bad memories about QTreeWidget
>

The code in qt_tree.py is not pretty, but in this case only
qtree.full_redraw will change, so I don't expect any real complications.


> p.moveToVisNext is pretty slow, but not slow enough to be dangerous.
>> Trying to optimize it might require a lot of code when expanding and
>> contracting a node.
>>
>
> They are fast enough to draw once the drawing starts, but they take their
> time while skipping invisible nodes (nodes that would be visible in large
> enough screen).
>

I agree.  We'll have to see what the measurements say when the new code is
complete.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to