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