Merge lp:~ahayzen/qtubuntu-print/add-initial-packaging into lp:qtubuntu-print

Proposed by Andrew Hayzen
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 6
Merged at revision: 1
Proposed branch: lp:~ahayzen/qtubuntu-print/add-initial-packaging
Merge into: lp:qtubuntu-print
Diff against target: 612 lines (+525/-0) (has conflicts)
15 files modified
debian/changelog (+5/-0)
debian/compat (+1/-0)
debian/control (+20/-0)
debian/copyright (+33/-0)
debian/rules (+25/-0)
debian/source/format (+1/-0)
main.cpp (+49/-0)
pdf-plugin.pro (+28/-0)
pdf.json (+3/-0)
qpdfdevice.cpp (+41/-0)
qpdfdevice_p.h (+36/-0)
qpdfengine.cpp (+128/-0)
qpdfengine_p.h (+50/-0)
qpdfsupport.cpp (+63/-0)
qpdfsupport_p.h (+42/-0)
Conflict adding file debian.  Moved existing file to debian.moved.
Conflict adding file main.cpp.  Moved existing file to main.cpp.moved.
Conflict adding file pdf-plugin.pro.  Moved existing file to pdf-plugin.pro.moved.
Conflict adding file pdf.json.  Moved existing file to pdf.json.moved.
Conflict adding file qpdfdevice.cpp.  Moved existing file to qpdfdevice.cpp.moved.
Conflict adding file qpdfdevice_p.h.  Moved existing file to qpdfdevice_p.h.moved.
Conflict adding file qpdfengine.cpp.  Moved existing file to qpdfengine.cpp.moved.
Conflict adding file qpdfengine_p.h.  Moved existing file to qpdfengine_p.h.moved.
Conflict adding file qpdfsupport.cpp.  Moved existing file to qpdfsupport.cpp.moved.
Conflict adding file qpdfsupport_p.h.  Moved existing file to qpdfsupport_p.h.moved.
To merge this branch: bzr merge lp:~ahayzen/qtubuntu-print/add-initial-packaging
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+312856@code.launchpad.net

Commit message

* Initial version

Description of the change

* Initial version

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'debian'
2=== renamed directory 'debian' => 'debian.moved'
3=== added file 'debian/changelog'
4--- debian/changelog 1970-01-01 00:00:00 +0000
5+++ debian/changelog 2016-12-08 18:51:39 +0000
6@@ -0,0 +1,5 @@
7+qtubuntu-print (0.1-1) unstable; urgency=medium
8+
9+ * Initial release
10+
11+ -- Andrew Hayzen <ahayzen@gmail.com> Thu, 08 Dec 2016 17:54:28 +0000
12
13=== added file 'debian/compat'
14--- debian/compat 1970-01-01 00:00:00 +0000
15+++ debian/compat 2016-12-08 18:51:39 +0000
16@@ -0,0 +1,1 @@
17+9
18
19=== added file 'debian/control'
20--- debian/control 1970-01-01 00:00:00 +0000
21+++ debian/control 2016-12-08 18:51:39 +0000
22@@ -0,0 +1,20 @@
23+Source: qtubuntu-print
24+Section: unknown
25+Priority: optional
26+Maintainer: Andrew Hayzen <ahayzen@gmail.com>
27+Build-Depends: debhelper (>=9),
28+ libcontent-hub-dev,
29+ qt5-default,
30+ qt5-qmake
31+Standards-Version: 3.9.6
32+Homepage: http://launchpad.net/qtubuntu-print
33+Vcs-Bzr: https://code.launchpad.net/~phablet-team/qtubuntu-print/trunk
34+
35+Package: qtubuntu-print
36+Architecture: any
37+Depends: ${shlibs:Depends}, ${misc:Depends},
38+ content-hub,
39+ qt5-default
40+Description: Print plugin for Qt sending PDFs over content-hub
41+ A printing plugin for Qt which creates a PDF and sends it
42+ over content-hub to a destination app.
43
44=== added file 'debian/copyright'
45--- debian/copyright 1970-01-01 00:00:00 +0000
46+++ debian/copyright 2016-12-08 18:51:39 +0000
47@@ -0,0 +1,33 @@
48+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
49+Upstream-Name: qt5-pdf-content-hub-print-plugin
50+Source: <url://example.com>
51+
52+Files: *
53+Copyright: 2016 Canonical Ltd.
54+License: GPL-3.0+
55+
56+Files: debian/*
57+Copyright: 2016 Canonical Ltd.
58+License: GPL-3.0+
59+
60+License: GPL-3.0+
61+ This program is free software: you can redistribute it and/or modify
62+ it under the terms of the GNU General Public License as published by
63+ the Free Software Foundation, either version 3 of the License, or
64+ (at your option) any later version.
65+ .
66+ This package is distributed in the hope that it will be useful,
67+ but WITHOUT ANY WARRANTY; without even the implied warranty of
68+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69+ GNU General Public License for more details.
70+ .
71+ You should have received a copy of the GNU General Public License
72+ along with this program. If not, see <https://www.gnu.org/licenses/>.
73+ .
74+ On Debian systems, the complete text of the GNU General
75+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
76+
77+# Please also look if there are files or directories which have a
78+# different copyright/license attached and list them here.
79+# Please avoid picking licenses with terms that are more restrictive than the
80+# packaged work, as it may make Debian's contributions unacceptable upstream.
81
82=== added file 'debian/rules'
83--- debian/rules 1970-01-01 00:00:00 +0000
84+++ debian/rules 2016-12-08 18:51:39 +0000
85@@ -0,0 +1,25 @@
86+#!/usr/bin/make -f
87+# See debhelper(7) (uncomment to enable)
88+# output every command that modifies files on the build system.
89+#export DH_VERBOSE = 1
90+
91+
92+# see FEATURE AREAS in dpkg-buildflags(1)
93+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
94+
95+# see ENVIRONMENT in dpkg-buildflags(1)
96+# package maintainers to append CFLAGS
97+#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
98+# package maintainers to append LDFLAGS
99+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
100+
101+
102+%:
103+ dh $@
104+
105+
106+# dh_make generated override targets
107+# This is example for Cmake (See https://bugs.debian.org/641051 )
108+#override_dh_auto_configure:
109+# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
110+
111
112=== added directory 'debian/source'
113=== added file 'debian/source/format'
114--- debian/source/format 1970-01-01 00:00:00 +0000
115+++ debian/source/format 2016-12-08 18:51:39 +0000
116@@ -0,0 +1,1 @@
117+3.0 (quilt)
118
119=== added file 'main.cpp'
120--- main.cpp 1970-01-01 00:00:00 +0000
121+++ main.cpp 2016-12-08 18:51:39 +0000
122@@ -0,0 +1,49 @@
123+/*
124+ * Copyright (C) 2016 Canonical Ltd
125+ *
126+ * This program is free software: you can redistribute it and/or modify
127+ * it under the terms of the GNU General Public License version 3 as
128+ * published by the Free Software Foundation.
129+ *
130+ * This program is distributed in the hope that it will be useful,
131+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
132+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
133+ * GNU General Public License for more details.
134+ *
135+ * You should have received a copy of the GNU General Public License
136+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
137+ *
138+ * Authored-by: Andrew Hayzen <andrew.hayzen@canonical.com>
139+ */
140+#include <qpa/qplatformprintplugin.h>
141+#include <QtCore/QStringList>
142+
143+#include "qpdfsupport_p.h"
144+
145+QT_BEGIN_NAMESPACE
146+
147+class QPDFSupportPlugin : public QPlatformPrinterSupportPlugin
148+{
149+ Q_OBJECT
150+ Q_PLUGIN_METADATA(IID QPlatformPrinterSupportFactoryInterface_iid FILE "pdf.json")
151+
152+public:
153+ QStringList keys() const;
154+ QPlatformPrinterSupport *create(const QString &) Q_DECL_OVERRIDE;
155+};
156+
157+QStringList QPDFSupportPlugin::keys() const
158+{
159+ return QStringList(QStringLiteral("pdfsupport"));
160+}
161+
162+QPlatformPrinterSupport *QPDFSupportPlugin::create(const QString &key)
163+{
164+ if (key.compare(key, QLatin1String("pdfsupport"), Qt::CaseInsensitive) == 0)
165+ return new QPDFSupport;
166+ return 0;
167+}
168+
169+QT_END_NAMESPACE
170+
171+#include "main.moc"
172
173=== renamed file 'main.cpp' => 'main.cpp.moved'
174=== added file 'pdf-plugin.pro'
175--- pdf-plugin.pro 1970-01-01 00:00:00 +0000
176+++ pdf-plugin.pro 2016-12-08 18:51:39 +0000
177@@ -0,0 +1,28 @@
178+TARGET = pdfsupport
179+TEMPLATE = lib
180+
181+QT += dbus printsupport printsupport-private
182+
183+target.path += $$[QT_INSTALL_PLUGINS]/printsupport
184+
185+CONFIG += plugin
186+INSTALLS += target
187+
188+DEFINES += "QT_NO_CUPS"
189+
190+HEADERS += \
191+ qpdfsupport_p.h \
192+ qpdfengine_p.h \
193+ qpdfdevice_p.h
194+
195+SOURCES += main.cpp \
196+ qpdfsupport.cpp \
197+ qpdfengine.cpp \
198+ qpdfdevice.cpp
199+
200+DISTFILES += \
201+ pdf.json
202+
203+OTHER_FILES += pdf.json
204+
205+unix|win32: LIBS += -lcontent-hub
206
207=== renamed file 'pdf-plugin.pro' => 'pdf-plugin.pro.moved'
208=== added file 'pdf.json'
209--- pdf.json 1970-01-01 00:00:00 +0000
210+++ pdf.json 2016-12-08 18:51:39 +0000
211@@ -0,0 +1,3 @@
212+{
213+ "Keys": [ "pdfsupport" ]
214+}
215
216=== renamed file 'pdf.json' => 'pdf.json.moved'
217=== added file 'qpdfdevice.cpp'
218--- qpdfdevice.cpp 1970-01-01 00:00:00 +0000
219+++ qpdfdevice.cpp 2016-12-08 18:51:39 +0000
220@@ -0,0 +1,41 @@
221+/*
222+ * Copyright (C) 2016 Canonical Ltd
223+ *
224+ * This program is free software: you can redistribute it and/or modify
225+ * it under the terms of the GNU General Public License version 3 as
226+ * published by the Free Software Foundation.
227+ *
228+ * This program is distributed in the hope that it will be useful,
229+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
230+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
231+ * GNU General Public License for more details.
232+ *
233+ * You should have received a copy of the GNU General Public License
234+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
235+ *
236+ * Authored-by: Andrew Hayzen <andrew.hayzen@canonical.com>
237+ */
238+#include "qpdfdevice_p.h"
239+
240+QPDFDevice::QPDFDevice()
241+{
242+
243+}
244+
245+QPDFDevice::QPDFDevice(const QString &id)
246+{
247+ Q_UNUSED(id)
248+
249+ // have to set ID otherwise printer has no name
250+ // and QPrinter ends up thinking it is not a NativePrinter
251+ // which then allows the user to change the output filename
252+ m_id = id;
253+ m_name = QStringLiteral(PRINTER_NAME);
254+ m_location = QStringLiteral("Internal");
255+ m_makeAndModel = QStringLiteral("PDF Printing Service");
256+}
257+
258+bool QPDFDevice::isValid() const
259+{
260+ return true;
261+}
262
263=== renamed file 'qpdfdevice.cpp' => 'qpdfdevice.cpp.moved'
264=== added file 'qpdfdevice_p.h'
265--- qpdfdevice_p.h 1970-01-01 00:00:00 +0000
266+++ qpdfdevice_p.h 2016-12-08 18:51:39 +0000
267@@ -0,0 +1,36 @@
268+/*
269+ * Copyright (C) 2016 Canonical Ltd
270+ *
271+ * This program is free software: you can redistribute it and/or modify
272+ * it under the terms of the GNU General Public License version 3 as
273+ * published by the Free Software Foundation.
274+ *
275+ * This program is distributed in the hope that it will be useful,
276+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
277+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
278+ * GNU General Public License for more details.
279+ *
280+ * You should have received a copy of the GNU General Public License
281+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
282+ *
283+ * Authored-by: Andrew Hayzen <andrew.hayzen@canonical.com>
284+ */
285+#ifndef QPDFDEVICE_H
286+#define QPDFDEVICE_H
287+
288+#include <qpa/qplatformprintdevice.h>
289+
290+QT_BEGIN_NAMESPACE
291+
292+#define PRINTER_NAME "Printing Service"
293+
294+class QPDFDevice : public QPlatformPrintDevice
295+{
296+public:
297+ QPDFDevice();
298+ explicit QPDFDevice(const QString &id);
299+
300+ bool isValid() const Q_DECL_OVERRIDE;
301+};
302+
303+#endif // QPDFDEVICE_H
304
305=== renamed file 'qpdfdevice_p.h' => 'qpdfdevice_p.h.moved'
306=== added file 'qpdfengine.cpp'
307--- qpdfengine.cpp 1970-01-01 00:00:00 +0000
308+++ qpdfengine.cpp 2016-12-08 18:51:39 +0000
309@@ -0,0 +1,128 @@
310+/*
311+ * Copyright (C) 2016 Canonical Ltd
312+ *
313+ * This program is free software: you can redistribute it and/or modify
314+ * it under the terms of the GNU General Public License version 3 as
315+ * published by the Free Software Foundation.
316+ *
317+ * This program is distributed in the hope that it will be useful,
318+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
319+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
320+ * GNU General Public License for more details.
321+ *
322+ * You should have received a copy of the GNU General Public License
323+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
324+ *
325+ * Authored-by: Andrew Hayzen <andrew.hayzen@canonical.com>
326+ */
327+#include <com/ubuntu/content/hub.h>
328+#include <com/ubuntu/content/item.h>
329+#include <com/ubuntu/content/peer.h>
330+#include <com/ubuntu/content/store.h>
331+#include <com/ubuntu/content/transfer.h>
332+#include <com/ubuntu/content/type.h>
333+
334+#include <QDebug>
335+#include <QtCore/QDateTime>
336+#include <QtCore/QDir>
337+#include <QtCore/QFile>
338+#include <QtCore/QFileInfo>
339+#include <QtCore/QStandardPaths>
340+#include <QtCore/QUrl>
341+
342+#include "qpdfdevice_p.h"
343+#include "qpdfengine_p.h"
344+
345+QT_BEGIN_NAMESPACE
346+
347+QPDFEngine::QPDFEngine(QPrinter::PrinterMode m)
348+ : QPdfPrintEngine(*new QPDFEnginePrivate(m))
349+{
350+ Q_D(QPDFEngine);
351+}
352+
353+QPDFEngine::~QPDFEngine()
354+{
355+
356+}
357+
358+QPDFEnginePrivate::QPDFEnginePrivate(QPrinter::PrinterMode m)
359+ : QPdfPrintEnginePrivate(m),
360+ m_output_filename_auto(false)
361+{
362+}
363+
364+QPDFEnginePrivate::~QPDFEnginePrivate()
365+{
366+
367+}
368+
369+bool QPDFEnginePrivate::openPrintDevice()
370+{
371+ if (outDevice)
372+ return false;
373+
374+ if (outputFileName.isEmpty()) {
375+ QDir dir(QStandardPaths::writableLocation(QStandardPaths::TempLocation));
376+
377+ if (!dir.exists()) {
378+ dir.mkpath(".");
379+ }
380+
381+ QFileInfo fileInfo(dir.path(), QDateTime::currentDateTime().toString(Qt::ISODate));
382+ outputFileName = fileInfo.absoluteFilePath();
383+ m_output_filename_auto = true;
384+ }
385+
386+ QFile *file = new QFile(outputFileName);
387+
388+ if (!file->open(QFile::WriteOnly|QFile::Truncate)) {
389+ qDebug() << "Cannot write to the location.";
390+ delete file;
391+ return false;
392+ }
393+
394+ outDevice = file;
395+
396+ return true;
397+}
398+
399+void QPDFEnginePrivate::closePrintDevice()
400+{
401+ QPdfPrintEnginePrivate::closePrintDevice();
402+
403+ if (outDevice) {
404+ outDevice->close();
405+ }
406+
407+ // Transfer via content-hub
408+ com::ubuntu::content::Hub *hub = com::ubuntu::content::Hub::Client::instance();
409+ com::ubuntu::content::Type documentType = com::ubuntu::content::Type::Known::documents();
410+
411+// QVector<com::ubuntu::content::Peer> peers = hub->known_destinations_for_type(documentType);
412+// com::ubuntu::content::Peer peer = peers.at(1);
413+
414+ com::ubuntu::content::Peer peer = com::ubuntu::content::Peer{"destination-app.ahayzen_destination-app_0.1"}; // pdfviewer.sverzegnassi_pdfviewer_2.2.261"};
415+
416+ QVector<com::ubuntu::content::Item> items;
417+
418+ // Content-hub needs file:///path not /path
419+ QUrl url(outputFileName);
420+ url.setScheme("file");
421+ items.append(com::ubuntu::content::Item(url.toString()));
422+
423+ com::ubuntu::content::Transfer *transfer = hub->create_export_to_peer_for_type(peer, documentType);
424+
425+ if (transfer != nullptr) {
426+ transfer->start();
427+ transfer->charge(items);
428+ } else {
429+ qWarning() << "Transfer failed to create, likely cannot find Peer: destination-app.ahayzen_destination-app_0.1";
430+ }
431+
432+ // If we set the filename, reset it
433+ if (m_output_filename_auto) {
434+ m_output_filename_auto = false;
435+ outputFileName = "";
436+ }
437+}
438
439=== renamed file 'qpdfengine.cpp' => 'qpdfengine.cpp.moved'
440=== added file 'qpdfengine_p.h'
441--- qpdfengine_p.h 1970-01-01 00:00:00 +0000
442+++ qpdfengine_p.h 2016-12-08 18:51:39 +0000
443@@ -0,0 +1,50 @@
444+/*
445+ * Copyright (C) 2016 Canonical Ltd
446+ *
447+ * This program is free software: you can redistribute it and/or modify
448+ * it under the terms of the GNU General Public License version 3 as
449+ * published by the Free Software Foundation.
450+ *
451+ * This program is distributed in the hope that it will be useful,
452+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
453+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
454+ * GNU General Public License for more details.
455+ *
456+ * You should have received a copy of the GNU General Public License
457+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
458+ *
459+ * Authored-by: Andrew Hayzen <andrew.hayzen@canonical.com>
460+ */
461+#ifndef QPDFENGINE_H
462+#define QPDFENGINE_H
463+
464+#include <QtPrintSupport/private/qprintengine_pdf_p.h>
465+
466+QT_BEGIN_NAMESPACE
467+
468+class QPDFEnginePrivate;
469+
470+class QPDFEngine : public QPdfPrintEngine
471+{
472+ Q_DECLARE_PRIVATE(QPDFEngine)
473+public:
474+ QPDFEngine(QPrinter::PrinterMode m);
475+ virtual ~QPDFEngine();
476+};
477+
478+class QPDFEnginePrivate : public QPdfPrintEnginePrivate
479+{
480+ Q_DECLARE_PUBLIC(QPDFEngine)
481+public:
482+ QPDFEnginePrivate(QPrinter::PrinterMode m);
483+ ~QPDFEnginePrivate();
484+
485+ bool openPrintDevice() Q_DECL_OVERRIDE;
486+ void closePrintDevice() Q_DECL_OVERRIDE;
487+private:
488+ bool m_output_filename_auto;
489+};
490+
491+QT_END_NAMESPACE
492+
493+#endif // QPDFENGINE_H
494
495=== renamed file 'qpdfengine_p.h' => 'qpdfengine_p.h.moved'
496=== added file 'qpdfsupport.cpp'
497--- qpdfsupport.cpp 1970-01-01 00:00:00 +0000
498+++ qpdfsupport.cpp 2016-12-08 18:51:39 +0000
499@@ -0,0 +1,63 @@
500+#include "qpdfsupport_p.h"
501+/*
502+ * Copyright (C) 2016 Canonical Ltd
503+ *
504+ * This program is free software: you can redistribute it and/or modify
505+ * it under the terms of the GNU General Public License version 3 as
506+ * published by the Free Software Foundation.
507+ *
508+ * This program is distributed in the hope that it will be useful,
509+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
510+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
511+ * GNU General Public License for more details.
512+ *
513+ * You should have received a copy of the GNU General Public License
514+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
515+ *
516+ * Authored-by: Andrew Hayzen <andrew.hayzen@canonical.com>
517+ */
518+#include <QtPrintSupport/qprintengine.h>
519+#include <QtPrintSupport/private/qprintdevice_p.h>
520+
521+#include "qpdfdevice_p.h"
522+#include "qpdfengine_p.h"
523+
524+QT_BEGIN_NAMESPACE
525+
526+QPDFSupport::QPDFSupport()
527+{
528+
529+}
530+
531+QPDFSupport::~QPDFSupport()
532+{
533+
534+}
535+
536+QPrintEngine *QPDFSupport::createNativePrintEngine(QPrinter::PrinterMode printerMode)
537+{
538+ return new QPDFEngine(printerMode);
539+}
540+
541+QPaintEngine *QPDFSupport::createPaintEngine(QPrintEngine *printEngine, QPrinter::PrinterMode printerMode)
542+{
543+ Q_UNUSED(printerMode)
544+ return static_cast<QPDFEngine *>(printEngine);
545+}
546+
547+QPrintDevice QPDFSupport::createPrintDevice(const QString &id)
548+{
549+ return QPlatformPrinterSupport::createPrintDevice(new QPDFDevice(id));
550+}
551+
552+QStringList QPDFSupport::availablePrintDeviceIds() const
553+{
554+ return QStringList(QStringLiteral(PRINTER_NAME));
555+}
556+
557+QString QPDFSupport::defaultPrintDeviceId() const
558+{
559+ return QStringLiteral(PRINTER_NAME);
560+}
561+
562+QT_END_NAMESPACE
563
564=== renamed file 'qpdfsupport.cpp' => 'qpdfsupport.cpp.moved'
565=== added file 'qpdfsupport_p.h'
566--- qpdfsupport_p.h 1970-01-01 00:00:00 +0000
567+++ qpdfsupport_p.h 2016-12-08 18:51:39 +0000
568@@ -0,0 +1,42 @@
569+/*
570+ * Copyright (C) 2016 Canonical Ltd
571+ *
572+ * This program is free software: you can redistribute it and/or modify
573+ * it under the terms of the GNU General Public License version 3 as
574+ * published by the Free Software Foundation.
575+ *
576+ * This program is distributed in the hope that it will be useful,
577+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
578+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
579+ * GNU General Public License for more details.
580+ *
581+ * You should have received a copy of the GNU General Public License
582+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
583+ *
584+ * Authored-by: Andrew Hayzen <andrew.hayzen@canonical.com>
585+ */
586+#ifndef QPDFSUPPORT_H
587+#define QPDFSUPPORT_H
588+
589+#include <qpa/qplatformprintersupport.h>
590+#include <QtCore/qstringlist.h>
591+
592+QT_BEGIN_NAMESPACE
593+
594+class QPDFSupport : public QPlatformPrinterSupport
595+{
596+public:
597+ QPDFSupport();
598+ ~QPDFSupport();
599+
600+ QPrintEngine *createNativePrintEngine(QPrinter::PrinterMode printerMode) Q_DECL_OVERRIDE;
601+ QPaintEngine *createPaintEngine(QPrintEngine *printEngine, QPrinter::PrinterMode) Q_DECL_OVERRIDE;
602+
603+ QPrintDevice createPrintDevice(const QString &id) Q_DECL_OVERRIDE;
604+ QStringList availablePrintDeviceIds() const Q_DECL_OVERRIDE;
605+ QString defaultPrintDeviceId() const Q_DECL_OVERRIDE;
606+};
607+
608+QT_END_NAMESPACE
609+
610+#endif // QPDFSUPPORT_H
611
612=== renamed file 'qpdfsupport_p.h' => 'qpdfsupport_p.h.moved'

Subscribers

People subscribed via source and target branches

to all changes: