Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1// Copyright (C) 2019 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#include "qpdfiohandler_p.h"
5
7
9{
12
13public:
14 Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
16};
17
18QImageIOPlugin::Capabilities QPdfPlugin::capabilities(QIODevice *device, const QByteArray &format) const
19{
20 if (format == "pdf")
21 return Capabilities(CanRead);
22 if (!format.isEmpty())
23 return {};
24
25 Capabilities cap;
26 if (device->isReadable() && QPdfIOHandler::canRead(device))
27 cap |= CanRead;
28 return cap;
29}
30
32{
33 QPdfIOHandler *hand = new QPdfIOHandler();
34 hand->setDevice(device);
35 hand->setFormat(format);
36 return hand;
37}
38
40
41#include "main.moc"
IOBluetoothDevice * device
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore \reentrant
Definition qiodevice.h:34
The QImageIOHandler class defines the common image I/O interface for all image formats in Qt.
\inmodule QtGui
bool canRead() const override
Returns true if an image can be read from the device (i.e., the image format is supported,...
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override
Returns the capabilities of the plugin, based on the data in device and the format format.
Definition main.cpp:18
QImageIOHandler * create(QIODevice *device, const QByteArray &format=QByteArray()) const override
Creates and returns a QImageIOHandler subclass, with device and format set.
Definition main.cpp:31
Combined button and popup list for selecting options.
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
#define QImageIOHandlerFactoryInterface_iid
GLint GLsizei GLsizei GLenum format
GLenum cap
#define Q_OBJECT
#define Q_PLUGIN_METADATA(x)
view create()