00001
00002
00003
00004
00005 #ifndef QFont_h
00006 #define QFont_h
00007
00008
00009
00010 class QFont;
00011
00012 #include <string>
00013
00014
00015 #include "QColor.h"
00016
00017
00018 class QFont
00019 {
00020 protected:
00021
00022 int Size;
00023
00024
00025 bool Bold;
00026
00027
00028 QColor* Color;
00029
00030 public:
00031
00032 void draw( const char* aText , int maxLength );
00033
00034
00035 void drawInternal( const char* aText , int maxLength );
00036
00037
00038 void drawAtPos( const char* aText , int x , int y , int maxLength );
00039
00040
00041 float getTextWidth( const char* aText );
00042
00043
00044 int getLengthForWidth( const char* aText , int aWidth );
00045
00046
00047 virtual void Init();
00048
00049
00050 virtual void CleanUp();
00051
00052
00053 virtual int getSize();
00054
00055
00056 virtual void setSize( int newValue );
00057
00058
00059 virtual bool getBold();
00060
00061
00062 virtual void setBold( bool newValue );
00063
00064
00065 QColor* getColor();
00066
00067
00068 void copyFrom( QFont* from );
00069
00070
00071 void print();
00072
00073
00074 QFont( );
00075
00076
00077 virtual ~QFont();
00078
00079
00080 };
00081 #endif
00082