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

#include "importerconfig.h"

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

using namespace Gwenview;

namespace Gwenview {

class ImporterConfigHelper
{
  public:
    ImporterConfigHelper() : q(nullptr) {}
    ~ImporterConfigHelper() { delete q; }
    ImporterConfig *q;
};
}

Q_GLOBAL_STATIC(ImporterConfigHelper, s_globalImporterConfig)
ImporterConfig *ImporterConfig::self()
{
  if (!s_globalImporterConfig()->q) {
    new ImporterConfig;
    s_globalImporterConfig()->q->read();
  }

  return s_globalImporterConfig()->q;
}

ImporterConfig::ImporterConfig(  )
  : KConfigSkeleton( QStringLiteral( "gwenview_importerrc" ) )
{
  Q_ASSERT(!s_globalImporterConfig()->q);
  s_globalImporterConfig()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemUrl  *itemDestinationUrl;
  itemDestinationUrl = new KConfigSkeleton::ItemUrl( currentGroup(), QStringLiteral( "DestinationUrl" ), mDestinationUrl );
  addItem( itemDestinationUrl, QStringLiteral( "DestinationUrl" ) );
  KConfigSkeleton::ItemBool  *itemAutoRename;
  itemAutoRename = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoRename" ), mAutoRename, true );
  addItem( itemAutoRename, QStringLiteral( "AutoRename" ) );
  KConfigSkeleton::ItemString  *itemAutoRenameFormat;
  itemAutoRenameFormat = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "AutoRenameFormat" ), mAutoRenameFormat, QStringLiteral( "{date}_{time}.{ext.lower}" ) );
  addItem( itemAutoRenameFormat, QStringLiteral( "AutoRenameFormat" ) );
}

ImporterConfig::~ImporterConfig()
{
  s_globalImporterConfig()->q = nullptr;
}

