// This file is generated by kconfig_compiler_kf5 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);
  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);
  addItem( itemCustomBell, QStringLiteral( "CustomBell" ) );
  KConfigCompilerSignallingItem  *itemCustomBellFile;
  KConfigSkeleton::ItemString  *innerItemCustomBellFile;
  innerItemCustomBellFile = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ArtsBellFile" ), mCustomBellFile );
  itemCustomBellFile = new KConfigCompilerSignallingItem(innerItemCustomBellFile, this, notifyFunction, signalCustomBellFileChanged);
  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);
  addItem( itemVisibleBell, QStringLiteral( "VisibleBell" ) );
  KConfigCompilerSignallingItem  *itemInvertScreen;
  KConfigSkeleton::ItemBool  *innerItemInvertScreen;
  innerItemInvertScreen = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "VisibleBellInvert" ), mInvertScreen, true );
  itemInvertScreen = new KConfigCompilerSignallingItem(innerItemInvertScreen, this, notifyFunction, signalInvertScreenChanged);
  addItem( itemInvertScreen, QStringLiteral( "InvertScreen" ) );
  KConfigCompilerSignallingItem  *itemVisibleBellColor;
  KConfigSkeleton::ItemColor  *innerItemVisibleBellColor;
  innerItemVisibleBellColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "VisibleBellColor" ), mVisibleBellColor );
  itemVisibleBellColor = new KConfigCompilerSignallingItem(innerItemVisibleBellColor, this, notifyFunction, signalVisibleBellColorChanged);
  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);
  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 true;
}

int BellSettings::defaultVisibleBellPauseValue_helper() const
{

  return 500;
}

BellSettings::~BellSettings()
{
}


void BellSettings::itemChanged(quint64 flags) {

  if ( flags & signalSystemBellChanged ) {
    Q_EMIT SystemBellChanged();
  }
  if ( flags & signalCustomBellChanged ) {
    Q_EMIT CustomBellChanged();
  }
  if ( flags & signalCustomBellFileChanged ) {
    Q_EMIT CustomBellFileChanged();
  }
  if ( flags & signalVisibleBellChanged ) {
    Q_EMIT VisibleBellChanged();
  }
  if ( flags & signalInvertScreenChanged ) {
    Q_EMIT InvertScreenChanged();
  }
  if ( flags & signalVisibleBellColorChanged ) {
    Q_EMIT VisibleBellColorChanged();
  }
  if ( flags & signalVisibleBellPauseChanged ) {
    Q_EMIT VisibleBellPauseChanged();
  }
}

#include "kcmaccessibilitybell.moc"

