Main Page   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

QColor Class Reference

Color Class. The values of color components are in range [0..1]. More...

#include <QColor.h>

Collaboration diagram for QColor:

Collaboration graph
[legend]

Public Methods

void setAsCurrent ()
 sets the color as current for drawing context

const void set (float r, float g, float b, float a)
 sets the color

virtual float getR ()
 getter method for R

virtual void setR (float newValue)
 setter method for R

virtual float getG ()
 getter method for G

virtual void setG (float newValue)
 setter method for G

virtual float getB ()
 getter method for B

virtual void setB (float newValue)
 setter method for B

virtual float getA ()
 getter method for A

virtual void setA (float newValue)
 setter method for A

void copyFrom (QColor *from)
 copy itself from another instance

void print ()
 prints itself to the cout

 QColor ()
 Constructor.

virtual ~QColor ()
 Destructor.

void setAsCurrent ()
 sets the color as current for drawing context

const void set (float r, float g, float b, float a)
 sets the color

virtual float getR ()
 getter method for R

virtual void setR (float newValue)
 setter method for R

virtual float getG ()
 getter method for G

virtual void setG (float newValue)
 setter method for G

virtual float getB ()
 getter method for B

virtual void setB (float newValue)
 setter method for B

virtual float getA ()
 getter method for A

virtual void setA (float newValue)
 setter method for A

void copyFrom (QColor *from)
 copy itself from another instance

void print ()
 prints itself to the cout

 QColor ()
 Constructor.

virtual ~QColor ()
 Destructor.


Protected Attributes

float R
 red

float G
 green

float B
 blue

float A
 alpha


Detailed Description

Color Class. The values of color components are in range [0..1].

Definition at line 15 of file QColor.h.


Constructor & Destructor Documentation

QColor::QColor  
 

Constructor.

Definition at line 103 of file QColor.cpp.

QColor::~QColor   [virtual]
 

Destructor.

Definition at line 114 of file QColor.cpp.

QColor::QColor  
 

Constructor.

virtual QColor::~QColor   [virtual]
 

Destructor.


Member Function Documentation

void QColor::copyFrom QColor *    from
 

copy itself from another instance

void QColor::copyFrom QColor *    from
 

copy itself from another instance

Definition at line 80 of file QColor.cpp.

Referenced by QFont::copyFrom().

virtual float QColor::getA   [virtual]
 

getter method for A

float QColor::getA   [virtual]
 

getter method for A

Definition at line 66 of file QColor.cpp.

References A.

virtual float QColor::getB   [virtual]
 

getter method for B

float QColor::getB   [virtual]
 

getter method for B

Definition at line 54 of file QColor.cpp.

References B.

virtual float QColor::getG   [virtual]
 

getter method for G

float QColor::getG   [virtual]
 

getter method for G

Definition at line 42 of file QColor.cpp.

References G.

virtual float QColor::getR   [virtual]
 

getter method for R

float QColor::getR   [virtual]
 

getter method for R

Definition at line 30 of file QColor.cpp.

References R.

void QColor::print  
 

prints itself to the cout

void QColor::print  
 

prints itself to the cout

Definition at line 91 of file QColor.cpp.

const void QColor::set float    r,
float    g,
float    b,
float    a
 

sets the color

const void QColor::set float    r,
float    g,
float    b,
float    a
 

sets the color

Definition at line 21 of file QColor.cpp.

References A, B, G, and R.

Referenced by QWindow::Init(), and QLookAndFeel::Init().

virtual void QColor::setA float    newValue [virtual]
 

setter method for A

void QColor::setA float    newValue [virtual]
 

setter method for A

Definition at line 72 of file QColor.cpp.

References A.

void QColor::setAsCurrent  
 

sets the color as current for drawing context

void QColor::setAsCurrent  
 

sets the color as current for drawing context

Definition at line 15 of file QColor.cpp.

References A, B, G, and R.

Referenced by QToolBar::draw(), QTextEdit::draw(), QCaptionButton::draw(), QLookAndFeel::drawBevel(), QLookAndFeel::drawCheckBox(), QWindow::drawFrame(), QFont::drawInternal(), and QLookAndFeel::drawRadioButton().

virtual void QColor::setB float    newValue [virtual]
 

setter method for B

void QColor::setB float    newValue [virtual]
 

setter method for B

Definition at line 60 of file QColor.cpp.

References B.

virtual void QColor::setG float    newValue [virtual]
 

setter method for G

void QColor::setG float    newValue [virtual]
 

setter method for G

Definition at line 48 of file QColor.cpp.

References G.

virtual void QColor::setR float    newValue [virtual]
 

setter method for R

void QColor::setR float    newValue [virtual]
 

setter method for R

Definition at line 36 of file QColor.cpp.

References R.


Field Documentation

float QColor::A [protected]
 

alpha

Definition at line 30 of file QColor.h.

Referenced by getA(), set(), setA(), and setAsCurrent().

float QColor::B [protected]
 

blue

Definition at line 27 of file QColor.h.

Referenced by getB(), set(), setAsCurrent(), and setB().

float QColor::G [protected]
 

green

Definition at line 24 of file QColor.h.

Referenced by getG(), set(), setAsCurrent(), and setG().

float QColor::R [protected]
 

red

Definition at line 21 of file QColor.h.

Referenced by getR(), set(), setAsCurrent(), and setR().


The documentation for this class was generated from the following files:
Generated on Thu Mar 18 18:34:29 2004 for miniQT by doxygen1.2.18