How to open external document to a second canvas in a docker?
Inge Wallin
inge at lysator.liu.se
Sat Oct 13 07:34:53 BST 2012
On Saturday, October 13, 2012 03:42:37 Yue Liu wrote:
> Hi,
>
> [deleted]
>
> 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?
Although I'm not aware of the details to give a definite answer, it *looks*
like it could work. Another way would be to have an off-screen canvas, paint
the stencil into a QImage, thereby creating a cache and then show only the
image in the docker. If nothing else it would speed up the repainting a lot.
Also: If you have every stencil as one document, won't the loading time for
the full stencil set be very long? One reason why you would have a whole
stencil set in one file is that it makes loading and therefore the startup
time of the application faster.
Finally, how will a stencil set be grouped? Will it be one file per stencil,
one directory per set?
-Inge
> Thanks,
> Yue Liu
> _______________________________________________
> calligra-devel mailing list
> calligra-devel at kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel
More information about the calligra-devel
mailing list