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

#include "ffmpegthumbnailersettings5.h"

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

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

  return s_globalFFMpegThumbnailerSettings()->q;
}

FFMpegThumbnailerSettings::FFMpegThumbnailerSettings( )
  : KConfigSkeleton( QStringLiteral( "ffmpegthumbsrc" ) )
{
  Q_ASSERT(!s_globalFFMpegThumbnailerSettings()->q);
  s_globalFFMpegThumbnailerSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemBool  *itemFilmstrip;
  itemFilmstrip = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "filmstrip" ), mFilmstrip, true );
  addItem( itemFilmstrip, QStringLiteral( "filmstrip" ) );
  QList<int> defaultsequenceSeekPercentages;
  defaultsequenceSeekPercentages.append( 20 );
  defaultsequenceSeekPercentages.append( 35 );
  defaultsequenceSeekPercentages.append( 50 );
  defaultsequenceSeekPercentages.append( 65 );
  defaultsequenceSeekPercentages.append( 80 );

  KConfigSkeleton::ItemIntList  *itemSequenceSeekPercentages;
  itemSequenceSeekPercentages = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "sequenceSeekPercentages" ), mSequenceSeekPercentages, defaultsequenceSeekPercentages );
  addItem( itemSequenceSeekPercentages, QStringLiteral( "sequenceSeekPercentages" ) );
  KConfigSkeleton::ItemUInt  *itemCacheSize;
  itemCacheSize = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "cacheSize" ), mCacheSize, 51200 );
  addItem( itemCacheSize, QStringLiteral( "cacheSize" ) );
}

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

