![]() |
Qt 6.x
The Qt SDK
|
Collaboration diagram for ICOReader:Public Member Functions | |
| 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< QImage > | read (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. | |
Definition at line 69 of file qicohandler.cpp.
| ICOReader::ICOReader | ( | QIODevice * | iodevice | ) |
Definition at line 156 of file qicohandler.cpp.
|
static |
Definition at line 171 of file qicohandler.cpp.
References QIODevice::isSequential(), QIODevice::pos(), readIconDir(), readIconDirEntry(), QIODevice::seek(), and QIODevice::ungetChar().
Referenced by QtIcoHandler::canRead(), and QtIcoHandler::canRead().
Here is the call graph for this function:
Here is the caller graph for this function:| int ICOReader::count | ( | ) |
Definition at line 164 of file qicohandler.cpp.
Referenced by iconAt(), and QtIcoHandler::imageCount().
Here is the caller graph for this function:| QImage ICOReader::iconAt | ( | int | index | ) |
Definition at line 426 of file qicohandler.cpp.
References QImageIOHandler::allocateImage(), QIODevice::bytesAvailable(), count(), QImage::Format_ARGB32, QImage::Format_ARGB32_Premultiplied, QImage::Format_Indexed8, QImage::Format_Mono, QImage::Format_RGB32, QImage::fromData(), QByteArray::fromRawData(), header(), icoOrigDepthKey, QString::number(), qRgba(), QIODevice::read(), readIconEntry(), QIODevice::seek(), and QByteArray::size().
Referenced by QtIcoHandler::read().
Here is the call graph for this function:
Here is the caller graph for this function: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.
Definition at line 538 of file qicohandler.cpp.
References device, i, images, and QList< T >::reserve().
Here is the call graph for this function:| bool ICOReader::readIconEntry | ( | int | index, |
| ICONDIRENTRY * | iconEntry | ||
| ) |
Definition at line 254 of file qicohandler.cpp.
References ICONDIR_SIZE, ICONDIRENTRY_SIZE, readIconDirEntry(), and QIODevice::seek().
Referenced by iconAt(), and QtIcoHandler::option().
Here is the call graph for this function:
Here is the caller graph for this function: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.
Definition at line 564 of file qicohandler.cpp.
References BMP_INFOHDR::biBitCount, BMP_INFOHDR::biClrImportant, BMP_INFOHDR::biClrUsed, BMP_INFOHDR::biCompression, BMP_INFOHDR::biHeight, BMP_INFOHDR::biPlanes, BMP_INFOHDR::biSize, BMP_INFOHDR::biSizeImage, BMP_INFOHDR::biWidth, BMP_INFOHDR::biXPelsPerMeter, BMP_INFOHDR::biYPelsPerMeter, BMP_INFOHDR_SIZE, QImage::bytesPerLine(), Qt::color1, device, QImage::fill(), QImage::Format_ARGB32, QImage::Format_Mono, QImage::height(), i, ICONDIR_SIZE, ICONDIRENTRY_SIZE, imageData, images, Qt::KeepAspectRatio, qAlpha(), qBlue(), qGreen(), qRed(), QRgb, QImage::scanLine(), QImage::setPixel(), QList< T >::size(), Qt::SmoothTransformation, writeBMPInfoHeader(), writeIconDir(), writeIconDirEntry(), and QIODeviceBase::WriteOnly.
Referenced by QtIcoHandler::write().
Here is the call graph for this function:
Here is the caller graph for this function: