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

#include "nowlisteningsettings.h"

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

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

  return s_globalNowListeningSettings()->q;
}

NowListeningSettings::NowListeningSettings( )
  : KConfigSkeleton( QStringLiteral( "choqokrc" ) )
{
  Q_ASSERT(!s_globalNowListeningSettings()->q);
  s_globalNowListeningSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Now Listening Plugin" ) );

  mTemplateStringItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "templateString" ), mTemplateString, QString::fromUtf8( "ᐅ %title% by %artist% from %album% [%player%]" ) );
  addItem( mTemplateStringItem, QStringLiteral( "templateString" ) );
}

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

