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

#include "kcmaccessibilityshakecursor.h"

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

  setCurrentGroup( QStringLiteral( "Plugins" ) );

  KConfigCompilerSignallingItem  *itemShakeCursor;
  KConfigSkeleton::ItemBool  *innerItemShakeCursor;
  innerItemShakeCursor = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "shakecursorEnabled" ), mShakeCursor, true );
  itemShakeCursor = new KConfigCompilerSignallingItem(innerItemShakeCursor, this, notifyFunction, signalShakeCursorChanged);
  itemShakeCursor->setWriteFlags(KConfigBase::Notify);
  addItem( itemShakeCursor, QStringLiteral( "ShakeCursor" ) );

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

  KConfigCompilerSignallingItem  *itemShakeCursorMagnification;
  KConfigSkeleton::ItemDouble  *innerItemShakeCursorMagnification;
  innerItemShakeCursorMagnification = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "Magnification" ), mShakeCursorMagnification, 3 );
  itemShakeCursorMagnification = new KConfigCompilerSignallingItem(innerItemShakeCursorMagnification, this, notifyFunction, signalShakeCursorMagnificationChanged);
  innerItemShakeCursorMagnification->setMinValue(1);
  itemShakeCursorMagnification->setWriteFlags(KConfigBase::Notify);
  addItem( itemShakeCursorMagnification, QStringLiteral( "ShakeCursorMagnification" ) );
}

bool ShakeCursorSettings::defaultShakeCursorValue_helper() const
{

  return true;
}

double ShakeCursorSettings::defaultShakeCursorMagnificationValue_helper() const
{

  return 3;
}

ShakeCursorSettings::~ShakeCursorSettings()
{
}


void ShakeCursorSettings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalShakeCursorChanged:
    Q_EMIT ShakeCursorChanged();
    break;
  case signalShakeCursorMagnificationChanged:
    Q_EMIT ShakeCursorMagnificationChanged();
    break;
  }
}
