MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / WizStringToColor2

Function WizStringToColor2

src/share/WizMisc.cpp:608–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606
607
608QColor WizStringToColor2(const CString& str)
609{
610 CString s = str;
611 s.trim('#');
612 int n = WizHexToInt(s);
613 //
614 int r = (LOBYTE((n)>>16));
615 int g = (LOBYTE(((WORD)(n)) >> 8));
616 int b = LOBYTE(n);
617 //
618 return QColor(r, g, b);
619}
620
621std::string WizBSTR2UTF8(const CString& str)
622{

Callers 3

getColorField2Method · 0.85
getColorMethod · 0.85
fromJsonMethod · 0.85

Calls 3

WizHexToIntFunction · 0.85
QColorClass · 0.70
trimMethod · 0.45

Tested by

no test coverage detected