Jump to content

Calligra/Calligra Mobile/How To Calligra QML

From KDE Community Wiki
Revision as of 16:07, 2 April 2011 by Shaan7 (talk | contribs) (First edit, tells the reader what stuff is needed to be done for QML UI for Calligra)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page logs the difficulties we had while implementing Calligra with QML

Canvas Controller

A canvas controller is what handles the viewing, scrolling, zooming etc for a document canvas. The document rendering is done by a canvas item.

  • We first got to create a new canvas controller that derives from KoCanvasController and QDeclarativeItem (in case of QML)
  • reimplement setCanvas
  • add a openDocument or similar slot which can be then called from QML to open a document

Problems

  • CanvasItem displays a viewport of the document, not the whole document (so you should *not* tell the canvasItem to display 200 pages at once. So we cannot use it on a scroll area of a QML Flickable element. So we have to do scrolling ourselves :(