Changeset View
Changeset View
Standalone View
Standalone View
src/renderer/scripting/KReportScriptDraw.h
Show All 18 Lines | |||||
19 | #define KRSCRIPTDRAW_H | 19 | #define KRSCRIPTDRAW_H | ||
20 | 20 | | |||
21 | #include <QObject> | 21 | #include <QObject> | ||
22 | #include <QPointF> | 22 | #include <QPointF> | ||
23 | 23 | | |||
24 | class OROPage; | 24 | class OROPage; | ||
25 | 25 | | |||
26 | /** | 26 | /** | ||
27 | @brief Helper giving access to drawing functions | ||||
28 | | ||||
29 | Contains methods for drawing shapes on a report page | ||||
30 | | ||||
31 | @author Adam Pigg <adam@piggz.co.uk>. | ||||
27 | */ | 32 | */ | ||
28 | class KReportScriptDraw : public QObject | 33 | class KReportScriptDraw : public QObject | ||
29 | { | 34 | { | ||
30 | Q_OBJECT | 35 | Q_OBJECT | ||
31 | public: | 36 | public: | ||
32 | explicit KReportScriptDraw(QObject *parent = nullptr); | 37 | explicit KReportScriptDraw(QObject *parent = nullptr); | ||
33 | 38 | | |||
34 | ~KReportScriptDraw() override; | 39 | ~KReportScriptDraw() override; | ||
35 | void setPage(OROPage*); | 40 | void setPage(OROPage*); | ||
36 | void setOffset(QPointF); | 41 | void setOffset(QPointF); | ||
37 | public Q_SLOTS: | 42 | public Q_SLOTS: | ||
38 | /** | 43 | /** | ||
39 | Draw a rectangle | 44 | @brief Draw a rectangle | ||
40 | \param x X posistion | 45 | \param x X posistion | ||
41 | \param y Y position | 46 | \param y Y position | ||
42 | \param w Width | 47 | \param w Width | ||
43 | \param h Height | 48 | \param h Height | ||
44 | \param lc Line Color | 49 | \param lc Line Color | ||
45 | \param fc Fill Color | 50 | \param fc Fill Color | ||
46 | \param lw Line Width | 51 | \param lw Line Width | ||
47 | \param o Opacity (0=transparent, 100=opaque) | 52 | \param o Opacity (0=transparent, 100=opaque) | ||
48 | */ | 53 | */ | ||
49 | void rectangle(qreal, qreal, qreal, qreal, const QString&, const QString&, qreal, int); | 54 | void rectangle(qreal, qreal, qreal, qreal, const QString&, const QString&, qreal, int); | ||
50 | 55 | | |||
51 | /** | 56 | /** | ||
52 | Draw an ellipse | 57 | @brief Draw an ellipse | ||
53 | \param x X posistion | 58 | \param x X posistion | ||
54 | \param y Y position | 59 | \param y Y position | ||
55 | \param w Width | 60 | \param w Width | ||
56 | \param h Height | 61 | \param h Height | ||
57 | \param lc Line Color | 62 | \param lc Line Color | ||
58 | \param fc Fill Color | 63 | \param fc Fill Color | ||
59 | \param lw Line Width | 64 | \param lw Line Width | ||
60 | \param o Opacity (0=transparent, 100=opaque) | 65 | \param o Opacity (0=transparent, 100=opaque) | ||
61 | */ | 66 | */ | ||
62 | void ellipse(qreal, qreal, qreal, qreal, const QString&, const QString&, qreal, int); | 67 | void ellipse(qreal, qreal, qreal, qreal, const QString&, const QString&, qreal, int); | ||
63 | 68 | | |||
64 | /** | 69 | /** | ||
65 | Draw a line | 70 | @brief Draw a line | ||
66 | \param x1 Start X position | 71 | \param x1 Start X position | ||
67 | \param y1 Start Y Position | 72 | \param y1 Start Y Position | ||
68 | \param x2 End X position | 73 | \param x2 End X position | ||
69 | \param y2 End Y position | 74 | \param y2 End Y position | ||
70 | \param lc Line Color | 75 | \param lc Line Color | ||
71 | */ | 76 | */ | ||
72 | void line(qreal, qreal, qreal, qreal, const QString&); | 77 | void line(qreal, qreal, qreal, qreal, const QString&); | ||
73 | 78 | | |||
74 | /** | 79 | /** | ||
75 | Draw some text | 80 | @brief Draw some text | ||
76 | \param x X Position | 81 | \param x X Position | ||
77 | \param y Y Position | 82 | \param y Y Position | ||
78 | \param txt The text | 83 | \param txt The text | ||
79 | \param fnt The font | 84 | \param fnt The font | ||
80 | \param pt Point size | 85 | \param pt Point size | ||
81 | \param fc Foreground color | 86 | \param fc Foreground color | ||
82 | \param bc Background color | 87 | \param bc Background color | ||
83 | \param lc Line color | 88 | \param lc Line color | ||
Show All 13 Lines |