1
by Andrew Hayzen
* Initial commit |
1 |
/*
|
2 |
* Copyright (C) 2016 Canonical Ltd
|
|
3 |
*
|
|
1.1.5
by Andrew Hayzen
* Rename everything from pdfsupport/pdfplugin to qtubuntu-print |
4 |
* This file is part of qtubuntu-print.
|
5 |
*
|
|
6 |
* qtubuntu-print is free software; you can redistribute it and/or modify
|
|
1.1.18
by Andrew Hayzen
* Change to using LGPL instead of GPL |
7 |
* it under the terms of the GNU Lesser General Public License as published by
|
1.1.5
by Andrew Hayzen
* Rename everything from pdfsupport/pdfplugin to qtubuntu-print |
8 |
* the Free Software Foundation; version 3.
|
9 |
*
|
|
10 |
* qtubuntu-print is distributed in the hope that it will be useful,
|
|
1
by Andrew Hayzen
* Initial commit |
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1.1.18
by Andrew Hayzen
* Change to using LGPL instead of GPL |
13 |
* GNU Lesser General Public License for more details.
|
1
by Andrew Hayzen
* Initial commit |
14 |
*
|
1.1.18
by Andrew Hayzen
* Change to using LGPL instead of GPL |
15 |
* You should have received a copy of the GNU Lesser General Public License
|
16 |
* along with qtubuntu-print. If not, see <http://www.gnu.org/licenses/>.
|
|
1
by Andrew Hayzen
* Initial commit |
17 |
*
|
18 |
* Authored-by: Andrew Hayzen <andrew.hayzen@canonical.com>
|
|
19 |
*/
|
|
20 |
#include <QtPrintSupport/qprintengine.h> |
|
21 |
#include <QtPrintSupport/private/qprintdevice_p.h> |
|
22 |
||
1.1.10
by Andrew Hayzen
* Migrate to CMake |
23 |
#include "i18n.h" |
1.1.5
by Andrew Hayzen
* Rename everything from pdfsupport/pdfplugin to qtubuntu-print |
24 |
#include "qubuntuprintdevice_p.h" |
25 |
#include "qubuntuprintengine_p.h" |
|
26 |
#include "qubuntuprintsupport_p.h" |
|
1
by Andrew Hayzen
* Initial commit |
27 |
|
28 |
QT_BEGIN_NAMESPACE
|
|
29 |
||
1.1.10
by Andrew Hayzen
* Migrate to CMake |
30 |
#define I18N_DOMAIN "qtubuntu-print"
|
31 |
||
1.1.5
by Andrew Hayzen
* Rename everything from pdfsupport/pdfplugin to qtubuntu-print |
32 |
QUbuntuPrintSupport::QUbuntuPrintSupport() |
33 |
{
|
|
1.1.10
by Andrew Hayzen
* Migrate to CMake |
34 |
initTr(I18N_DOMAIN, NULL); |
1.1.5
by Andrew Hayzen
* Rename everything from pdfsupport/pdfplugin to qtubuntu-print |
35 |
}
|
36 |
||
37 |
QUbuntuPrintSupport::~QUbuntuPrintSupport() |
|
38 |
{
|
|
39 |
||
40 |
}
|
|
41 |
||
42 |
QPrintEngine *QUbuntuPrintSupport::createNativePrintEngine(QPrinter::PrinterMode printerMode) |
|
43 |
{
|
|
44 |
return new QUbuntuPrintEngine(printerMode); |
|
45 |
}
|
|
46 |
||
47 |
QPaintEngine *QUbuntuPrintSupport::createPaintEngine(QPrintEngine *printEngine, QPrinter::PrinterMode printerMode) |
|
1
by Andrew Hayzen
* Initial commit |
48 |
{
|
49 |
Q_UNUSED(printerMode) |
|
1.1.5
by Andrew Hayzen
* Rename everything from pdfsupport/pdfplugin to qtubuntu-print |
50 |
return static_cast<QUbuntuPrintEngine *>(printEngine); |
1
by Andrew Hayzen
* Initial commit |
51 |
}
|
52 |
||
1.1.5
by Andrew Hayzen
* Rename everything from pdfsupport/pdfplugin to qtubuntu-print |
53 |
QPrintDevice QUbuntuPrintSupport::createPrintDevice(const QString &id) |
1
by Andrew Hayzen
* Initial commit |
54 |
{
|
1.1.5
by Andrew Hayzen
* Rename everything from pdfsupport/pdfplugin to qtubuntu-print |
55 |
return QPlatformPrinterSupport::createPrintDevice(new QUbuntuPrintDevice(id)); |
1
by Andrew Hayzen
* Initial commit |
56 |
}
|
57 |
||
1.1.5
by Andrew Hayzen
* Rename everything from pdfsupport/pdfplugin to qtubuntu-print |
58 |
QStringList QUbuntuPrintSupport::availablePrintDeviceIds() const |
1
by Andrew Hayzen
* Initial commit |
59 |
{
|
1.1.10
by Andrew Hayzen
* Migrate to CMake |
60 |
return QStringList(__(PRINTER_NAME)); |
1
by Andrew Hayzen
* Initial commit |
61 |
}
|
62 |
||
1.1.5
by Andrew Hayzen
* Rename everything from pdfsupport/pdfplugin to qtubuntu-print |
63 |
QString QUbuntuPrintSupport::defaultPrintDeviceId() const |
1
by Andrew Hayzen
* Initial commit |
64 |
{
|
1.1.10
by Andrew Hayzen
* Migrate to CMake |
65 |
return __(PRINTER_NAME); |
1
by Andrew Hayzen
* Initial commit |
66 |
}
|
67 |
||
68 |
QT_END_NAMESPACE
|