filters
ImportHelpers.hGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _IMPORT_HELPERS_H
00021 #define _IMPORT_HELPERS_H
00022
00023 #include <qstring.h>
00024 #include <qmap.h>
00025
00034 class AbiProps
00035 {
00036 public:
00037 AbiProps() {};
00038 AbiProps(QString newValue) : m_value(newValue) {};
00039 virtual ~AbiProps() {};
00040 public:
00041 inline QString getValue(void) const { return m_value; }
00042 private:
00043 QString m_value;
00044 };
00045
00046 class AbiPropsMap : public QMap<QString,AbiProps>
00047 {
00048 public:
00049 AbiPropsMap() {};
00050 virtual ~AbiPropsMap() {};
00051 public:
00052 bool setProperty(const QString& newName, const QString& newValue);
00053 void splitAndAddAbiProps(const QString& strProps);
00054 };
00055
00056 inline double CentimetresToPoints(const double d)
00057 {
00058 return d * 72.0 / 2.54;
00059 }
00060
00061 inline double MillimetresToPoints(const double d)
00062 {
00063 return d * 72.0 / 25.4;
00064 }
00065
00066 inline double InchesToPoints(const double d)
00067 {
00068 return d * 72.0;
00069 }
00070
00071 inline double PicaToPoints(const double d)
00072 {
00073
00074 return d * 12.0;
00075 }
00076
00083 double ValueWithLengthUnit( const QString& _str, bool* atleast = NULL );
00084
00085 #endif // _IMPORT_HELPERS_H
|