MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / updateColorUi

Method updateColorUi

qt/OpenRGBDevicePage/OpenRGBDevicePage.cpp:1655–1693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1653}
1654
1655void Ui::OpenRGBDevicePage::updateColorUi()
1656{
1657 /*-----------------------------------------------------*\
1658 | Update colorwheel |
1659 \*-----------------------------------------------------*/
1660 ui->ColorWheelBox->blockSignals(true);
1661 ui->ColorWheelBox->setColor(current_color);
1662 ui->ColorWheelBox->blockSignals(false);
1663
1664 /*-----------------------------------------------------*\
1665 | Update RGB spinboxes |
1666 \*-----------------------------------------------------*/
1667 ui->RedSpinBox->blockSignals(true);
1668 ui->RedSpinBox->setValue(current_color.red());
1669 ui->RedSpinBox->blockSignals(false);
1670
1671 ui->GreenSpinBox->blockSignals(true);
1672 ui->GreenSpinBox->setValue(current_color.green());
1673 ui->GreenSpinBox->blockSignals(false);
1674
1675 ui->BlueSpinBox->blockSignals(true);
1676 ui->BlueSpinBox->setValue(current_color.blue());
1677 ui->BlueSpinBox->blockSignals(false);
1678
1679 /*-----------------------------------------------------*\
1680 | Update HSV spinboxes |
1681 \*-----------------------------------------------------*/
1682 ui->HueSpinBox->blockSignals(true);
1683 ui->HueSpinBox->setValue(current_color.hue());
1684 ui->HueSpinBox->blockSignals(false);
1685
1686 ui->SatSpinBox->blockSignals(true);
1687 ui->SatSpinBox->setValue(current_color.saturation());
1688 ui->SatSpinBox->blockSignals(false);
1689
1690 ui->ValSpinBox->blockSignals(true);
1691 ui->ValSpinBox->setValue(current_color.value());
1692 ui->ValSpinBox->blockSignals(false);
1693}

Callers

nothing calls this directly

Calls 2

setColorMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected