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

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

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