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

#include "kcmaccessibilitymouse.h"

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

  setCurrentGroup( QStringLiteral( "Mouse" ) );

  KConfigCompilerSignallingItem  *itemMouseKeys;
  KConfigSkeleton::ItemBool  *innerItemMouseKeys;
  innerItemMouseKeys = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "MouseKeys" ), mMouseKeys, false );
  itemMouseKeys = new KConfigCompilerSignallingItem(innerItemMouseKeys, this, notifyFunction, signalMouseKeysChanged);
  addItem( itemMouseKeys, QStringLiteral( "MouseKeys" ) );
  KConfigCompilerSignallingItem  *itemAccelerationDelay;
  KConfigSkeleton::ItemInt  *innerItemAccelerationDelay;
  innerItemAccelerationDelay = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MKDelay" ), mAccelerationDelay, 1 );
  itemAccelerationDelay = new KConfigCompilerSignallingItem(innerItemAccelerationDelay, this, notifyFunction, signalAccelerationDelayChanged);
  addItem( itemAccelerationDelay, QStringLiteral( "AccelerationDelay" ) );
  KConfigCompilerSignallingItem  *itemRepetitionInterval;
  KConfigSkeleton::ItemInt  *innerItemRepetitionInterval;
  innerItemRepetitionInterval = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MKInterval" ), mRepetitionInterval, 1 );
  itemRepetitionInterval = new KConfigCompilerSignallingItem(innerItemRepetitionInterval, this, notifyFunction, signalRepetitionIntervalChanged);
  addItem( itemRepetitionInterval, QStringLiteral( "RepetitionInterval" ) );
  KConfigCompilerSignallingItem  *itemMK_TimeToMax;
  KConfigSkeleton::ItemInt  *innerItemMK_TimeToMax;
  innerItemMK_TimeToMax = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MK_TimeToMax" ), mMK_TimeToMax, 5000 );
  itemMK_TimeToMax = new KConfigCompilerSignallingItem(innerItemMK_TimeToMax, this, notifyFunction, signalMK_TimeToMaxChanged);
  addItem( itemMK_TimeToMax, QStringLiteral( "MK_TimeToMax" ) );
  KConfigCompilerSignallingItem  *itemAccelerationTime;
  KConfigSkeleton::ItemInt  *innerItemAccelerationTime;
  innerItemAccelerationTime = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MKTimeToMax" ), mAccelerationTime );
  itemAccelerationTime = new KConfigCompilerSignallingItem(innerItemAccelerationTime, this, notifyFunction, signalAccelerationTimeChanged);
  addItem( itemAccelerationTime, QStringLiteral( "AccelerationTime" ) );
  KConfigCompilerSignallingItem  *itemMK_MaxSpeed;
  KConfigSkeleton::ItemInt  *innerItemMK_MaxSpeed;
  innerItemMK_MaxSpeed = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MK_MaxSpeed" ), mMK_MaxSpeed, 1000 );
  itemMK_MaxSpeed = new KConfigCompilerSignallingItem(innerItemMK_MaxSpeed, this, notifyFunction, signalMK_MaxSpeedChanged);
  addItem( itemMK_MaxSpeed, QStringLiteral( "MK_MaxSpeed" ) );
  KConfigCompilerSignallingItem  *itemMaxSpeed;
  KConfigSkeleton::ItemInt  *innerItemMaxSpeed;
  innerItemMaxSpeed = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MKMaxSpeed" ), mMaxSpeed );
  itemMaxSpeed = new KConfigCompilerSignallingItem(innerItemMaxSpeed, this, notifyFunction, signalMaxSpeedChanged);
  addItem( itemMaxSpeed, QStringLiteral( "MaxSpeed" ) );
  KConfigCompilerSignallingItem  *itemProfileCurve;
  KConfigSkeleton::ItemInt  *innerItemProfileCurve;
  innerItemProfileCurve = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MKCurve" ), mProfileCurve, 0 );
  itemProfileCurve = new KConfigCompilerSignallingItem(innerItemProfileCurve, this, notifyFunction, signalProfileCurveChanged);
  addItem( itemProfileCurve, QStringLiteral( "ProfileCurve" ) );

  setCurrentGroup( QStringLiteral( "Keyboard" ) );

  KConfigCompilerSignallingItem  *itemGestures;
  KConfigSkeleton::ItemBool  *innerItemGestures;
  innerItemGestures = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Gestures" ), mGestures, false );
  itemGestures = new KConfigCompilerSignallingItem(innerItemGestures, this, notifyFunction, signalGesturesChanged);
  addItem( itemGestures, QStringLiteral( "Gestures" ) );
  KConfigCompilerSignallingItem  *itemGestureConfirmation;
  KConfigSkeleton::ItemBool  *innerItemGestureConfirmation;
  innerItemGestureConfirmation = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "GestureConfirmation" ), mGestureConfirmation, false );
  itemGestureConfirmation = new KConfigCompilerSignallingItem(innerItemGestureConfirmation, this, notifyFunction, signalGestureConfirmationChanged);
  addItem( itemGestureConfirmation, QStringLiteral( "GestureConfirmation" ) );
  KConfigCompilerSignallingItem  *itemKeyboardNotifyAccess;
  KConfigSkeleton::ItemBool  *innerItemKeyboardNotifyAccess;
  innerItemKeyboardNotifyAccess = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "kNotifyAccess" ), mKeyboardNotifyAccess, false );
  itemKeyboardNotifyAccess = new KConfigCompilerSignallingItem(innerItemKeyboardNotifyAccess, this, notifyFunction, signalKeyboardNotifyAccessChanged);
  addItem( itemKeyboardNotifyAccess, QStringLiteral( "KeyboardNotifyAccess" ) );
}

bool MouseSettings::defaultMouseKeysValue_helper() const
{

  return false;
}

int MouseSettings::defaultAccelerationDelayValue_helper() const
{

  return 1;
}

int MouseSettings::defaultRepetitionIntervalValue_helper() const
{

  return 1;
}

int MouseSettings::defaultMK_TimeToMaxValue_helper() const
{

  return 5000;
}

int MouseSettings::defaultMK_MaxSpeedValue_helper() const
{

  return 1000;
}

int MouseSettings::defaultProfileCurveValue_helper() const
{

  return 0;
}

bool MouseSettings::defaultGesturesValue_helper() const
{

  return false;
}

bool MouseSettings::defaultGestureConfirmationValue_helper() const
{

  return false;
}

bool MouseSettings::defaultKeyboardNotifyAccessValue_helper() const
{

  return false;
}

MouseSettings::~MouseSettings()
{
}


void MouseSettings::itemChanged(quint64 flags) {

  if ( flags & signalMouseKeysChanged ) {
    Q_EMIT MouseKeysChanged();
  }
  if ( flags & signalAccelerationDelayChanged ) {
    Q_EMIT AccelerationDelayChanged();
  }
  if ( flags & signalRepetitionIntervalChanged ) {
    Q_EMIT RepetitionIntervalChanged();
  }
  if ( flags & signalMK_TimeToMaxChanged ) {
    Q_EMIT MK_TimeToMaxChanged();
  }
  if ( flags & signalAccelerationTimeChanged ) {
    Q_EMIT AccelerationTimeChanged();
  }
  if ( flags & signalMK_MaxSpeedChanged ) {
    Q_EMIT MK_MaxSpeedChanged();
  }
  if ( flags & signalMaxSpeedChanged ) {
    Q_EMIT MaxSpeedChanged();
  }
  if ( flags & signalProfileCurveChanged ) {
    Q_EMIT ProfileCurveChanged();
  }
  if ( flags & signalGesturesChanged ) {
    Q_EMIT GesturesChanged();
  }
  if ( flags & signalGestureConfirmationChanged ) {
    Q_EMIT GestureConfirmationChanged();
  }
  if ( flags & signalKeyboardNotifyAccessChanged ) {
    Q_EMIT KeyboardNotifyAccessChanged();
  }
}

#include "kcmaccessibilitymouse.moc"

