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

Method getIconPixmap

src/plugins/core/gui/pluginitemdelegate.cpp:147–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147QPixmap PluginItemDelegate::getIconPixmap(const QIcon &icon,
148 const QSize &size,
149 qreal pixelRatio = 1.0,
150 QIcon::Mode mode,
151 QIcon::State state)
152{
153 Q_UNUSED(pixelRatio)
154
155 if (icon.isNull())
156 return QPixmap();
157
158 if (size.width() <= 0 || size.height() <= 0)
159 return QPixmap();
160
161 auto px = icon.pixmap(size, mode, state);
162 px.setDevicePixelRatio(qApp->devicePixelRatio());
163
164 return px;
165}
166
167void PluginItemDelegate::paintItemColumn(QPainter *painter,
168 const QStyleOptionViewItem &option,

Callers

nothing calls this directly

Calls 3

QPixmapClass · 0.85
widthMethod · 0.80
isNullMethod · 0.45

Tested by

no test coverage detected