Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/barcode/KReportDesignerItemBarcode.cpp
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Line(s) | 66 | { | |||
---|---|---|---|---|---|
71 | n = e.firstChild(); | 71 | n = e.firstChild(); | ||
72 | return new KReportDesignerItemBarcode(n, designer(), nullptr); | 72 | return new KReportDesignerItemBarcode(n, designer(), nullptr); | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | // methods (deconstructor) | 75 | // methods (deconstructor) | ||
76 | KReportDesignerItemBarcode::~KReportDesignerItemBarcode() | 76 | KReportDesignerItemBarcode::~KReportDesignerItemBarcode() | ||
77 | {} | 77 | {} | ||
78 | 78 | | |||
79 | QRect KReportDesignerItemBarcode::getTextRect() | 79 | QRectF KReportDesignerItemBarcode::getTextRect() const | ||
80 | { | 80 | { | ||
81 | QFont fnt = QFont(); | 81 | QFont fnt = QFont(); | ||
82 | return QFontMetrics(fnt) | 82 | return QFontMetricsF(fnt) | ||
83 | .boundingRect(int (x()), int (y()), 0, 0, 0, | 83 | .boundingRect(QRectF(x(), y(), 0, 0), 0, | ||
84 | dataSourceAndObjectTypeName(itemDataSource(), QLatin1String("barcode"))); | 84 | dataSourceAndObjectTypeName(itemDataSource(), QLatin1String("barcode"))); | ||
85 | } | 85 | } | ||
86 | 86 | | |||
87 | void KReportDesignerItemBarcode::paint(QPainter* painter, | 87 | void KReportDesignerItemBarcode::paint(QPainter* painter, | ||
88 | const QStyleOptionGraphicsItem* option, | 88 | const QStyleOptionGraphicsItem* option, | ||
89 | QWidget* widget) | 89 | QWidget* widget) | ||
90 | { | 90 | { | ||
91 | Q_UNUSED(option); | 91 | Q_UNUSED(option); | ||
▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines |