MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / getIconPixmap

Method getIconPixmap

src/plugins/binarytools/widgets/iconcombobox.cpp:72–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72QPixmap IconItemDelegate::getIconPixmap(const QIcon &icon, const QSize &size, qreal pixelRatio, QIcon::Mode mode, QIcon::State state)
73{
74 if (icon.isNull())
75 return QPixmap();
76
77 if (size.width() <= 0 || size.height() <= 0)
78 return QPixmap();
79
80 auto px = icon.pixmap(size, mode, state);
81 px.setDevicePixelRatio(qApp->devicePixelRatio());
82
83 return px;
84}
85
86void IconItemDelegate::paintItemBackgroundAndGeomerty(QPainter *painter,
87 const QStyleOptionViewItem &option) const

Callers

nothing calls this directly

Calls 3

QPixmapClass · 0.85
widthMethod · 0.80
isNullMethod · 0.45

Tested by

no test coverage detected