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

#include "krunnersettings.h"

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

class KRunnerSettingsHelper
{
  public:
    KRunnerSettingsHelper() : q(0) {}
    ~KRunnerSettingsHelper() { delete q; }
    KRunnerSettings *q;
};
K_GLOBAL_STATIC(KRunnerSettingsHelper, s_globalKRunnerSettings)
KRunnerSettings *KRunnerSettings::self()
{
  if (!s_globalKRunnerSettings->q) {
    new KRunnerSettings;
    s_globalKRunnerSettings->q->readConfig();
  }

  return s_globalKRunnerSettings->q;
}

KRunnerSettings::KRunnerSettings(  )
  : KConfigSkeleton( QLatin1String( "krunnerrc" ) )
{
  Q_ASSERT(!s_globalKRunnerSettings->q);
  s_globalKRunnerSettings->q = this;
  setCurrentGroup( QLatin1String( "General" ) );

  QList<KConfigSkeleton::ItemEnum::Choice2> valuesInterface;
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("CommandOriented");
    valuesInterface.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("TaskOriented");
    valuesInterface.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemInterface;
  itemInterface = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "Interface" ), mInterface, valuesInterface, EnumInterface::CommandOriented );
  addItem( itemInterface, QLatin1String( "Interface" ) );
  KConfigSkeleton::ItemBool  *itemFreeFloating;
  itemFreeFloating = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "FreeFloating" ), mFreeFloating, false );
  addItem( itemFreeFloating, QLatin1String( "FreeFloating" ) );
  KConfigSkeleton::ItemInt  *itemQueryTextCompletionMode;
  itemQueryTextCompletionMode = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "QueryTextCompletionMode" ), mQueryTextCompletionMode, (int)KGlobalSettings::CompletionMan );
  addItem( itemQueryTextCompletionMode, QLatin1String( "QueryTextCompletionMode" ) );
  KConfigSkeleton::ItemStringList  *itemPastQueries;
  itemPastQueries = new KConfigSkeleton::ItemStringList( currentGroup(), QLatin1String( "PastQueries" ), mPastQueries );
  addItem( itemPastQueries, QLatin1String( "PastQueries" ) );

  setCurrentGroup( QLatin1String( "TaskDialog" ) );

  KConfigSkeleton::ItemBool  *itemKeepTaskDialogAbove;
  itemKeepTaskDialogAbove = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "KeepAbove" ), mKeepTaskDialogAbove, true );
  addItem( itemKeepTaskDialogAbove, QLatin1String( "KeepTaskDialogAbove" ) );
  KConfigSkeleton::ItemInt  *itemUnits;
  itemUnits = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "units" ), mUnits, ProcessModel::UnitsKB );
  addItem( itemUnits, QLatin1String( "units" ) );
  KConfigSkeleton::ItemBool  *itemShowTotals;
  itemShowTotals = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "showTotals" ), mShowTotals, true );
  addItem( itemShowTotals, QLatin1String( "showTotals" ) );
  KConfigSkeleton::ItemInt  *itemFilterState;
  itemFilterState = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "filterState" ), mFilterState, ProcessFilter::AllProcesses );
  addItem( itemFilterState, QLatin1String( "filterState" ) );
  KConfigSkeleton::ItemInt  *itemUpdateIntervalMSecs;
  itemUpdateIntervalMSecs = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "updateIntervalMSecs" ), mUpdateIntervalMSecs, 2000 );
  itemUpdateIntervalMSecs->setMinValue(0);
  addItem( itemUpdateIntervalMSecs, QLatin1String( "updateIntervalMSecs" ) );
  KConfigSkeleton::ItemInt  *itemVersion;
  itemVersion = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "version" ), mVersion, 0 );
  itemVersion->setMinValue(0);
  addItem( itemVersion, QLatin1String( "version" ) );
}

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

