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
6
7#include <qpa/qplatformprintplugin.h>
8#include <QtCore/QStringList>
9
11
12using namespace Qt::StringLiterals;
13
15{
16 Q_OBJECT
17 Q_PLUGIN_METADATA(IID QPlatformPrinterSupportFactoryInterface_iid FILE "cups.json")
18
19public:
21 QPlatformPrinterSupport *create(const QString &) override;
22};
23
24QStringList QCupsPrinterSupportPlugin::keys() const
25{
26 return QStringList(QStringLiteral("cupsprintersupport"));
27}
28
30{
31 if (key.compare(key, "cupsprintersupport"_L1, Qt::CaseInsensitive) == 0)
32 return new QCupsPrinterSupport;
33 return 0;
34}
35
36QT_END_NAMESPACE
37
38#include "main.moc"
QPlatformPrinterSupport * create(const QString &) override
Definition main.cpp:29