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

#include "historyconfig.h"

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

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

  return s_globalHistoryConfig()->q;
}

HistoryConfig::HistoryConfig( )
  : KConfigSkeleton( QStringLiteral( "kopeterc" ) )
{
  Q_ASSERT(!s_globalHistoryConfig()->q);
  s_globalHistoryConfig()->q = this;
  setCurrentGroup( QStringLiteral( "History Plugin" ) );

  KConfigSkeleton::ItemBool  *itemAuto_chatwindow;
  itemAuto_chatwindow = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Auto_chatwindow" ), mAuto_chatwindow, true );
  addItem( itemAuto_chatwindow, QStringLiteral( "Auto_chatwindow" ) );
  KConfigSkeleton::ItemUInt  *itemNumber_Auto_chatwindow;
  itemNumber_Auto_chatwindow = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "Number_Auto_chatwindow" ), mNumber_Auto_chatwindow, 7 );
  addItem( itemNumber_Auto_chatwindow, QStringLiteral( "Number_Auto_chatwindow" ) );
  KConfigSkeleton::ItemInt  *itemNumber_ChatWindow;
  itemNumber_ChatWindow = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Number_ChatWindow" ), mNumber_ChatWindow, 20 );
  addItem( itemNumber_ChatWindow, QStringLiteral( "Number_ChatWindow" ) );
  KConfigSkeleton::ItemColor  *itemHistory_color;
  itemHistory_color = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "History_color" ), mHistory_color, QColor( 170, 170, 127 ) );
  addItem( itemHistory_color, QStringLiteral( "History_color" ) );
  KConfigSkeleton::ItemPath  *itemBrowserStyle;
  itemBrowserStyle = new KConfigSkeleton::ItemPath( currentGroup(), QStringLiteral( "BrowserStyle" ), mBrowserStyle );
  addItem( itemBrowserStyle, QStringLiteral( "BrowserStyle" ) );
}

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

