Calligra/Making libs independent of QWidget

From KDE Community Wiki
Revision as of 14:57, 16 November 2011 by Shaan7 (talk | contribs) (Create the page and fill with info from BoF)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Problem

Right now some parts of the Calligra libs are dependent on QWidget and its subclasses, making it difficult to use in UIs which don't use QWidget. An example can be a QML based UI.

Places where this dependency is present

  • Shape
  • Tool/ConfigWidget - A tool uses a configwidget which is a QWidget which finally sits in a dock

Possible solution

  • Separate Shape and Tool, make Tool independent of QWidget and let it contain only logic. A platform specific Tool then inherits the Abstract Tool to provide UI to the Tool on that platform.
  • In separating Shape and Tool, let Shape expose some Actions which the Tool can use to interact with it.
  • In the long run, we would also want something like the following-
calligra
        /engine
               /words
               /stage
                ....
        /ui
               /active
               /desktop