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

#include "settings.h"

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

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

  return s_globalSettings()->q;
}

Settings::Settings( )
  : KConfigSkeleton( QStringLiteral( "mailreaderrc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Preferences" ) );

  KConfigSkeleton::ItemColor  *itemCol_background;
  itemCol_background = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "col_background" ), mCol_background, QColor( "black" ) );
  addItem( itemCol_background, QStringLiteral( "col_background" ) );
  KConfigSkeleton::ItemColor  *itemCol_foreground;
  itemCol_foreground = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "col_foreground" ), mCol_foreground, QColor( "yellow" ) );
  addItem( itemCol_foreground, QStringLiteral( "col_foreground" ) );
  KConfigSkeleton::ItemInt  *itemVal_time;
  itemVal_time = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "val_time" ), mVal_time, 2 );
  addItem( itemVal_time, QStringLiteral( "val_time" ) );
}

Settings::~Settings()
{
  s_globalSettings()->q = nullptr;
}

