Changeset View
Changeset View
Standalone View
Standalone View
src/items/text/KReportScriptText.h
Show All 32 Lines | |||||
33 | { | 33 | { | ||
34 | Q_OBJECT | 34 | Q_OBJECT | ||
35 | public: | 35 | public: | ||
36 | explicit Text(KReportItemText*); | 36 | explicit Text(KReportItemText*); | ||
37 | 37 | | |||
38 | ~Text() override; | 38 | ~Text() override; | ||
39 | public Q_SLOTS: | 39 | public Q_SLOTS: | ||
40 | 40 | | |||
41 | //!Returns the source (column) that the text item gets its data from | 41 | //! @return the source (column) that the text-item gets its data from* | ||
42 | QString source() const; | 42 | QString source() const; | ||
43 | //!Sets the source (column) for the field | 43 | | ||
44 | //! Sets the source (column) for the text-item. | ||||
45 | //! Valid values include a column name, fixed string if prefixed with '$' | ||||
46 | //! or a valid script expression if prefixed with a '=' | ||||
44 | void setSource(const QString&); | 47 | void setSource(const QString&); | ||
45 | 48 | | |||
46 | //!Returns the horizontal alignment of the label, -1 = left, 0 = center, 1 = right | 49 | //! @return the horizontal alignment as an integer | ||
50 | //! Valid values are left: -1, center: 0, right; 1 | ||||
47 | int horizontalAlignment() const; | 51 | int horizontalAlignment() const; | ||
48 | //!Sets the horizontal alignment. Valid values are -1, 0, 1 | 52 | | ||
53 | //! Sets the horizontal alignment | ||||
54 | //! Valid values for alignment are left: -1, center: 0, right; 1 | ||||
49 | void setHorizonalAlignment(int); | 55 | void setHorizonalAlignment(int); | ||
50 | 56 | | |||
51 | //!Returns the vertical alignment of the label, -1 = left, 0 = center, 1 = right | 57 | //! @return the vertical alignment | ||
58 | //! Valid values are top: -1, middle: 0, bottom: 1 | ||||
52 | int verticalAlignment() const; | 59 | int verticalAlignment() const; | ||
53 | //!Sets the vertical alignment. Valid values are -1, 0, 1 | 60 | | ||
61 | //! Sets the vertical alignment | ||||
62 | //! Valid values for aligmnt are top: -1, middle: 0, bottom: 1 | ||||
54 | void setVerticalAlignment(int); | 63 | void setVerticalAlignment(int); | ||
55 | 64 | | |||
56 | //!Returns the background color of the label | 65 | //! @return the background color of the lable | ||
57 | QColor backgroundColor() const; | 66 | QColor backgroundColor() const; | ||
58 | //!Sets the background color | 67 | | ||
68 | //! Set the background color of the text-item to the given color | ||||
59 | void setBackgroundColor(const QColor&); | 69 | void setBackgroundColor(const QColor&); | ||
60 | 70 | | |||
61 | //!Returns the foreground (text) color of the label | 71 | //! @return the foreground (text) color of the text-item | ||
62 | QColor foregroundColor() const; | 72 | QColor foregroundColor() const; | ||
63 | //!Srets the foreground (text) color | 73 | | ||
74 | //! Sets the foreground (text) color of the text-item to the given color | ||||
64 | void setForegroundColor(const QColor&); | 75 | void setForegroundColor(const QColor&); | ||
65 | 76 | | |||
66 | //!Returns the background opacity | 77 | //! @return the opacity of the text-item | ||
67 | int backgroundOpacity() const; | 78 | int backgroundOpacity() const; | ||
68 | //!Sets the background opacity. Values 0-100 | 79 | | ||
80 | //! Sets the background opacity of the text-item | ||||
81 | //! Valid values are in the range 0-100 | ||||
69 | void setBackgroundOpacity(int); | 82 | void setBackgroundOpacity(int); | ||
70 | 83 | | |||
71 | //!Returns the line color of the label | 84 | //! @return the border line color of the text-item | ||
72 | QColor lineColor() const; | 85 | QColor lineColor() const; | ||
73 | //!Sets the line color of the label | 86 | | ||
87 | //! Sets the border line color of the text-item to the given color | ||||
74 | void setLineColor(const QColor&); | 88 | void setLineColor(const QColor&); | ||
75 | 89 | | |||
76 | //!Returns the line weight (width) of the label | 90 | //! @return the border line weight (thickness) of the text-item | ||
77 | int lineWeight() const; | 91 | int lineWeight() const; | ||
78 | //!Sets the line weight (width) of the label | 92 | | ||
93 | //! Sets the border line weight (thickness) of the text-item | ||||
79 | void setLineWeight(int); | 94 | void setLineWeight(int); | ||
80 | 95 | | |||
81 | //! Returns the line style. Valid values are those from Qt::PenStyle (0-5) | 96 | //! @return the border line style of the text-item. Values are from Qt::Penstyle range 0-5 | ||
82 | int lineStyle() const; | 97 | int lineStyle() const; | ||
83 | //! Srts the line style. Valid values are those from Qt::PenStyle (0-5) | 98 | | ||
99 | //! Sets the border line style of the text-item to the given style in the range 0-5 | ||||
84 | void setLineStyle(int); | 100 | void setLineStyle(int); | ||
85 | 101 | | |||
86 | //!Returns the position of the label within the parent section | 102 | //! @returns the position of the text-item in points | ||
87 | QPointF position() const; | 103 | QPointF position() const; | ||
88 | //!Sets the position of the label within the parent section | 104 | | ||
105 | //! Sets the position of the text-item to the given point coordinates | ||||
89 | void setPosition(const QPointF&); | 106 | void setPosition(const QPointF&); | ||
90 | 107 | | |||
91 | //!Returns the size of the label | 108 | //! @returns the size of the text-item in points | ||
92 | QSizeF size() const; | 109 | QSizeF size() const; | ||
93 | //!Serts the size of the label | 110 | | ||
111 | //! Sets the size of the text-item to the given size in points | ||||
94 | void setSize(const QSizeF&); | 112 | void setSize(const QSizeF&); | ||
95 | 113 | | |||
96 | //!Load the contets for the text item from the given file | 114 | //!Load the contets for the text item from the given file | ||
97 | void loadFromFile(const QString& fileName); | 115 | void loadFromFile(const QString& fileName); | ||
98 | private: | 116 | private: | ||
99 | KReportItemText *m_text; | 117 | KReportItemText *m_text; | ||
100 | }; | 118 | }; | ||
101 | 119 | | |||
102 | } | 120 | } | ||
103 | 121 | | |||
104 | #endif | 122 | #endif |