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

#include "donotdisturbsettings.h"

using namespace NotificationManager;

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

  setCurrentGroup( QStringLiteral( "DoNotDisturb" ) );

  KConfigCompilerSignallingItem  *itemUntil;
  KConfigSkeleton::ItemDateTime  *innerItemUntil;
  innerItemUntil = new KConfigSkeleton::ItemDateTime( currentGroup(), QStringLiteral( "Until" ), mUntil );
  itemUntil = new KConfigCompilerSignallingItem(innerItemUntil, this, notifyFunction, signalUntilChanged);
  itemUntil->setWriteFlags(KConfigBase::Notify);
  addItem( itemUntil, QStringLiteral( "Until" ) );
  KConfigCompilerSignallingItem  *itemWhenScreensMirrored;
  KConfigSkeleton::ItemBool  *innerItemWhenScreensMirrored;
  innerItemWhenScreensMirrored = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "WhenScreensMirrored" ), mWhenScreensMirrored, true );
  itemWhenScreensMirrored = new KConfigCompilerSignallingItem(innerItemWhenScreensMirrored, this, notifyFunction, signalWhenScreensMirroredChanged);
  itemWhenScreensMirrored->setWriteFlags(KConfigBase::Notify);
  addItem( itemWhenScreensMirrored, QStringLiteral( "WhenScreensMirrored" ) );
  KConfigCompilerSignallingItem  *itemWhenScreenSharing;
  KConfigSkeleton::ItemBool  *innerItemWhenScreenSharing;
  innerItemWhenScreenSharing = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "WhenScreenSharing" ), mWhenScreenSharing, true );
  itemWhenScreenSharing = new KConfigCompilerSignallingItem(innerItemWhenScreenSharing, this, notifyFunction, signalWhenScreenSharingChanged);
  itemWhenScreenSharing->setWriteFlags(KConfigBase::Notify);
  addItem( itemWhenScreenSharing, QStringLiteral( "WhenScreenSharing" ) );
  KConfigCompilerSignallingItem  *itemNotificationSoundsMuted;
  KConfigSkeleton::ItemBool  *innerItemNotificationSoundsMuted;
  innerItemNotificationSoundsMuted = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "NotificationSoundsMuted" ), mNotificationSoundsMuted, false );
  itemNotificationSoundsMuted = new KConfigCompilerSignallingItem(innerItemNotificationSoundsMuted, this, notifyFunction, signalNotificationSoundsMutedChanged);
  itemNotificationSoundsMuted->setWriteFlags(KConfigBase::Notify);
  addItem( itemNotificationSoundsMuted, QStringLiteral( "NotificationSoundsMuted" ) );
}

bool DoNotDisturbSettings::defaultWhenScreensMirroredValue_helper() const
{

  return true;
}

bool DoNotDisturbSettings::defaultWhenScreenSharingValue_helper() const
{

  return true;
}

bool DoNotDisturbSettings::defaultNotificationSoundsMutedValue_helper() const
{

  return false;
}

DoNotDisturbSettings::~DoNotDisturbSettings()
{
}


void DoNotDisturbSettings::itemChanged(quint64 flags) {

  if ( flags & signalUntilChanged ) {
    Q_EMIT UntilChanged();
  }
  if ( flags & signalWhenScreensMirroredChanged ) {
    Q_EMIT WhenScreensMirroredChanged();
  }
  if ( flags & signalWhenScreenSharingChanged ) {
    Q_EMIT WhenScreenSharingChanged();
  }
  if ( flags & signalNotificationSoundsMutedChanged ) {
    Q_EMIT NotificationSoundsMutedChanged();
  }
}

#include "donotdisturbsettings.moc"

