KLayout 0.29.8 (2024-10-28 63dd591e5) [master]

API reference - Class QImageReader

Notation used in Ruby API documentation

Module: QtGui

Description: Binding of QImageReader

Sub-classes: ImageReaderError, QFlags_ImageReaderError

Public constructors

new QImageReadernewConstructor QImageReader::QImageReader()
new QImageReadernew(QIODevice ptr device,
bytes format = QByteArray())
Constructor QImageReader::QImageReader(QIODevice *device, const QByteArray &format)
new QImageReadernew(string fileName,
bytes format = QByteArray())
Constructor QImageReader::QImageReader(const QString &fileName, const QByteArray &format)

Public methods

[const]QImageReader ptr_const_castReturns a non-const reference to self.
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
[const]boolautoDetectImageFormatMethod bool QImageReader::autoDetectImageFormat()
voidautoDetectImageFormat=(bool enabled)Method void QImageReader::setAutoDetectImageFormat(bool enabled)
[const]boolautoTransformMethod bool QImageReader::autoTransform()
voidautoTransform=(bool enabled)Method void QImageReader::setAutoTransform(bool enabled)
[const]QColorbackgroundColorMethod QColor QImageReader::backgroundColor()
voidbackgroundColor=(const QColor color)Method void QImageReader::setBackgroundColor(const QColor &color)
[const]boolcanReadMethod bool QImageReader::canRead()
[const]QRectclipRectMethod QRect QImageReader::clipRect()
voidclipRect=(const QRect rect)Method void QImageReader::setClipRect(const QRect &rect)
[const]intcurrentImageNumberMethod int QImageReader::currentImageNumber()
[const]QRectcurrentImageRectMethod QRect QImageReader::currentImageRect()
[const]booldecideFormatFromContentMethod bool QImageReader::decideFormatFromContent()
voiddecideFormatFromContent=(bool ignored)Method void QImageReader::setDecideFormatFromContent(bool ignored)
[const]QIODevice ptrdeviceMethod QIODevice *QImageReader::device()
voiddevice=(QIODevice ptr device)Method void QImageReader::setDevice(QIODevice *device)
[const]QImageReader_ImageReaderErrorerrorMethod QImageReader::ImageReaderError QImageReader::error()
[const]stringerrorStringMethod QString QImageReader::errorString()
[const]stringfileNameMethod QString QImageReader::fileName()
voidfileName=(string fileName)Method void QImageReader::setFileName(const QString &fileName)
[const]bytesformatMethod QByteArray QImageReader::format()
voidformat=(bytes format)Method void QImageReader::setFormat(const QByteArray &format)
[const]floatgammaMethod float QImageReader::gamma()
voidgamma=(float gamma)Method void QImageReader::setGamma(float gamma)
[const]intimageCountMethod int QImageReader::imageCount()
[const]QImage_FormatimageFormatMethod QImage::Format QImageReader::imageFormat()
booljumpToImage(int imageNumber)Method bool QImageReader::jumpToImage(int imageNumber)
booljumpToNextImageMethod bool QImageReader::jumpToNextImage()
[const]intloopCountMethod int QImageReader::loopCount()
[const]intnextImageDelayMethod int QImageReader::nextImageDelay()
[const]intqualityMethod int QImageReader::quality()
voidquality=(int quality)Method void QImageReader::setQuality(int quality)
QImagereadMethod QImage QImageReader::read()
boolread(QImage ptr image)Method bool QImageReader::read(QImage *image)
[const]QRectscaledClipRectMethod QRect QImageReader::scaledClipRect()
voidscaledClipRect=(const QRect rect)Method void QImageReader::setScaledClipRect(const QRect &rect)
[const]QSizescaledSizeMethod QSize QImageReader::scaledSize()
voidscaledSize=(const QSize size)Method void QImageReader::setScaledSize(const QSize &size)
voidsetAutoDetectImageFormat(bool enabled)Method void QImageReader::setAutoDetectImageFormat(bool enabled)
voidsetAutoTransform(bool enabled)Method void QImageReader::setAutoTransform(bool enabled)
voidsetBackgroundColor(const QColor color)Method void QImageReader::setBackgroundColor(const QColor &color)
voidsetClipRect(const QRect rect)Method void QImageReader::setClipRect(const QRect &rect)
voidsetDecideFormatFromContent(bool ignored)Method void QImageReader::setDecideFormatFromContent(bool ignored)
voidsetDevice(QIODevice ptr device)Method void QImageReader::setDevice(QIODevice *device)
voidsetFileName(string fileName)Method void QImageReader::setFileName(const QString &fileName)
voidsetFormat(bytes format)Method void QImageReader::setFormat(const QByteArray &format)
voidsetGamma(float gamma)Method void QImageReader::setGamma(float gamma)
voidsetQuality(int quality)Method void QImageReader::setQuality(int quality)
voidsetScaledClipRect(const QRect rect)Method void QImageReader::setScaledClipRect(const QRect &rect)
voidsetScaledSize(const QSize size)Method void QImageReader::setScaledSize(const QSize &size)
[const]QSizesizeMethod QSize QImageReader::size()
[const]bytessubTypeMethod QByteArray QImageReader::subType()
[const]bytes[]supportedSubTypesMethod QList<QByteArray> QImageReader::supportedSubTypes()
[const]boolsupportsAnimationMethod bool QImageReader::supportsAnimation()
[const]boolsupportsOption(const QImageIOHandler_ImageOption option)Method bool QImageReader::supportsOption(QImageIOHandler::ImageOption option)
[const]stringtext(string key)Method QString QImageReader::text(const QString &key)
[const]string[]textKeysMethod QStringList QImageReader::textKeys()
[const]QImageIOHandler_QFlags_TransformationtransformationMethod QFlags<QImageIOHandler::Transformation> QImageReader::transformation()

Public static methods and constants

[static,const]QImageReader_ImageReaderErrorDeviceErrorEnum constant QImageReader::DeviceError
[static,const]QImageReader_ImageReaderErrorFileNotFoundErrorEnum constant QImageReader::FileNotFoundError
[static,const]QImageReader_ImageReaderErrorInvalidDataErrorEnum constant QImageReader::InvalidDataError
[static,const]QImageReader_ImageReaderErrorUnknownErrorEnum constant QImageReader::UnknownError
[static,const]QImageReader_ImageReaderErrorUnsupportedFormatErrorEnum constant QImageReader::UnsupportedFormatError
bytesimageFormat(string fileName)Static method QByteArray QImageReader::imageFormat(const QString &fileName)
bytesimageFormat(QIODevice ptr device)Static method QByteArray QImageReader::imageFormat(QIODevice *device)
bytes[]imageFormatsForMimeType(bytes mimeType)Static method QList<QByteArray> QImageReader::imageFormatsForMimeType(const QByteArray &mimeType)
bytes[]supportedImageFormatsStatic method QList<QByteArray> QImageReader::supportedImageFormats()
bytes[]supportedMimeTypesStatic method QList<QByteArray> QImageReader::supportedMimeTypes()
stringtr(string sourceText,
string disambiguation = nullptr,
int n = -1)
Static method QString QImageReader::tr(const char *sourceText, const char *disambiguation, int n)
stringtrUtf8(string sourceText,
string disambiguation = nullptr,
int n = -1)
Static method QString QImageReader::trUtf8(const char *sourceText, const char *disambiguation, int n)

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

DeviceError

Signature: [static,const] QImageReader_ImageReaderError DeviceError

Description: Enum constant QImageReader::DeviceError

Python specific notes:
The object exposes a readable attribute 'DeviceError'. This is the getter.

FileNotFoundError

Signature: [static,const] QImageReader_ImageReaderError FileNotFoundError

Description: Enum constant QImageReader::FileNotFoundError

Python specific notes:
The object exposes a readable attribute 'FileNotFoundError'. This is the getter.

InvalidDataError

Signature: [static,const] QImageReader_ImageReaderError InvalidDataError

Description: Enum constant QImageReader::InvalidDataError

Python specific notes:
The object exposes a readable attribute 'InvalidDataError'. This is the getter.

UnknownError

Signature: [static,const] QImageReader_ImageReaderError UnknownError

Description: Enum constant QImageReader::UnknownError

Python specific notes:
The object exposes a readable attribute 'UnknownError'. This is the getter.

UnsupportedFormatError

Signature: [static,const] QImageReader_ImageReaderError UnsupportedFormatError

Description: Enum constant QImageReader::UnsupportedFormatError

Python specific notes:
The object exposes a readable attribute 'UnsupportedFormatError'. This is the getter.

_const_cast

Signature: [const] QImageReader ptr _const_cast

Description: Returns a non-const reference to self.

Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects.

This method has been introduced in version 0.29.6.

_create

Signature: void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

_destroy

Signature: void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

_destroyed?

Signature: [const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

_is_const_object?

Signature: [const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

_manage

Signature: void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

_unmanage

Signature: void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

autoDetectImageFormat

Signature: [const] bool autoDetectImageFormat

Description: Method bool QImageReader::autoDetectImageFormat()

Python specific notes:
The object exposes a readable attribute 'autoDetectImageFormat'. This is the getter.

autoDetectImageFormat=

Signature: void autoDetectImageFormat= (bool enabled)

Description: Method void QImageReader::setAutoDetectImageFormat(bool enabled)

Python specific notes:
The object exposes a writable attribute 'autoDetectImageFormat'. This is the setter.

autoTransform

Signature: [const] bool autoTransform

Description: Method bool QImageReader::autoTransform()

Python specific notes:
The object exposes a readable attribute 'autoTransform'. This is the getter.

autoTransform=

Signature: void autoTransform= (bool enabled)

Description: Method void QImageReader::setAutoTransform(bool enabled)

Python specific notes:
The object exposes a writable attribute 'autoTransform'. This is the setter.

backgroundColor

Signature: [const] QColor backgroundColor

Description: Method QColor QImageReader::backgroundColor()

Python specific notes:
The object exposes a readable attribute 'backgroundColor'. This is the getter.

backgroundColor=

Signature: void backgroundColor= (const QColor color)

Description: Method void QImageReader::setBackgroundColor(const QColor &color)

Python specific notes:
The object exposes a writable attribute 'backgroundColor'. This is the setter.

canRead

Signature: [const] bool canRead

Description: Method bool QImageReader::canRead()

clipRect

Signature: [const] QRect clipRect

Description: Method QRect QImageReader::clipRect()

Python specific notes:
The object exposes a readable attribute 'clipRect'. This is the getter.

clipRect=

Signature: void clipRect= (const QRect rect)

Description: Method void QImageReader::setClipRect(const QRect &rect)

Python specific notes:
The object exposes a writable attribute 'clipRect'. This is the setter.

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

currentImageNumber

Signature: [const] int currentImageNumber

Description: Method int QImageReader::currentImageNumber()

currentImageRect

Signature: [const] QRect currentImageRect

Description: Method QRect QImageReader::currentImageRect()

decideFormatFromContent

Signature: [const] bool decideFormatFromContent

Description: Method bool QImageReader::decideFormatFromContent()

Python specific notes:
The object exposes a readable attribute 'decideFormatFromContent'. This is the getter.

decideFormatFromContent=

Signature: void decideFormatFromContent= (bool ignored)

Description: Method void QImageReader::setDecideFormatFromContent(bool ignored)

Python specific notes:
The object exposes a writable attribute 'decideFormatFromContent'. This is the setter.

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

destroyed?

Signature: [const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

device

Signature: [const] QIODevice ptr device

Description: Method QIODevice *QImageReader::device()

Python specific notes:
The object exposes a readable attribute 'device'. This is the getter.

device=

Signature: void device= (QIODevice ptr device)

Description: Method void QImageReader::setDevice(QIODevice *device)

Python specific notes:
The object exposes a writable attribute 'device'. This is the setter.

error

Signature: [const] QImageReader_ImageReaderError error

Description: Method QImageReader::ImageReaderError QImageReader::error()

errorString

Signature: [const] string errorString

Description: Method QString QImageReader::errorString()

fileName

Signature: [const] string fileName

Description: Method QString QImageReader::fileName()

Python specific notes:
The object exposes a readable attribute 'fileName'. This is the getter.

fileName=

Signature: void fileName= (string fileName)

Description: Method void QImageReader::setFileName(const QString &fileName)

Python specific notes:
The object exposes a writable attribute 'fileName'. This is the setter.

format

Signature: [const] bytes format

Description: Method QByteArray QImageReader::format()

Python specific notes:
The object exposes a readable attribute 'format'. This is the getter.

format=

Signature: void format= (bytes format)

Description: Method void QImageReader::setFormat(const QByteArray &format)

Python specific notes:
The object exposes a writable attribute 'format'. This is the setter.

gamma

Signature: [const] float gamma

Description: Method float QImageReader::gamma()

Python specific notes:
The object exposes a readable attribute 'gamma'. This is the getter.

gamma=

Signature: void gamma= (float gamma)

Description: Method void QImageReader::setGamma(float gamma)

Python specific notes:
The object exposes a writable attribute 'gamma'. This is the setter.

imageCount

Signature: [const] int imageCount

Description: Method int QImageReader::imageCount()

imageFormat

(1) Signature: [const] QImage_Format imageFormat

Description: Method QImage::Format QImageReader::imageFormat()

Python specific notes:
This instance method is available as '_inst_imageFormat' in Python.

(2) Signature: [static] bytes imageFormat (string fileName)

Description: Static method QByteArray QImageReader::imageFormat(const QString &fileName)

This method is static and can be called without an instance.

Python specific notes:
This class method is available as '_class_imageFormat' in Python.

(3) Signature: [static] bytes imageFormat (QIODevice ptr device)

Description: Static method QByteArray QImageReader::imageFormat(QIODevice *device)

This method is static and can be called without an instance.

Python specific notes:
This class method is available as '_class_imageFormat' in Python.

imageFormatsForMimeType

Signature: [static] bytes[] imageFormatsForMimeType (bytes mimeType)

Description: Static method QList<QByteArray> QImageReader::imageFormatsForMimeType(const QByteArray &mimeType)

This method is static and can be called without an instance.

is_const_object?

Signature: [const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

jumpToImage

Signature: bool jumpToImage (int imageNumber)

Description: Method bool QImageReader::jumpToImage(int imageNumber)

jumpToNextImage

Signature: bool jumpToNextImage

Description: Method bool QImageReader::jumpToNextImage()

loopCount

Signature: [const] int loopCount

Description: Method int QImageReader::loopCount()

new

(1) Signature: [static] new QImageReader new

Description: Constructor QImageReader::QImageReader()

This method creates an object of class QImageReader.

Python specific notes:
This method is the default initializer of the object.

(2) Signature: [static] new QImageReader new (QIODevice ptr device, bytes format = QByteArray())

Description: Constructor QImageReader::QImageReader(QIODevice *device, const QByteArray &format)

This method creates an object of class QImageReader.

Python specific notes:
This method is the default initializer of the object.

(3) Signature: [static] new QImageReader new (string fileName, bytes format = QByteArray())

Description: Constructor QImageReader::QImageReader(const QString &fileName, const QByteArray &format)

This method creates an object of class QImageReader.

Python specific notes:
This method is the default initializer of the object.

nextImageDelay

Signature: [const] int nextImageDelay

Description: Method int QImageReader::nextImageDelay()

quality

Signature: [const] int quality

Description: Method int QImageReader::quality()

Python specific notes:
The object exposes a readable attribute 'quality'. This is the getter.

quality=

Signature: void quality= (int quality)

Description: Method void QImageReader::setQuality(int quality)

Python specific notes:
The object exposes a writable attribute 'quality'. This is the setter.

read

(1) Signature: QImage read

Description: Method QImage QImageReader::read()

(2) Signature: bool read (QImage ptr image)

Description: Method bool QImageReader::read(QImage *image)

scaledClipRect

Signature: [const] QRect scaledClipRect

Description: Method QRect QImageReader::scaledClipRect()

Python specific notes:
The object exposes a readable attribute 'scaledClipRect'. This is the getter.

scaledClipRect=

Signature: void scaledClipRect= (const QRect rect)

Description: Method void QImageReader::setScaledClipRect(const QRect &rect)

Python specific notes:
The object exposes a writable attribute 'scaledClipRect'. This is the setter.

scaledSize

Signature: [const] QSize scaledSize

Description: Method QSize QImageReader::scaledSize()

Python specific notes:
The object exposes a readable attribute 'scaledSize'. This is the getter.

scaledSize=

Signature: void scaledSize= (const QSize size)

Description: Method void QImageReader::setScaledSize(const QSize &size)

Python specific notes:
The object exposes a writable attribute 'scaledSize'. This is the setter.

setAutoDetectImageFormat

Signature: void setAutoDetectImageFormat (bool enabled)

Description: Method void QImageReader::setAutoDetectImageFormat(bool enabled)

Python specific notes:
The object exposes a writable attribute 'autoDetectImageFormat'. This is the setter.

setAutoTransform

Signature: void setAutoTransform (bool enabled)

Description: Method void QImageReader::setAutoTransform(bool enabled)

Python specific notes:
The object exposes a writable attribute 'autoTransform'. This is the setter.

setBackgroundColor

Signature: void setBackgroundColor (const QColor color)

Description: Method void QImageReader::setBackgroundColor(const QColor &color)

Python specific notes:
The object exposes a writable attribute 'backgroundColor'. This is the setter.

setClipRect

Signature: void setClipRect (const QRect rect)

Description: Method void QImageReader::setClipRect(const QRect &rect)

Python specific notes:
The object exposes a writable attribute 'clipRect'. This is the setter.

setDecideFormatFromContent

Signature: void setDecideFormatFromContent (bool ignored)

Description: Method void QImageReader::setDecideFormatFromContent(bool ignored)

Python specific notes:
The object exposes a writable attribute 'decideFormatFromContent'. This is the setter.

setDevice

Signature: void setDevice (QIODevice ptr device)

Description: Method void QImageReader::setDevice(QIODevice *device)

Python specific notes:
The object exposes a writable attribute 'device'. This is the setter.

setFileName

Signature: void setFileName (string fileName)

Description: Method void QImageReader::setFileName(const QString &fileName)

Python specific notes:
The object exposes a writable attribute 'fileName'. This is the setter.

setFormat

Signature: void setFormat (bytes format)

Description: Method void QImageReader::setFormat(const QByteArray &format)

Python specific notes:
The object exposes a writable attribute 'format'. This is the setter.

setGamma

Signature: void setGamma (float gamma)

Description: Method void QImageReader::setGamma(float gamma)

Python specific notes:
The object exposes a writable attribute 'gamma'. This is the setter.

setQuality

Signature: void setQuality (int quality)

Description: Method void QImageReader::setQuality(int quality)

Python specific notes:
The object exposes a writable attribute 'quality'. This is the setter.

setScaledClipRect

Signature: void setScaledClipRect (const QRect rect)

Description: Method void QImageReader::setScaledClipRect(const QRect &rect)

Python specific notes:
The object exposes a writable attribute 'scaledClipRect'. This is the setter.

setScaledSize

Signature: void setScaledSize (const QSize size)

Description: Method void QImageReader::setScaledSize(const QSize &size)

Python specific notes:
The object exposes a writable attribute 'scaledSize'. This is the setter.

size

Signature: [const] QSize size

Description: Method QSize QImageReader::size()

Python specific notes:
This method is also available as 'len(object)'.

subType

Signature: [const] bytes subType

Description: Method QByteArray QImageReader::subType()

supportedImageFormats

Signature: [static] bytes[] supportedImageFormats

Description: Static method QList<QByteArray> QImageReader::supportedImageFormats()

This method is static and can be called without an instance.

supportedMimeTypes

Signature: [static] bytes[] supportedMimeTypes

Description: Static method QList<QByteArray> QImageReader::supportedMimeTypes()

This method is static and can be called without an instance.

supportedSubTypes

Signature: [const] bytes[] supportedSubTypes

Description: Method QList<QByteArray> QImageReader::supportedSubTypes()

supportsAnimation

Signature: [const] bool supportsAnimation

Description: Method bool QImageReader::supportsAnimation()

supportsOption

Signature: [const] bool supportsOption (const QImageIOHandler_ImageOption option)

Description: Method bool QImageReader::supportsOption(QImageIOHandler::ImageOption option)

text

Signature: [const] string text (string key)

Description: Method QString QImageReader::text(const QString &key)

textKeys

Signature: [const] string[] textKeys

Description: Method QStringList QImageReader::textKeys()

tr

Signature: [static] string tr (string sourceText, string disambiguation = nullptr, int n = -1)

Description: Static method QString QImageReader::tr(const char *sourceText, const char *disambiguation, int n)

This method is static and can be called without an instance.

trUtf8

Signature: [static] string trUtf8 (string sourceText, string disambiguation = nullptr, int n = -1)

Description: Static method QString QImageReader::trUtf8(const char *sourceText, const char *disambiguation, int n)

This method is static and can be called without an instance.

transformation

Signature: [const] QImageIOHandler_QFlags_Transformation transformation

Description: Method QFlags<QImageIOHandler::Transformation> QImageReader::transformation()