Difference between revisions of "Refactoring Ideas"
From Avogadro - Free cross-platform molecule editor
(→Modularization of libavogadro) |
(→Modularization of libavogadro) |
||
Line 23: | Line 23: | ||
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) | 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) | ||
+ | |||
+ | For compatibility with previous versions, dummy libavogadro library linked to all components could be provided | ||
* '''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. |
Revision as of 06:55, 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)
For compatibility with previous versions, dummy libavogadro library linked to all components could be provided
- 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 IDList Mesh MeshGenerator Molecule MoleculeFile NeighborList (?) Primitive PrimitiveList Protein (?) Residue ZMatrix
- AvogadroWidget - rendering of molecules in external apps (including Avogadro). Probably engines also go here
Animation Camera Color3f ColorButton (?) Cylinder_p GLHit GLPainter_p GLWidget Navigate Painter PainterDevice UndoSequence Color Engine Extension DockExtension Tool ToolGroup
- AvogadroPython - Everything Python-related
pythonengine pythonerror pythonextension_p pythoninterpreter pythonscript pythonthread_p pythontool_p
- QPeriodicTable
ElementDetail ElementItem PeriodicTableScene PeriodicTableView
- QPlotWidget
plotaxis plotobject plotpoint plotwidget