void EasySelectorWidget::mouseReleaseEvent(QMouseEvent *e)
{
  Q_D(EasySelectorWidget);
  if (e->button() == Qt::LeftButton) {
    d->buttonDown = false;
    if (d->length != d->oldLength || d->complexity != d->oldComplexity) {
      emit valuesChanged(d->length, d->complexity);
      d->oldLength = d->length;
      d->oldComplexity = d->complexity;
    }
  }
}
void EasySelectorWidget::setLength(int length)
{
  Q_D(EasySelectorWidget);
  d->length = length;
  if (d->length != d->oldLength) {
    emit valuesChanged(d->length, d->complexity);
    d->oldLength = d->length;
  }
  if (d->length > d->maxLength)
    setMaxLength(d->length);
  update();
}
void EasySelectorWidget::mouseMoveEvent(QMouseEvent *e)
{
  Q_D(EasySelectorWidget);
  if (d->buttonDown) {
    setMousePos(e->pos());
    if (d->length != d->oldLength || d->complexity != d->oldComplexity) {
      emit valuesChanged(d->length, d->complexity);
      d->oldLength = d->length;
      d->oldComplexity = d->complexity;
    }
  }
}
Esempio n. 4
0
// Set the data source inputs.
void AM3DDeadTimeAB::setInputDataSourcesImplementation(const QList<AMDataSource*>& dataSources)
{
	// disconnect connections from old sources, if they exist.
	if(spectra_ != 0 && icr_ != 0 && ocr_ != 0) {

		disconnect(spectra_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		disconnect(spectra_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		disconnect(spectra_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));

		disconnect(icr_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		disconnect(icr_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		disconnect(icr_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));

		disconnect(ocr_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		disconnect(ocr_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		disconnect(ocr_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));

		spectra_ = 0;
		icr_ = 0;
		ocr_ = 0;
	}
// Set the data source inputs.
void AM1DRunningAverageFilterAB::setInputDataSourcesImplementation(const QList<AMDataSource*>& dataSources) {

	// disconnect connections from old source, if it exists.
	if(inputSource_) {
		disconnect(inputSource_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		disconnect(inputSource_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		disconnect(inputSource_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
	}

	if(dataSources.isEmpty()) {
		inputSource_ = 0;
		sources_.clear();

		axes_[0] = AMAxisInfo("invalid", 0, "No input data");
		setDescription("-- No input data --");
	}

	// we know that this will only be called with valid input source
	else {
		inputSource_ = dataSources.at(0);
		sources_ = dataSources;

		axes_[0] = inputSource_->axisInfoAt(0);

		setDescription(QString("Running Average of %1")
					   .arg(inputSource_->name()));

		connect(inputSource_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		connect(inputSource_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		connect(inputSource_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));

	}

	reviewState();

	emitSizeChanged(0);
	emitValuesChanged();
	emitAxisInfoChanged(0);
	emitInfoChanged();
}
Esempio n. 6
0
void AM3DNormalizationAB::setInputSources()
{
	if (data_){

		disconnect(data_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		disconnect(data_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		disconnect(data_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
		data_ = 0;
	}

	if (normalizer_){

		disconnect(normalizer_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		disconnect(normalizer_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		disconnect(normalizer_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
		normalizer_ = 0;
	}

	int dataIndex = indexOfInputSource(dataName_);
	int normalizationIndex = indexOfInputSource(normalizationName_);

	if (dataIndex >= 0 && normalizationIndex >= 0){

		data_ = inputDataSourceAt(dataIndex);
		normalizer_ = inputDataSourceAt(normalizationIndex);
		canAnalyze_ = true;

		axes_[0] = data_->axisInfoAt(0);
		axes_[1] = data_->axisInfoAt(1);
		axes_[2] = data_->axisInfoAt(2);

		setDescription(QString("Normalized %1 map").arg(data_->name()));

		connect(data_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		connect(data_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		connect(data_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
		connect(normalizer_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		connect(normalizer_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		connect(normalizer_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
	}
void GammaWidget::changeEvent(QEvent *event)
{
    if (event->type() == QEvent::EnabledChange) {
        //// Reset from film when enabling in case values were not properly initialized
        //if (retrieveParam(false, LUX_FILM, LUX_FILM_TORGB_GAMMA) == m_TORGB_gamma)
        //	resetFromFilm(false);

        updateParam(LUX_FILM, LUX_FILM_TORGB_GAMMA, (this->isEnabled() ? m_TORGB_gamma : 1.0));
        updateParam(LUX_FILM, LUX_FILM_CAMERA_RESPONSE_ENABLED, this->isEnabled() && m_CRF_enabled);
        emit valuesChanged ();

    }
}
void GammaWidget::gammaChanged (double value)
{
    m_TORGB_gamma = value;

    int sliderval = (int)((FLOAT_SLIDER_RES / TORGB_GAMMA_RANGE) * m_TORGB_gamma);

    updateWidgetValue(ui->slider_gamma, sliderval);
    updateWidgetValue(ui->spinBox_gamma, m_TORGB_gamma);

    updateParam (LUX_FILM, LUX_FILM_TORGB_GAMMA, m_TORGB_gamma);

    emit valuesChanged ();
}
Esempio n. 9
0
void AM1DDerivativeAB::setInputDataSourcesImplementation(const QList<AMDataSource*>& dataSources)
{
	// disconnect connections from old source, if it exists.
	if(inputSource_) {

		disconnect(inputSource_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		disconnect(inputSource_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		disconnect(inputSource_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
		inputSource_ = 0;
	}

	if(dataSources.isEmpty()) {

		inputSource_ = 0;
		sources_.clear();
		canAnalyze_ = false;

		axes_[0] = AMAxisInfo("invalid", 0, "No input data");
		setDescription("Derivative");
	}

	// we know that this will only be called with valid input source
	else if (dataSources.count() == 1){

		inputSource_ = dataSources.at(0);
		sources_ = dataSources;
		canAnalyze_ = true;

		axes_[0] = inputSource_->axisInfoAt(0);

        cacheUpdateRequired_ = true;
        cachedData_ = QVector<double>(size(0));

		setDescription(QString("Derivative of %1").arg(inputSource_->name()));

		connect(inputSource_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		connect(inputSource_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		connect(inputSource_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
	}
Esempio n. 10
0
void SearchSet::clear()
{
  m_queryString = "";
  m_maxDepth = DEFAULT_DEPTH;
  m_addUSRefs = true;
  m_addReferencedBy = true;
  m_downloadedItems.clear();
  m_outstandingItems.clear();
  m_needReferencedBy.clear();

  emit valuesChanged(0, 0, 0);
  emit modified(false);
}
void AM1DDarkCurrentCorrectionAB::setInputSources()
{
	if (data_){

		disconnect(data_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		disconnect(data_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		disconnect(data_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
		data_ = 0;
	}

	if (dwellTime_){

		disconnect(dwellTime_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		disconnect(dwellTime_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		disconnect(dwellTime_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
		dwellTime_ = 0;
	}

	int dataIndex = indexOfInputSource(dataName_);
	int dwellTimeIndex = indexOfInputSource(dwellTimeName_);

	if (dataIndex >= 0 && dwellTimeIndex >= 0){

		data_ = inputDataSourceAt(dataIndex);
		dwellTime_ = inputDataSourceAt(dwellTimeIndex);
		canAnalyze_ = true;

		axes_[0] = data_->axisInfoAt(0);

		setDescription(QString("Dark Current Corrected %1").arg(data_->name()));

		connect(data_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		connect(data_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		connect(data_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
		connect(dwellTime_->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
		connect(dwellTime_->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
		connect(dwellTime_->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
	}
void NoiseReductionWidget::amplitudeChanged(double value)
{
	m_GREYC_amplitude = value;

	int sliderval = (int)((FLOAT_SLIDER_RES / GREYC_AMPLITUDE_RANGE) * m_GREYC_amplitude);

	updateWidgetValue(ui->slider_amplitude, sliderval);
	updateWidgetValue(ui->spinBox_amplitude, m_GREYC_amplitude);

	updateParam (LUX_FILM, LUX_FILM_NOISE_GREYC_AMPLITUDE, m_GREYC_amplitude);

	if (m_GREYC_enabled)
		emit valuesChanged();
}
void NoiseReductionWidget::sharpnessChanged(double value)
{
	m_GREYC_sharpness = value;

	int sliderval = (int)((FLOAT_SLIDER_RES / GREYC_SHARPNESS_RANGE) * m_GREYC_sharpness);

	updateWidgetValue(ui->slider_sharpness, sliderval);
	updateWidgetValue(ui->spinBox_sharpness, m_GREYC_sharpness);

	updateParam (LUX_FILM, LUX_FILM_NOISE_GREYC_SHARPNESS, m_GREYC_sharpness);

	if (m_GREYC_enabled)
		emit valuesChanged();
}
void NoiseReductionWidget::precisionChanged(double value)
{
	m_GREYC_gauss_prec = value;

	int sliderval = (int)((FLOAT_SLIDER_RES / GREYC_GAUSSPREC_RANGE) * m_GREYC_gauss_prec);

	updateWidgetValue(ui->slider_precision, sliderval);
	updateWidgetValue(ui->spinBox_precision, m_GREYC_gauss_prec);

	updateParam (LUX_FILM, LUX_FILM_NOISE_GREYC_GAUSSPREC, m_GREYC_gauss_prec);

	if (m_GREYC_enabled)
		emit valuesChanged();
}
void NoiseReductionWidget::spatialChanged(double value)
{
	m_GREYC_dl = value;

	int sliderval = (int)((FLOAT_SLIDER_RES / GREYC_DL_RANGE) * m_GREYC_dl);

	updateWidgetValue(ui->slider_spatial, sliderval);
	updateWidgetValue(ui->spinBox_spatial, m_GREYC_dl);

	updateParam (LUX_FILM, LUX_FILM_NOISE_GREYC_DL, m_GREYC_dl);

	if (m_GREYC_enabled)
		emit valuesChanged();
}
void NoiseReductionWidget::iterationsChanged(double value)
{
	m_GREYC_nb_iter = value;

	int sliderval = (int)((FLOAT_SLIDER_RES / GREYC_NB_ITER_RANGE) * m_GREYC_nb_iter);

	updateWidgetValue(ui->slider_iterations, sliderval);
	updateWidgetValue(ui->spinBox_iterations, m_GREYC_nb_iter);

	updateParam (LUX_FILM, LUX_FILM_NOISE_GREYC_NBITER, m_GREYC_nb_iter);

	if (m_GREYC_enabled)
		emit valuesChanged();
}
void NoiseReductionWidget::angularChanged(double value)
{
	m_GREYC_da = value;

	int sliderval = (int)((FLOAT_SLIDER_RES / GREYC_DA_RANGE) * m_GREYC_da);

	updateWidgetValue(ui->slider_angular, sliderval);
	updateWidgetValue(ui->spinBox_angular, m_GREYC_da);

	updateParam (LUX_FILM, LUX_FILM_NOISE_GREYC_DA, m_GREYC_da);

	if (m_GREYC_enabled)
		emit valuesChanged();
}
void NoiseReductionWidget::anisoChanged(double value)
{
	m_GREYC_anisotropy = value;

	int sliderval = (int)((FLOAT_SLIDER_RES / GREYC_ANISOTROPY_RANGE) * m_GREYC_anisotropy);

	updateWidgetValue(ui->slider_aniso, sliderval);
	updateWidgetValue(ui->spinBox_aniso, m_GREYC_anisotropy);

	updateParam (LUX_FILM, LUX_FILM_NOISE_GREYC_ANISOTROPY, m_GREYC_anisotropy);

	if (m_GREYC_enabled)
		emit valuesChanged();
}
Esempio n. 19
0
void SpinBoxRangeSliderQt::updateFromSlider(int valMin, int valMax) {
    valMin = (valMin >= maxRange_) ? maxRange_ - 1 : valMin;
    valMax = (valMax >= maxRange_) ? maxRange_ : valMax;
    valMin = (valMax <= 0) ? 0 : valMin;
    valMax = (valMax <= 0) ? 1 : valMax;
    valMin = (valMin >= valMax) ? valMax - 1 : valMin;

    if (valMin != spinBoxMin_->value())
        spinBoxMin_->setValue(valMin);

    if (valMax != spinBoxMax_->value())
        spinBoxMax_->setValue(valMax);

    emit valuesChanged();
}
Esempio n. 20
0
void EnvelopeWidget::setForce(ForceEffect *force)
{
    if (m_force)
    {
        disconnect(m_force, 0, this, 0);
    }

    m_force = force;

    if (m_force)
    {
        connect(m_force, SIGNAL(valuesChanged()), this, SLOT(updateUserInterface()));

        updateUserInterface();
    }
}
Esempio n. 21
0
void DRangeSlider::updateRangeValues() {

  double nval = (x_min - x_lim_min) / (double) (x_lim_max - x_lim_min);
  double sub_min_tmp = nval*(range_max-range_min) + range_min;

  nval = (x_max - x_lim_min) / (double) (x_lim_max - x_lim_min);
  double sub_max_tmp = nval*(range_max-range_min) + range_min;

  if (sub_min_tmp!=sub_min || sub_max_tmp!=sub_max) {
    sub_min = sub_min_tmp;
    sub_max = sub_max_tmp;
    emit valuesChanged();
    emit rangeChanged( sub_min, sub_max );
    emit sliderChanged( this );
  }
}
void ImageDepth::recalculate()
{
    mapValues();

    int algorithm;

    if( ui->algorithmComboBox->currentIndex() == 0 )
        algorithm = ALG_BM;
    else if( ui->algorithmComboBox->currentIndex() == 1)
        algorithm = ALG_SGBM;
    else
        algorithm = ALG_VAR;

    qDebug() << "Algorithm:=" << algorithm;

    emit(valuesChanged(*this->bmVariables, *this->sgbmVariables, *this->varVariables, algorithm));
}
void NoiseReductionWidget::chiuRadiusChanged(double value)
{
	m_Chiu_radius = value;

	if ( m_Chiu_radius > CHIU_RADIUS_MAX )
		m_Chiu_radius = CHIU_RADIUS_MAX;
	else if ( m_Chiu_radius < CHIU_RADIUS_MIN )
		m_Chiu_radius = CHIU_RADIUS_MIN;

	int sliderval = (int)(( FLOAT_SLIDER_RES / (CHIU_RADIUS_MAX - CHIU_RADIUS_MIN) ) * (m_Chiu_radius - CHIU_RADIUS_MIN) );

	updateWidgetValue(ui->slider_chiuRadius, sliderval);
	updateWidgetValue(ui->spinBox_chiuRadius, m_Chiu_radius);

	updateParam (LUX_FILM, LUX_FILM_NOISE_CHIU_RADIUS, m_Chiu_radius);

	if (m_Chiu_enabled)
		emit valuesChanged();
}
Esempio n. 24
0
void DoubleSlider::setMinValue(float val) {
    if (val == minValue_)
        return;

    if (val < 0.f)
        val = 0.f;
    if (val + minimalAllowedSliderDistance_ < maxValue_)
        minValue_ = val;
    else {
        maxValue_ = val + minimalAllowedSliderDistance_;
        if (maxValue_ > 1.f) {
            maxValue_ = 1.f;
            minValue_ = 1.f - minimalAllowedSliderDistance_;
        }
        else
            minValue_ = val;
    }
    update();
    emit valuesChanged(minValue_, maxValue_);
}
Esempio n. 25
0
void DoubleSlider::setMaxValue(float val) {
    if (val == maxValue_)
        return;

    if (val > 1.f)
        val = 1.f;
    if (minValue_ + minimalAllowedSliderDistance_ < val)
        maxValue_ = val;
    else {
        minValue_ = val - minimalAllowedSliderDistance_;
        if (minValue_ < 0.f) {
            minValue_ = 0.f;
            maxValue_ = minimalAllowedSliderDistance_;
        }
        else
            maxValue_ = val;
    }
    update();
    emit valuesChanged(minValue_, maxValue_);
}
Esempio n. 26
0
void HistogramDialog::activatePreset (int id, bool zoom)
{
    id = clamp( id, 0, 6);
    switch( id) {
    case 0: min_ = frameInfo_.min95;   max_ = frameInfo_.max95; break;
    case 1: min_ = frameInfo_.min98;   max_ = frameInfo_.max98; break;
    case 2: min_ = frameInfo_.min99;   max_ = frameInfo_.max99; break;
    case 3: min_ = frameInfo_.min995;  max_ = frameInfo_.max995; break;
    case 4: min_ = frameInfo_.min999;  max_ = frameInfo_.max999; break;
    case 5: min_ = frameInfo_.min9999; max_ = frameInfo_.max9999; break;
    case 6: min_ = frameInfo_.min; max_ = frameInfo_.max; break;
    }

    if( zoom) {
        zoomToSelection();
    }
    recalculateHistogramDelayed();
    pwset ("/Histogram/Index", id);
    emit valuesChanged ( min_, max_);
}
Esempio n. 27
0
void ExpoDialog::widgetChanged()
{
    if (GetEepromInterface()->getCapability(GvarsAsWeight)) {
      int gvars=0;
      if (GetEepromInterface()->getCapability(HasVariants)) {
        if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) {
          gvars=1;
        }
      } else {
        gvars=1;
      }
      if (gvars==1) {
        if (!GetEepromInterface()->getCapability(ExpoIsCurve)) {
          if (ui->expoGV->isChecked()) {
            ui->expoCB->show();
            ui->expoSB->hide();
          } else {
            ui->expoCB->hide();
            ui->expoSB->show();
          }
        } else {
          if (ui->expoCurveGV->isChecked()) {
            ui->expoCurveCB->show();
            ui->expoCurveSB->hide();
          } else {
            ui->expoCurveCB->hide();
            ui->expoCurveSB->show();
          }
        }
        if (ui->weightGV->isChecked()) {
          ui->weightCB->show();
          ui->weightSB->hide();
        } else {
          ui->weightCB->hide();
          ui->weightSB->show();
        }
      }
      valuesChanged();
      QTimer::singleShot(0, this, SLOT(shrink()));      
    }
}
void
OfflineBrief::devModeChanged (
        MeeGo::QmDeviceMode::DeviceMode mode)
{
#ifdef DEBUG
    switch (mode)
    {
        case MeeGo::QmDeviceMode::Flight:
            SYS_DEBUG ("mode = Flight mode");
            break;
        case MeeGo::QmDeviceMode::Normal:
            SYS_DEBUG ("mode = Normal");
            break;
        default:
            SYS_DEBUG ("mode = Error!!!");
            break;
    }
#endif
    m_LastMode = mode;
    emit valuesChanged();
}
void PolygonVertexAttributeArray::setValuesFromBase64Binary(const QString& base64Str) {
    mValues.clear();
    QByteArray array = QByteArray::fromBase64(base64Str.toLatin1());
    int length = array.size() / sizeof(float);
    mValues.reserve(length);
    const char* dataPtr = array.data();
    for (int i = 0; i < length; i++) {
        unsigned char b1 = *dataPtr++;
        unsigned char b2 = *dataPtr++;
        unsigned char b3 = *dataPtr++;
        unsigned char b4 = *dataPtr++;
        unsigned int intValue =
                (static_cast<unsigned int>(b1) << 0)
                | (static_cast<unsigned int>(b2) << 8)
                | (static_cast<unsigned int>(b3) << 16)
                | (static_cast<unsigned int>(b4) << 24);
        float value = *reinterpret_cast<float*>(&intValue);
        mValues.append(value);
    }
    emit valuesChanged();
}
void GammaWidget::LoadSettings( QString fName )
{
    QSettings settings( fName, QSettings::IniFormat );

    settings.beginGroup("gamma");
    if ( settings.status() ) return;

    m_TORGB_gamma = settings.value("TORGB_gamma", 2.2 ).toDouble();
    m_CRF_enabled = settings.value("CRF_enabled", false ).toBool();
    m_CRF_file = settings.value("CRF_file", "" ).toString();

    settings.endGroup();

    updateWidgetValues();
    updateParam(LUX_FILM, LUX_FILM_TORGB_GAMMA, (this->isEnabled() ? m_TORGB_gamma : 1.0));

    if ( m_CRF_enabled )
    {
        activateCRF();
    }

    emit valuesChanged();
}