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

#include "settings.h"

#include <klocalizedstring.h>

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

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

  return s_globalSettings()->q;
}

Settings::Settings( )
  : KConfigSkeleton()
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Global" ) );

  mShowTicksItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Tickmarks" ), mShowTicks, true );
  mShowTicksItem->setLabel( i18n("Tickmarks") );
  addItem( mShowTicksItem, QStringLiteral( "ShowTicks" ) );
  mShowLabelsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Labels" ), mShowLabels, true );
  mShowLabelsItem->setLabel( i18n("Labels") );
  addItem( mShowLabelsItem, QStringLiteral( "ShowLabels" ) );
  mVolumeOverdriveItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "VolumeOverdrive" ), mVolumeOverdrive, false );
  mVolumeOverdriveItem->setLabel( i18n("VolumeOverdrive") );
  addItem( mVolumeOverdriveItem, QStringLiteral( "VolumeOverdrive" ) );
  mBeepOnVolumeChangeItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "VolumeFeedback" ), mBeepOnVolumeChange, false );
  mBeepOnVolumeChangeItem->setLabel( i18n("VolumeFeedback") );
  addItem( mBeepOnVolumeChangeItem, QStringLiteral( "BeepOnVolumeChange" ) );
  mVolumePercentageStepItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "VolumePercentageStep" ), mVolumePercentageStep, 5 );
  mVolumePercentageStepItem->setLabel( i18n("VolumePercentageStep") );
  addItem( mVolumePercentageStepItem, QStringLiteral( "VolumePercentageStep" ) );
  mOrientationMainWindowItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Orientation" ), mOrientationMainWindow, Qt::Vertical );
  mOrientationMainWindowItem->setLabel( i18n("Orientation") );
  addItem( mOrientationMainWindowItem, QStringLiteral( "OrientationMainWindow" ) );
  mOrientationTrayPopupItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "OrientationTrayPopup" ), mOrientationTrayPopup, Qt::Vertical );
  mOrientationTrayPopupItem->setLabel( i18n("OrientationTrayPopup") );
  addItem( mOrientationTrayPopupItem, QStringLiteral( "OrientationTrayPopup" ) );
  mShowOSDItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showOSD" ), mShowOSD, true );
  mShowOSDItem->setLabel( i18n("showOSD") );
  addItem( mShowOSDItem, QStringLiteral( "ShowOSD" ) );
  mShowDockWidgetItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AllowDocking" ), mShowDockWidget, true );
  mShowDockWidgetItem->setLabel( i18n("AllowDocking") );
  addItem( mShowDockWidgetItem, QStringLiteral( "ShowDockWidget" ) );
  mStartRestoreItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "startkdeRestore" ), mStartRestore, true );
  mStartRestoreItem->setLabel( i18n("startkdeRestore") );
  addItem( mStartRestoreItem, QStringLiteral( "StartRestore" ) );
  mAutoStartItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoStart" ), mAutoStart, true );
  mAutoStartItem->setLabel( i18n("AutoStart") );
  addItem( mAutoStartItem, QStringLiteral( "AutoStart" ) );
  mConfigVersionItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "ConfigVersion" ), mConfigVersion );
  mConfigVersionItem->setLabel( i18n("ConfigVersion") );
  addItem( mConfigVersionItem, QStringLiteral( "ConfigVersion" ) );
  mSizeItem = new KConfigSkeleton::ItemSize( currentGroup(), QStringLiteral( "Size" ), mSize );
  mSizeItem->setLabel( i18n("Size") );
  addItem( mSizeItem, QStringLiteral( "Size" ) );
  mPositionItem = new KConfigSkeleton::ItemPoint( currentGroup(), QStringLiteral( "Position" ), mPosition );
  mPositionItem->setLabel( i18n("Position") );
  addItem( mPositionItem, QStringLiteral( "Position" ) );
  mVisibleItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Visible" ), mVisible );
  mVisibleItem->setLabel( i18n("Visible") );
  addItem( mVisibleItem, QStringLiteral( "Visible" ) );
  mMenubarItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Menubar" ), mMenubar, true );
  mMenubarItem->setLabel( i18n("Menubar") );
  addItem( mMenubarItem, QStringLiteral( "Menubar" ) );
  mMixersForSoundMenuItem = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "Soundmenu.Mixers" ), mMixersForSoundMenu );
  mMixersForSoundMenuItem->setLabel( i18n("Soundmenu.Mixers") );
  addItem( mMixersForSoundMenuItem, QStringLiteral( "MixersForSoundMenu" ) );
  mDefaultCardOnStartItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "DefaultCardOnStart" ), mDefaultCardOnStart );
  mDefaultCardOnStartItem->setLabel( i18n("DefaultCardOnStart") );
  addItem( mDefaultCardOnStartItem, QStringLiteral( "DefaultCardOnStart" ) );
  mAutoUseMultimediaKeysItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoUseMultimediaKeys" ), mAutoUseMultimediaKeys, true );
  mAutoUseMultimediaKeysItem->setLabel( i18n("AutoUseMultimediaKeys") );
  addItem( mAutoUseMultimediaKeysItem, QStringLiteral( "AutoUseMultimediaKeys" ) );
  mMasterMixerItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "MasterMixer" ), mMasterMixer );
  mMasterMixerItem->setLabel( i18n("MasterMixer") );
  addItem( mMasterMixerItem, QStringLiteral( "MasterMixer" ) );
  mMasterMixerDeviceItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "MasterMixerDevice" ), mMasterMixerDevice );
  mMasterMixerDeviceItem->setLabel( i18n("MasterMixerDevice") );
  addItem( mMasterMixerDeviceItem, QStringLiteral( "MasterMixerDevice" ) );
  mMixerIgnoreExpressionItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "MixerIgnoreExpression" ), mMixerIgnoreExpression );
  mMixerIgnoreExpressionItem->setLabel( i18n("MixerIgnoreExpression") );
  addItem( mMixerIgnoreExpressionItem, QStringLiteral( "MixerIgnoreExpression" ) );
  mMultiDriverItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "MultiDriver" ), mMultiDriver, false );
  mMultiDriverItem->setLabel( i18n("MultiDriver") );
  addItem( mMultiDriverItem, QStringLiteral( "MultiDriver" ) );
  mBackendsItem = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "Backends" ), mBackends );
  mBackendsItem->setLabel( i18n("Backends") );
  addItem( mBackendsItem, QStringLiteral( "Backends" ) );

  setCurrentGroup( QStringLiteral( "Debug" ) );

  mDebugControlManagerItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "DebugControlManager" ), mDebugControlManager, false );
  mDebugControlManagerItem->setLabel( i18n("DebugControlManager") );
  addItem( mDebugControlManagerItem, QStringLiteral( "DebugControlManager" ) );
  mDebugGuiItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "DebugGui" ), mDebugGui, false );
  mDebugGuiItem->setLabel( i18n("DebugGui") );
  addItem( mDebugGuiItem, QStringLiteral( "DebugGui" ) );
  mDebugVolumeItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "DebugVolume" ), mDebugVolume, false );
  mDebugVolumeItem->setLabel( i18n("DebugVolume") );
  addItem( mDebugVolumeItem, QStringLiteral( "DebugVolume" ) );
  mDebugConfigItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "DebugConfig" ), mDebugConfig, false );
  mDebugConfigItem->setLabel( i18n("DebugConfig") );
  addItem( mDebugConfigItem, QStringLiteral( "DebugConfig" ) );
}

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

