MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / onColorActivated

Method onColorActivated

src/colortable.cpp:290–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290void ColorTable::onColorActivated()
291{
292 const auto rows = selectionModel()->selectedRows();
293 if (rows.isEmpty()) {
294 return;
295 }
296
297 const auto row = rows[0].row();
298 auto* ci = colorItemForRow(this, row);
299 if (!ci) {
300 return;
301 }
302
303 const QColor result = QColorDialog::getColor(
304 ci->get(), topLevelWidget(), ci->caption(), QColorDialog::ShowAlphaChannel);
305
306 if (result.isValid()) {
307 ci->set(result);
308 update(model()->index(row, 1));
309 }
310}

Callers

nothing calls this directly

Calls 6

colorItemForRowFunction · 0.85
isEmptyMethod · 0.45
getMethod · 0.45
isValidMethod · 0.45
setMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected