Image Formats NG
Public Types | Public Member Functions | List of all members
ImageFormatInfo Class Reference

Provides information about supported image formats. More...

Public Types

enum  Capability { CanRead = 0x1, CanWrite = 0x2, ReadWrite = CanRead | CanWrite }
 This enum holds possible capabilities of the image format. More...
 
using Capabilities = QFlags< Capability >
 Capability flags.
 

Public Member Functions

 ImageFormatInfo (const ImageFormatInfo &other)
 Constructs a new ImageFormatInfo that is a copy of the given other ImageFormatInfo.
 
 ImageFormatInfo (ImageFormatInfo &&other)
 Move-constructs a new ImageFormatInfo that is a copy of the given other ImageFormatInfo.
 
 ~ImageFormatInfo ()
 Destroys the ImageFormatInfo object.
 
ImageFormatInfooperator= (const ImageFormatInfo &)
 Assigns other to this ImageFormatInfo instance.
 
ImageFormatInfooperator= (ImageFormatInfo &&)
 Move-assigns other to this ImageFormatInfo instance.
 
QByteArray name () const
 Returns the name of the image format.
 
QMimeType mimeType () const
 Returns the mimetype corresponding to the image format.
 
Capabilities capabilities () const
 Returns the capabilities supported by the image format.
 
QString capabilitiesString () const
 Returns the capabilities supported by the image format as a QString object.
 
QVector< QByteArray > supportedSubTypes () const
 Returns the list of the subtypes that the image format can write. More...
 
ImageOptionsSet supportedOptions (const QByteArray &subType=QByteArray()) const
 Returns list of available options for the fiven subtype. More...
 
bool supportsOption (ImageOptions::Option option, const QByteArray &subType=QByteArray()) const
 Returns true, if format supports option option for the sub type subType.
 
void swap (ImageFormatInfo &other)
 Swaps other info with this info. More...
 

Detailed Description

Provides information about supported image formats.

Member Enumeration Documentation

◆ Capability

This enum holds possible capabilities of the image format.

Enumerator
CanRead 

Whether image format supports reading.

CanWrite 

Whether image format supports writing.

ReadWrite 

Whether image format supports reading and writing.

Member Function Documentation

◆ supportedOptions()

ImageOptionsSet ImageFormatInfo::supportedOptions ( const QByteArray &  subType = QByteArray()) const

Returns list of available options for the fiven subtype.

Read options should be always retreived for an unnamed subtype. Write options should be retrieved for a particular subtype if format supports multiple subtypes or for an unnamed subtype if format supports single subtype.

◆ supportedSubTypes()

QVector< QByteArray > ImageFormatInfo::supportedSubTypes ( ) const

Returns the list of the subtypes that the image format can write.

If the list is empty, that can mean that format doesn't support writing, or it supports only one, unnamed subtype.

◆ swap()

void ImageFormatInfo::swap ( ImageFormatInfo other)
inline

Swaps other info with this info.

This operation is very fast and never fails.