18 #include "KReportScriptLabel.h"
25 Label::Label(KReportItemLabel *l)
37 return m_label->text();
40 void Label::setCaption(
const QString& c)
45 int Label::horizontalAlignment()
const
47 const QString a = m_label->m_horizontalAlignment->value().toString().
toLower();
60 void Label::setHorizonalAlignment(
int a)
64 m_label->m_horizontalAlignment->setValue(
QLatin1String(
"left"));
67 m_label->m_horizontalAlignment->setValue(
QLatin1String(
"center"));
70 m_label->m_horizontalAlignment->setValue(
QLatin1String(
"right"));
73 m_label->m_horizontalAlignment->setValue(
QLatin1String(
"left"));
78 int Label::verticalAlignment()
const
80 const QString a = m_label->m_horizontalAlignment->value().toString().
toLower();
93 void Label::setVerticalAlignment(
int a)
100 m_label->m_verticalAlignment->setValue(
QLatin1String(
"middle"));
103 m_label->m_verticalAlignment->setValue(
QLatin1String(
"bottom"));
106 m_label->m_verticalAlignment->setValue(
QLatin1String(
"middle"));
111 QColor Label::backgroundColor()
const
113 return m_label->m_backgroundColor->
value().value<
QColor>();
115 void Label::setBackgroundColor(
const QColor& c)
117 m_label->m_backgroundColor->setValue(c);
120 QColor Label::foregroundColor()
const
122 return m_label->m_foregroundColor->
value().value<
QColor>();
124 void Label::setForegroundColor(
const QColor& c)
126 m_label->m_foregroundColor->setValue(c);
129 int Label::backgroundOpacity()
const
131 return m_label->m_backgroundOpacity->
value().toInt();
133 void Label::setBackgroundOpacity(
int o)
135 m_label->m_backgroundOpacity->setValue(o);
138 QColor Label::lineColor()
const
140 return m_label->m_lineColor->
value().value<
QColor>();
142 void Label::setLineColor(
const QColor& c)
144 m_label->m_lineColor->setValue(c);
147 int Label::lineWeight()
const
149 return m_label->m_lineWeight->
value().toInt();
151 void Label::setLineWeight(
int w)
153 m_label->m_lineWeight->setValue(w);
156 int Label::lineStyle()
const
158 return m_label->m_lineStyle->value().toInt();
160 void Label::setLineStyle(
int s)
162 if (s < 0 || s > 5) {
165 m_label->m_lineStyle->setValue(s);
168 QPointF Label::position()
const
170 return m_label->position();
172 void Label::setPosition(
const QPointF &p)
174 m_label->setPosition(p);
177 QSizeF Label::size()
const
179 return m_label->size();
181 void Label::setSize(
const QSizeF &s)