Changeset View
Changeset View
Standalone View
Standalone View
src/common/KReportItemLine.h
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU Lesser General Public | 14 | * You should have received a copy of the GNU Lesser General Public | ||
15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | #ifndef KREPORTITEMLINE_H | 18 | #ifndef KREPORTITEMLINE_H | ||
19 | #define KREPORTITEMLINE_H | 19 | #define KREPORTITEMLINE_H | ||
20 | 20 | | |||
21 | #include "KReportItemBase.h" | 21 | #include "KReportItemBase.h" | ||
22 | #include "KReportPosition.h" | | |||
23 | #include "kreport_export.h" | 22 | #include "kreport_export.h" | ||
24 | 23 | | |||
25 | class QDomNode; | 24 | class QDomNode; | ||
26 | 25 | | |||
27 | namespace Scripting | 26 | namespace Scripting | ||
28 | { | 27 | { | ||
29 | class Line; | 28 | class Line; | ||
30 | } | 29 | } | ||
31 | 30 | | |||
32 | /** | 31 | /** | ||
33 | */ | 32 | */ | ||
34 | class KReportItemLine : public KReportItemBase | 33 | class KReportItemLine : public KReportItemBase | ||
35 | { | 34 | { | ||
36 | Q_OBJECT | 35 | Q_OBJECT | ||
37 | public: | 36 | public: | ||
38 | KReportItemLine(); | 37 | KReportItemLine(); | ||
39 | explicit KReportItemLine(const QDomNode & element); | 38 | explicit KReportItemLine(const QDomNode & element); | ||
40 | ~KReportItemLine(); | 39 | ~KReportItemLine(); | ||
41 | 40 | | |||
42 | virtual QString typeName() const; | 41 | virtual QString typeName() const; | ||
43 | virtual int renderSimpleData(OROPage *page, OROSection *section, const QPointF &offset, const QVariant &data, KReportScriptHandler *script); | 42 | virtual int renderSimpleData(OROPage *page, OROSection *section, const QPointF &offset, const QVariant &data, KReportScriptHandler *script); | ||
44 | 43 | | |||
45 | virtual void setUnit(const KReportUnit&); | 44 | virtual void setUnit(const KReportUnit&); | ||
46 | 45 | | |||
47 | KReportPosition startPosition() const; | 46 | QPointF startPosition() const; | ||
48 | KReportPosition endPosition() const; | 47 | QPointF endPosition() const; | ||
49 | 48 | | |||
50 | protected: | 49 | protected: | ||
51 | KReportPosition m_start; | 50 | KProperty *m_start; | ||
52 | KReportPosition m_end; | 51 | KProperty *m_end; | ||
53 | KProperty *m_lineColor; | 52 | KProperty *m_lineColor; | ||
54 | KProperty *m_lineWeight; | 53 | KProperty *m_lineWeight; | ||
55 | KProperty *m_lineStyle; | 54 | KProperty *m_lineStyle; | ||
56 | 55 | | |||
57 | KReportLineStyle lineStyle() const; | 56 | KReportLineStyle lineStyle() const; | ||
58 | int weight() const; | 57 | int weight() const; | ||
59 | void setWeight(int w); | 58 | void setWeight(int w); | ||
60 | 59 | | |||
61 | private: | 60 | private: | ||
62 | virtual void createProperties(); | 61 | virtual void createProperties(); | ||
63 | 62 | | |||
64 | friend class Scripting::Line; | 63 | friend class Scripting::Line; | ||
65 | }; | 64 | }; | ||
66 | 65 | | |||
67 | #endif | 66 | #endif |