Changeset View
Changeset View
Standalone View
Standalone View
src/items/text/KReportScriptText.cpp
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Line(s) | 162 | { | |||
---|---|---|---|---|---|
163 | if (s < 0 || s > 5) { | 163 | if (s < 0 || s > 5) { | ||
164 | s = 1; | 164 | s = 1; | ||
165 | } | 165 | } | ||
166 | m_text->m_lineStyle->setValue(s); | 166 | m_text->m_lineStyle->setValue(s); | ||
167 | } | 167 | } | ||
168 | 168 | | |||
169 | QPointF Text::position() const | 169 | QPointF Text::position() const | ||
170 | { | 170 | { | ||
171 | return m_text->m_pos.toPoint(); | 171 | return m_text->position(); | ||
172 | } | 172 | } | ||
173 | void Text::setPosition(const QPointF& p) | 173 | void Text::setPosition(const QPointF& p) | ||
174 | { | 174 | { | ||
175 | m_text->m_pos.setPointPos(p); | 175 | m_text->setPosition(p); | ||
176 | } | 176 | } | ||
177 | 177 | | |||
178 | QSizeF Text::size() const | 178 | QSizeF Text::size() const | ||
179 | { | 179 | { | ||
180 | return m_text->m_size.toPoint(); | 180 | return m_text->size(); | ||
181 | } | 181 | } | ||
182 | void Text::setSize(const QSizeF& s) | 182 | void Text::setSize(const QSizeF& s) | ||
183 | { | 183 | { | ||
184 | m_text->m_size.setPointSize(s); | 184 | m_text->setSize(s); | ||
185 | } | 185 | } | ||
186 | 186 | | |||
187 | void Text::loadFromFile(const QString &fn) | 187 | void Text::loadFromFile(const QString &fn) | ||
188 | { | 188 | { | ||
189 | QFile file(fn); | 189 | QFile file(fn); | ||
190 | //kreportpluginDebug() << "Loading from" << fn; | 190 | //kreportpluginDebug() << "Loading from" << fn; | ||
191 | if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { | 191 | if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { | ||
192 | m_text->m_controlSource->setValue(tr("$Unable to read %1").arg(fn)); | 192 | m_text->m_controlSource->setValue(tr("$Unable to read %1").arg(fn)); | ||
Show All 13 Lines |