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

#include "settings.h"

#include <klocale.h>

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

class ArkSettingsHelper
{
  public:
    ArkSettingsHelper() : q(0) {}
    ~ArkSettingsHelper() { delete q; }
    ArkSettings *q;
};
K_GLOBAL_STATIC(ArkSettingsHelper, s_globalArkSettings)
ArkSettings *ArkSettings::self()
{
  if (!s_globalArkSettings->q) {
    new ArkSettings;
    s_globalArkSettings->q->readConfig();
  }

  return s_globalArkSettings->q;
}

ArkSettings::ArkSettings(  )
  : KConfigSkeleton( QLatin1String( "arkrc" ) )
{
  Q_ASSERT(!s_globalArkSettings->q);
  s_globalArkSettings->q = this;
  setCurrentGroup( QLatin1String( "Extraction" ) );

  KConfigSkeleton::ItemBool  *itemOpenDestinationFolderAfterExtraction;
  itemOpenDestinationFolderAfterExtraction = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "openDestinationFolderAfterExtraction" ), mOpenDestinationFolderAfterExtraction, false );
  itemOpenDestinationFolderAfterExtraction->setLabel( i18n("Open destination folder after extraction") );
  addItem( itemOpenDestinationFolderAfterExtraction, QLatin1String( "openDestinationFolderAfterExtraction" ) );
  KConfigSkeleton::ItemBool  *itemCloseAfterExtraction;
  itemCloseAfterExtraction = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "closeAfterExtraction" ), mCloseAfterExtraction, false );
  itemCloseAfterExtraction->setLabel( i18n("Close Ark after extraction") );
  addItem( itemCloseAfterExtraction, QLatin1String( "closeAfterExtraction" ) );
  KConfigSkeleton::ItemBool  *itemPreservePaths;
  itemPreservePaths = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "preservePaths" ), mPreservePaths, true );
  itemPreservePaths->setLabel( i18n("Preserve paths when extracting") );
  addItem( itemPreservePaths, QLatin1String( "preservePaths" ) );

  setCurrentGroup( QLatin1String( "MainWindow" ) );

  QList<int> defaultsplitterSizes;

  KConfigSkeleton::ItemIntList  *itemSplitterSizes;
  itemSplitterSizes = new KConfigSkeleton::ItemIntList( currentGroup(), QLatin1String( "splitterSizes" ), mSplitterSizes, defaultsplitterSizes );
  itemSplitterSizes->setLabel( i18n("splitterSizes") );
  addItem( itemSplitterSizes, QLatin1String( "splitterSizes" ) );
  QList<int> defaultsplitterSizesWithBothWidgets;

  KConfigSkeleton::ItemIntList  *itemSplitterSizesWithBothWidgets;
  itemSplitterSizesWithBothWidgets = new KConfigSkeleton::ItemIntList( currentGroup(), QLatin1String( "splitterSizesWithBothWidgets" ), mSplitterSizesWithBothWidgets, defaultsplitterSizesWithBothWidgets );
  itemSplitterSizesWithBothWidgets->setLabel( i18n("splitterSizesWithBothWidgets") );
  addItem( itemSplitterSizesWithBothWidgets, QLatin1String( "splitterSizesWithBothWidgets" ) );
}

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

