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

#include "scanfolderpluginsettings.h"

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

using namespace kt;

namespace kt {

class ScanFolderPluginSettingsHelper
{
  public:
    ScanFolderPluginSettingsHelper() : q(0) {}
    ~ScanFolderPluginSettingsHelper() { delete q; }
    ScanFolderPluginSettings *q;
};
}

K_GLOBAL_STATIC(ScanFolderPluginSettingsHelper, s_globalScanFolderPluginSettings)
ScanFolderPluginSettings *ScanFolderPluginSettings::self()
{
  if (!s_globalScanFolderPluginSettings->q) {
    new ScanFolderPluginSettings;
    s_globalScanFolderPluginSettings->q->readConfig();
  }

  return s_globalScanFolderPluginSettings->q;
}

ScanFolderPluginSettings::ScanFolderPluginSettings(  )
  : KConfigSkeleton( QLatin1String( "ktscanfolderpluginrc" ) )
{
  Q_ASSERT(!s_globalScanFolderPluginSettings->q);
  s_globalScanFolderPluginSettings->q = this;
  setCurrentGroup( QLatin1String( "general" ) );

  KConfigSkeleton::ItemStringList  *itemFolders;
  itemFolders = new KConfigSkeleton::ItemStringList( currentGroup(), QLatin1String( "folders" ), mFolders );
  addItem( itemFolders, QLatin1String( "folders" ) );
  KConfigSkeleton::ItemBool  *itemOpenSilently;
  itemOpenSilently = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "openSilently" ), mOpenSilently, FALSE );
  addItem( itemOpenSilently, QLatin1String( "openSilently" ) );
  KConfigSkeleton::ItemBool  *itemActionDelete;
  itemActionDelete = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "actionDelete" ), mActionDelete, FALSE );
  addItem( itemActionDelete, QLatin1String( "actionDelete" ) );
  KConfigSkeleton::ItemBool  *itemActionMove;
  itemActionMove = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "actionMove" ), mActionMove, FALSE );
  addItem( itemActionMove, QLatin1String( "actionMove" ) );
  KConfigSkeleton::ItemBool  *itemRecursive;
  itemRecursive = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "recursive" ), mRecursive, FALSE );
  addItem( itemRecursive, QLatin1String( "recursive" ) );
  KConfigSkeleton::ItemBool  *itemAddToGroup;
  itemAddToGroup = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "addToGroup" ), mAddToGroup, false );
  addItem( itemAddToGroup, QLatin1String( "addToGroup" ) );
  KConfigSkeleton::ItemString  *itemGroup;
  itemGroup = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "group" ), mGroup );
  addItem( itemGroup, QLatin1String( "group" ) );
}

ScanFolderPluginSettings::~ScanFolderPluginSettings()
{
  if (!s_globalScanFolderPluginSettings.isDestroyed()) {
    s_globalScanFolderPluginSettings->q = 0;
  }
}

