summaryrefslogtreecommitdiffstats
path: root/src/core/print_view_manager_qt.h
diff options
context:
space:
mode:
authorMichael Bruning <michael.bruning@qt.io>2016-08-10 17:22:05 +0200
committerMichal Klocek <michal.klocek@qt.io>2016-08-24 16:19:28 +0000
commitaf2535018b1553e351198f3d9c21538de1c328a1 (patch)
treedc66a94a925477f60aa155b0ba979fadfc560a80 /src/core/print_view_manager_qt.h
parenteeac120ec135e2ab0bd02f399afb50b684d00298 (diff)
Add widgets API for printing on a QPrinter
Renders the content to a PDF document and then renders this on a QPrinter-backed QPainter using the PDFium library. PDFium bitmap to QImage conversion based on work by Paulo Pinheiro <paulvap.os@gmail.com>. [ChangeLog][QtWebEngineWidgets][Printing] Enables printing QWebPage content on a QPrinter. Currently does not support previewing the document. Widgets only for the moment. Change-Id: I9a5264433093379aee90f5e4f69bf2aee8814f2b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/print_view_manager_qt.h')
-rw-r--r--src/core/print_view_manager_qt.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/print_view_manager_qt.h b/src/core/print_view_manager_qt.h
index 8856a5b2b..668516096 100644
--- a/src/core/print_view_manager_qt.h
+++ b/src/core/print_view_manager_qt.h
@@ -83,8 +83,8 @@ public:
typedef base::Callback<void(const std::vector<char> &result)> PrintToPDFCallback;
#if defined(ENABLE_BASIC_PRINTING)
// Method to print a page to a Pdf document with page size \a pageSize in location \a filePath.
- bool PrintToPDF(const QPageLayout& pageLayout, const QString& filePath);
- bool PrintToPDFWithCallback(const QPageLayout& pageLayout, const PrintToPDFCallback& callback);
+ bool PrintToPDF(const QPageLayout &pageLayout, bool printInColor, const QString &filePath);
+ bool PrintToPDFWithCallback(const QPageLayout &pageLayout, bool printInColor, const PrintToPDFCallback &callback);
#endif // ENABLE_BASIC_PRINTING
// PrintedPagesSource implementation.
@@ -109,7 +109,7 @@ protected:
void OnMetafileReadyForPrinting(const PrintHostMsg_DidPreviewDocument_Params& params);
#if defined(ENABLE_BASIC_PRINTING)
- bool PrintToPDFInternal(const QPageLayout &);
+ bool PrintToPDFInternal(const QPageLayout &, bool printInColor);
#endif //
base::FilePath m_pdfOutputPath;