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
ICOReader Class Reference
Collaboration diagram for ICOReader:

Public Member Functions

 ICOReader (QIODevice *iodevice)
int count ()
QImage iconAt (int index)
bool readIconEntry (int index, ICONDIRENTRY *iconEntry)
 ICOReader (QIODevice *iodevice)
int count ()
QImage iconAt (int index)
bool readIconEntry (int index, ICONDIRENTRY *iconEntry)

Static Public Member Functions

static bool canRead (QIODevice *iodev)
static QList< QImageread (QIODevice *device)
 Reads all the icons from the given device, and returns them as a list of QImage objects.
static bool write (QIODevice *device, const QList< QImage > &images)
 Writes all the QImages in the images list to the given device.
static bool canRead (QIODevice *iodev)
static QList< QImageread (QIODevice *device)
static bool write (QIODevice *device, const QList< QImage > &images)

Detailed Description

Definition at line 70 of file qicohandler.cpp.

Constructor & Destructor Documentation

◆ ICOReader() [1/2]

ICOReader::ICOReader ( QIODevice * iodevice)

Definition at line 157 of file qicohandler.cpp.

References ICOReader().

Referenced by ICOReader().

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

◆ ICOReader() [2/2]

ICOReader::ICOReader ( QIODevice * iodevice)

Member Function Documentation

◆ canRead() [1/2]

bool ICOReader::canRead ( QIODevice * iodev)
static

Definition at line 172 of file qicohandler.cpp.

◆ canRead() [2/2]

bool ICOReader::canRead ( QIODevice * iodev)
static

◆ count() [1/2]

int ICOReader::count ( )

Definition at line 165 of file qicohandler.cpp.

Referenced by iconAt(), QtIcoHandler::imageCount(), and read().

Here is the caller graph for this function:

◆ count() [2/2]

int ICOReader::count ( )

◆ iconAt() [1/2]

QImage ICOReader::iconAt ( int index)

Definition at line 427 of file qicohandler.cpp.

References count(), and readIconEntry().

Here is the call graph for this function:

◆ iconAt() [2/2]

QImage ICOReader::iconAt ( int index)

◆ read() [1/2]

QList< QImage > ICOReader::read ( QIODevice * device)
static

Reads all the icons from the given device, and returns them as a list of QImage objects.

Each image has an alpha channel that represents the mask from the corresponding icon.

See also
write()

Definition at line 539 of file qicohandler.cpp.

References count().

Here is the call graph for this function:

◆ read() [2/2]

QList< QImage > ICOReader::read ( QIODevice * device)
static

◆ readIconEntry() [1/2]

bool ICOReader::readIconEntry ( int index,
ICONDIRENTRY * iconEntry )

Definition at line 255 of file qicohandler.cpp.

Referenced by iconAt(), and QtIcoHandler::option().

Here is the caller graph for this function:

◆ readIconEntry() [2/2]

bool ICOReader::readIconEntry ( int index,
ICONDIRENTRY * iconEntry )

◆ write() [1/2]

bool ICOReader::write ( QIODevice * device,
const QList< QImage > & images )
static

Writes all the QImages in the images list to the given device.

Returns true if the images are written successfully; otherwise returns false.

The first image in the list is stored as the first icon in the device, and is therefore used as the default icon by applications. The alpha channel of each image is converted to a mask for each corresponding icon.

See also
read()

Definition at line 565 of file qicohandler.cpp.

◆ write() [2/2]

bool ICOReader::write ( QIODevice * device,
const QList< QImage > & images )
static

The documentation for this class was generated from the following file: