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

#include "colorssettings.h"

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

  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigCompilerSignallingItem  *itemColorScheme;
  KConfigSkeleton::ItemString  *innerItemColorScheme;
  innerItemColorScheme = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ColorScheme" ), mColorScheme, QStringLiteral( "BreezeLight" ) );
  itemColorScheme = new KConfigCompilerSignallingItem(innerItemColorScheme, this, notifyFunction, signalColorSchemeChanged);
  itemColorScheme->setWriteFlags(KConfigBase::Notify);
  addItem( itemColorScheme, QStringLiteral( "colorScheme" ) );
  KConfigCompilerSignallingItem  *itemAccentColor;
  KConfigSkeleton::ItemColor  *innerItemAccentColor;
  innerItemAccentColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "AccentColor" ), mAccentColor, QColor( "transparent" ) );
  itemAccentColor = new KConfigCompilerSignallingItem(innerItemAccentColor, this, notifyFunction, signalAccentColorChanged);
  itemAccentColor->setWriteFlags(KConfigBase::Notify);
  addItem( itemAccentColor, QStringLiteral( "accentColor" ) );
  KConfigCompilerSignallingItem  *itemLastUsedCustomAccentColor;
  KConfigSkeleton::ItemColor  *innerItemLastUsedCustomAccentColor;
  innerItemLastUsedCustomAccentColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "LastUsedCustomAccentColor" ), mLastUsedCustomAccentColor, QColor( "transparent" ) );
  itemLastUsedCustomAccentColor = new KConfigCompilerSignallingItem(innerItemLastUsedCustomAccentColor, this, notifyFunction, signalLastUsedCustomAccentColorChanged);
  itemLastUsedCustomAccentColor->setWriteFlags(KConfigBase::Notify);
  addItem( itemLastUsedCustomAccentColor, QStringLiteral( "lastUsedCustomAccentColor" ) );
  KConfigCompilerSignallingItem  *itemAccentColorFromWallpaper;
  KConfigSkeleton::ItemBool  *innerItemAccentColorFromWallpaper;
  innerItemAccentColorFromWallpaper = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "accentColorFromWallpaper" ), mAccentColorFromWallpaper, false );
  itemAccentColorFromWallpaper = new KConfigCompilerSignallingItem(innerItemAccentColorFromWallpaper, this, notifyFunction, signalAccentColorFromWallpaperChanged);
  itemAccentColorFromWallpaper->setWriteFlags(KConfigBase::Notify);
  addItem( itemAccentColorFromWallpaper, QStringLiteral( "accentColorFromWallpaper" ) );
}

QString ColorsSettings::defaultColorSchemeValue_helper() const
{

  return QStringLiteral( "BreezeLight" );
}

QColor ColorsSettings::defaultAccentColorValue_helper() const
{

  return QColor( "transparent" );
}

QColor ColorsSettings::defaultLastUsedCustomAccentColorValue_helper() const
{

  return QColor( "transparent" );
}

bool ColorsSettings::defaultAccentColorFromWallpaperValue_helper() const
{

  return false;
}

ColorsSettings::~ColorsSettings()
{
}


void ColorsSettings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalColorSchemeChanged:
    Q_EMIT colorSchemeChanged();
    break;
  case signalAccentColorChanged:
    Q_EMIT accentColorChanged();
    break;
  case signalLastUsedCustomAccentColorChanged:
    Q_EMIT lastUsedCustomAccentColorChanged();
    break;
  case signalAccentColorFromWallpaperChanged:
    Q_EMIT accentColorFromWallpaperChanged();
    break;
  }
}
