Changeset View
Changeset View
Standalone View
Standalone View
src/items/label/KReportScriptLabel.h
Show All 37 Lines | 35 | public: | |||
---|---|---|---|---|---|
38 | ~Label() override; | 38 | ~Label() override; | ||
39 | 39 | | |||
40 | public Q_SLOTS: | 40 | public Q_SLOTS: | ||
41 | //!Return the label caption | 41 | //!Return the label caption | ||
42 | QString caption() const; | 42 | QString caption() const; | ||
43 | //!Sets the label caption | 43 | //!Sets the label caption | ||
44 | void setCaption(const QString&); | 44 | void setCaption(const QString&); | ||
45 | 45 | | |||
46 | //!Returns the horizontal alignment of the label, -1 = left, 0 = center, 1 = right | 46 | //! @return the horizontal alignment as an integer | ||
47 | //! Valid values are left: -1, center: 0, right; 1 | ||||
47 | int horizontalAlignment() const; | 48 | int horizontalAlignment() const; | ||
48 | //!Sets the horizontal alignment. Valid values are -1, 0, 1 | 49 | | ||
50 | //! Sets the horizontal alignment | ||||
51 | //! Valid values for alignment are left: -1, center: 0, right; 1 | ||||
49 | void setHorizonalAlignment(int); | 52 | void setHorizonalAlignment(int); | ||
50 | 53 | | |||
51 | //!Returns the vertical alignment of the label, -1 = left, 0 = center, 1 = right | 54 | //! @return the vertical alignment | ||
55 | //! Valid values are top: -1, middle: 0, bottom: 1 | ||||
52 | int verticalAlignment() const; | 56 | int verticalAlignment() const; | ||
53 | //!Sets the vertical alignment. Valid values are -1, 0, 1 | 57 | | ||
58 | //! Sets the vertical alignment | ||||
59 | //! Valid values for aligmnt are top: -1, middle: 0, bottom: 1 | ||||
54 | void setVerticalAlignment(int); | 60 | void setVerticalAlignment(int); | ||
55 | 61 | | |||
56 | //!Returns the background color of the label | 62 | //! @return the background color of the lable | ||
57 | QColor backgroundColor() const; | 63 | QColor backgroundColor() const; | ||
58 | //!Sets the background color | 64 | | ||
65 | //! Set the background color of the label to the given color | ||||
59 | void setBackgroundColor(const QColor&); | 66 | void setBackgroundColor(const QColor&); | ||
60 | 67 | | |||
61 | //!Returns the foreground (text) color of the label | 68 | //! @return the foreground (text) color of the label | ||
62 | QColor foregroundColor() const; | 69 | QColor foregroundColor() const; | ||
63 | //!Srets the foreground (text) color | 70 | | ||
71 | //! Sets the foreground (text) color of the label to the given color | ||||
64 | void setForegroundColor(const QColor&); | 72 | void setForegroundColor(const QColor&); | ||
65 | 73 | | |||
66 | //!Returns the background opacity | 74 | //! @return the opacity of the label | ||
67 | int backgroundOpacity() const; | 75 | int backgroundOpacity() const; | ||
68 | //!Sets the background opacity. Values 0-100 | 76 | | ||
77 | //! Sets the background opacity of the label | ||||
78 | //! Valid values are in the range 0-100 | ||||
69 | void setBackgroundOpacity(int); | 79 | void setBackgroundOpacity(int); | ||
70 | 80 | | |||
71 | //!Returns the line color of the label | 81 | //! @return the border line color of the label | ||
72 | QColor lineColor() const; | 82 | QColor lineColor() const; | ||
73 | //!Sets the line color of the label | 83 | | ||
84 | //! Sets the border line color of the label to the given color | ||||
74 | void setLineColor(const QColor&); | 85 | void setLineColor(const QColor&); | ||
75 | 86 | | |||
76 | //!Returns the line weight (width) of the label | 87 | //! @return the border line weight (thickness) of the label | ||
77 | int lineWeight() const; | 88 | int lineWeight() const; | ||
78 | //!Sets the line weight (width) of the label | 89 | | ||
90 | //! Sets the border line weight (thickness) of the label | ||||
79 | void setLineWeight(int); | 91 | void setLineWeight(int); | ||
80 | 92 | | |||
81 | //! Returns the line style. Valid values are those from Qt::PenStyle (0-5) | 93 | //! @return the border line style of the label. Values are from Qt::Penstyle range 0-5 | ||
82 | int lineStyle() const; | 94 | int lineStyle() const; | ||
83 | //! Srts the line style. Valid values are those from Qt::PenStyle (0-5) | 95 | | ||
96 | //! Sets the border line style of the label to the given style in the range 0-5 | ||||
84 | void setLineStyle(int); | 97 | void setLineStyle(int); | ||
85 | 98 | | |||
86 | //!Returns the position of the label within the parent section | 99 | //! @returns the position of the label in points | ||
87 | QPointF position() const; | 100 | QPointF position() const; | ||
88 | //!Sets the position of the label within the parent section | 101 | | ||
102 | //! Sets the position of the label to the given point coordinates | ||||
89 | void setPosition(const QPointF&); | 103 | void setPosition(const QPointF&); | ||
90 | 104 | | |||
91 | //!Returns the size of the label | 105 | //! @returns the size of the label in points | ||
92 | QSizeF size() const; | 106 | QSizeF size() const; | ||
93 | //!Serts the size of the label | 107 | | ||
108 | //! Sets the size of the label to the given size in points | ||||
94 | void setSize(const QSizeF&); | 109 | void setSize(const QSizeF&); | ||
95 | 110 | | |||
96 | private: | 111 | private: | ||
97 | KReportItemLabel *m_label; | 112 | KReportItemLabel *m_label; | ||
98 | }; | 113 | }; | ||
99 | } | 114 | } | ||
100 | 115 | | |||
101 | #endif | 116 | #endif |