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

#include "mediaplayerpluginsettings.h"

#include <kglobal.h>
#include <QtCore/QFile>

using namespace kt;

namespace kt {

class MediaPlayerPluginSettingsHelper
{
  public:
    MediaPlayerPluginSettingsHelper() : q(0) {}
    ~MediaPlayerPluginSettingsHelper() { delete q; }
    MediaPlayerPluginSettings *q;
};
}

K_GLOBAL_STATIC(MediaPlayerPluginSettingsHelper, s_globalMediaPlayerPluginSettings)
MediaPlayerPluginSettings *MediaPlayerPluginSettings::self()
{
  if (!s_globalMediaPlayerPluginSettings->q) {
    new MediaPlayerPluginSettings;
    s_globalMediaPlayerPluginSettings->q->readConfig();
  }

  return s_globalMediaPlayerPluginSettings->q;
}

MediaPlayerPluginSettings::MediaPlayerPluginSettings(  )
  : KConfigSkeleton( QLatin1String( "ktmediaplayerpluginrc" ) )
{
  Q_ASSERT(!s_globalMediaPlayerPluginSettings->q);
  s_globalMediaPlayerPluginSettings->q = this;
  setCurrentGroup( QLatin1String( "general" ) );

  KConfigSkeleton::ItemBool  *itemSkipVideos;
  itemSkipVideos = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "skipVideos" ), mSkipVideos, true );
  addItem( itemSkipVideos, QLatin1String( "skipVideos" ) );
  KConfigSkeleton::ItemBool  *itemSkipIncomplete;
  itemSkipIncomplete = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "skipIncomplete" ), mSkipIncomplete, true );
  addItem( itemSkipIncomplete, QLatin1String( "skipIncomplete" ) );
}

MediaPlayerPluginSettings::~MediaPlayerPluginSettings()
{
  if (!s_globalMediaPlayerPluginSettings.isDestroyed()) {
    s_globalMediaPlayerPluginSettings->q = 0;
  }
}

