// This file is generated by kconfig_compiler_kf6 from kcmaccessibilitycolorblindnesscorrection.kcfg.
// All changes you do to this file will be lost.

#include "kcmaccessibilitycolorblindnesscorrection.h"

ColorblindnessCorrectionSettings::ColorblindnessCorrectionSettings( QObject *parent )
  : KConfigSkeleton( QStringLiteral( "kwinrc" ) )
{
  setParent(parent);
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&ColorblindnessCorrectionSettings::itemChanged);

  setCurrentGroup( QStringLiteral( "Plugins" ) );

  KConfigCompilerSignallingItem  *itemColorblindnessCorrection;
  KConfigSkeleton::ItemBool  *innerItemColorblindnessCorrection;
  innerItemColorblindnessCorrection = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "colorblindnesscorrectionEnabled" ), mColorblindnessCorrection, false );
  itemColorblindnessCorrection = new KConfigCompilerSignallingItem(innerItemColorblindnessCorrection, this, notifyFunction, signalColorblindnessCorrectionChanged);
  itemColorblindnessCorrection->setWriteFlags(KConfigBase::Notify);
  addItem( itemColorblindnessCorrection, QStringLiteral( "ColorblindnessCorrection" ) );

  setCurrentGroup( QStringLiteral( "Effect-colorblindnesscorrection" ) );

  KConfigCompilerSignallingItem  *itemMode;
  KConfigSkeleton::ItemUInt  *innerItemMode;
  innerItemMode = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "Mode" ), mMode, 0 );
  itemMode = new KConfigCompilerSignallingItem(innerItemMode, this, notifyFunction, signalModeChanged);
  itemMode->setWriteFlags(KConfigBase::Notify);
  addItem( itemMode, QStringLiteral( "Mode" ) );
  KConfigCompilerSignallingItem  *itemIntensity;
  KConfigSkeleton::ItemDouble  *innerItemIntensity;
  innerItemIntensity = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "Intensity" ), mIntensity, 1.0 );
  itemIntensity = new KConfigCompilerSignallingItem(innerItemIntensity, this, notifyFunction, signalIntensityChanged);
  itemIntensity->setWriteFlags(KConfigBase::Notify);
  addItem( itemIntensity, QStringLiteral( "Intensity" ) );
}

bool ColorblindnessCorrectionSettings::defaultColorblindnessCorrectionValue_helper() const
{

  return false;
}

uint ColorblindnessCorrectionSettings::defaultModeValue_helper() const
{

  return 0;
}

double ColorblindnessCorrectionSettings::defaultIntensityValue_helper() const
{

  return 1.0;
}

ColorblindnessCorrectionSettings::~ColorblindnessCorrectionSettings()
{
}


void ColorblindnessCorrectionSettings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalColorblindnessCorrectionChanged:
    Q_EMIT ColorblindnessCorrectionChanged();
    break;
  case signalModeChanged:
    Q_EMIT ModeChanged();
    break;
  case signalIntensityChanged:
    Q_EMIT IntensityChanged();
    break;
  }
}
