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

#include "KommitSettings.h"

#include <qglobal.h>
#include <QFile>

class KommitSettingsHelper
{
  public:
    KommitSettingsHelper() : q(nullptr) {}
    ~KommitSettingsHelper() { delete q; q = nullptr; }
    KommitSettingsHelper(const KommitSettingsHelper&) = delete;
    KommitSettingsHelper& operator=(const KommitSettingsHelper&) = delete;
    KommitSettings *q;
};
Q_GLOBAL_STATIC(KommitSettingsHelper, s_globalKommitSettings)
KommitSettings *KommitSettings::self()
{
  if (!s_globalKommitSettings()->q) {
    new KommitSettings;
    s_globalKommitSettings()->q->read();
  }

  return s_globalKommitSettings()->q;
}

KommitSettings::KommitSettings( )
  : KConfigSkeleton( QStringLiteral( "KommitSettings" ) )
{
  Q_ASSERT(!s_globalKommitSettings()->q);
  s_globalKommitSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Preferences" ) );

  KConfigSkeleton::ItemColor  *itemDiffAddedColor;
  itemDiffAddedColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "diffAddedColor" ), mDiffAddedColor, QColor( "#84f3a9" ) );
  addItem( itemDiffAddedColor, QStringLiteral( "diffAddedColor" ) );
  KConfigSkeleton::ItemColor  *itemDiffRemovedColor;
  itemDiffRemovedColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "diffRemovedColor" ), mDiffRemovedColor, QColor( "#ffaaaa" ) );
  addItem( itemDiffRemovedColor, QStringLiteral( "diffRemovedColor" ) );
  KConfigSkeleton::ItemColor  *itemDiffModifiedColor;
  itemDiffModifiedColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "diffModifiedColor" ), mDiffModifiedColor, QColor( "#c5d2ff" ) );
  addItem( itemDiffModifiedColor, QStringLiteral( "diffModifiedColor" ) );
  KConfigSkeleton::ItemColor  *itemColorForeground;
  itemColorForeground = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "colorForeground" ), mColorForeground, QColor( "#ffea9d" ) );
  addItem( itemColorForeground, QStringLiteral( "colorForeground" ) );
  KConfigSkeleton::ItemString  *itemGitBinPath;
  itemGitBinPath = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "gitBinPath" ), mGitBinPath );
  addItem( itemGitBinPath, QStringLiteral( "gitBinPath" ) );
  KConfigSkeleton::ItemString  *itemCalendarType;
  itemCalendarType = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "calendarType" ), mCalendarType );
  addItem( itemCalendarType, QStringLiteral( "calendarType" ) );
  KConfigSkeleton::ItemInt  *itemCalendarTypeIndex;
  itemCalendarTypeIndex = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "calendarTypeIndex" ), mCalendarTypeIndex );
  addItem( itemCalendarTypeIndex, QStringLiteral( "calendarTypeIndex" ) );
  KConfigSkeleton::ItemBool  *itemOpenLastRepo;
  itemOpenLastRepo = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "openLastRepo" ), mOpenLastRepo, false );
  addItem( itemOpenLastRepo, QStringLiteral( "openLastRepo" ) );
  KConfigSkeleton::ItemBool  *itemRegisterDiffTool;
  itemRegisterDiffTool = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "registerDiffTool" ), mRegisterDiffTool, true );
  addItem( itemRegisterDiffTool, QStringLiteral( "registerDiffTool" ) );
  KConfigSkeleton::ItemBool  *itemRegisterMergeTool;
  itemRegisterMergeTool = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "registerMergeTool" ), mRegisterMergeTool, true );
  addItem( itemRegisterMergeTool, QStringLiteral( "registerMergeTool" ) );
}

KommitSettings::~KommitSettings()
{
  if (s_globalKommitSettings.exists() && !s_globalKommitSettings.isDestroyed()) {
    s_globalKommitSettings()->q = nullptr;
  }
}

