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

#include "jpegcreatorsettings5.h"

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

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

  return s_globalJpegCreatorSettings()->q;
}

JpegCreatorSettings::JpegCreatorSettings( )
  : KConfigSkeleton( QStringLiteral( "jpegcreatorrc" ) )
{
  Q_ASSERT(!s_globalJpegCreatorSettings()->q);
  s_globalJpegCreatorSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemBool  *itemRotate;
  itemRotate = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "rotate" ), mRotate, true );
  addItem( itemRotate, QStringLiteral( "rotate" ) );
}

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

