Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QImageReaderWriterHelpers Namespace Reference

Classes

struct  _qt_BuiltInFormatStruct
 

Typedefs

typedef PluginKeyMap::const_iterator PluginKeyMapConstIterator
 

Enumerations

enum  _qt_BuiltInFormatType {
  _qt_PngFormat , _qt_BmpFormat , _qt_PpmFormat , _qt_PgmFormat ,
  _qt_PbmFormat , _qt_XbmFormat , _qt_XpmFormat , _qt_NumFormats ,
  _qt_NoFormat = -1
}
 
enum  Capability { CanRead , CanWrite }
 

Functions

 Q_GLOBAL_STATIC_WITH_ARGS (QFactoryLoader, irhLoader,(QImageIOHandlerFactoryInterface_iid, "/imageformats"_L1)) static void appendImagePluginFormats(QFactoryLoader *loader
 
result reserve (result->size()+keyMap.size())
 
 for (PluginKeyMapConstIterator it=keyMap.constBegin();it !=cend;++it)
 
static void appendImagePluginMimeTypes (QFactoryLoader *loader, QImageIOPlugin::Capability cap, QList< QByteArray > *result, QList< QByteArray > *resultKeys=nullptr)
 
QSharedPointer< QFactoryLoaderpluginLoader ()
 
static QImageIOPlugin::Capability pluginCapability (Capability cap)
 
QList< QByteArraysupportedImageFormats (Capability cap)
 
QList< QByteArraysupportedMimeTypes (Capability cap)
 
QList< QByteArrayimageFormatsForMimeType (const QByteArray &mimeType, Capability cap)
 

Variables

QImageIOPlugin::Capability cap
 
QImageIOPlugin::Capability QList< QByteArray > * result
 
const PluginKeyMap keyMap = loader->keyMap()
 
const PluginKeyMapConstIterator cend = keyMap.constEnd()
 
int i = -1
 
QImageIOPluginplugin = nullptr
 
static const _qt_BuiltInFormatStruct _qt_BuiltInFormats []
 

Typedef Documentation

◆ PluginKeyMapConstIterator

typedef PluginKeyMap::const_iterator QImageReaderWriterHelpers::PluginKeyMapConstIterator

Definition at line 27 of file qimagereaderwriterhelpers.cpp.

Enumeration Type Documentation

◆ _qt_BuiltInFormatType

Enumerator
_qt_PngFormat 
_qt_BmpFormat 
_qt_PpmFormat 
_qt_PgmFormat 
_qt_PbmFormat 
_qt_XbmFormat 
_qt_XpmFormat 
_qt_NumFormats 
_qt_NoFormat 

Definition at line 28 of file qimagereaderwriterhelpers_p.h.

◆ Capability

Enumerator
CanRead 
CanWrite 

Definition at line 91 of file qimagereaderwriterhelpers_p.h.

Function Documentation

◆ appendImagePluginMimeTypes()

static void QImageReaderWriterHelpers::appendImagePluginMimeTypes ( QFactoryLoader loader,
QImageIOPlugin::Capability  cap,
QList< QByteArray > *  result,
QList< QByteArray > *  resultKeys = nullptr 
)
static

Definition at line 45 of file qimagereaderwriterhelpers.cpp.

References QCborArray::at(), QList< T >::at(), QImageIOPlugin::capabilities(), i, keys, loader, MetaData, plugin, QList< T >::size(), QCborValue::toArray(), QString::toLatin1(), QCborValue::toString(), and QCborMap::value().

Referenced by imageFormatsForMimeType(), and supportedMimeTypes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ for()

QImageReaderWriterHelpers::for ( PluginKeyMapConstIterator  it = keyMap.constBegin(); it != cend; ++it)

Definition at line 34 of file qimagereaderwriterhelpers.cpp.

◆ imageFormatsForMimeType()

QList< QByteArray > QImageReaderWriterHelpers::imageFormatsForMimeType ( const QByteArray mimeType,
Capability  cap 
)

Definition at line 116 of file qimagereaderwriterhelpers.cpp.

References _qt_BuiltInFormats, appendImagePluginMimeTypes(), QList< T >::at(), fmt, i, keys, mimeType, pluginCapability(), and QList< T >::size().

Referenced by QImageReader::imageFormatsForMimeType(), and QImageWriter::imageFormatsForMimeType().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pluginCapability()

static QImageIOPlugin::Capability QImageReaderWriterHelpers::pluginCapability ( Capability  cap)
inlinestatic

Definition at line 77 of file qimagereaderwriterhelpers.cpp.

References QImageIOPlugin::CanRead, CanRead, and QImageIOPlugin::CanWrite.

Referenced by imageFormatsForMimeType(), supportedImageFormats(), and supportedMimeTypes().

+ Here is the caller graph for this function:

◆ pluginLoader()

QSharedPointer< QFactoryLoader > QImageReaderWriterHelpers::pluginLoader ( )

Definition at line 69 of file qimagereaderwriterhelpers.cpp.

Referenced by createReadHandlerHelper(), and createWriteHandlerHelper().

+ Here is the caller graph for this function:

◆ Q_GLOBAL_STATIC_WITH_ARGS()

QImageReaderWriterHelpers::Q_GLOBAL_STATIC_WITH_ARGS ( QFactoryLoader  ,
irhLoader  ,
(QImageIOHandlerFactoryInterface_iid, "/imageformats"_L1)   
)

◆ reserve()

result QImageReaderWriterHelpers::reserve ( result->  size)+keyMap.size()

◆ supportedImageFormats()

QList< QByteArray > QImageReaderWriterHelpers::supportedImageFormats ( Capability  cap)

Definition at line 84 of file qimagereaderwriterhelpers.cpp.

References _qt_BuiltInFormats, _qt_NumFormats, extension(), i, and pluginCapability().

Referenced by QImageReader::supportedImageFormats(), and QImageWriter::supportedImageFormats().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supportedMimeTypes()

QList< QByteArray > QImageReaderWriterHelpers::supportedMimeTypes ( Capability  cap)

Definition at line 100 of file qimagereaderwriterhelpers.cpp.

References _qt_BuiltInFormats, _qt_NumFormats, QList< T >::append(), appendImagePluginMimeTypes(), QList< T >::begin(), QList< T >::end(), QList< T >::erase(), fmt, pluginCapability(), QByteArrayLiteral, and QList< T >::reserve().

Referenced by QImageReader::supportedMimeTypes(), and QImageWriter::supportedMimeTypes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ _qt_BuiltInFormats

const _qt_BuiltInFormatStruct QImageReaderWriterHelpers::_qt_BuiltInFormats[]
static
Initial value:
= {
{"png", "png"},
{"bmp", "bmp"},
{"ppm", "x-portable-pixmap"},
{"pgm", "x-portable-graymap"},
{"pbm", "x-portable-bitmap"},
{"xbm", "x-xbitmap"},
{"xpm", "x-xpixmap"},
}

Definition at line 66 of file qimagereaderwriterhelpers_p.h.

Referenced by createReadHandlerHelper(), imageFormatsForMimeType(), supportedImageFormats(), and supportedMimeTypes().

◆ cap

QImageIOPlugin::Capability QImageReaderWriterHelpers::cap

Definition at line 23 of file qimagereaderwriterhelpers.cpp.

◆ cend

const PluginKeyMapConstIterator QImageReaderWriterHelpers::cend = keyMap.constEnd()

Definition at line 30 of file qimagereaderwriterhelpers.cpp.

◆ i

int QImageReaderWriterHelpers::i = -1

◆ keyMap

const PluginKeyMap QImageReaderWriterHelpers::keyMap = loader->keyMap()

Definition at line 29 of file qimagereaderwriterhelpers.cpp.

Referenced by createReadHandlerHelper().

◆ plugin

QImageIOPlugin* QImageReaderWriterHelpers::plugin = nullptr

◆ result

QImageIOPlugin::Capability QList<QByteArray>* QImageReaderWriterHelpers::result
Initial value:
{
typedef QMultiMap<int, QString> PluginKeyMap

Definition at line 24 of file qimagereaderwriterhelpers.cpp.