Changeset View
Changeset View
Standalone View
Standalone View
src/common/KReportUtils_p.h
Show All 20 Lines | |||||
21 | #define KREPORTUTILS_P_H | 21 | #define KREPORTUTILS_P_H | ||
22 | 22 | | |||
23 | #include "KReportUnit.h" | 23 | #include "KReportUnit.h" | ||
24 | 24 | | |||
25 | #include <QPageLayout> | 25 | #include <QPageLayout> | ||
26 | #include <QRect> | 26 | #include <QRect> | ||
27 | #include <QStandardPaths> | 27 | #include <QStandardPaths> | ||
28 | 28 | | |||
29 | const bool DEFAULT_SHOW_GRID = true; | ||||
30 | const bool DEFAULT_SNAP_TO_GRID = true; | ||||
31 | const int DEFAULT_GRID_DIVISIONS = 4; | ||||
32 | const KReportUnit DEFAULT_UNIT(KReportUnit::Type::Centimeter); | ||||
33 | const KReportUnit::Type DEFAULT_UNIT_TYPE = DEFAULT_UNIT.type(); | ||||
34 | #define DEFAULT_UNIT_STRING QLatin1String("cm") | ||||
35 | const QPointF DEFAULT_ELEMENT_POS_PT(CM_TO_POINT(1.0), CM_TO_POINT(1.0)); | ||||
36 | const QSizeF DEFAULT_ELEMENT_SIZE_PT(CM_TO_POINT(1.0), CM_TO_POINT(1.0)); | ||||
37 | const QRectF DEFAULT_ELEMENT_RECT_PT(DEFAULT_ELEMENT_POS_PT, DEFAULT_ELEMENT_SIZE_PT); | ||||
38 | #define DEFAULT_ELEMENT_POS_STRING QLatin1String("1.0cm") // both X and Y | ||||
39 | #define DEFAULT_ELEMENT_SIZE_STRING QLatin1String("1.0cm") // both width and height | ||||
40 | const qreal DEFAULT_SECTION_SIZE_PT = CM_TO_POINT(2.0); | ||||
41 | #define DEFAULT_SECTION_SIZE_STRING QLatin1String("2.0cm") | ||||
42 | const qreal DEFAULT_PAGE_MARGIN_PT = CM_TO_POINT(1.0); | ||||
43 | #define DEFAULT_PAGE_MARGIN_STRING QLatin1String("1.0cm") | ||||
44 | const QPageSize::PageSizeId DEFAULT_PAGE_SIZE = QPageSize::A4; | ||||
45 | const QPageLayout::Orientation DEFAULT_PAGE_ORIENTATION = QPageLayout::Landscape; | ||||
46 | const QSizeF DEFAULT_CUSTOM_PAGE_SIZE(10.0,10.0); | ||||
47 | const int SMALLEST_PAGE_SIZE_MM = 5; | ||||
staniek: We never use this value directly so how about using consistently:
`const qreal… | |||||
29 | 48 | | |||
30 | // This is a private code made inline for use in the lib and examples. | 49 | // This is a private code made inline for use in the lib and examples. | ||
31 | //! @todo Move to a shared lib to use in other Kexi libraries as well. | 50 | //! @todo Move to a shared lib to use in other Kexi libraries as well. | ||
32 | 51 | | |||
33 | namespace KReportPrivate { | 52 | namespace KReportPrivate { | ||
34 | 53 | | |||
35 | //! @todo Support other themes | 54 | //! @todo Support other themes | ||
36 | const QString supportedIconTheme = QLatin1String("breeze"); | 55 | const QString supportedIconTheme = QLatin1String("breeze"); | ||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |
We never use this value directly so how about using consistently:
`const qreal SMALLEST_PAGE_SIZE_PT = MM_TO_POINT(5);