Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
5
#
include
"qcupsprintersupport_p.h"
6
7
#
include
<
qpa
/
qplatformprintplugin
.
h
>
8
#
include
<
QtCore
/
QStringList
>
9
10
QT_BEGIN_NAMESPACE
11
12
using
namespace
Qt::StringLiterals;
13
14
class
QCupsPrinterSupportPlugin
:
public
QPlatformPrinterSupportPlugin
15
{
16
Q_OBJECT
17
Q_PLUGIN_METADATA(IID QPlatformPrinterSupportFactoryInterface_iid FILE
"cups.json"
)
18
19
public
:
20
QStringList
keys
()
const
;
21
QPlatformPrinterSupport
*
create
(
const
QString &)
override
;
22
};
23
24
QStringList
QCupsPrinterSupportPlugin
::keys()
const
25
{
26
return
QStringList(QStringLiteral(
"cupsprintersupport"
));
27
}
28
29
QPlatformPrinterSupport
*
QCupsPrinterSupportPlugin
::
create
(
const
QString &key)
30
{
31
if
(key.compare(key,
"cupsprintersupport"_L1
, Qt::CaseInsensitive) == 0)
32
return
new
QCupsPrinterSupport;
33
return
0;
34
}
35
36
QT_END_NAMESPACE
37
38
#
include
"main.moc"
QCupsPrinterSupportPlugin
Definition
main.cpp:15
QCupsPrinterSupportPlugin::create
QPlatformPrinterSupport * create(const QString &) override
Definition
main.cpp:29
QPlatformGraphicsBufferHelper
\inmodule QtGui
qtbase
src
plugins
printsupport
cups
main.cpp
Generated on
for Qt by
1.14.0