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

#include "settings.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( QStringLiteral( "artikulaterc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "artikulate" ) );

  KConfigSkeleton::ItemBool  *itemShowMenuBar;
  itemShowMenuBar = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowMenuBar" ), mShowMenuBar, false );
  addItem( itemShowMenuBar, QStringLiteral( "ShowMenuBar" ) );
  KConfigSkeleton::ItemBool  *itemUseCourseRepository;
  itemUseCourseRepository = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseCourseRepository" ), mUseCourseRepository, false );
  addItem( itemUseCourseRepository, QStringLiteral( "UseCourseRepository" ) );
  KConfigSkeleton::ItemString  *itemCourseRepositoryPath;
  itemCourseRepositoryPath = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "CourseRepositoryPath" ), mCourseRepositoryPath );
  addItem( itemCourseRepositoryPath, QStringLiteral( "CourseRepositoryPath" ) );
  KConfigSkeleton::ItemString  *itemAudioInputDevice;
  itemAudioInputDevice = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "AudioInputDevice" ), mAudioInputDevice );
  addItem( itemAudioInputDevice, QStringLiteral( "AudioInputDevice" ) );
  KConfigSkeleton::ItemInt  *itemAudioInputVolume;
  itemAudioInputVolume = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "AudioInputVolume" ), mAudioInputVolume, 10 );
  addItem( itemAudioInputVolume, QStringLiteral( "AudioInputVolume" ) );
  KConfigSkeleton::ItemInt  *itemAudioOutputVolume;
  itemAudioOutputVolume = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "AudioOutputVolume" ), mAudioOutputVolume, 10 );
  addItem( itemAudioOutputVolume, QStringLiteral( "AudioOutputVolume" ) );
QFont defaultFont = QFont();
            defaultFont.setPointSize(20);
      
  KConfigSkeleton::ItemFont  *itemTrainingPhraseFont;
  itemTrainingPhraseFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "TrainingPhraseFont" ), mTrainingPhraseFont, defaultFont );
  addItem( itemTrainingPhraseFont, QStringLiteral( "TrainingPhraseFont" ) );
  KConfigSkeleton::ItemString  *itemRecordingBackend;
  itemRecordingBackend = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "RecordingBackend" ), mRecordingBackend, QStringLiteral( "qtmultimediabackend" ) );
  addItem( itemRecordingBackend, QStringLiteral( "RecordingBackend" ) );
}

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

