Difference between revisions of "Refactoring Ideas"

From Avogadro - Free cross-platform molecule editor
Jump to: navigation, search
Line 25: Line 25:
  
 
* AvogadroCore - generic classes which could be used even by terminal applications to simplify access to OB and make some advanced operations with molecules.
 
* AvogadroCore - generic classes which could be used even by terminal applications to simplify access to OB and make some advanced operations with molecules.
<pre>Atom
+
<big><pre>Atom
 
Bond
 
Bond
 
Cube
 
Cube
Line 37: Line 37:
 
Residue
 
Residue
 
ZMatrix  
 
ZMatrix  
</pre>
+
</pre></big>
  
 
* AvogadroWidget
 
* AvogadroWidget
 
+
<big><pre></pre></big>
* AvogadroPython
+
* AvogadroPython - Everything Python-related
<pre>
+
<big><pre>
Everything Python-related</pre>
+
pythonengine
 +
pythonerror
 +
pythonextension_p
 +
pythoninterpreter
 +
pythonscript
 +
pythonthread_p
 +
pythontool_p
 +
</pre></big>
  
 
* QPeriodicTable (not sure - color mapping transfer is needed)
 
* QPeriodicTable (not sure - color mapping transfer is needed)

Revision as of 05:41, 27 March 2010

This page contains some ideas about future refactorization of libavogadro. They may seriously break ABI (and possibly API), and should be discussed

Rendering Widget

  • Make libavogadro use abstract RenderWidget instead of GLWidget
  • Inherit GLWidget from RenderWidget and QGLWidget, move GL-independent functionality (e.g., plugin access) up to RenderWidget
  • Remove any OpenGL calls from engines, replace them by new methods of PainterDevice
  • Add minimalistic SimpleRenderWidget without OpenGL (to create images for publication, b/w images, for use on old/heavy loaded PCs, etc)
  • Create separate GLWidgets for OpenGL2, 3, 4, etc (?)
  • "On-line" POV-Ray rendering for aesthetes (???)

PlotWidget

  • Make it stronger and used by 3rd party developers - I think there are some projects interested in easy Qt way to do it without linking to KDE
  • Rename it to QPlotWidget and publish as independent library - may be some contributors will appear
  • KPlotWidget is LGPL, so we can change its license to LGPL
  • Try to merge KPlotWidget with QPlotWIdget
    • KPlotWidget didn't evolve a lot from time it was forked for Avogadro
    • so it could be simple KDE wrapper for QPlotWidget library and some KDE-specific features
    • [crazy idea] We can try to push QPlotWidget in QtGui, and KDE folks will do all work theirselves :)

Modularization of libavogadro

Libavogadro is too big (~22 Mb on Linux), and contains a lot of APIs for different purposes. I propose to separate it to modules (as Qt did when moving to Qt4)

  • AvogadroCore - generic classes which could be used even by terminal applications to simplify access to OB and make some advanced operations with molecules.
Atom
Bond
Cube
Fragment
Mesh
Molecule
MoleculeFile
Primitive
PrimitiveList
Protein (?)
Residue
ZMatrix 
  • AvogadroWidget
  • AvogadroPython - Everything Python-related
pythonengine
pythonerror
pythonextension_p
pythoninterpreter
pythonscript
pythonthread_p
 pythontool_p
  • QPeriodicTable (not sure - color mapping transfer is needed)
  • QPlotWidget