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
qimagereaderwriterhelpers_p.h
Go to the documentation of this file.
1
// Copyright (C) 2018 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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QIMAGEREADERWRITERHELPERS_P_H
6
#
define
QIMAGEREADERWRITERHELPERS_P_H
7
8
#
include
<
QtGui
/
private
/
qtguiglobal_p
.
h
>
9
#
include
<
qsharedpointer
.
h
>
10
#
include
"qimageiohandler.h"
11
12
//
13
// W A R N I N G
14
// -------------
15
//
16
// This file is not part of the Qt API. It exists purely as an
17
// implementation detail. This header file may change from version to
18
// version without notice, or even be removed.
19
//
20
// We mean it.
21
//
22
23
QT_BEGIN_NAMESPACE
24
25
class
QFactoryLoader;
26
27
namespace
QImageReaderWriterHelpers
{
28
29
enum
_qt_BuiltInFormatType
{
30
#
ifndef
QT_NO_IMAGEFORMAT_PNG
31
_qt_PngFormat
,
32
#
endif
33
#
ifndef
QT_NO_IMAGEFORMAT_BMP
34
_qt_BmpFormat
,
35
#
endif
36
#
ifndef
QT_NO_IMAGEFORMAT_PPM
37
_qt_PpmFormat
,
38
_qt_PgmFormat
,
39
_qt_PbmFormat
,
40
#
endif
41
#
ifndef
QT_NO_IMAGEFORMAT_XBM
42
_qt_XbmFormat
,
43
#
endif
44
#
ifndef
QT_NO_IMAGEFORMAT_XPM
45
_qt_XpmFormat
,
46
#
endif
47
_qt_NumFormats
,
48
_qt_NoFormat
= -1
49
};
50
51
#
if
!
defined
(
QT_NO_IMAGEFORMAT_PPM
)
52
#
define
MAX_MT_SIZE
20
53
#
elif
!
defined
(
QT_NO_IMAGEFORMAT_XBM
)
||
!
defined
(
QT_NO_IMAGEFORMAT_XPM
)
54
#
define
MAX_MT_SIZE
10
55
#
else
56
#
define
MAX_MT_SIZE
4
57
#
endif
58
59
struct
_qt_BuiltInFormatStruct
60
{
61
char
extension
[4];
62
char
mimeType
[
MAX_MT_SIZE
];
63
};
64
65
#
undef
MAX_MT_SIZE
66
67
static
const
_qt_BuiltInFormatStruct
_qt_BuiltInFormats
[] = {
68
#
ifndef
QT_NO_IMAGEFORMAT_PNG
69
{
"png"
,
"png"
},
70
#
endif
71
#
ifndef
QT_NO_IMAGEFORMAT_BMP
72
{
"bmp"
,
"bmp"
},
73
#
endif
74
#
ifndef
QT_NO_IMAGEFORMAT_PPM
75
{
"ppm"
,
"x-portable-pixmap"
},
76
{
"pgm"
,
"x-portable-graymap"
},
77
{
"pbm"
,
"x-portable-bitmap"
},
78
#
endif
79
#
ifndef
QT_NO_IMAGEFORMAT_XBM
80
{
"xbm"
,
"x-xbitmap"
},
81
#
endif
82
#
ifndef
QT_NO_IMAGEFORMAT_XPM
83
{
"xpm"
,
"x-xpixmap"
},
84
#
endif
85
};
86
static_assert
(
_qt_NumFormats
==
sizeof
_qt_BuiltInFormats
/
sizeof
*
_qt_BuiltInFormats
);
87
88
#
ifndef
QT_NO_IMAGEFORMATPLUGIN
89
QSharedPointer
<
QFactoryLoader
>
pluginLoader
();
90
#
endif
91
92
enum
Capability
{
93
CanRead
,
94
CanWrite
95
};
96
QList<QByteArray> supportedImageFormats(
Capability
cap);
97
QList<QByteArray> supportedMimeTypes(
Capability
cap);
98
QList<QByteArray> imageFormatsForMimeType(QByteArrayView mimeType,
Capability
cap);
99
100
}
101
102
QT_END_NAMESPACE
103
104
#
endif
// QIMAGEREADERWRITERHELPERS_P_H
QImageReaderWriterHelpers
Definition
qimagereaderwriterhelpers.cpp:15
QImageReaderWriterHelpers::Capability
Capability
Definition
qimagereaderwriterhelpers_p.h:92
QImageReaderWriterHelpers::CanRead
@ CanRead
Definition
qimagereaderwriterhelpers_p.h:93
QImageReaderWriterHelpers::CanWrite
@ CanWrite
Definition
qimagereaderwriterhelpers_p.h:94
QImageReaderWriterHelpers::pluginLoader
QSharedPointer< QFactoryLoader > pluginLoader()
Definition
qimagereaderwriterhelpers.cpp:70
QImageReaderWriterHelpers::_qt_BuiltInFormatType
_qt_BuiltInFormatType
Definition
qimagereaderwriterhelpers_p.h:29
QImageReaderWriterHelpers::_qt_PgmFormat
@ _qt_PgmFormat
Definition
qimagereaderwriterhelpers_p.h:38
QImageReaderWriterHelpers::_qt_BmpFormat
@ _qt_BmpFormat
Definition
qimagereaderwriterhelpers_p.h:34
QImageReaderWriterHelpers::_qt_NumFormats
@ _qt_NumFormats
Definition
qimagereaderwriterhelpers_p.h:47
QImageReaderWriterHelpers::_qt_PbmFormat
@ _qt_PbmFormat
Definition
qimagereaderwriterhelpers_p.h:39
QImageReaderWriterHelpers::_qt_PpmFormat
@ _qt_PpmFormat
Definition
qimagereaderwriterhelpers_p.h:37
QImageReaderWriterHelpers::_qt_PngFormat
@ _qt_PngFormat
Definition
qimagereaderwriterhelpers_p.h:31
QImageReaderWriterHelpers::_qt_XpmFormat
@ _qt_XpmFormat
Definition
qimagereaderwriterhelpers_p.h:45
QImageReaderWriterHelpers::_qt_XbmFormat
@ _qt_XbmFormat
Definition
qimagereaderwriterhelpers_p.h:42
QImageReaderWriterHelpers::_qt_NoFormat
@ _qt_NoFormat
Definition
qimagereaderwriterhelpers_p.h:48
QImageReaderWriterHelpers::_qt_BuiltInFormats
static const _qt_BuiltInFormatStruct _qt_BuiltInFormats[]
Definition
qimagereaderwriterhelpers_p.h:67
MAX_MT_SIZE
#define MAX_MT_SIZE
Definition
qimagereaderwriterhelpers_p.h:52
QImageReaderWriterHelpers::_qt_BuiltInFormatStruct
Definition
qimagereaderwriterhelpers_p.h:60
QImageReaderWriterHelpers::_qt_BuiltInFormatStruct::extension
char extension[4]
Definition
qimagereaderwriterhelpers_p.h:61
QImageReaderWriterHelpers::_qt_BuiltInFormatStruct::mimeType
char mimeType[MAX_MT_SIZE]
Definition
qimagereaderwriterhelpers_p.h:62
qtbase
src
gui
image
qimagereaderwriterhelpers_p.h
Generated on
for Qt by
1.16.1