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

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

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

__NOTOC__

Image:qt-logo.png

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

Image:trolltech-logo.png

Содержание

[править] Qt 3 Support Members for QIcon

The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.



[править] Открытые типы

  • enum Size { Small, Large, Automatic }

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

  • QPixmap pixmap ( Size size, Mode mode, State state = Off ) const
  • QPixmap pixmap ( Size size, bool enabled, State state = Off ) const
  • QPixmap pixmap () const
  • void reset ( const QPixmap & pixmap, Size size )
  • void setPixmap ( const QPixmap & pixmap, Size size, Mode mode = Normal, State state = Off )
  • void setPixmap ( const QString & fileName, Size size, Mode mode = Normal, State state = Off )

[править] Статические открытые члены


[править] Описание типов членов

[править]
enum QIcon::Size

Constant Value Description
QIcon::Small 0 Use QStyle::pixelMetric( QStyle::PM_SmallIconSize) instead.
QIcon::Large 1 Use QStyle::pixelMetric( QStyle::PM_LargeIconSize) instead.
QIcon::Automatic Small N/A.

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

[править]
QPixmap QIcon::pixmap ( Size size, Mode mode, State state = Off ) const

This is an overloaded member function, provided for convenience.

Use pixmap( QSize(...), mode, state), where the first argument is an appropriate QSize instead of a Size value.

See also pixmapSize().

[править]
QPixmap QIcon::pixmap ( Size size, bool enabled, State state = Off ) const

This is an overloaded member function, provided for convenience.

Use pixmap( QSize(...), mode, state), where the first argument is an appropriate QSize instead of a Size value, and the second argument is QIcon::Normal or QIcon::Disabled, depending on the value of enabled.

See also pixmapSize().

[править]
QPixmap QIcon::pixmap () const

This is an overloaded member function, provided for convenience.

Use one of the other pixmap() overloads.

[править]
QSize QIcon::pixmapSize ( Size which ) [static]

Use QStyle::pixelMetric() with QStyle::PM_SmallIconSize or QStyle::PM_LargeIconSize as the first argument, depending on which.

See also setPixmapSize().

[править]
void QIcon::reset ( const QPixmap & pixmap, Size size )

Use the constructor that takes a QPixmap and operator=().

[править]
void QIcon::setPixmap ( const QPixmap & pixmap, Size size, Mode mode = Normal, State state = Off )

Use addPixmap(pixmap, mode, state) instead. The size parameter is ignored.

See also pixmap().

[править]
void QIcon::setPixmap ( const QString & fileName, Size size, Mode mode = Normal, State state = Off )

This is an overloaded member function, provided for convenience.

Use addFile(fileName, mode, state) instead. The size parameter is ignored.

[править]
void QIcon::setPixmapSize ( Size which, const QSize & size ) [static]

The pixmap() function now takes a QSize instead of a QIcon::Size, so there is no need for this function in new code.

See also pixmapSize().


Copyright © 2007 Trolltech Trademarks
Qt 4.3.2