QGUIFont.hh
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _QGUI_FONT_HH_
00015 #define _QGUI_FONT_HH_
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <sstream>
00027 #include <iostream>
00028
00029
00030 class QGUIFont
00031 {
00032
00033 public:
00034
00035
00036 virtual ~QGUIFont();
00037
00038
00039 static QGUIFont& Get();
00040
00041
00042 const std::string& GetDefaultFont(size_t PxlSize);
00043 const std::string& GetDefaultFont();
00044
00045 protected:
00046
00047
00048 private:
00049
00050
00051
00052 QGUIFont();
00053
00054
00055 std::string fFontCode;
00056
00057
00058 std::ostringstream fFamily;
00059
00060
00061 std::ostringstream fWeight;
00062
00063
00064 std::ostringstream fSlant;
00065
00066
00067 size_t fPxlSize;
00068
00069
00070
00071 const std::string kFamily;
00072
00073
00074 const std::string kWeight;
00075
00076
00077 const std::string kSlant;
00078
00079
00080 const size_t kPxlSize;
00081
00082
00083 const std::string kFixed;
00084
00085
00086 const std::string kEmpty;
00087
00088
00089
00090
00091 const std::string& BuildFontCode(const std::string& Family, const std::string& Weight,
00092 const std::string& Slant, size_t PxlSize);
00093
00094
00095 const size_t TuneSize(size_t PxlSize);
00096
00097
00098 };
00099
00100
00101
00102 int qcompare(const void* a, const void* b);
00103
00104 #endif // _QGUI_FONT_HH_