MCPcopy Create free account
hub / github.com/YACReader/yacreader / applyColorToItem

Method applyColorToItem

common/themes/theme_editor_dialog.cpp:249–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249void ThemeEditorDialog::applyColorToItem(QTreeWidgetItem *item, const QColor &color)
250{
251 const QString hexStr = color.alpha() < 255
252 ? color.name(QColor::HexArgb)
253 : color.name(QColor::HexRgb);
254 const QString normalizedHexStr = hexStr.toUpper();
255 item->setText(1, normalizedHexStr);
256 item->setIcon(1, colorIcon(color));
257
258 const QStringList path = item->data(0, PathRole).toStringList();
259 setJsonPath(params, path, normalizedHexStr);
260}
261
262void ThemeEditorDialog::toggleBoolItem(QTreeWidgetItem *item)
263{

Callers

nothing calls this directly

Calls 4

setIconMethod · 0.80
nameMethod · 0.45
setTextMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected