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

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

Go to the documentation of this file.
00001 // Class QFont 
00002 // Filename QFont.h 
00003 // FaPra 2003-2004, A5, Alexander Kramer
00004 
00005 #ifndef QFont_h 
00006 #define QFont_h 
00007 
00008 
00009 //! Pre-declaration of QFont
00010 class QFont;
00011 
00012 #include <string>
00013 
00014 
00015 #include "QColor.h"
00016 
00017 //! Font class for drawing text
00018 class QFont
00019 {
00020 protected:
00021 //! Font size
00022 int Size;
00023 
00024 //! defines whether font is bold
00025 bool Bold;
00026 
00027 //! color of the font
00028 QColor* Color;
00029 
00030 public:
00031 //! draws the text with maximum length)
00032  void draw( const  char*  aText , int  maxLength );
00033 
00034 //! draws the text and ajust the matrix
00035  void drawInternal( const  char*  aText , int  maxLength );
00036 
00037 //! draws the text at given position
00038  void drawAtPos( const  char*  aText , int  x , int  y , int  maxLength );
00039 
00040 //! returns width of text
00041  float getTextWidth( const  char*  aText );
00042 
00043 //! returns length of string which can be drawn whithin the given width
00044  int getLengthForWidth( const  char*  aText , int  aWidth );
00045 
00046 //! initialization code
00047 virtual void Init();
00048 
00049 //! clean up code
00050 virtual void CleanUp();
00051 
00052 //! getter method for Size
00053 virtual int getSize();
00054 
00055 //! setter method for Size
00056 virtual void setSize( int  newValue );
00057 
00058 //! getter method for Bold
00059 virtual bool getBold();
00060 
00061 //! setter method for Bold
00062 virtual void setBold( bool  newValue );
00063 
00064 //! getter method for Color
00065  QColor* getColor();
00066 
00067 //! copy itself from another instance
00068  void copyFrom( QFont*  from );
00069 
00070 //! prints itself to the cout
00071  void print();
00072 
00073 //! Constructor
00074   QFont(  );
00075 
00076 //! Destructor
00077 virtual  ~QFont();
00078 
00079 
00080 };
00081 #endif
00082 

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