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

#include "filereceiversettings.h"

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

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

  return s_globalFileReceiverSettings()->q;
}

FileReceiverSettings::FileReceiverSettings(  )
  : KConfigSkeleton( QStringLiteral( "bluedevilreceiverrc" ) )
{
  Q_ASSERT(!s_globalFileReceiverSettings()->q);
  s_globalFileReceiverSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemBool  *itemEnabled;
  itemEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "enabled" ), mEnabled, true );
  addItem( itemEnabled, QStringLiteral( "enabled" ) );
  KConfigSkeleton::ItemUrl  *itemSaveUrl;
  itemSaveUrl = new KConfigSkeleton::ItemUrl( currentGroup(), QStringLiteral( "saveUrl" ), mSaveUrl, QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)) );
  addItem( itemSaveUrl, QStringLiteral( "saveUrl" ) );
  KConfigSkeleton::ItemInt  *itemAutoAccept;
  itemAutoAccept = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "autoAccept" ), mAutoAccept, 0 );
  addItem( itemAutoAccept, QStringLiteral( "autoAccept" ) );
}

FileReceiverSettings::~FileReceiverSettings()
{
  s_globalFileReceiverSettings()->q = nullptr;
}

