| 854 | } |
| 855 | |
| 856 | void Settings::setColorSequence(SupportedDevices::DeviceType device, QString colorSequence) |
| 857 | { |
| 858 | DEBUG_LOW_LEVEL << Q_FUNC_INFO << device << colorSequence; |
| 859 | switch (device) |
| 860 | { |
| 861 | case SupportedDevices::DeviceTypeAdalight: |
| 862 | setValueMain(Main::Key::Adalight::ColorSequence, colorSequence); |
| 863 | DEBUG_LOW_LEVEL << Q_FUNC_INFO << "ada" << colorSequence; |
| 864 | break; |
| 865 | case SupportedDevices::DeviceTypeArdulight: |
| 866 | setValueMain(Main::Key::Ardulight::ColorSequence, colorSequence); |
| 867 | DEBUG_LOW_LEVEL << Q_FUNC_INFO << "ard" << colorSequence; |
| 868 | break; |
| 869 | default: |
| 870 | qWarning() << Q_FUNC_INFO << "Unsupported device type: " << device << m_devicesTypeToNameMap.value(device); |
| 871 | return; |
| 872 | } |
| 873 | m_this->deviceColorSequenceChanged(colorSequence); |
| 874 | } |
| 875 | |
| 876 | QString Settings::getColorSequence(SupportedDevices::DeviceType device) |
| 877 | { |