Changeset View
Changeset View
Standalone View
Standalone View
src/common/KReportItemBase.cpp
Show All 12 Lines | |||||
13 | * | 13 | * | ||
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 | #include "KReportItemBase.h" | 18 | #include "KReportItemBase.h" | ||
19 | 19 | | |||
20 | #include "KReportUtils.h" | 20 | #include "KReportUtils.h" | ||
21 | #include "KReportUtils_p.h" | ||||
22 | | ||||
21 | #include <KPropertySet> | 23 | #include <KPropertySet> | ||
22 | #include <QApplication> | 24 | #include <QApplication> | ||
23 | #include <QDomElement> | 25 | #include <QDomElement> | ||
24 | 26 | | |||
25 | class Q_DECL_HIDDEN KReportItemBase::Private | 27 | class Q_DECL_HIDDEN KReportItemBase::Private | ||
26 | { | 28 | { | ||
27 | public: | 29 | public: | ||
28 | Private(); | 30 | Private(); | ||
▲ Show 20 Lines • Show All 149 Lines • ▼ Show 20 Line(s) | |||||
178 | 180 | | |||
179 | const KPropertySet * KReportItemBase::propertySet() const | 181 | const KPropertySet * KReportItemBase::propertySet() const | ||
180 | { | 182 | { | ||
181 | return d->set; | 183 | return d->set; | ||
182 | } | 184 | } | ||
183 | 185 | | |||
184 | QPointF KReportItemBase::scenePosition(const QPointF &pos) | 186 | QPointF KReportItemBase::scenePosition(const QPointF &pos) | ||
185 | { | 187 | { | ||
186 | const qreal x = POINT_TO_INCH(pos.x()) * KReportDpi::dpiX(); | 188 | const qreal x = POINT_TO_INCH(pos.x()) * KReportPrivate::dpiX(); | ||
187 | const qreal y = POINT_TO_INCH(pos.y()) * KReportDpi::dpiY(); | 189 | const qreal y = POINT_TO_INCH(pos.y()) * KReportPrivate::dpiY(); | ||
188 | return QPointF(x, y); | 190 | return QPointF(x, y); | ||
189 | } | 191 | } | ||
190 | 192 | | |||
191 | QSizeF KReportItemBase::sceneSize(const QSizeF &size) | 193 | QSizeF KReportItemBase::sceneSize(const QSizeF &size) | ||
192 | { | 194 | { | ||
193 | const qreal w = POINT_TO_INCH(size.width()) * KReportDpi::dpiX(); | 195 | const qreal w = POINT_TO_INCH(size.width()) * KReportPrivate::dpiX(); | ||
194 | const qreal h = POINT_TO_INCH(size.height()) * KReportDpi::dpiY(); | 196 | const qreal h = POINT_TO_INCH(size.height()) * KReportPrivate::dpiY(); | ||
195 | return QSizeF(w, h); | 197 | return QSizeF(w, h); | ||
196 | } | 198 | } | ||
197 | 199 | | |||
198 | qreal KReportItemBase::z() const | 200 | qreal KReportItemBase::z() const | ||
199 | { | 201 | { | ||
200 | return d->z; | 202 | return d->z; | ||
201 | } | 203 | } | ||
202 | 204 | | |||
Show All 9 Lines | |||||
212 | 214 | | |||
213 | void KReportItemBase::setSize(const QSizeF& size) | 215 | void KReportItemBase::setSize(const QSizeF& size) | ||
214 | { | 216 | { | ||
215 | d->sizeProperty->setValue(size); | 217 | d->sizeProperty->setValue(size); | ||
216 | } | 218 | } | ||
217 | 219 | | |||
218 | QPointF KReportItemBase::positionFromScene(const QPointF& pos) | 220 | QPointF KReportItemBase::positionFromScene(const QPointF& pos) | ||
219 | { | 221 | { | ||
220 | const qreal x = INCH_TO_POINT(pos.x() / KReportDpi::dpiX()); | 222 | const qreal x = INCH_TO_POINT(pos.x() / KReportPrivate::dpiX()); | ||
221 | const qreal y = INCH_TO_POINT(pos.y() / KReportDpi::dpiY()); | 223 | const qreal y = INCH_TO_POINT(pos.y() / KReportPrivate::dpiY()); | ||
222 | return QPointF(x, y); | 224 | return QPointF(x, y); | ||
223 | } | 225 | } | ||
224 | 226 | | |||
225 | QSizeF KReportItemBase::sizeFromScene(const QSizeF& size) | 227 | QSizeF KReportItemBase::sizeFromScene(const QSizeF& size) | ||
226 | { | 228 | { | ||
227 | qreal w = INCH_TO_POINT(size.width() / KReportDpi::dpiX()); | 229 | qreal w = INCH_TO_POINT(size.width() / KReportPrivate::dpiX()); | ||
228 | qreal h = INCH_TO_POINT(size.height() / KReportDpi::dpiY()); | 230 | qreal h = INCH_TO_POINT(size.height() / KReportPrivate::dpiY()); | ||
229 | return QSizeF(w, h); | 231 | return QSizeF(w, h); | ||
230 | } | 232 | } | ||
231 | 233 | | |||
232 | void KReportItemBase::propertyChanged(KPropertySet& s, KProperty& p) | 234 | void KReportItemBase::propertyChanged(KPropertySet& s, KProperty& p) | ||
233 | { | 235 | { | ||
234 | } | 236 | } | ||
235 | 237 | | |||
236 | 238 | | |||
237 | 239 | |