How to open external document to a second canvas in a docker?

Yue Liu yue.liu at mail.com
Sat Oct 13 02:42:37 BST 2012


Hi,

Currently for flow stencil box each shape in a stencil is an ODG file.
It's not convenient for designers to create stencils, and it's
difficult to display object not in a rectanglar shape. So I'm thinking
of using one ODG file to represent the whole stencil, and display it
in a canvas so user will see the whole stencil as exactly what the ODG
document looks like.

This way has following advantages:

 - Designers can work in a single ODG document.
 - Object with special shape, such as long curve lines, can be shown
in the docker clearer.
 - Designers can organize object positions in creative ways to make
stencil better understood by users, for example, if object is arranged
like a real use case, users will understand where to use what stencil
shape better.

But to implement this, I have to show a canvas and external document
in a docker, I'm not sure how to do it right. My idea is:

 - class StencilDocument inherited from KoOdfDocument and
KoShapeBasedDocumentBase
 - class StencilCanvas inherited from KoCanvasBase
 - put StencilCanvas in the docker, load StencilDocument to the canvas
 - user drag shapes from the docker and drop to the application main canvas

Is this practical? If not, what would be a practical way of doing
this? If it's totally wrong to do this, what do you think is a better
solution for stencil box docker?

Thanks,
Yue Liu



More information about the calligra-devel mailing list