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

#include "ktimetracker.h"

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

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

  return s_globalKTimeTrackerSettings()->q;
}

KTimeTrackerSettings::KTimeTrackerSettings( )
  : KConfigSkeleton( QStringLiteral( "ktimetrackerrc" ) )
{
  Q_ASSERT(!s_globalKTimeTrackerSettings()->q);
  s_globalKTimeTrackerSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemBool  *itemShowSearchBar;
  itemShowSearchBar = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showSearchBar" ), mShowSearchBar, true );
  addItem( itemShowSearchBar, QStringLiteral( "showSearchBar" ) );

  setCurrentGroup( QStringLiteral( "Idle detection" ) );

  KConfigSkeleton::ItemBool  *itemEnabled;
  itemEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "enabled" ), mEnabled, true );
  addItem( itemEnabled, QStringLiteral( "enabled" ) );
  KConfigSkeleton::ItemUInt  *itemPeriod;
  itemPeriod = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "period" ), mPeriod, 15 );
  addItem( itemPeriod, QStringLiteral( "period" ) );
  KConfigSkeleton::ItemUInt  *itemMinActiveTime;
  itemMinActiveTime = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "minActiveTime" ), mMinActiveTime, 5 );
  addItem( itemMinActiveTime, QStringLiteral( "minActiveTime" ) );

  setCurrentGroup( QStringLiteral( "Saving" ) );

  KConfigSkeleton::ItemBool  *itemAutoSave;
  itemAutoSave = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "autoSave" ), mAutoSave, true );
  addItem( itemAutoSave, QStringLiteral( "autoSave" ) );
  KConfigSkeleton::ItemUInt  *itemAutoSavePeriod;
  itemAutoSavePeriod = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "autoSavePeriod" ), mAutoSavePeriod, 5 );
  addItem( itemAutoSavePeriod, QStringLiteral( "autoSavePeriod" ) );
  KConfigSkeleton::ItemBool  *itemPromptDelete;
  itemPromptDelete = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "promptDelete" ), mPromptDelete, true );
  addItem( itemPromptDelete, QStringLiteral( "promptDelete" ) );
  KConfigSkeleton::ItemBool  *itemUniTasking;
  itemUniTasking = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "uniTasking" ), mUniTasking, false );
  addItem( itemUniTasking, QStringLiteral( "uniTasking" ) );
  KConfigSkeleton::ItemBool  *itemDisplaySessionTime;
  itemDisplaySessionTime = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "displaySessionTime" ), mDisplaySessionTime, true );
  addItem( itemDisplaySessionTime, QStringLiteral( "displaySessionTime" ) );
  KConfigSkeleton::ItemBool  *itemDisplayTime;
  itemDisplayTime = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "displayTime" ), mDisplayTime, true );
  addItem( itemDisplayTime, QStringLiteral( "displayTime" ) );
  KConfigSkeleton::ItemBool  *itemDisplayTotalSessionTime;
  itemDisplayTotalSessionTime = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "displayTotalSessionTime" ), mDisplayTotalSessionTime, true );
  addItem( itemDisplayTotalSessionTime, QStringLiteral( "displayTotalSessionTime" ) );
  KConfigSkeleton::ItemBool  *itemDisplayTotalTime;
  itemDisplayTotalTime = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "displayTotalTime" ), mDisplayTotalTime, true );
  addItem( itemDisplayTotalTime, QStringLiteral( "displayTotalTime" ) );
  KConfigSkeleton::ItemBool  *itemDisplayPriority;
  itemDisplayPriority = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "displayPriority" ), mDisplayPriority, false );
  addItem( itemDisplayPriority, QStringLiteral( "displayPriority" ) );
  KConfigSkeleton::ItemBool  *itemDisplayPercentComplete;
  itemDisplayPercentComplete = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "displayPercentComplete" ), mDisplayPercentComplete, false );
  addItem( itemDisplayPercentComplete, QStringLiteral( "displayPercentComplete" ) );
  KConfigSkeleton::ItemBool  *itemDecimalFormat;
  itemDecimalFormat = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "decimalFormat" ), mDecimalFormat, false );
  addItem( itemDecimalFormat, QStringLiteral( "decimalFormat" ) );
  KConfigSkeleton::ItemBool  *itemWindowTitleCurrentFile;
  itemWindowTitleCurrentFile = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "windowTitleCurrentFile" ), mWindowTitleCurrentFile, true );
  addItem( itemWindowTitleCurrentFile, QStringLiteral( "windowTitleCurrentFile" ) );
  KConfigSkeleton::ItemBool  *itemWindowTitleCurrentTask;
  itemWindowTitleCurrentTask = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "windowTitleCurrentTask" ), mWindowTitleCurrentTask, false );
  addItem( itemWindowTitleCurrentTask, QStringLiteral( "windowTitleCurrentTask" ) );
  KConfigSkeleton::ItemBool  *itemConfigPDA;
  itemConfigPDA = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "configPDA" ), mConfigPDA, false );
  addItem( itemConfigPDA, QStringLiteral( "configPDA" ) );
  KConfigSkeleton::ItemBool  *itemTrayIcon;
  itemTrayIcon = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "trayIcon" ), mTrayIcon, true );
  addItem( itemTrayIcon, QStringLiteral( "trayIcon" ) );
}

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

