@@ -150,7 +150,6 @@ SettingsWindow::SettingsWindow(QWidget *parent) :
150150
151151 initGrabbersRadioButtonsVisibility ();
152152 initLanguages ();
153- initVirtualLeds (Settings::getNumberOfLeds (SupportedDevices::DeviceTypeVirtual));
154153
155154 loadTranslation (Settings::getLanguage ());
156155
@@ -265,6 +264,7 @@ void SettingsWindow::connectSignalsSlots()
265264 connect (ui->spinBox_DeviceBrightnessCap , SIGNAL (valueChanged (int )), this , SLOT (onDeviceBrightnessCap_valueChanged (int )));
266265 connect (ui->spinBox_DeviceColorDepth , SIGNAL (valueChanged (int )), this , SLOT (onDeviceColorDepth_valueChanged (int )));
267266 connect (ui->doubleSpinBox_DeviceGamma , SIGNAL (valueChanged (double )), this , SLOT (onDeviceGammaCorrection_valueChanged (double )));
267+ connect (ui->checkBox_EnableDithering , SIGNAL (toggled (bool )), this , SLOT (onDeviceDitheringEnabled_toggled (bool )));
268268 connect (ui->horizontalSlider_GammaCorrection , SIGNAL (valueChanged (int )), this , SLOT (onSliderDeviceGammaCorrection_valueChanged (int )));
269269 connect (ui->checkBox_SendDataOnlyIfColorsChanges , SIGNAL (toggled (bool )), this , SLOT (onDeviceSendDataOnlyIfColorsChanged_toggled (bool )));
270270
@@ -1393,6 +1393,13 @@ void SettingsWindow::onSliderDeviceGammaCorrection_valueChanged(int value)
13931393 emit updateGamma (Settings::getDeviceGamma ());
13941394}
13951395
1396+ void SettingsWindow::onDeviceDitheringEnabled_toggled (bool state) {
1397+ DEBUG_LOW_LEVEL << Q_FUNC_INFO << state;
1398+
1399+ Settings::setDeviceDitheringEnabled (state);
1400+ }
1401+
1402+
13961403void SettingsWindow::onLightpackModes_currentIndexChanged (int index)
13971404{
13981405 if (updatingFromSettings) return ;
@@ -1926,25 +1933,26 @@ void SettingsWindow::updateUiFromSettings()
19261933
19271934 ui->pushButton_SelectColorSoundVizMin ->setColor (Settings::getSoundVisualizerMinColor ());
19281935 ui->pushButton_SelectColorSoundVizMax ->setColor (Settings::getSoundVisualizerMaxColor ());
1929- ui->radioButton_SoundVizConstantMode ->setChecked (!Settings::isSoundVisualizerLiquidMode ());
1936+ ui->radioButton_SoundVizConstantMode ->setChecked (!Settings::isSoundVisualizerLiquidMode ());
19301937 ui->radioButton_SoundVizLiquidMode ->setChecked (Settings::isSoundVisualizerLiquidMode ());
19311938 ui->horizontalSlider_SoundVizLiquidSpeed ->setValue (Settings::getSoundVisualizerLiquidSpeed ());
19321939#endif
19331940
19341941 ui->checkBox_DisableUsbPowerLed ->setChecked (Settings::isDeviceUsbPowerLedDisabled ());
19351942 ui->horizontalSlider_DeviceRefreshDelay ->setValue (Settings::getDeviceRefreshDelay ());
19361943 ui->horizontalSlider_DeviceBrightness ->setValue (Settings::getDeviceBrightness ());
1937- ui->horizontalSlider_DeviceBrightnessCap ->setValue (Settings::getDeviceBrightnessCap ());
1944+ ui->horizontalSlider_DeviceBrightnessCap ->setValue (Settings::getDeviceBrightnessCap ());
19381945 ui->horizontalSlider_DeviceSmooth ->setValue (Settings::getDeviceSmooth ());
19391946 ui->horizontalSlider_DeviceColorDepth ->setValue (Settings::getDeviceColorDepth ());
19401947 ui->doubleSpinBox_DeviceGamma ->setValue (Settings::getDeviceGamma ());
1941- ui->horizontalSlider_GammaCorrection ->setValue (floor ((Settings::getDeviceGamma () * 100 + 0.5 )));
1942-
1943- ui->groupBox_Api ->setChecked (Settings::isApiEnabled ());
1944- ui->checkBox_listenOnlyOnLoInterface ->setChecked (Settings::isListenOnlyOnLoInterface ());
1945- ui->lineEdit_ApiPort ->setText (QString::number (Settings::getApiPort ()));
1946- ui->lineEdit_ApiPort ->setValidator (new QIntValidator (1 , 49151 ));
1947- ui->lineEdit_ApiKey ->setText (Settings::getApiAuthKey ());
1948+ ui->horizontalSlider_GammaCorrection ->setValue (floor ((Settings::getDeviceGamma () * 100 + 0.5 )));
1949+ ui->checkBox_EnableDithering ->setChecked (Settings::isDeviceDitheringEnabled ());
1950+
1951+ ui->groupBox_Api ->setChecked (Settings::isApiEnabled ());
1952+ ui->checkBox_listenOnlyOnLoInterface ->setChecked (Settings::isListenOnlyOnLoInterface ());
1953+ ui->lineEdit_ApiPort ->setText (QString::number (Settings::getApiPort ()));
1954+ ui->lineEdit_ApiPort ->setValidator (new QIntValidator (1 , 49151 ));
1955+ ui->lineEdit_ApiKey ->setText (Settings::getApiAuthKey ());
19481956 ui->spinBox_LoggingLevel ->setValue (g_debugLevel);
19491957
19501958 if (g_debugLevel == Debug::DebugLevels::ZeroLevel) {
@@ -2125,6 +2133,11 @@ void SettingsWindow::on_pushButton_GammaCorrectionHelp_clicked()
21252133 showHelpOf (ui->horizontalSlider_GammaCorrection );
21262134}
21272135
2136+ void SettingsWindow::on_pushButton_DitheringHelp_clicked ()
2137+ {
2138+ showHelpOf (ui->checkBox_EnableDithering );
2139+ }
2140+
21282141void SettingsWindow::on_pushButton_BrightnessCapHelp_clicked ()
21292142{
21302143 showHelpOf (ui->horizontalSlider_DeviceBrightnessCap );
0 commit comments