[Okular-devel] Which class is responsible for placing 'Document' pages onscreen?
Albert Astals Cid
aacid at kde.org
Wed Nov 16 11:16:08 UTC 2011
A Dimarts, 15 de novembre de 2011, Stephen Anthony vàreu escriure:
> I've been looking over the codebase for the past few hours, but I can't
> seem to find which class is responsible for this. A little explanation
> first:
>
> I'm trying to implement the oft-requested feature of no spacing between
> facing pages, to more accurately emulate the behaviour of reading a book
> or magazine.
Cool :-)
>
> Anyway, I thought I found the code several times, but each time it seems
> that the class I'm considering isn't being used. It seems that large
> parts of the codebase are dead code (or at least I couldn't figure out how
> they are ever used).
That's not true, i doubt we have any considerable amount (>0.1%) of dead code.
> I tried working from the absolute beginning, and tracing function calls.
> I can see how the 'shell' is created. I understand how 'Document' class
> works. And I can see that Document::openDocument is being called. The
> problem is:
>
> 1) I can't find anywhere in the code that actually calls this method (but
> I know it *is* called because of a print statement
Have you tried using grep?
part.cpp:1151: ok = m_document->openDocument( fileNameToOpen, url(), mime );
> 2) I can't see the relationship between the shell and the document class.
The shell holds a part, the part holds a document.
> Specifically, once the document is created, its pages are being rendered to
> the UI centralWidget somehow. But I can't find the code that actually does
> this.
The rendering code is in pageview and friends.
Albert
>
> Please help me if you can. I've been looking at this for the past 4 hours
> with no luck.
>
> Thanks,
> Steve A.
> _______________________________________________
> Okular-devel mailing list
> Okular-devel at kde.org
> https://mail.kde.org/mailman/listinfo/okular-devel
More information about the Okular-devel
mailing list