How to know when a KoDocument is ready for generatePreview(...)?

Friedrich W. H. Kossebau kossebau at kde.org
Thu Jun 28 22:23:19 BST 2012


Hi,

I am currently restoring the functionality of the Calligra thumbnail generator 
in tools/thumbnail. Works fine on a first look (so I pushed a review request 
in https://git.reviewboard.kde.org/r/105373/ ), but on a closer look there are 
some issues.
E.g. just waiting for the signal completed() is not enough, seems the 
layouting is still under process, so generating at that time the generated 
preview is garbage.

KoDocument has no signal like layoutingDone(). So am I right that I need to 
cast to the individual subclasses? But what would be proper signals for each 
of them?

KWDocument could be done with pageSetupChanged().
KoPADocument?
Calligra::Sheets::Doc with updateView()?
The others?

Or could we introduce a general signal documentLayoutCompleted()? Can there be 
a signal with such a semantics at all for all current Calligra documents?
Would there be other usecases besides creating snapshots of the rendering?

How does the printing code handle this? It would have to wait for the layout 
to be completed as well. Any pointers?

Cheers
Friedrich



More information about the calligra-devel mailing list