kalzium
kalziumutils.h
Go to the documentation of this file.00001 #ifndef KALZIUMUTILS_H
00002 #define KALZIUMUTILS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 class QString;
00018 class QRect;
00019 class QFont;
00020 class QPainter;
00021 class Element;
00022
00023 #include <chemicaldataobject.h>
00024
00025 class KalziumUtils
00026 {
00027 public:
00036 static int maxSize( const QString& string, const QRect& rect, QFont font, QPainter* painter, int minFontSize = 4, int maxFontSize = 20 );
00037
00044 static double strippedValue( double value );
00045
00052 static int StringWidth( const QString& string, const QFont& font, QPainter* painter );
00059 static int StringHeight( const QString& string, const QFont& font, QPainter* painter );
00060
00068 static QString prettyUnit( const Element* el, ChemicalDataObject::BlueObelisk kind );
00069 };
00070
00071 #endif // KALZIUMUTILS_H
00072