QGUIFont.hh

00001 /*
00002  * APOLLO: A complete DAQ and Online Data Analysis Framework for Cuore
00003  * 
00004  * A.Giachero created 30/07/07 - <Andrea.Giachero@ge.infn.it> 
00005  * 
00006  $ $Id: $
00007  * $Revision: $
00008  *
00009  * Class QGUIFont:
00010  *
00011  */
00012 
00013 
00014 #ifndef _QGUI_FONT_HH_
00015 #define _QGUI_FONT_HH_
00016 
00017 
00018 
00019 // Apollo Includes
00020 
00021 
00022 // Root Includes
00023 
00024 
00025 // C/C++ Includes
00026 #include <sstream>
00027 #include <iostream>
00028 
00029 
00030 class QGUIFont
00031 {
00032 
00033 public:
00034 
00035   // dtor
00036   virtual ~QGUIFont();
00037 
00038   // Singleton Getter
00039   static QGUIFont& Get();
00040 
00041   // Get Default Font Code
00042   const std::string& GetDefaultFont(size_t PxlSize);
00043   const std::string& GetDefaultFont();
00044 
00045 protected:
00046   
00047 
00048 private:
00049 
00050   
00051   // Private ctor
00052   QGUIFont();
00053   
00054   // Font Code
00055   std::string fFontCode;
00056 
00057   // Font Family
00058   std::ostringstream fFamily;
00059 
00060   // Font Weight
00061   std::ostringstream fWeight;
00062 
00063   // Font Slant
00064   std::ostringstream fSlant;
00065 
00066   // Font pixel Size
00067   size_t fPxlSize;
00068 
00069 
00070   // Default Font Family
00071   const std::string kFamily;
00072 
00073   // Default Font Weight
00074   const std::string kWeight;
00075 
00076   // Default Font Slant
00077   const std::string kSlant;
00078 
00079   // Default Font pixel Size
00080   const size_t kPxlSize;
00081 
00082   // Font fixed last part
00083   const std::string kFixed;
00084    
00085   // Empty separator
00086   const std::string kEmpty;
00087 
00088 
00089 
00090   // Build Font Code starting up from the setting
00091   const std::string& BuildFontCode(const std::string& Family, const std::string& Weight, 
00092                                    const std::string& Slant,  size_t PxlSize);
00093 
00094   // Tune Size in agreement with sizes allowed
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_

Generated on Tue Nov 16 10:49:54 2010 for CUORE Software by  doxygen 1.5.6