Qt
6.x
The Qt SDK
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::keys
QStringList keys() const
Definition
main.cpp:24
QCupsPrinterSupportPlugin::create
QPlatformPrinterSupport * create(const QString &) override
Definition
main.cpp:29
QCupsPrinterSupport
Definition
qcupsprintersupport_p.h:26
QPlatformPrinterSupportPlugin
Definition
qplatformprintplugin.h:30
QPlatformPrinterSupport
The QPlatformPrinterSupport class provides an abstraction for print support.
Definition
qplatformprintersupport.h:34
QStringList
\inmodule QtCore
QString
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition
qstring.h:127
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
Qt::StringLiterals
Definition
qbytearray.h:716
Qt::CaseInsensitive
@ CaseInsensitive
Definition
qnamespace.h:1257
qcupsprintersupport_p.h
key
GLuint64 key
Definition
qopengles2ext.h:2268
QPlatformPrinterSupportFactoryInterface_iid
#define QPlatformPrinterSupportFactoryInterface_iid
Definition
qplatformprintplugin.h:27
QtPluginMetaDataKeys::IID
@ IID
QStringLiteral
#define QStringLiteral(str)
Definition
qstringliteral.h:36
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:117
Q_PLUGIN_METADATA
#define Q_PLUGIN_METADATA(x)
Definition
qtmetamacros.h:54
create
view create()
qtbase
src
plugins
printsupport
cups
main.cpp
Generated by
1.9.7