Qt:Документация 4.3.2/qimage-obsolete

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] Obsolete Members for QImage

The following class members are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.



[править] Открытые функции

  • int serialNumber () const (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)

[править] Описание функций-членов

[править]
int QImage::serialNumber () const

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==().

[править]
void QImage::setText ( const char * key, const char * language, const QString & text )

This is an overloaded member function, provided for convenience.

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.

[править]
QString QImage::text ( const char * key, const char * language = 0 ) const

This is an overloaded member function, provided for convenience.

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.

[править]
QString QImage::text ( const QImageTextKeyLang & keywordAndLanguage ) const

This is an overloaded member function, provided for convenience.

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.

[править]
QStringList QImage::textLanguages () const

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.

[править]
QList<QImageTextKeyLang> QImage::textList () const

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.


Copyright © 2007 Trolltech Trademarks
Qt 4.3.2