qtGui.py is becoming too large.  It's time for a rethink.  

The original idea was that to write a new qui, one would write a single 
file, say plugins/newGui.py.  But there is no particular reason to put all 
the gui code in just one file.  A set of files seems more reasonable.  In 
fact, there already are multiple files:

- plugins/baseNativeTree.py
- plugins/free_layout.py
- plugins/nested_splitter.py
- plugins/qtframecommands.py
- plugins/qtGui.py

And hah, qsyntaxhighlighter.py.  This will be removed immediately:  it is 
an out-of-date version of the PQSH code now in leoColorizer.py.

The new organization will use something like the following files:

- qt_gui.py: will contain the LeoQtGui class.
- qt_text.py: will contain classes presently in  << define text widget 
classes >> in qtGui.py
- qt_tree.py: will contain the LeoQTreeWidget, LeoQtTree class.
  It may also contain the BaseNativeTreeWidget class now in 
baseNativeTree.py.
- qt_log.py: will contain the LeoQtLog class, and maybe other classes.
- qt_frame.py: will contain most other classes now found in qtGui.py.

Note: pep 8 says: " Underscores can be used in the module name if it 
improves readability."  Here, it certainly does.

Note: leoColorizer.py intermixes base colorizing classes with 
LeoQtSyntaxHighlighter, which is essentially Qt code.  But in this case, it 
would be inconvenient to put this class in, say, qt_colorizer.py, so I 
haven't ;-)

Here are the advantages of this scheme:

- It's a more natural organization: each file pertains to a single topic.
- Each file will have only the imports that pertain to that file.  This 
turns out to be a useful aid to understanding.
- It's easier to run pylint on smaller files.

Your comments, please. I'll wait for for at least a day to hear your 
comments before doing any of this.

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/d/optout.

Reply via email to