Changeset View
Changeset View
Standalone View
Standalone View
src/ui/imagepreviewwidget.cpp
Context not available. | |||||
30 | QWidget(parent) | 30 | QWidget(parent) | ||
---|---|---|---|---|---|
31 | { | 31 | { | ||
32 | //installEventFilter(this); | 32 | //installEventFilter(this); | ||
33 | | ||||
34 | const QString framefile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kf5/knewstuff/pics/thumb_frame.png")); | | |||
35 | m_frameImage = QPixmap(framefile); | | |||
36 | } | 33 | } | ||
37 | 34 | | |||
38 | void ImagePreviewWidget::setImage(const QImage &preview) | 35 | void ImagePreviewWidget::setImage(const QImage &preview) | ||
Context not available. | |||||
80 | point.setY(contentsRect().top() + ((height - m_scaledImage.height()) / 2)); | 77 | point.setY(contentsRect().top() + ((height - m_scaledImage.height()) / 2)); | ||
81 | 78 | | |||
82 | QPoint framePoint(point.x() - 5, point.y() - 5); | 79 | QPoint framePoint(point.x() - 5, point.y() - 5); | ||
83 | painter.drawPixmap(framePoint, m_frameImage.scaled(m_scaledImage.width() + 10, m_scaledImage.height() + 10)); | | |||
84 | painter.drawImage(point, m_scaledImage); | 80 | painter.drawImage(point, m_scaledImage); | ||
85 | } | 81 | } | ||
86 | 82 | | |||
Context not available. |