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

#include "kgraphviewersettings.h"

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

class KGraphViewerSettingsHelper
{
  public:
    KGraphViewerSettingsHelper() noexcept : q(nullptr) {}
    ~KGraphViewerSettingsHelper() noexcept { delete q; q = nullptr; }
    KGraphViewerSettingsHelper(const KGraphViewerSettingsHelper&) = delete;
    KGraphViewerSettingsHelper& operator=(const KGraphViewerSettingsHelper&) = delete;
    KGraphViewerSettings *q;
};
Q_GLOBAL_STATIC(KGraphViewerSettingsHelper, s_globalKGraphViewerSettings)
KGraphViewerSettings *KGraphViewerSettings::self()
{
  if (!s_globalKGraphViewerSettings()->q) {
    new KGraphViewerSettings;
    s_globalKGraphViewerSettings()->q->read();
  }

  return s_globalKGraphViewerSettings()->q;
}

KGraphViewerSettings::KGraphViewerSettings( )
  : KConfigSkeleton( QStringLiteral( "kgraphviewerrc" ) )
{
  Q_ASSERT(!s_globalKGraphViewerSettings()->q);
  s_globalKGraphViewerSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Notification Messages" ) );

  KConfigSkeleton::ItemString  *itemReloadOnChangeMode;
  itemReloadOnChangeMode = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "reloadOnChangeMode" ), mReloadOnChangeMode, QStringLiteral( "ask" ) );
  addItem( itemReloadOnChangeMode, QStringLiteral( "reloadOnChangeMode" ) );
  KConfigSkeleton::ItemString  *itemParsingMode;
  itemParsingMode = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "parsingMode" ), mParsingMode, QStringLiteral( "internal" ) );
  addItem( itemParsingMode, QStringLiteral( "parsingMode" ) );
  KConfigSkeleton::ItemString  *itemOpenInExistingWindowMode;
  itemOpenInExistingWindowMode = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "openInExistingWindowMode" ), mOpenInExistingWindowMode, QStringLiteral( "ask" ) );
  addItem( itemOpenInExistingWindowMode, QStringLiteral( "openInExistingWindowMode" ) );
  KConfigSkeleton::ItemString  *itemReopenPreviouslyOpenedFilesMode;
  itemReopenPreviouslyOpenedFilesMode = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "reopenPreviouslyOpenedFilesMode" ), mReopenPreviouslyOpenedFilesMode, QStringLiteral( "ask" ) );
  addItem( itemReopenPreviouslyOpenedFilesMode, QStringLiteral( "reopenPreviouslyOpenedFilesMode" ) );
  KConfigSkeleton::ItemBool  *itemBirdsEyeViewEnabled;
  itemBirdsEyeViewEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "birdsEyeViewEnabled" ), mBirdsEyeViewEnabled, true );
  addItem( itemBirdsEyeViewEnabled, QStringLiteral( "birdsEyeViewEnabled" ) );
  KConfigSkeleton::ItemStringList  *itemPreviouslyOpenedFiles;
  itemPreviouslyOpenedFiles = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "PreviouslyOpenedFiles" ), mPreviouslyOpenedFiles );
  addItem( itemPreviouslyOpenedFiles, QStringLiteral( "PreviouslyOpenedFiles" ) );

  setCurrentGroup( QStringLiteral( "Appearance" ) );

  KConfigSkeleton::ItemColor  *itemBackgroundColor;
  itemBackgroundColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "backgroundColor" ), mBackgroundColor, QColor( "white" ) );
  addItem( itemBackgroundColor, QStringLiteral( "backgroundColor" ) );
}

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

