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

#include "kbankingsettings.h"

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

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

  return s_globalKBankingSettings()->q;
}

KBankingSettings::KBankingSettings( )
  : KConfigSkeleton( QStringLiteral( "kmymoney/kbankingrc" ) )
{
  Q_ASSERT(!s_globalKBankingSettings()->q);
  s_globalKBankingSettings()->q = this;
  setCurrentGroup( QStringLiteral( "opticalTan" ) );

  KConfigSkeleton::ItemInt  *itemWidth;
  itemWidth = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "width" ), mWidth, 260 );
  addItem( itemWidth, QStringLiteral( "width" ) );
  KConfigSkeleton::ItemInt  *itemClocksetting;
  itemClocksetting = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "clocksetting" ), mClocksetting, 50 );
  addItem( itemClocksetting, QStringLiteral( "clocksetting" ) );
}

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

