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

#include "stylesettings.h"

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

  setCurrentGroup( QStringLiteral( "KDE" ) );

  KConfigCompilerSignallingItem  *itemWidgetStyle;
  KConfigSkeleton::ItemString  *innerItemWidgetStyle;
  innerItemWidgetStyle = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "widgetStyle" ), mWidgetStyle, QStringLiteral( "Breeze" ) );
  itemWidgetStyle = new KConfigCompilerSignallingItem(innerItemWidgetStyle, this, notifyFunction, signalWidgetStyleChanged);
  addItem( itemWidgetStyle, QStringLiteral( "widgetStyle" ) );
  KConfigCompilerSignallingItem  *itemIconsOnButtons;
  KConfigSkeleton::ItemBool  *innerItemIconsOnButtons;
  innerItemIconsOnButtons = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowIconsOnPushButtons" ), mIconsOnButtons, true );
  itemIconsOnButtons = new KConfigCompilerSignallingItem(innerItemIconsOnButtons, this, notifyFunction, signalIconsOnButtonsChanged);
  itemIconsOnButtons->setWriteFlags(KConfigBase::Notify);
  addItem( itemIconsOnButtons, QStringLiteral( "iconsOnButtons" ) );
  KConfigCompilerSignallingItem  *itemIconsInMenus;
  KConfigSkeleton::ItemBool  *innerItemIconsInMenus;
  innerItemIconsInMenus = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowIconsInMenuItems" ), mIconsInMenus, true );
  itemIconsInMenus = new KConfigCompilerSignallingItem(innerItemIconsInMenus, this, notifyFunction, signalIconsInMenusChanged);
  itemIconsInMenus->setWriteFlags(KConfigBase::Notify);
  addItem( itemIconsInMenus, QStringLiteral( "iconsInMenus" ) );

  setCurrentGroup( QStringLiteral( "Toolbar style" ) );

  KConfigCompilerSignallingItem  *itemToolButtonStyle;
  KConfigSkeleton::ItemString  *innerItemToolButtonStyle;
  innerItemToolButtonStyle = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ToolButtonStyle" ), mToolButtonStyle, QStringLiteral( "TextBesideIcon" ) );
  itemToolButtonStyle = new KConfigCompilerSignallingItem(innerItemToolButtonStyle, this, notifyFunction, signalToolButtonStyleChanged);
  itemToolButtonStyle->setWriteFlags(KConfigBase::Notify);
  addItem( itemToolButtonStyle, QStringLiteral( "toolButtonStyle" ) );
  KConfigCompilerSignallingItem  *itemToolButtonStyleOtherToolbars;
  KConfigSkeleton::ItemString  *innerItemToolButtonStyleOtherToolbars;
  innerItemToolButtonStyleOtherToolbars = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ToolButtonStyleOtherToolbars" ), mToolButtonStyleOtherToolbars, QStringLiteral( "TextBesideIcon" ) );
  itemToolButtonStyleOtherToolbars = new KConfigCompilerSignallingItem(innerItemToolButtonStyleOtherToolbars, this, notifyFunction, signalToolButtonStyleOtherToolbarsChanged);
  addItem( itemToolButtonStyleOtherToolbars, QStringLiteral( "toolButtonStyleOtherToolbars" ) );
}

QString StyleSettings::defaultWidgetStyleValue_helper() const
{

  return QStringLiteral( "Breeze" );
}

bool StyleSettings::defaultIconsOnButtonsValue_helper() const
{

  return true;
}

bool StyleSettings::defaultIconsInMenusValue_helper() const
{

  return true;
}

QString StyleSettings::defaultToolButtonStyleValue_helper() const
{

  return QStringLiteral( "TextBesideIcon" );
}

QString StyleSettings::defaultToolButtonStyleOtherToolbarsValue_helper() const
{

  return QStringLiteral( "TextBesideIcon" );
}

StyleSettings::~StyleSettings()
{
}


void StyleSettings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalWidgetStyleChanged:
    Q_EMIT widgetStyleChanged();
    break;
  case signalIconsOnButtonsChanged:
    Q_EMIT iconsOnButtonsChanged();
    break;
  case signalIconsInMenusChanged:
    Q_EMIT iconsInMenusChanged();
    break;
  case signalToolButtonStyleChanged:
    Q_EMIT toolButtonStyleChanged();
    break;
  case signalToolButtonStyleOtherToolbarsChanged:
    Q_EMIT toolButtonStyleOtherToolbarsChanged();
    break;
  }
}
