MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / onHexCommitted

Method onHexCommitted

pj_widgets/src/ColorPickerPopup.cpp:256–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256void ColorPickerPopup::onHexCommitted() {
257 QString text = hex_edit_->text().trimmed();
258 if (!text.startsWith('#')) {
259 text.prepend('#');
260 }
261 if (text.size() != 7) {
262 pushToHexField(color());
263 return;
264 }
265 const QColor c(text);
266 if (!c.isValid()) {
267 pushToHexField(color());
268 return;
269 }
270 setColor(c);
271 emit colorChanged(c);
272}
273
274void ColorPickerPopup::recomputeAndEmit() {
275 const QColor c = color();

Callers

nothing calls this directly

Calls 3

textMethod · 0.45
sizeMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected