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

#include "settingsmanager.h"

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

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

  return s_globalSettingsManager()->q;
}

SettingsManager *SettingsManager::create(QQmlEngine *, QJSEngine *)
{
  QQmlEngine::setObjectOwnership(self(), QQmlEngine::CppOwnership);
  return self();
}

SettingsManager::SettingsManager( QObject *parent )
  : KConfigSkeleton( QStringLiteral( "kastsrc" ) )
{
  setParent(parent);
  Q_ASSERT(!s_globalSettingsManager()->q);
  s_globalSettingsManager()->q = this;
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&SettingsManager::itemChanged);

  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigCompilerSignallingItem  *itemPrioritizeStreaming;
  KConfigSkeleton::ItemBool  *innerItemPrioritizeStreaming;
  innerItemPrioritizeStreaming = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "prioritizeStreaming" ), mPrioritizeStreaming, false );
  itemPrioritizeStreaming = new KConfigCompilerSignallingItem(innerItemPrioritizeStreaming, this, notifyFunction, signalPrioritizeStreamingChanged);
  addItem( itemPrioritizeStreaming, QStringLiteral( "prioritizeStreaming" ) );
  KConfigCompilerSignallingItem  *itemContinuePlayingNextEntry;
  KConfigSkeleton::ItemBool  *innerItemContinuePlayingNextEntry;
  innerItemContinuePlayingNextEntry = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "continuePlayingNextEntry" ), mContinuePlayingNextEntry, true );
  itemContinuePlayingNextEntry = new KConfigCompilerSignallingItem(innerItemContinuePlayingNextEntry, this, notifyFunction, signalContinuePlayingNextEntryChanged);
  addItem( itemContinuePlayingNextEntry, QStringLiteral( "continuePlayingNextEntry" ) );
  KConfigCompilerSignallingItem  *itemAdjustTimeLeft;
  KConfigSkeleton::ItemBool  *innerItemAdjustTimeLeft;
  innerItemAdjustTimeLeft = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "adjustTimeLeft" ), mAdjustTimeLeft, false );
  itemAdjustTimeLeft = new KConfigCompilerSignallingItem(innerItemAdjustTimeLeft, this, notifyFunction, signalAdjustTimeLeftChanged);
  addItem( itemAdjustTimeLeft, QStringLiteral( "adjustTimeLeft" ) );
  KConfigCompilerSignallingItem  *itemRefreshOnStartup;
  KConfigSkeleton::ItemBool  *innerItemRefreshOnStartup;
  innerItemRefreshOnStartup = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "refreshOnStartup" ), mRefreshOnStartup, false );
  itemRefreshOnStartup = new KConfigCompilerSignallingItem(innerItemRefreshOnStartup, this, notifyFunction, signalRefreshOnStartupChanged);
  addItem( itemRefreshOnStartup, QStringLiteral( "refreshOnStartup" ) );
  KConfigCompilerSignallingItem  *itemDoFullUpdate;
  KConfigSkeleton::ItemBool  *innerItemDoFullUpdate;
  innerItemDoFullUpdate = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "doFullUpdate" ), mDoFullUpdate, true );
  itemDoFullUpdate = new KConfigCompilerSignallingItem(innerItemDoFullUpdate, this, notifyFunction, signalDoFullUpdateChanged);
  addItem( itemDoFullUpdate, QStringLiteral( "doFullUpdate" ) );
  KConfigCompilerSignallingItem  *itemAutoQueue;
  KConfigSkeleton::ItemBool  *innerItemAutoQueue;
  innerItemAutoQueue = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "autoQueue" ), mAutoQueue, true );
  itemAutoQueue = new KConfigCompilerSignallingItem(innerItemAutoQueue, this, notifyFunction, signalAutoQueueChanged);
  addItem( itemAutoQueue, QStringLiteral( "autoQueue" ) );
  KConfigCompilerSignallingItem  *itemAutoDownload;
  KConfigSkeleton::ItemBool  *innerItemAutoDownload;
  innerItemAutoDownload = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "autoDownload" ), mAutoDownload, false );
  itemAutoDownload = new KConfigCompilerSignallingItem(innerItemAutoDownload, this, notifyFunction, signalAutoDownloadChanged);
  addItem( itemAutoDownload, QStringLiteral( "autoDownload" ) );
  KConfigCompilerSignallingItem  *itemAutoFeedUpdateInterval;
  KConfigSkeleton::ItemInt  *innerItemAutoFeedUpdateInterval;
  innerItemAutoFeedUpdateInterval = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "autoFeedUpdateInterval" ), mAutoFeedUpdateInterval, 0 );
  itemAutoFeedUpdateInterval = new KConfigCompilerSignallingItem(innerItemAutoFeedUpdateInterval, this, notifyFunction, signalAutoFeedUpdateIntervalChanged);
  addItem( itemAutoFeedUpdateInterval, QStringLiteral( "autoFeedUpdateInterval" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesautoDeleteOnPlayed;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Disabled");
    valuesautoDeleteOnPlayed.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Immediately");
    valuesautoDeleteOnPlayed.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("OnNextStartup");
    valuesautoDeleteOnPlayed.append( choice );
  }
  KConfigCompilerSignallingItem  *itemAutoDeleteOnPlayed;
  KConfigSkeleton::ItemEnum  *innerItemAutoDeleteOnPlayed;
  innerItemAutoDeleteOnPlayed = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "autoDeleteOnPlayed" ), mAutoDeleteOnPlayed, valuesautoDeleteOnPlayed, EnumAutoDeleteOnPlayed::OnNextStartup );
  itemAutoDeleteOnPlayed = new KConfigCompilerSignallingItem(innerItemAutoDeleteOnPlayed, this, notifyFunction, signalAutoDeleteOnPlayedChanged);
  addItem( itemAutoDeleteOnPlayed, QStringLiteral( "autoDeleteOnPlayed" ) );
  KConfigCompilerSignallingItem  *itemMarkAsPlayedBeforeEnd;
  KConfigSkeleton::ItemInt  *innerItemMarkAsPlayedBeforeEnd;
  innerItemMarkAsPlayedBeforeEnd = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "markAsPlayedBeforeEnd" ), mMarkAsPlayedBeforeEnd, 15 );
  itemMarkAsPlayedBeforeEnd = new KConfigCompilerSignallingItem(innerItemMarkAsPlayedBeforeEnd, this, notifyFunction, signalMarkAsPlayedBeforeEndChanged);
  addItem( itemMarkAsPlayedBeforeEnd, QStringLiteral( "markAsPlayedBeforeEnd" ) );
  KConfigCompilerSignallingItem  *itemResetPositionOnPlayed;
  KConfigSkeleton::ItemBool  *innerItemResetPositionOnPlayed;
  innerItemResetPositionOnPlayed = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "resetPositionOnPlayed" ), mResetPositionOnPlayed, true );
  itemResetPositionOnPlayed = new KConfigCompilerSignallingItem(innerItemResetPositionOnPlayed, this, notifyFunction, signalResetPositionOnPlayedChanged);
  addItem( itemResetPositionOnPlayed, QStringLiteral( "resetPositionOnPlayed" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesmarkUnreadOnNewFeed;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("None");
    valuesmarkUnreadOnNewFeed.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Custom");
    valuesmarkUnreadOnNewFeed.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("All");
    valuesmarkUnreadOnNewFeed.append( choice );
  }
  KConfigCompilerSignallingItem  *itemMarkUnreadOnNewFeed;
  KConfigSkeleton::ItemEnum  *innerItemMarkUnreadOnNewFeed;
  innerItemMarkUnreadOnNewFeed = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "markUnreadOnNewFeed" ), mMarkUnreadOnNewFeed, valuesmarkUnreadOnNewFeed, EnumMarkUnreadOnNewFeed::None );
  itemMarkUnreadOnNewFeed = new KConfigCompilerSignallingItem(innerItemMarkUnreadOnNewFeed, this, notifyFunction, signalMarkUnreadOnNewFeedChanged);
  addItem( itemMarkUnreadOnNewFeed, QStringLiteral( "markUnreadOnNewFeed" ) );
  KConfigCompilerSignallingItem  *itemMarkUnreadOnNewFeedCustomAmount;
  KConfigSkeleton::ItemInt  *innerItemMarkUnreadOnNewFeedCustomAmount;
  innerItemMarkUnreadOnNewFeedCustomAmount = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "markUnreadOnNewFeedCustomAmount" ), mMarkUnreadOnNewFeedCustomAmount, 1 );
  itemMarkUnreadOnNewFeedCustomAmount = new KConfigCompilerSignallingItem(innerItemMarkUnreadOnNewFeedCustomAmount, this, notifyFunction, signalMarkUnreadOnNewFeedCustomAmountChanged);
  addItem( itemMarkUnreadOnNewFeedCustomAmount, QStringLiteral( "markUnreadOnNewFeedCustomAmount" ) );
  KConfigCompilerSignallingItem  *itemToggleRemainingTime;
  KConfigSkeleton::ItemBool  *innerItemToggleRemainingTime;
  innerItemToggleRemainingTime = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "toggleRemainingTime" ), mToggleRemainingTime, false );
  itemToggleRemainingTime = new KConfigCompilerSignallingItem(innerItemToggleRemainingTime, this, notifyFunction, signalToggleRemainingTimeChanged);
  addItem( itemToggleRemainingTime, QStringLiteral( "toggleRemainingTime" ) );
  KConfigCompilerSignallingItem  *itemArticleFontSize;
  KConfigSkeleton::ItemInt  *innerItemArticleFontSize;
  innerItemArticleFontSize = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "articleFontSize" ), mArticleFontSize, 10 );
  itemArticleFontSize = new KConfigCompilerSignallingItem(innerItemArticleFontSize, this, notifyFunction, signalArticleFontSizeChanged);
  addItem( itemArticleFontSize, QStringLiteral( "articleFontSize" ) );
  KConfigCompilerSignallingItem  *itemStoragePath;
  KConfigSkeleton::ItemUrl  *innerItemStoragePath;
  innerItemStoragePath = new KConfigSkeleton::ItemUrl( currentGroup(), QStringLiteral( "StoragePath" ), mStoragePath );
  itemStoragePath = new KConfigCompilerSignallingItem(innerItemStoragePath, this, notifyFunction, signalStoragePathChanged);
  addItem( itemStoragePath, QStringLiteral( "StoragePath" ) );

  setCurrentGroup( QStringLiteral( "Appearance" ) );

  KConfigCompilerSignallingItem  *itemAlwaysShowFeedTitles;
  KConfigSkeleton::ItemBool  *innerItemAlwaysShowFeedTitles;
  innerItemAlwaysShowFeedTitles = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "alwaysShowFeedTitles" ), mAlwaysShowFeedTitles, false );
  itemAlwaysShowFeedTitles = new KConfigCompilerSignallingItem(innerItemAlwaysShowFeedTitles, this, notifyFunction, signalAlwaysShowFeedTitlesChanged);
  addItem( itemAlwaysShowFeedTitles, QStringLiteral( "alwaysShowFeedTitles" ) );
  KConfigCompilerSignallingItem  *itemShowEpisodeImage;
  KConfigSkeleton::ItemBool  *innerItemShowEpisodeImage;
  innerItemShowEpisodeImage = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showEpisodeImage" ), mShowEpisodeImage, true );
  itemShowEpisodeImage = new KConfigCompilerSignallingItem(innerItemShowEpisodeImage, this, notifyFunction, signalShowEpisodeImageChanged);
  addItem( itemShowEpisodeImage, QStringLiteral( "showEpisodeImage" ) );
  KConfigCompilerSignallingItem  *itemShowPodcastTitle;
  KConfigSkeleton::ItemBool  *innerItemShowPodcastTitle;
  innerItemShowPodcastTitle = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showPodcastTitle" ), mShowPodcastTitle, false );
  itemShowPodcastTitle = new KConfigCompilerSignallingItem(innerItemShowPodcastTitle, this, notifyFunction, signalShowPodcastTitleChanged);
  addItem( itemShowPodcastTitle, QStringLiteral( "showPodcastTitle" ) );
  KConfigCompilerSignallingItem  *itemShowTrayIcon;
  KConfigSkeleton::ItemBool  *innerItemShowTrayIcon;
  innerItemShowTrayIcon = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showTrayIcon" ), mShowTrayIcon, false );
  itemShowTrayIcon = new KConfigCompilerSignallingItem(innerItemShowTrayIcon, this, notifyFunction, signalShowTrayIconChanged);
  addItem( itemShowTrayIcon, QStringLiteral( "showTrayIcon" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuestrayIconType;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Colorful");
    valuestrayIconType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Light");
    valuestrayIconType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Dark");
    valuestrayIconType.append( choice );
  }
  KConfigCompilerSignallingItem  *itemTrayIconType;
  KConfigSkeleton::ItemEnum  *innerItemTrayIconType;
  innerItemTrayIconType = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "trayIconType" ), mTrayIconType, valuestrayIconType, EnumTrayIconType::Dark );
  itemTrayIconType = new KConfigCompilerSignallingItem(innerItemTrayIconType, this, notifyFunction, signalTrayIconTypeChanged);
  addItem( itemTrayIconType, QStringLiteral( "trayIconType" ) );
  KConfigCompilerSignallingItem  *itemMinimizeToTray;
  KConfigSkeleton::ItemBool  *innerItemMinimizeToTray;
  innerItemMinimizeToTray = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "minimizeToTray" ), mMinimizeToTray, true );
  itemMinimizeToTray = new KConfigCompilerSignallingItem(innerItemMinimizeToTray, this, notifyFunction, signalMinimizeToTrayChanged);
  addItem( itemMinimizeToTray, QStringLiteral( "minimizeToTray" ) );
  KConfigCompilerSignallingItem  *itemArticleFontUseSystem;
  KConfigSkeleton::ItemBool  *innerItemArticleFontUseSystem;
  innerItemArticleFontUseSystem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "articleFontUseSystem" ), mArticleFontUseSystem, true );
  itemArticleFontUseSystem = new KConfigCompilerSignallingItem(innerItemArticleFontUseSystem, this, notifyFunction, signalArticleFontUseSystemChanged);
  addItem( itemArticleFontUseSystem, QStringLiteral( "articleFontUseSystem" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesinterfaceMode;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Desktop");
    valuesinterfaceMode.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Mobile");
    valuesinterfaceMode.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Auto");
    valuesinterfaceMode.append( choice );
  }
  KConfigCompilerSignallingItem  *itemInterfaceMode;
  KConfigSkeleton::ItemEnum  *innerItemInterfaceMode;
  innerItemInterfaceMode = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "interfaceMode" ), mInterfaceMode, valuesinterfaceMode, EnumInterfaceMode::Auto );
  itemInterfaceMode = new KConfigCompilerSignallingItem(innerItemInterfaceMode, this, notifyFunction, signalInterfaceModeChanged);
  addItem( itemInterfaceMode, QStringLiteral( "interfaceMode" ) );

  setCurrentGroup( QStringLiteral( "Playback Settings" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesmediabackend;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Qt");
    valuesmediabackend.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Vlc");
    valuesmediabackend.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Gst");
    valuesmediabackend.append( choice );
  }
  KConfigCompilerSignallingItem  *itemMediabackend;
  KConfigSkeleton::ItemEnum  *innerItemMediabackend;
  innerItemMediabackend = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "mediabackend" ), mMediabackend, valuesmediabackend, 1 );
  itemMediabackend = new KConfigCompilerSignallingItem(innerItemMediabackend, this, notifyFunction, signalMediabackendChanged);
  addItem( itemMediabackend, QStringLiteral( "mediabackend" ) );
  QList<int> defaultplaybackRates;
  defaultplaybackRates.append( 50 );
  defaultplaybackRates.append( 75 );
  defaultplaybackRates.append( 100 );
  defaultplaybackRates.append( 125 );
  defaultplaybackRates.append( 150 );
  defaultplaybackRates.append( 175 );
  defaultplaybackRates.append( 200 );
  defaultplaybackRates.append( 225 );
  defaultplaybackRates.append( 250 );

  KConfigCompilerSignallingItem  *itemPlaybackRates;
  KConfigSkeleton::ItemIntList  *innerItemPlaybackRates;
  innerItemPlaybackRates = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "playbackRates" ), mPlaybackRates, defaultplaybackRates );
  itemPlaybackRates = new KConfigCompilerSignallingItem(innerItemPlaybackRates, this, notifyFunction, signalPlaybackRatesChanged);
  addItem( itemPlaybackRates, QStringLiteral( "playbackRates" ) );
  KConfigCompilerSignallingItem  *itemSkipForward;
  KConfigSkeleton::ItemUInt  *innerItemSkipForward;
  innerItemSkipForward = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "skipForward" ), mSkipForward, 10 );
  itemSkipForward = new KConfigCompilerSignallingItem(innerItemSkipForward, this, notifyFunction, signalSkipForwardChanged);
  innerItemSkipForward->setMinValue(1);
  innerItemSkipForward->setMaxValue(300);
  addItem( itemSkipForward, QStringLiteral( "skipForward" ) );
  KConfigCompilerSignallingItem  *itemSkipBackward;
  KConfigSkeleton::ItemUInt  *innerItemSkipBackward;
  innerItemSkipBackward = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "skipBackward" ), mSkipBackward, 10 );
  itemSkipBackward = new KConfigCompilerSignallingItem(innerItemSkipBackward, this, notifyFunction, signalSkipBackwardChanged);
  innerItemSkipBackward->setMinValue(1);
  innerItemSkipBackward->setMaxValue(300);
  addItem( itemSkipBackward, QStringLiteral( "skipBackward" ) );

  setCurrentGroup( QStringLiteral( "Network" ) );

  KConfigCompilerSignallingItem  *itemMaximumParallelEpisodeDownloads;
  KConfigSkeleton::ItemInt  *innerItemMaximumParallelEpisodeDownloads;
  innerItemMaximumParallelEpisodeDownloads = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "maximumParallelEpisodeDownloads" ), mMaximumParallelEpisodeDownloads, 2 );
  itemMaximumParallelEpisodeDownloads = new KConfigCompilerSignallingItem(innerItemMaximumParallelEpisodeDownloads, this, notifyFunction, signalMaximumParallelEpisodeDownloadsChanged);
  addItem( itemMaximumParallelEpisodeDownloads, QStringLiteral( "maximumParallelEpisodeDownloads" ) );
  KConfigCompilerSignallingItem  *itemCheckNetworkStatus;
  KConfigSkeleton::ItemBool  *innerItemCheckNetworkStatus;
  innerItemCheckNetworkStatus = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "checkNetworkStatus" ), mCheckNetworkStatus, true );
  itemCheckNetworkStatus = new KConfigCompilerSignallingItem(innerItemCheckNetworkStatus, this, notifyFunction, signalCheckNetworkStatusChanged);
  addItem( itemCheckNetworkStatus, QStringLiteral( "checkNetworkStatus" ) );
  KConfigCompilerSignallingItem  *itemAllowMeteredFeedUpdates;
  KConfigSkeleton::ItemBool  *innerItemAllowMeteredFeedUpdates;
  innerItemAllowMeteredFeedUpdates = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "allowMeteredFeedUpdates" ), mAllowMeteredFeedUpdates, false );
  itemAllowMeteredFeedUpdates = new KConfigCompilerSignallingItem(innerItemAllowMeteredFeedUpdates, this, notifyFunction, signalAllowMeteredFeedUpdatesChanged);
  addItem( itemAllowMeteredFeedUpdates, QStringLiteral( "allowMeteredFeedUpdates" ) );
  KConfigCompilerSignallingItem  *itemAllowMeteredEpisodeDownloads;
  KConfigSkeleton::ItemBool  *innerItemAllowMeteredEpisodeDownloads;
  innerItemAllowMeteredEpisodeDownloads = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "allowMeteredEpisodeDownloads" ), mAllowMeteredEpisodeDownloads, false );
  itemAllowMeteredEpisodeDownloads = new KConfigCompilerSignallingItem(innerItemAllowMeteredEpisodeDownloads, this, notifyFunction, signalAllowMeteredEpisodeDownloadsChanged);
  addItem( itemAllowMeteredEpisodeDownloads, QStringLiteral( "allowMeteredEpisodeDownloads" ) );
  KConfigCompilerSignallingItem  *itemAllowMeteredImageDownloads;
  KConfigSkeleton::ItemBool  *innerItemAllowMeteredImageDownloads;
  innerItemAllowMeteredImageDownloads = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "allowMeteredImageDownloads" ), mAllowMeteredImageDownloads, false );
  itemAllowMeteredImageDownloads = new KConfigCompilerSignallingItem(innerItemAllowMeteredImageDownloads, this, notifyFunction, signalAllowMeteredImageDownloadsChanged);
  addItem( itemAllowMeteredImageDownloads, QStringLiteral( "allowMeteredImageDownloads" ) );
  KConfigCompilerSignallingItem  *itemAllowMeteredStreaming;
  KConfigSkeleton::ItemBool  *innerItemAllowMeteredStreaming;
  innerItemAllowMeteredStreaming = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "allowMeteredStreaming" ), mAllowMeteredStreaming, false );
  itemAllowMeteredStreaming = new KConfigCompilerSignallingItem(innerItemAllowMeteredStreaming, this, notifyFunction, signalAllowMeteredStreamingChanged);
  addItem( itemAllowMeteredStreaming, QStringLiteral( "allowMeteredStreaming" ) );

  setCurrentGroup( QStringLiteral( "Persistency" ) );

  KConfigCompilerSignallingItem  *itemSleepTimerValue;
  KConfigSkeleton::ItemInt  *innerItemSleepTimerValue;
  innerItemSleepTimerValue = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "sleepTimerValue" ), mSleepTimerValue, 30 );
  itemSleepTimerValue = new KConfigCompilerSignallingItem(innerItemSleepTimerValue, this, notifyFunction, signalSleepTimerValueChanged);
  addItem( itemSleepTimerValue, QStringLiteral( "sleepTimerValue" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuessleepTimerUnits;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Seconds");
    valuessleepTimerUnits.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Minutes");
    valuessleepTimerUnits.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Hours");
    valuessleepTimerUnits.append( choice );
  }
  KConfigCompilerSignallingItem  *itemSleepTimerUnits;
  KConfigSkeleton::ItemEnum  *innerItemSleepTimerUnits;
  innerItemSleepTimerUnits = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "sleepTimerUnits" ), mSleepTimerUnits, valuessleepTimerUnits, EnumSleepTimerUnits::Minutes );
  itemSleepTimerUnits = new KConfigCompilerSignallingItem(innerItemSleepTimerUnits, this, notifyFunction, signalSleepTimerUnitsChanged);
  addItem( itemSleepTimerUnits, QStringLiteral( "sleepTimerUnits" ) );

  setCurrentGroup( QStringLiteral( "Synchronization" ) );

  KConfigCompilerSignallingItem  *itemSyncEnabled;
  KConfigSkeleton::ItemBool  *innerItemSyncEnabled;
  innerItemSyncEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "syncEnabled" ), mSyncEnabled, false );
  itemSyncEnabled = new KConfigCompilerSignallingItem(innerItemSyncEnabled, this, notifyFunction, signalSyncEnabledChanged);
  addItem( itemSyncEnabled, QStringLiteral( "syncEnabled" ) );
  KConfigCompilerSignallingItem  *itemSyncWhenUpdatingFeeds;
  KConfigSkeleton::ItemBool  *innerItemSyncWhenUpdatingFeeds;
  innerItemSyncWhenUpdatingFeeds = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "syncWhenUpdatingFeeds" ), mSyncWhenUpdatingFeeds, true );
  itemSyncWhenUpdatingFeeds = new KConfigCompilerSignallingItem(innerItemSyncWhenUpdatingFeeds, this, notifyFunction, signalSyncWhenUpdatingFeedsChanged);
  addItem( itemSyncWhenUpdatingFeeds, QStringLiteral( "syncWhenUpdatingFeeds" ) );
  KConfigCompilerSignallingItem  *itemSyncWhenPlayerstateChanges;
  KConfigSkeleton::ItemBool  *innerItemSyncWhenPlayerstateChanges;
  innerItemSyncWhenPlayerstateChanges = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "syncWhenPlayerstateChanges" ), mSyncWhenPlayerstateChanges, true );
  itemSyncWhenPlayerstateChanges = new KConfigCompilerSignallingItem(innerItemSyncWhenPlayerstateChanges, this, notifyFunction, signalSyncWhenPlayerstateChangesChanged);
  addItem( itemSyncWhenPlayerstateChanges, QStringLiteral( "syncWhenPlayerstateChanges" ) );
  KConfigCompilerSignallingItem  *itemSyncProvider;
  KConfigSkeleton::ItemInt  *innerItemSyncProvider;
  innerItemSyncProvider = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "syncProvider" ), mSyncProvider, 0 );
  itemSyncProvider = new KConfigCompilerSignallingItem(innerItemSyncProvider, this, notifyFunction, signalSyncProviderChanged);
  addItem( itemSyncProvider, QStringLiteral( "syncProvider" ) );
  KConfigCompilerSignallingItem  *itemSyncHostname;
  KConfigSkeleton::ItemString  *innerItemSyncHostname;
  innerItemSyncHostname = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "syncHostname" ), mSyncHostname );
  itemSyncHostname = new KConfigCompilerSignallingItem(innerItemSyncHostname, this, notifyFunction, signalSyncHostnameChanged);
  addItem( itemSyncHostname, QStringLiteral( "syncHostname" ) );
  KConfigCompilerSignallingItem  *itemSyncUsername;
  KConfigSkeleton::ItemString  *innerItemSyncUsername;
  innerItemSyncUsername = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "syncUsername" ), mSyncUsername );
  itemSyncUsername = new KConfigCompilerSignallingItem(innerItemSyncUsername, this, notifyFunction, signalSyncUsernameChanged);
  addItem( itemSyncUsername, QStringLiteral( "syncUsername" ) );
  KConfigCompilerSignallingItem  *itemSyncDevice;
  KConfigSkeleton::ItemString  *innerItemSyncDevice;
  innerItemSyncDevice = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "syncDevice" ), mSyncDevice );
  itemSyncDevice = new KConfigCompilerSignallingItem(innerItemSyncDevice, this, notifyFunction, signalSyncDeviceChanged);
  addItem( itemSyncDevice, QStringLiteral( "syncDevice" ) );
  KConfigCompilerSignallingItem  *itemSyncDeviceName;
  KConfigSkeleton::ItemString  *innerItemSyncDeviceName;
  innerItemSyncDeviceName = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "syncDeviceName" ), mSyncDeviceName );
  itemSyncDeviceName = new KConfigCompilerSignallingItem(innerItemSyncDeviceName, this, notifyFunction, signalSyncDeviceNameChanged);
  addItem( itemSyncDeviceName, QStringLiteral( "syncDeviceName" ) );

  setCurrentGroup( QStringLiteral( "NetworkProxy" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesProxyType;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("System");
    valuesProxyType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("HTTP");
    valuesProxyType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Socks5");
    valuesProxyType.append( choice );
  }
  KConfigCompilerSignallingItem  *itemProxyType;
  KConfigSkeleton::ItemEnum  *innerItemProxyType;
  innerItemProxyType = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "ProxyType" ), mProxyType, valuesProxyType );
  itemProxyType = new KConfigCompilerSignallingItem(innerItemProxyType, this, notifyFunction, signalProxyTypeChanged);
  addItem( itemProxyType, QStringLiteral( "ProxyType" ) );
  KConfigCompilerSignallingItem  *itemProxyHost;
  KConfigSkeleton::ItemString  *innerItemProxyHost;
  innerItemProxyHost = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ProxyHost" ), mProxyHost, QStringLiteral( "127.0.0.1" ) );
  itemProxyHost = new KConfigCompilerSignallingItem(innerItemProxyHost, this, notifyFunction, signalProxyHostChanged);
  addItem( itemProxyHost, QStringLiteral( "ProxyHost" ) );
  KConfigCompilerSignallingItem  *itemProxyPort;
  KConfigSkeleton::ItemInt  *innerItemProxyPort;
  innerItemProxyPort = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "ProxyPort" ), mProxyPort, 1080 );
  itemProxyPort = new KConfigCompilerSignallingItem(innerItemProxyPort, this, notifyFunction, signalProxyPortChanged);
  addItem( itemProxyPort, QStringLiteral( "ProxyPort" ) );
  KConfigCompilerSignallingItem  *itemProxyUser;
  KConfigSkeleton::ItemString  *innerItemProxyUser;
  innerItemProxyUser = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ProxyUser" ), mProxyUser );
  itemProxyUser = new KConfigCompilerSignallingItem(innerItemProxyUser, this, notifyFunction, signalProxyUserChanged);
  addItem( itemProxyUser, QStringLiteral( "ProxyUser" ) );
  KConfigCompilerSignallingItem  *itemProxyPassword;
  KConfigSkeleton::ItemPassword  *innerItemProxyPassword;
  innerItemProxyPassword = new KConfigSkeleton::ItemPassword( currentGroup(), QStringLiteral( "ProxyPassword" ), mProxyPassword );
  itemProxyPassword = new KConfigCompilerSignallingItem(innerItemProxyPassword, this, notifyFunction, signalProxyPasswordChanged);
  addItem( itemProxyPassword, QStringLiteral( "ProxyPassword" ) );
}

bool SettingsManager::defaultPrioritizeStreamingValue_helper()
{

  return false;
}

bool SettingsManager::defaultContinuePlayingNextEntryValue_helper()
{

  return true;
}

bool SettingsManager::defaultAdjustTimeLeftValue_helper()
{

  return false;
}

bool SettingsManager::defaultRefreshOnStartupValue_helper()
{

  return false;
}

bool SettingsManager::defaultDoFullUpdateValue_helper()
{

  return true;
}

bool SettingsManager::defaultAutoQueueValue_helper()
{

  return true;
}

bool SettingsManager::defaultAutoDownloadValue_helper()
{

  return false;
}

int SettingsManager::defaultAutoFeedUpdateIntervalValue_helper()
{

  return 0;
}

int SettingsManager::defaultAutoDeleteOnPlayedValue_helper()
{

  return EnumAutoDeleteOnPlayed::OnNextStartup;
}

int SettingsManager::defaultMarkAsPlayedBeforeEndValue_helper()
{

  return 15;
}

bool SettingsManager::defaultResetPositionOnPlayedValue_helper()
{

  return true;
}

int SettingsManager::defaultMarkUnreadOnNewFeedValue_helper()
{

  return EnumMarkUnreadOnNewFeed::None;
}

int SettingsManager::defaultMarkUnreadOnNewFeedCustomAmountValue_helper()
{

  return 1;
}

bool SettingsManager::defaultToggleRemainingTimeValue_helper()
{

  return false;
}

int SettingsManager::defaultArticleFontSizeValue_helper()
{

  return 10;
}

bool SettingsManager::defaultAlwaysShowFeedTitlesValue_helper()
{

  return false;
}

bool SettingsManager::defaultShowEpisodeImageValue_helper()
{

  return true;
}

bool SettingsManager::defaultShowPodcastTitleValue_helper()
{

  return false;
}

bool SettingsManager::defaultShowTrayIconValue_helper()
{

  return false;
}

int SettingsManager::defaultTrayIconTypeValue_helper()
{

  return EnumTrayIconType::Dark;
}

bool SettingsManager::defaultMinimizeToTrayValue_helper()
{

  return true;
}

bool SettingsManager::defaultArticleFontUseSystemValue_helper()
{

  return true;
}

int SettingsManager::defaultInterfaceModeValue_helper()
{

  return EnumInterfaceMode::Auto;
}

int SettingsManager::defaultMediabackendValue_helper()
{

  return 1;
}

QList<int> SettingsManager::defaultPlaybackRatesValue_helper()
{
  QList<int> defaultplaybackRates;
  defaultplaybackRates.append( 50 );
  defaultplaybackRates.append( 75 );
  defaultplaybackRates.append( 100 );
  defaultplaybackRates.append( 125 );
  defaultplaybackRates.append( 150 );
  defaultplaybackRates.append( 175 );
  defaultplaybackRates.append( 200 );
  defaultplaybackRates.append( 225 );
  defaultplaybackRates.append( 250 );

  return defaultplaybackRates;
}

uint SettingsManager::defaultSkipForwardValue_helper()
{

  return 10;
}

uint SettingsManager::defaultSkipBackwardValue_helper()
{

  return 10;
}

int SettingsManager::defaultMaximumParallelEpisodeDownloadsValue_helper()
{

  return 2;
}

bool SettingsManager::defaultCheckNetworkStatusValue_helper()
{

  return true;
}

bool SettingsManager::defaultAllowMeteredFeedUpdatesValue_helper()
{

  return false;
}

bool SettingsManager::defaultAllowMeteredEpisodeDownloadsValue_helper()
{

  return false;
}

bool SettingsManager::defaultAllowMeteredImageDownloadsValue_helper()
{

  return false;
}

bool SettingsManager::defaultAllowMeteredStreamingValue_helper()
{

  return false;
}

int SettingsManager::defaultSleepTimerValueValue_helper()
{

  return 30;
}

int SettingsManager::defaultSleepTimerUnitsValue_helper()
{

  return EnumSleepTimerUnits::Minutes;
}

bool SettingsManager::defaultSyncEnabledValue_helper()
{

  return false;
}

bool SettingsManager::defaultSyncWhenUpdatingFeedsValue_helper()
{

  return true;
}

bool SettingsManager::defaultSyncWhenPlayerstateChangesValue_helper()
{

  return true;
}

int SettingsManager::defaultSyncProviderValue_helper()
{

  return 0;
}

QString SettingsManager::defaultProxyHostValue_helper()
{

  return QStringLiteral( "127.0.0.1" );
}

int SettingsManager::defaultProxyPortValue_helper()
{

  return 1080;
}

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


void SettingsManager::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalPrioritizeStreamingChanged:
    Q_EMIT prioritizeStreamingChanged();
    break;
  case signalContinuePlayingNextEntryChanged:
    Q_EMIT continuePlayingNextEntryChanged();
    break;
  case signalAdjustTimeLeftChanged:
    Q_EMIT adjustTimeLeftChanged();
    break;
  case signalRefreshOnStartupChanged:
    Q_EMIT refreshOnStartupChanged();
    break;
  case signalDoFullUpdateChanged:
    Q_EMIT doFullUpdateChanged();
    break;
  case signalAutoQueueChanged:
    Q_EMIT autoQueueChanged();
    break;
  case signalAutoDownloadChanged:
    Q_EMIT autoDownloadChanged();
    break;
  case signalAutoFeedUpdateIntervalChanged:
    Q_EMIT autoFeedUpdateIntervalChanged();
    break;
  case signalAutoDeleteOnPlayedChanged:
    Q_EMIT autoDeleteOnPlayedChanged();
    break;
  case signalMarkAsPlayedBeforeEndChanged:
    Q_EMIT markAsPlayedBeforeEndChanged();
    break;
  case signalResetPositionOnPlayedChanged:
    Q_EMIT resetPositionOnPlayedChanged();
    break;
  case signalMarkUnreadOnNewFeedChanged:
    Q_EMIT markUnreadOnNewFeedChanged();
    break;
  case signalMarkUnreadOnNewFeedCustomAmountChanged:
    Q_EMIT markUnreadOnNewFeedCustomAmountChanged();
    break;
  case signalToggleRemainingTimeChanged:
    Q_EMIT toggleRemainingTimeChanged();
    break;
  case signalArticleFontSizeChanged:
    Q_EMIT articleFontSizeChanged();
    break;
  case signalStoragePathChanged:
    Q_EMIT StoragePathChanged();
    break;
  case signalAlwaysShowFeedTitlesChanged:
    Q_EMIT alwaysShowFeedTitlesChanged();
    break;
  case signalShowEpisodeImageChanged:
    Q_EMIT showEpisodeImageChanged();
    break;
  case signalShowPodcastTitleChanged:
    Q_EMIT showPodcastTitleChanged();
    break;
  case signalShowTrayIconChanged:
    Q_EMIT showTrayIconChanged();
    break;
  case signalTrayIconTypeChanged:
    Q_EMIT trayIconTypeChanged();
    break;
  case signalMinimizeToTrayChanged:
    Q_EMIT minimizeToTrayChanged();
    break;
  case signalArticleFontUseSystemChanged:
    Q_EMIT articleFontUseSystemChanged();
    break;
  case signalInterfaceModeChanged:
    Q_EMIT interfaceModeChanged();
    break;
  case signalMediabackendChanged:
    Q_EMIT mediabackendChanged();
    break;
  case signalPlaybackRatesChanged:
    Q_EMIT playbackRatesChanged();
    break;
  case signalSkipForwardChanged:
    Q_EMIT skipForwardChanged();
    break;
  case signalSkipBackwardChanged:
    Q_EMIT skipBackwardChanged();
    break;
  case signalMaximumParallelEpisodeDownloadsChanged:
    Q_EMIT maximumParallelEpisodeDownloadsChanged();
    break;
  case signalCheckNetworkStatusChanged:
    Q_EMIT checkNetworkStatusChanged();
    break;
  case signalAllowMeteredFeedUpdatesChanged:
    Q_EMIT allowMeteredFeedUpdatesChanged();
    break;
  case signalAllowMeteredEpisodeDownloadsChanged:
    Q_EMIT allowMeteredEpisodeDownloadsChanged();
    break;
  case signalAllowMeteredImageDownloadsChanged:
    Q_EMIT allowMeteredImageDownloadsChanged();
    break;
  case signalAllowMeteredStreamingChanged:
    Q_EMIT allowMeteredStreamingChanged();
    break;
  case signalSleepTimerValueChanged:
    Q_EMIT sleepTimerValueChanged();
    break;
  case signalSleepTimerUnitsChanged:
    Q_EMIT sleepTimerUnitsChanged();
    break;
  case signalSyncEnabledChanged:
    Q_EMIT syncEnabledChanged();
    break;
  case signalSyncWhenUpdatingFeedsChanged:
    Q_EMIT syncWhenUpdatingFeedsChanged();
    break;
  case signalSyncWhenPlayerstateChangesChanged:
    Q_EMIT syncWhenPlayerstateChangesChanged();
    break;
  case signalSyncProviderChanged:
    Q_EMIT syncProviderChanged();
    break;
  case signalSyncHostnameChanged:
    Q_EMIT syncHostnameChanged();
    break;
  case signalSyncUsernameChanged:
    Q_EMIT syncUsernameChanged();
    break;
  case signalSyncDeviceChanged:
    Q_EMIT syncDeviceChanged();
    break;
  case signalSyncDeviceNameChanged:
    Q_EMIT syncDeviceNameChanged();
    break;
  case signalProxyTypeChanged:
    Q_EMIT ProxyTypeChanged();
    break;
  case signalProxyHostChanged:
    Q_EMIT ProxyHostChanged();
    break;
  case signalProxyPortChanged:
    Q_EMIT ProxyPortChanged();
    break;
  case signalProxyUserChanged:
    Q_EMIT ProxyUserChanged();
    break;
  case signalProxyPasswordChanged:
    Q_EMIT ProxyPasswordChanged();
    break;
  }
}
