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 | ||||
27 | */ | 30 | */ | ||
28 | class KReportScriptDraw : public QObject | 31 | class KReportScriptDraw : public QObject | ||
29 | { | 32 | { | ||
30 | Q_OBJECT | 33 | Q_OBJECT | ||
31 | public: | 34 | public: | ||
32 | explicit KReportScriptDraw(QObject *parent = nullptr); | 35 | explicit KReportScriptDraw(QObject *parent = nullptr); | ||
33 | 36 | | |||
34 | ~KReportScriptDraw() override; | 37 | ~KReportScriptDraw() override; | ||
35 | void setPage(OROPage*); | 38 | void setPage(OROPage*); | ||
36 | void setOffset(QPointF); | 39 | void setOffset(QPointF); | ||
37 | public Q_SLOTS: | 40 | public Q_SLOTS: | ||
38 | /** | 41 | /** | ||
39 | Draw a rectangle | 42 | @brief Draw a rectangle | ||
40 | \param x X posistion | 43 | \param x X posistion | ||
41 | \param y Y position | 44 | \param y Y position | ||
42 | \param w Width | 45 | \param w Width | ||
43 | \param h Height | 46 | \param h Height | ||
44 | \param lc Line Color | 47 | \param lc Line Color | ||
45 | \param fc Fill Color | 48 | \param fc Fill Color | ||
46 | \param lw Line Width | 49 | \param lw Line Width | ||
47 | \param o Opacity (0=transparent, 100=opaque) | 50 | \param o Opacity (0=transparent, 100=opaque) | ||
48 | */ | 51 | */ | ||
49 | void rectangle(qreal, qreal, qreal, qreal, const QString&, const QString&, qreal, int); | 52 | void rectangle(qreal, qreal, qreal, qreal, const QString&, const QString&, qreal, int); | ||
50 | 53 | | |||
51 | /** | 54 | /** | ||
52 | Draw an ellipse | 55 | @brief Draw an ellipse | ||
53 | \param x X posistion | 56 | \param x X posistion | ||
54 | \param y Y position | 57 | \param y Y position | ||
55 | \param w Width | 58 | \param w Width | ||
56 | \param h Height | 59 | \param h Height | ||
57 | \param lc Line Color | 60 | \param lc Line Color | ||
58 | \param fc Fill Color | 61 | \param fc Fill Color | ||
59 | \param lw Line Width | 62 | \param lw Line Width | ||
60 | \param o Opacity (0=transparent, 100=opaque) | 63 | \param o Opacity (0=transparent, 100=opaque) | ||
61 | */ | 64 | */ | ||
62 | void ellipse(qreal, qreal, qreal, qreal, const QString&, const QString&, qreal, int); | 65 | void ellipse(qreal, qreal, qreal, qreal, const QString&, const QString&, qreal, int); | ||
63 | 66 | | |||
64 | /** | 67 | /** | ||
65 | Draw a line | 68 | @brief Draw a line | ||
66 | \param x1 Start X position | 69 | \param x1 Start X position | ||
67 | \param y1 Start Y Position | 70 | \param y1 Start Y Position | ||
68 | \param x2 End X position | 71 | \param x2 End X position | ||
69 | \param y2 End Y position | 72 | \param y2 End Y position | ||
70 | \param lc Line Color | 73 | \param lc Line Color | ||
71 | */ | 74 | */ | ||
72 | void line(qreal, qreal, qreal, qreal, const QString&); | 75 | void line(qreal, qreal, qreal, qreal, const QString&); | ||
73 | 76 | | |||
74 | /** | 77 | /** | ||
75 | Draw some text | 78 | @brief Draw some text | ||
76 | \param x X Position | 79 | \param x X Position | ||
77 | \param y Y Position | 80 | \param y Y Position | ||
78 | \param txt The text | 81 | \param txt The text | ||
79 | \param fnt The font | 82 | \param fnt The font | ||
80 | \param pt Point size | 83 | \param pt Point size | ||
81 | \param fc Foreground color | 84 | \param fc Foreground color | ||
82 | \param bc Background color | 85 | \param bc Background color | ||
83 | \param lc Line color | 86 | \param lc Line color | ||
Show All 13 Lines |