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

#include "kcmaccessibilitybell.h"

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

  setCurrentGroup( QStringLiteral( "Bell" ) );

  KConfigCompilerSignallingItem  *itemSystemBell;
  KConfigSkeleton::ItemBool  *innerItemSystemBell;
  innerItemSystemBell = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SystemBell" ), mSystemBell, true );
  itemSystemBell = new KConfigCompilerSignallingItem(innerItemSystemBell, this, notifyFunction, signalSystemBellChanged);
  itemSystemBell->setWriteFlags(KConfigBase::Notify);
  addItem( itemSystemBell, QStringLiteral( "SystemBell" ) );
  KConfigCompilerSignallingItem  *itemCustomBell;
  KConfigSkeleton::ItemBool  *innerItemCustomBell;
  innerItemCustomBell = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ArtsBell" ), mCustomBell, false );
  itemCustomBell = new KConfigCompilerSignallingItem(innerItemCustomBell, this, notifyFunction, signalCustomBellChanged);
  itemCustomBell->setWriteFlags(KConfigBase::Notify);
  addItem( itemCustomBell, QStringLiteral( "CustomBell" ) );
  KConfigCompilerSignallingItem  *itemCustomBellFile;
  KConfigSkeleton::ItemString  *innerItemCustomBellFile;
  innerItemCustomBellFile = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ArtsBellFile" ), mCustomBellFile );
  itemCustomBellFile = new KConfigCompilerSignallingItem(innerItemCustomBellFile, this, notifyFunction, signalCustomBellFileChanged);
  itemCustomBellFile->setWriteFlags(KConfigBase::Notify);
  addItem( itemCustomBellFile, QStringLiteral( "CustomBellFile" ) );
  KConfigCompilerSignallingItem  *itemVisibleBell;
  KConfigSkeleton::ItemBool  *innerItemVisibleBell;
  innerItemVisibleBell = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "VisibleBell" ), mVisibleBell, false );
  itemVisibleBell = new KConfigCompilerSignallingItem(innerItemVisibleBell, this, notifyFunction, signalVisibleBellChanged);
  itemVisibleBell->setWriteFlags(KConfigBase::Notify);
  addItem( itemVisibleBell, QStringLiteral( "VisibleBell" ) );
  KConfigCompilerSignallingItem  *itemInvertScreen;
  KConfigSkeleton::ItemBool  *innerItemInvertScreen;
  innerItemInvertScreen = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "VisibleBellInvert" ), mInvertScreen, false );
  itemInvertScreen = new KConfigCompilerSignallingItem(innerItemInvertScreen, this, notifyFunction, signalInvertScreenChanged);
  itemInvertScreen->setWriteFlags(KConfigBase::Notify);
  addItem( itemInvertScreen, QStringLiteral( "InvertScreen" ) );
  KConfigCompilerSignallingItem  *itemVisibleBellColor;
  KConfigSkeleton::ItemColor  *innerItemVisibleBellColor;
  innerItemVisibleBellColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "VisibleBellColor" ), mVisibleBellColor, Qt::red );
  itemVisibleBellColor = new KConfigCompilerSignallingItem(innerItemVisibleBellColor, this, notifyFunction, signalVisibleBellColorChanged);
  itemVisibleBellColor->setWriteFlags(KConfigBase::Notify);
  addItem( itemVisibleBellColor, QStringLiteral( "VisibleBellColor" ) );
  KConfigCompilerSignallingItem  *itemVisibleBellPause;
  KConfigSkeleton::ItemInt  *innerItemVisibleBellPause;
  innerItemVisibleBellPause = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "VisibleBellPause" ), mVisibleBellPause, 500 );
  itemVisibleBellPause = new KConfigCompilerSignallingItem(innerItemVisibleBellPause, this, notifyFunction, signalVisibleBellPauseChanged);
  itemVisibleBellPause->setWriteFlags(KConfigBase::Notify);
  addItem( itemVisibleBellPause, QStringLiteral( "VisibleBellPause" ) );
}

bool BellSettings::defaultSystemBellValue_helper() const
{

  return true;
}

bool BellSettings::defaultCustomBellValue_helper() const
{

  return false;
}

bool BellSettings::defaultVisibleBellValue_helper() const
{

  return false;
}

bool BellSettings::defaultInvertScreenValue_helper() const
{

  return false;
}

QColor BellSettings::defaultVisibleBellColorValue_helper() const
{

  return Qt::red;
}

int BellSettings::defaultVisibleBellPauseValue_helper() const
{

  return 500;
}

BellSettings::~BellSettings()
{
}


void BellSettings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalSystemBellChanged:
    Q_EMIT SystemBellChanged();
    break;
  case signalCustomBellChanged:
    Q_EMIT CustomBellChanged();
    break;
  case signalCustomBellFileChanged:
    Q_EMIT CustomBellFileChanged();
    break;
  case signalVisibleBellChanged:
    Q_EMIT VisibleBellChanged();
    break;
  case signalInvertScreenChanged:
    Q_EMIT InvertScreenChanged();
    break;
  case signalVisibleBellColorChanged:
    Q_EMIT VisibleBellColorChanged();
    break;
  case signalVisibleBellPauseChanged:
    Q_EMIT VisibleBellPauseChanged();
    break;
  }
}
