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

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

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

__NOTOC__

Image:qt-logo.png

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

Image:trolltech-logo.png

Содержание

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

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.



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

  • QColor ( int x, int y, int z, Spec colorSpec )
  • void getRgba ( int * r, int * g, int * b, int * a ) const
  • void hsv ( int * h, int * s, int * v ) const
  • uint pixel ( int screen = -1 ) const
  • void rgb ( int * r, int * g, int * b ) const
  • void setRgba ( int r, int g, int b, int a )

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

[править]
QColor::QColor ( int x, int y, int z, Spec colorSpec )

Use one of the other QColor constructors, or one of the static convenience functions, instead.

[править]
void QColor::getRgba ( int * r, int * g, int * b, int * a ) const

Use getRgb() instead.

[править]
void QColor::hsv ( int * h, int * s, int * v ) const

Use getHsv() instead.

See also setHsv().

[править]
uint QColor::pixel ( int screen = -1 ) const

Returns the pixel value used by the underlying window system to refer to a color.

Use QColormap::pixel() instead.

For example, if you have code like

 QColor myColor;
 uint pixel = myColor.pixel(screen);

you can rewrite it as

 QColormap cmap = QColormap::instance(screen);
 uint pixel  = cmap.pixel(*this);

[править]
void QColor::rgb ( int * r, int * g, int * b ) const

This is an overloaded member function, provided for convenience.

Use getRgb() instead.

[править]
void QColor::setRgba ( int r, int g, int b, int a )

This is an overloaded member function, provided for convenience.

Use setRgb() instead.


Copyright © 2007 Trolltech Trademarks
Qt 4.3.2