Sonntag, 2. August 2009

GSOC [KFormula shape] update

Wow almost 2 months went by without me blogging. So it is urgent time for a status update of my GSOC work. In contrast to blogging I luckily didn't stop coding. So what has been done:
  • working keyboard and mouse navigation
  • inserting stuff from the keyboard
  • inserting symbols and templates from the docker
  • Undo and Redo
Especially implementing the Undo mechanism took me a while and some sleepless nights, because there is a strict separation of the flake part (which is responsible for embedding the formula shape in KOffice and event handling) and the back end part, which will hopefully become a independent MathML library one day (well it actually is code wise right now, but the kformula shape is the only user atm). Since the editing is done in the back end, we need some way to inform the shape and the tool, that its content has changed, we can't rely on the tool being still around when doing undo, ...

I solved this by letting each editing command return an QUndoCommand which is then passed to the tool in KOffice which wraps it in another QUndoCommand that is responsible for calling the first one and then calling update on the shape and tool. Works quite well.

Next things on my list include some refactoring of the movement code and finishing it for the missing elements. Changing some internals that make inserting and removing stuff a lot easier and finally maybe copy and paste.

So the KFormula shape is now able to create this formula.



1 Kommentar:

  1. Nice work on the formula shape! This is very useful for a lot of ppl :D

    AntwortenLöschen