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

#include "kwindecorationsettings.h"

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

  setCurrentGroup( QStringLiteral( "org.kde.kdecoration2" ) );

#if HAVE_BREEZE_DECO
              const QString s_defaultPlugin { QStringLiteral(BREEZE_KDECORATION_PLUGIN_ID) };
          #else
              const QString s_defaultPlugin { QStringLiteral("org.kde.kwin.aurorae") };
          #endif
      
  KConfigCompilerSignallingItem  *itemPluginName;
  KConfigSkeleton::ItemString  *innerItemPluginName;
  innerItemPluginName = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "library" ), mPluginName, s_defaultPlugin );
  itemPluginName = new KConfigCompilerSignallingItem(innerItemPluginName, this, notifyFunction, signalPluginNameChanged);
  addItem( itemPluginName, QStringLiteral( "pluginName" ) );
#if HAVE_BREEZE_DECO
                const QString s_defaultTheme { QStringLiteral("Breeze") };
            #else
                const QString s_defaultTheme { QStringLiteral("kwin4_decoration_qml_plastik") };
            #endif
      
  KConfigCompilerSignallingItem  *itemTheme;
  KConfigSkeleton::ItemString  *innerItemTheme;
  innerItemTheme = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "theme" ), mTheme, s_defaultTheme );
  itemTheme = new KConfigCompilerSignallingItem(innerItemTheme, this, notifyFunction, signalThemeChanged);
  itemTheme->setWriteFlags(KConfigBase::Notify);
  addItem( itemTheme, QStringLiteral( "theme" ) );
  KConfigCompilerSignallingItem  *itemBorderSize;
  KConfigSkeleton::ItemString  *innerItemBorderSize;
  innerItemBorderSize = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "BorderSize" ), mBorderSize, QStringLiteral( "Normal" ) );
  itemBorderSize = new KConfigCompilerSignallingItem(innerItemBorderSize, this, notifyFunction, signalBorderSizeChanged);
  addItem( itemBorderSize, QStringLiteral( "borderSize" ) );
  KConfigCompilerSignallingItem  *itemBorderSizeAuto;
  KConfigSkeleton::ItemBool  *innerItemBorderSizeAuto;
  innerItemBorderSizeAuto = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "BorderSizeAuto" ), mBorderSizeAuto, true );
  itemBorderSizeAuto = new KConfigCompilerSignallingItem(innerItemBorderSizeAuto, this, notifyFunction, signalBorderSizeAutoChanged);
  addItem( itemBorderSizeAuto, QStringLiteral( "borderSizeAuto" ) );
  KConfigCompilerSignallingItem  *itemCloseOnDoubleClickOnMenu;
  KConfigSkeleton::ItemBool  *innerItemCloseOnDoubleClickOnMenu;
  innerItemCloseOnDoubleClickOnMenu = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "CloseOnDoubleClickOnMenu" ), mCloseOnDoubleClickOnMenu, false );
  itemCloseOnDoubleClickOnMenu = new KConfigCompilerSignallingItem(innerItemCloseOnDoubleClickOnMenu, this, notifyFunction, signalCloseOnDoubleClickOnMenuChanged);
  addItem( itemCloseOnDoubleClickOnMenu, QStringLiteral( "closeOnDoubleClickOnMenu" ) );
  KConfigCompilerSignallingItem  *itemShowToolTips;
  KConfigSkeleton::ItemBool  *innerItemShowToolTips;
  innerItemShowToolTips = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowToolTips" ), mShowToolTips, true );
  itemShowToolTips = new KConfigCompilerSignallingItem(innerItemShowToolTips, this, notifyFunction, signalShowToolTipsChanged);
  addItem( itemShowToolTips, QStringLiteral( "showToolTips" ) );
  KConfigCompilerSignallingItem  *itemButtonsOnLeft;
  KConfigSkeleton::ItemString  *innerItemButtonsOnLeft;
  innerItemButtonsOnLeft = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ButtonsOnLeft" ), mButtonsOnLeft, QStringLiteral( "MS" ) );
  itemButtonsOnLeft = new KConfigCompilerSignallingItem(innerItemButtonsOnLeft, this, notifyFunction, signalButtonsOnLeftChanged);
  itemButtonsOnLeft->setWriteFlags(KConfigBase::Notify);
  addItem( itemButtonsOnLeft, QStringLiteral( "buttonsOnLeft" ) );
  KConfigCompilerSignallingItem  *itemButtonsOnRight;
  KConfigSkeleton::ItemString  *innerItemButtonsOnRight;
  innerItemButtonsOnRight = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ButtonsOnRight" ), mButtonsOnRight, QStringLiteral( "HIAX" ) );
  itemButtonsOnRight = new KConfigCompilerSignallingItem(innerItemButtonsOnRight, this, notifyFunction, signalButtonsOnRightChanged);
  itemButtonsOnRight->setWriteFlags(KConfigBase::Notify);
  addItem( itemButtonsOnRight, QStringLiteral( "buttonsOnRight" ) );
}

QString KWinDecorationSettings::defaultPluginNameValue_helper() const
{
#if HAVE_BREEZE_DECO
              const QString s_defaultPlugin { QStringLiteral(BREEZE_KDECORATION_PLUGIN_ID) };
          #else
              const QString s_defaultPlugin { QStringLiteral("org.kde.kwin.aurorae") };
          #endif
      
  return s_defaultPlugin;
}

QString KWinDecorationSettings::defaultThemeValue_helper() const
{
#if HAVE_BREEZE_DECO
                const QString s_defaultTheme { QStringLiteral("Breeze") };
            #else
                const QString s_defaultTheme { QStringLiteral("kwin4_decoration_qml_plastik") };
            #endif
      
  return s_defaultTheme;
}

QString KWinDecorationSettings::defaultBorderSizeValue_helper() const
{

  return QStringLiteral( "Normal" );
}

bool KWinDecorationSettings::defaultBorderSizeAutoValue_helper() const
{

  return true;
}

bool KWinDecorationSettings::defaultCloseOnDoubleClickOnMenuValue_helper() const
{

  return false;
}

bool KWinDecorationSettings::defaultShowToolTipsValue_helper() const
{

  return true;
}

QString KWinDecorationSettings::defaultButtonsOnLeftValue_helper() const
{

  return QStringLiteral( "MS" );
}

QString KWinDecorationSettings::defaultButtonsOnRightValue_helper() const
{

  return QStringLiteral( "HIAX" );
}

KWinDecorationSettings::~KWinDecorationSettings()
{
}


void KWinDecorationSettings::itemChanged(quint64 flags) {

  if ( flags & signalPluginNameChanged ) {
    Q_EMIT pluginNameChanged();
  }
  if ( flags & signalThemeChanged ) {
    Q_EMIT themeChanged();
  }
  if ( flags & signalBorderSizeChanged ) {
    Q_EMIT borderSizeChanged();
  }
  if ( flags & signalBorderSizeAutoChanged ) {
    Q_EMIT borderSizeAutoChanged();
  }
  if ( flags & signalCloseOnDoubleClickOnMenuChanged ) {
    Q_EMIT closeOnDoubleClickOnMenuChanged();
  }
  if ( flags & signalShowToolTipsChanged ) {
    Q_EMIT showToolTipsChanged();
  }
  if ( flags & signalButtonsOnLeftChanged ) {
    Q_EMIT buttonsOnLeftChanged();
  }
  if ( flags & signalButtonsOnRightChanged ) {
    Q_EMIT buttonsOnRightChanged();
  }
}

#include "kwindecorationsettings.moc"

