From f5dbc3b44d56124dd8b1eaaaefd4e019fbd7db71 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sun, 15 Nov 2015 23:02:02 +0200 Subject: Planner: support profile in planner print The "Print" button in the planner dumps the QTextEdit to a QPrinter via ::print(). This patch renders the Profile to a Pixmap which is inserted as Base64 stream in an tag and fed on top of the QTextEdit HTML contents. This route preserves the planner notes as text in PDF prints. The quick alternative is to render the QTextDocument to a QPixmap as well, but that will not preserve the text and pagination becomes manual. Possibly the QTextDocument can be rendered as a QPicture but pagination is still an issue, while so far there is exactly one user requesting this feature! Related small change in ProfileWidget2: Explicitly hide the tooltip when printMode is true. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- profile-widget/profilewidget2.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'profile-widget/profilewidget2.cpp') diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index eae4b3f21..b44bdfc99 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1527,6 +1527,7 @@ void ProfileWidget2::setPrintMode(bool mode, bool grayscale) isGrayscale = mode ? grayscale : false; mouseFollowerHorizontal->setVisible(!mode); mouseFollowerVertical->setVisible(!mode); + toolTipItem->setVisible(!mode); } void ProfileWidget2::setFontPrintScale(double scale) -- cgit v1.2.3-70-g09d2