D29045: [KJots] Revive printing support
Igor Poboiko
noreply at phabricator.kde.org
Tue Apr 21 12:01:04 BST 2020
poboiko created this revision.
poboiko added a reviewer: dvratil.
poboiko requested review of this revision.
REVISION SUMMARY
Removed custom code inside `KJotsWidget::print`, which did the pagination and painting:
`QTextDocument::print()` is quite capable of it on its own.
Make Qt also responsible for margins, document placement, etc.
Make `QPrintPreviewDialog` actually work: it requires to connect to `paintRequested` signal.
For this purpose, made `KJotsWidget::print` a slot.
Unify `QPrinter` creation code, add a `setupPrinter` method for this purpose.
Note: `HighResolution` property was removed, as it results in weird-looking bold fonts.
TEST PLAN
1. `Print Preview` works again
2. Try to select some text and press `Print Preview` -> it previews selection only
3. `Print` also works (tried only virtual PDF printer though)
BRANCH
printing (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D29045
AFFECTED FILES
src/kjotswidget.cpp
src/kjotswidget.h
To: poboiko, dvratil
Cc: kde-pim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200421/2aa47ae0/attachment.html>
More information about the kde-pim
mailing list