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

/cygdrive/d/Eigene Dateien/!DProcs/code_gen/QColor.cpp

Go to the documentation of this file.
00001 // Class QColor 
00002 // Color Class. The values of color components are in range [0..1]
00003 // Filename QColor.cpp
00004 // FaPra 2003-2004, A5,  Alexander Kramer
00005 
00006 
00007 #include "QColor.h"
00008 #include <GL/glut.h>
00009 #include <iostream>
00010 using namespace std;
00011 
00012 // ----------------------------------------------------------
00013 
00014 //! sets the color as current for drawing context
00015 void QColor::setAsCurrent()
00016 {
00017  glColor4f(R,G,B,A);
00018 } // end of setAsCurrent()
00019 
00020 //! sets the color
00021 const void QColor::set( float  r , float  g , float  b , float  a )
00022 {
00023   R = r;
00024   G = g;
00025   B = b;
00026   A = a;
00027 } // end of set()
00028 
00029 //! getter method for R
00030 float QColor::getR()
00031 {
00032 return R;
00033 } // end of getR()
00034 
00035 //! setter method for R
00036 void QColor::setR( float  newValue )
00037 {
00038 R = newValue;
00039 } // end of setR()
00040 
00041 //! getter method for G
00042 float QColor::getG()
00043 {
00044 return G;
00045 } // end of getG()
00046 
00047 //! setter method for G
00048 void QColor::setG( float  newValue )
00049 {
00050 G = newValue;
00051 } // end of setG()
00052 
00053 //! getter method for B
00054 float QColor::getB()
00055 {
00056 return B;
00057 } // end of getB()
00058 
00059 //! setter method for B
00060 void QColor::setB( float  newValue )
00061 {
00062 B = newValue;
00063 } // end of setB()
00064 
00065 //! getter method for A
00066 float QColor::getA()
00067 {
00068 return A;
00069 } // end of getA()
00070 
00071 //! setter method for A
00072 void QColor::setA( float  newValue )
00073 {
00074 A = newValue;
00075 } // end of setA()
00076 
00077 // WARNING : The implementation of this method will be automatically generated with code generator.
00078 // To prevent this add '//KEEP' at the first line of the implementation.(first line after '{')
00079 //! copy itself from another instance
00080 void QColor::copyFrom( QColor*  from )
00081 {
00082 setR(from->getR());
00083 setG(from->getG());
00084 setB(from->getB());
00085 setA(from->getA());
00086 } // end of copyFrom()
00087 
00088 // WARNING : The implementation of this method will be automatically generated with code generator.
00089 // To prevent this add '//KEEP' at the first line of the implementation.(first line after '{')
00090 //! prints itself to the cout
00091 void QColor::print()
00092 {
00093 cout << "Class : QColor" << endl;
00094 cout << "R = " << R << endl;
00095 cout << "G = " << G << endl;
00096 cout << "B = " << B << endl;
00097 cout << "A = " << A << endl;
00098 } // end of print()
00099 
00100 // WARNING : The implementation of this method will be automatically generated with code generator.
00101 // To prevent this add '//KEEP' at the first line of the implementation.(first line after '{')
00102 //! Constructor
00103  QColor::QColor(  )
00104 {
00105 R = 1;
00106 G = 1;
00107 B = 1;
00108 A = 1;
00109 } // end of QColor()
00110 
00111 // WARNING : The implementation of this method will be automatically generated with code generator.
00112 // To prevent this add '//KEEP' at the first line of the implementation.(first line after '{')
00113 //! Destructor
00114  QColor::~QColor()
00115 {
00116 } // end of ~QColor()
00117 
00118 // end of implementation of QColor
00119 
00120 

Generated on Thu Mar 18 18:33:48 2004 for miniQT by doxygen1.2.18