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

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

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