Changeset View
Changeset View
Standalone View
Standalone View
src/items/text/KReportDesignerItemText.cpp
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 69 | { | |||
---|---|---|---|---|---|
75 | return new KReportDesignerItemText(n, designer(), nullptr); | 75 | return new KReportDesignerItemText(n, designer(), nullptr); | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | KReportDesignerItemText::~KReportDesignerItemText | 78 | KReportDesignerItemText::~KReportDesignerItemText | ||
79 | 79 | | |||
80 | () | 80 | () | ||
81 | {} | 81 | {} | ||
82 | 82 | | |||
83 | QRect KReportDesignerItemText::getTextRect() const | 83 | QRectF KReportDesignerItemText::getTextRect() const | ||
84 | { | 84 | { | ||
85 | return QFontMetrics(font()).boundingRect(int (x()), int (y()), 0, 0, textFlags(), renderText()); | 85 | return QFontMetricsF(font()).boundingRect(QRectF(x(), y(), 0, 0), textFlags(), renderText()); | ||
86 | } | 86 | } | ||
87 | 87 | | |||
88 | void KReportDesignerItemText::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) | 88 | void KReportDesignerItemText::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) | ||
89 | { | 89 | { | ||
90 | Q_UNUSED(option); | 90 | Q_UNUSED(option); | ||
91 | Q_UNUSED(widget) | 91 | Q_UNUSED(widget) | ||
92 | 92 | | |||
93 | // store any values we plan on changing so we can restore them | 93 | // store any values we plan on changing so we can restore them | ||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |