MCPcopy Create free account
hub / github.com/KDE/krita / slotSetColor

Method slotSetColor

libs/widgets/KisVisualColorModel.cpp:61–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void KisVisualColorModel::slotSetColor(const KoColor &c)
62{
63 if (!m_d->allowUpdates) {
64 return;
65 }
66
67 if (!m_d->currentCS) {
68 m_d->currentcolor = c;
69 slotSetColorSpace(c.colorSpace());
70 }
71 else {
72 m_d->currentcolor = c.convertedTo(m_d->currentCS);
73 m_d->channelValues = convertKoColorToChannelValues(m_d->currentcolor);
74 emitChannelValues();
75 }
76}
77
78void KisVisualColorModel::slotSetColorSpace(const KoColorSpace *cs)
79{

Callers 15

lockUsedColorSpaceMethod · 0.45
updateAllElementsMethod · 0.45
setCurrentColorMethod · 0.45
WGShadeLineEditorMethod · 0.45
slotColorSelectedMethod · 0.45
WGSelectorConfigGridMethod · 0.45
setConfigurationMethod · 0.45

Calls 2

convertedToMethod · 0.80
colorSpaceMethod · 0.45

Tested by

no test coverage detected