The following class members are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
QImage | alphaChannel () const (obsolete) |
int | serialNumber () const (obsolete) |
void | setAlphaChannel ( const QImage & alphaChannel ) (obsolete) |
void | setText ( const char * key, const char * language, const QString & text ) (obsolete) |
QString | text ( const char * key, const char * language = 0 ) const (obsolete) |
QString | text ( const QImageTextKeyLang & keywordAndLanguage ) const (obsolete) |
QStringList | textLanguages () const (obsolete) |
QList<QImageTextKeyLang> | textList () const (obsolete) |
Returns the alpha channel of the image as a new grayscale QImage in which each pixel's red, green, and blue values are given the alpha value of the original image. The color depth of the returned image is 8-bit.
You can see an example of use of this function in QPixmap's alphaChannel(), which works in the same way as this function on QPixmaps.
Most usecases for this function can be replaced with QPainter and using composition modes.
Warning: This is an expensive function.
See also setAlphaChannel(), hasAlphaChannel(), Pixmap, and Image Transformations.
Returns a number that identifies the contents of this QImage object. Distinct QImage objects can only have the same serial number if they refer to the same contents (but they don't have to).
Use cacheKey() instead.
Warning: The serial number doesn't necessarily change when the image is altered. This means that it may be dangerous to use it as a cache key.
See also operator==().
Sets the alpha channel of this image to the given alphaChannel.
If alphaChannel is an 8 bit grayscale image, the intensity values are written into this buffer directly. Otherwise, alphaChannel is converted to 32 bit and the intensity of the RGB pixel values is used.
Note that the image will be converted to the Format_ARGB32_Premultiplied format if the function succeeds.
Use one of the composition modes in QPainter::CompositionMode instead.
Warning: This function is expensive.
See also alphaChannel(), Image Transformations, and Image Formats.
Sets the image text to the given text and associate it with the given key. The text is recorded in the specified language, or in a default language if language is 0.
Use setText() instead.
The language the text is recorded in is no longer relevant since the text is always set using QString and UTF-8 representation.
Returns the text recorded for the given key in the given language, or in a default language if language is 0.
Use text() instead.
The language the text is recorded in is no longer relevant since the text is always set using QString and UTF-8 representation.
This is an overloaded function.
Returns the text recorded for the given keywordAndLanguage.
Use text() instead.
The language the text is recorded in is no longer relevant since the text is always set using QString and UTF-8 representation.
Returns the language identifiers for which some texts are recorded. Note that if you want to iterate over the list, you should iterate over a copy.
The language the text is recorded in is no longer relevant since the text is always set using QString and UTF-8 representation.
Returns a list of QImageTextKeyLang objects that enumerate all the texts key/language pairs set for this image.
Use textKeys() instead.
The language the text is recorded in is no longer relevant since the text is always set using QString and UTF-8 representation.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.