00001 // @(#)root/qt:$Name: $:$Id: TQtPadFont.h 33707 2010-06-02 06:27:34Z brun $ 00002 // Author: Valeri Fine 21/01/2002 00003 /**************************************************************************** 00004 ** 00005 ** Copyright (C) 2002 by Valeri Fine. All rights reserved. 00006 ** 00007 ** This file may be distributed under the terms of the Q Public License 00008 ** as defined by Trolltech AS of Norway and appearing in the file 00009 ** LICENSE.QPL included in the packaging of this file. 00010 *****************************************************************************/ 00011 00012 #ifndef ROOT_TQtPadFont 00013 #define ROOT_TQtPadFont 00014 00015 #include "TAttText.h" 00016 #include "TString.h" 00017 00018 #ifndef __CINT__ 00019 # include <QFont> 00020 #else 00021 class QFont; 00022 #endif 00023 // 00024 // TQtPadFont class is Qt QFont class with TAttText ROOT class interface 00025 // 00026 class TQtPadFont : public QFont, public TAttText 00027 { 00028 private: 00029 static TString fgRomanFontName; 00030 static TString fgArialFontName; 00031 static TString fgCourierFontName; 00032 static TString fgSymbolFontFamily; 00033 00034 public: 00035 TQtPadFont(); 00036 TQtPadFont(const TQtPadFont &src):QFont(src),TAttText(src) {} 00037 virtual ~TQtPadFont(){;} 00038 void SetTextFont(const char *fontname, int italic, int bold); 00039 void SetTextFont(Font_t fontnumber=62); 00040 void SetTextSize(Float_t textsize=1); 00041 void SetTextSizePixels(Int_t npixels); 00042 void SetTextMagnify(Float_t mgn); 00043 static const char *RomanFontName(); 00044 static const char *ArialFontName(); 00045 static const char *CourierFontName(); 00046 static const char *SymbolFontFamily(); 00047 static void SetSymbolFontFamily(const char *symbolFnName="Symbol"); 00048 00049 ClassDef(TQtPadFont,0) //< Create Qt QFont object based on ROOT TAttText attributes 00050 }; 00051 00052 #endif