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

/cygdrive/d/Eigene Dateien/!DProcs/code_gen/src/QLookAndFeel.h

Go to the documentation of this file.
00001 // Class QLookAndFeel 
00002 // Filename QLookAndFeel.h 
00003 // FaPra 2003-2004, A5, Alexander Kramer
00004 
00005 #ifndef QLookAndFeel_h 
00006 #define QLookAndFeel_h 
00007 
00008 
00009 //! Pre-declaration of QLookAndFeel
00010 class QLookAndFeel;
00011 
00012 
00013 
00014 #include "QColor.h"
00015 #include "QFont.h"
00016 //! enumeration of bevel states
00017 enum QBevelState {bsUp, bsDown, bsDisabled };
00018 
00019 
00020 //! Defines Look and Feel. Colors, Textures, default Font size and so on.
00021 class QLookAndFeel
00022 {
00023 private:
00024 //! id for checkbox texture
00025 unsigned int CheckBoxTexID;
00026 
00027 //! id for checkbox texture
00028 unsigned int CheckBoxCheckedTexID;
00029 
00030 //! id for radio button checked texture
00031 unsigned int RadioButtonCheckedTexID;
00032 
00033 //! id for radio button texture
00034 unsigned int RadioButtonTexID;
00035 
00036 //! id for close button texture
00037 unsigned int CloseButtonTexID;
00038 
00039 //! id for close button down texture
00040 unsigned int CloseButtonDownTexID;
00041 
00042 //! id for maximize button texture
00043 unsigned int MaximizeButtonTexID;
00044 
00045 //! id for maximize button down texture
00046 unsigned int MaximizeButtonDownTexID;
00047 
00048 //! id for restore button texture
00049 unsigned int RestoreButtonTexID;
00050 
00051 //! id for restore button down texture
00052 unsigned int RestoreButtonDownTexID;
00053 
00054 //! id for miniimize button texture
00055 unsigned int MinimizeButtonTexID;
00056 
00057 //! id for minimize button down texture
00058 unsigned int MinimizeButtonDownTexID;
00059 
00060 protected:
00061 //! back ground color
00062 QColor* BackGroundColor;
00063 
00064 //! color of control if it is disabled
00065 QColor* DisabledColor;
00066 
00067 //! color of the raised side of a bevel
00068 QColor* BevelRaisedColor;
00069 
00070 //! color of the lowered side of a bevel
00071 QColor* BevelLoweredColor;
00072 
00073 //! color of the side of a disabled bevel
00074 QColor* BevelDisabledColor;
00075 
00076 //! highlighted color
00077 QColor* HighlightColor;
00078 
00079 //! reference font
00080 QFont* Font;
00081 
00082 public:
00083 //! draws bevel from x,y-x+w,y+h. State : up,down,disabled
00084  void drawBevel( float  x , float  y , float  w , float  h , QBevelState  state );
00085 
00086 //! draws bevel from x,y-x+w,y+h. State : up,down,disabled
00087  void drawRect( float  x , float  y , float  w , float  h );
00088 
00089 //! draws given texture with given size
00090  void drawTexture( unsigned  int  texID , int  width , int  height );
00091 
00092 //! draws checkbox texture
00093  void drawCheckBox( bool  checked );
00094 
00095 //! draws radio button texture
00096  void drawRadioButton( bool  checked );
00097 
00098 //! draws close button texture
00099  void drawCloseButton( bool  down , int  width , int  height );
00100 
00101 //! draws maximize button texture
00102  void drawMaximizeButton( bool  down , int  width , int  height );
00103 
00104 //! initialization code
00105 virtual void Init();
00106 
00107 //! clean up code
00108 virtual void CleanUp();
00109 
00110 //! getter method for BackGroundColor
00111  QColor* getBackGroundColor();
00112 
00113 //! getter method for DisabledColor
00114  QColor* getDisabledColor();
00115 
00116 //! getter method for BevelRaisedColor
00117  QColor* getBevelRaisedColor();
00118 
00119 //! getter method for BevelLoweredColor
00120  QColor* getBevelLoweredColor();
00121 
00122 //! getter method for BevelDisabledColor
00123  QColor* getBevelDisabledColor();
00124 
00125 //! getter method for HighlightColor
00126  QColor* getHighlightColor();
00127 
00128 //! getter method for Font
00129  QFont* getFont();
00130 
00131 //! prints itself to the cout
00132  void print();
00133 
00134 //! Constructor
00135   QLookAndFeel(  );
00136 
00137 //! Destructor
00138 virtual  ~QLookAndFeel();
00139 
00140 
00141 };
00142 #endif
00143 

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