Changeset View
Changeset View
Standalone View
Standalone View
src/common/KReportUnit.h
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | |||||
50 | #define POINT_TO_INCH(px) qreal((px)*0.01388888888889) | 50 | #define POINT_TO_INCH(px) qreal((px)*0.01388888888889) | ||
51 | #define INCH_TO_POINT(inch) qreal((inch)*72.0) | 51 | #define INCH_TO_POINT(inch) qreal((inch)*72.0) | ||
52 | #define MM_TO_INCH(mm) qreal((mm)*0.039370147) | 52 | #define MM_TO_INCH(mm) qreal((mm)*0.039370147) | ||
53 | #define INCH_TO_MM(inch) qreal((inch)*25.399956) | 53 | #define INCH_TO_MM(inch) qreal((inch)*25.399956) | ||
54 | #define POINT_TO_PI(px) qreal((px)*0.083333333) | 54 | #define POINT_TO_PI(px) qreal((px)*0.083333333) | ||
55 | #define POINT_TO_CC(px) qreal((px)*0.077880997) | 55 | #define POINT_TO_CC(px) qreal((px)*0.077880997) | ||
56 | #define PI_TO_POINT(pi) qreal((pi)*12) | 56 | #define PI_TO_POINT(pi) qreal((pi)*12) | ||
57 | #define CC_TO_POINT(cc) qreal((cc)*12.840103) | 57 | #define CC_TO_POINT(cc) qreal((cc)*12.840103) | ||
58 | /** | 58 | | ||
59 | * %KReport stores everything in pt (using "qreal") internally. | 59 | /*! | ||
60 | * @brief Converts between different units | ||||
staniek: % not needed here. | |||||
61 | * | ||||
62 | * KReportUnit stores everything in pt (using "qreal") internally. | ||||
60 | * When displaying a value to the user, the value is converted to the user's unit | 63 | * When displaying a value to the user, the value is converted to the user's unit | ||
61 | * of choice, and rounded to a reasonable precision to avoid 0.999999 | 64 | * of choice, and rounded to a reasonable precision to avoid 0.999999 | ||
62 | * | 65 | * | ||
63 | * For implementing the selection of a unit type in the UI use the allTypes() method. | 66 | * For implementing the selection of a unit type in the UI use the allTypes() method. | ||
64 | * it ensure the same order of the unit types in all places, with the order not | 67 | * it ensure the same order of the unit types in all places, with the order not | ||
65 | * bound to the order in the enum so ABI-compatible extension is possible. | 68 | * bound to the order in the enum so ABI-compatible extension is possible. | ||
66 | */ | 69 | */ | ||
67 | class KREPORT_EXPORT KReportUnit | 70 | class KREPORT_EXPORT KReportUnit | ||
▲ Show 20 Lines • Show All 274 Lines • Show Last 20 Lines |
% not needed here.