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

#include "kcmaccessibilityzoommagnifier.h"

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

  setCurrentGroup( QStringLiteral( "Plugins" ) );

  KConfigCompilerSignallingItem  *itemZoom;
  KConfigSkeleton::ItemBool  *innerItemZoom;
  innerItemZoom = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "zoomEnabled" ), mZoom, true );
  itemZoom = new KConfigCompilerSignallingItem(innerItemZoom, this, notifyFunction, signalZoomChanged);
  itemZoom->setWriteFlags(KConfigBase::Notify);
  addItem( itemZoom, QStringLiteral( "Zoom" ) );
  KConfigCompilerSignallingItem  *itemMagnifier;
  KConfigSkeleton::ItemBool  *innerItemMagnifier;
  innerItemMagnifier = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "magnifierEnabled" ), mMagnifier, false );
  itemMagnifier = new KConfigCompilerSignallingItem(innerItemMagnifier, this, notifyFunction, signalMagnifierChanged);
  itemMagnifier->setWriteFlags(KConfigBase::Notify);
  addItem( itemMagnifier, QStringLiteral( "Magnifier" ) );

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

  KConfigCompilerSignallingItem  *itemSharedZoomFactor;
  KConfigSkeleton::ItemDouble  *innerItemSharedZoomFactor;
  innerItemSharedZoomFactor = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "ZoomFactor" ), mSharedZoomFactor, 1.2 );
  itemSharedZoomFactor = new KConfigCompilerSignallingItem(innerItemSharedZoomFactor, this, notifyFunction, signalSharedZoomFactorChanged);
  itemSharedZoomFactor->setWriteFlags(KConfigBase::Notify);
  addItem( itemSharedZoomFactor, QStringLiteral( "SharedZoomFactor" ) );
  KConfigCompilerSignallingItem  *itemZoomMousePointer;
  KConfigSkeleton::ItemUInt  *innerItemZoomMousePointer;
  innerItemZoomMousePointer = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "MousePointer" ), mZoomMousePointer, 0 );
  itemZoomMousePointer = new KConfigCompilerSignallingItem(innerItemZoomMousePointer, this, notifyFunction, signalZoomMousePointerChanged);
  itemZoomMousePointer->setWriteFlags(KConfigBase::Notify);
  addItem( itemZoomMousePointer, QStringLiteral( "ZoomMousePointer" ) );
  KConfigCompilerSignallingItem  *itemZoomMouseTracking;
  KConfigSkeleton::ItemUInt  *innerItemZoomMouseTracking;
  innerItemZoomMouseTracking = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "MouseTracking" ), mZoomMouseTracking, 0 );
  itemZoomMouseTracking = new KConfigCompilerSignallingItem(innerItemZoomMouseTracking, this, notifyFunction, signalZoomMouseTrackingChanged);
  itemZoomMouseTracking->setWriteFlags(KConfigBase::Notify);
  addItem( itemZoomMouseTracking, QStringLiteral( "ZoomMouseTracking" ) );
  KConfigCompilerSignallingItem  *itemZoomEnableFocusTracking;
  KConfigSkeleton::ItemBool  *innerItemZoomEnableFocusTracking;
  innerItemZoomEnableFocusTracking = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "EnableFocusTracking" ), mZoomEnableFocusTracking, false );
  itemZoomEnableFocusTracking = new KConfigCompilerSignallingItem(innerItemZoomEnableFocusTracking, this, notifyFunction, signalZoomEnableFocusTrackingChanged);
  itemZoomEnableFocusTracking->setWriteFlags(KConfigBase::Notify);
  addItem( itemZoomEnableFocusTracking, QStringLiteral( "ZoomEnableFocusTracking" ) );
  KConfigCompilerSignallingItem  *itemZoomEnableTextCaretTracking;
  KConfigSkeleton::ItemBool  *innerItemZoomEnableTextCaretTracking;
  innerItemZoomEnableTextCaretTracking = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "EnableTextCaretTracking" ), mZoomEnableTextCaretTracking, false );
  itemZoomEnableTextCaretTracking = new KConfigCompilerSignallingItem(innerItemZoomEnableTextCaretTracking, this, notifyFunction, signalZoomEnableTextCaretTrackingChanged);
  itemZoomEnableTextCaretTracking->setWriteFlags(KConfigBase::Notify);
  addItem( itemZoomEnableTextCaretTracking, QStringLiteral( "ZoomEnableTextCaretTracking" ) );
  KConfigCompilerSignallingItem  *itemZoomPixelGridZoom;
  KConfigSkeleton::ItemDouble  *innerItemZoomPixelGridZoom;
  innerItemZoomPixelGridZoom = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "PixelGridZoom" ), mZoomPixelGridZoom, 15.0 );
  itemZoomPixelGridZoom = new KConfigCompilerSignallingItem(innerItemZoomPixelGridZoom, this, notifyFunction, signalZoomPixelGridZoomChanged);
  itemZoomPixelGridZoom->setWriteFlags(KConfigBase::Notify);
  addItem( itemZoomPixelGridZoom, QStringLiteral( "ZoomPixelGridZoom" ) );
  KConfigCompilerSignallingItem  *itemZoomPointerAxisGestureModifiers;
  KConfigSkeleton::ItemString  *innerItemZoomPointerAxisGestureModifiers;
  innerItemZoomPointerAxisGestureModifiers = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "PointerAxisGestureModifiers" ), mZoomPointerAxisGestureModifiers, QStringLiteral( "Meta+Control" ) );
  itemZoomPointerAxisGestureModifiers = new KConfigCompilerSignallingItem(innerItemZoomPointerAxisGestureModifiers, this, notifyFunction, signalZoomPointerAxisGestureModifiersChanged);
  itemZoomPointerAxisGestureModifiers->setWriteFlags(KConfigBase::Notify);
  addItem( itemZoomPointerAxisGestureModifiers, QStringLiteral( "ZoomPointerAxisGestureModifiers" ) );

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

  KConfigCompilerSignallingItem  *itemMagnifierWidth;
  KConfigSkeleton::ItemUInt  *innerItemMagnifierWidth;
  innerItemMagnifierWidth = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "Width" ), mMagnifierWidth, 200 );
  itemMagnifierWidth = new KConfigCompilerSignallingItem(innerItemMagnifierWidth, this, notifyFunction, signalMagnifierWidthChanged);
  itemMagnifierWidth->setWriteFlags(KConfigBase::Notify);
  addItem( itemMagnifierWidth, QStringLiteral( "MagnifierWidth" ) );
  KConfigCompilerSignallingItem  *itemMagnifierHeight;
  KConfigSkeleton::ItemUInt  *innerItemMagnifierHeight;
  innerItemMagnifierHeight = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "Height" ), mMagnifierHeight, 200 );
  itemMagnifierHeight = new KConfigCompilerSignallingItem(innerItemMagnifierHeight, this, notifyFunction, signalMagnifierHeightChanged);
  itemMagnifierHeight->setWriteFlags(KConfigBase::Notify);
  addItem( itemMagnifierHeight, QStringLiteral( "MagnifierHeight" ) );
}

bool ZoomMagnifierSettings::defaultZoomValue_helper() const
{

  return true;
}

bool ZoomMagnifierSettings::defaultMagnifierValue_helper() const
{

  return false;
}

double ZoomMagnifierSettings::defaultSharedZoomFactorValue_helper() const
{

  return 1.2;
}

uint ZoomMagnifierSettings::defaultZoomMousePointerValue_helper() const
{

  return 0;
}

uint ZoomMagnifierSettings::defaultZoomMouseTrackingValue_helper() const
{

  return 0;
}

bool ZoomMagnifierSettings::defaultZoomEnableFocusTrackingValue_helper() const
{

  return false;
}

bool ZoomMagnifierSettings::defaultZoomEnableTextCaretTrackingValue_helper() const
{

  return false;
}

double ZoomMagnifierSettings::defaultZoomPixelGridZoomValue_helper() const
{

  return 15.0;
}

QString ZoomMagnifierSettings::defaultZoomPointerAxisGestureModifiersValue_helper() const
{

  return QStringLiteral( "Meta+Control" );
}

uint ZoomMagnifierSettings::defaultMagnifierWidthValue_helper() const
{

  return 200;
}

uint ZoomMagnifierSettings::defaultMagnifierHeightValue_helper() const
{

  return 200;
}

ZoomMagnifierSettings::~ZoomMagnifierSettings()
{
}


void ZoomMagnifierSettings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalZoomChanged:
    Q_EMIT ZoomChanged();
    break;
  case signalMagnifierChanged:
    Q_EMIT MagnifierChanged();
    break;
  case signalSharedZoomFactorChanged:
    Q_EMIT SharedZoomFactorChanged();
    break;
  case signalZoomMousePointerChanged:
    Q_EMIT ZoomMousePointerChanged();
    break;
  case signalZoomMouseTrackingChanged:
    Q_EMIT ZoomMouseTrackingChanged();
    break;
  case signalZoomEnableFocusTrackingChanged:
    Q_EMIT ZoomEnableFocusTrackingChanged();
    break;
  case signalZoomEnableTextCaretTrackingChanged:
    Q_EMIT ZoomEnableTextCaretTrackingChanged();
    break;
  case signalZoomPixelGridZoomChanged:
    Q_EMIT ZoomPixelGridZoomChanged();
    break;
  case signalZoomPointerAxisGestureModifiersChanged:
    Q_EMIT ZoomPointerAxisGestureModifiersChanged();
    break;
  case signalMagnifierWidthChanged:
    Q_EMIT MagnifierWidthChanged();
    break;
  case signalMagnifierHeightChanged:
    Q_EMIT MagnifierHeightChanged();
    break;
  }
}
