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

#include "krfbconfig.h"

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

class KrfbConfigHelper
{
  public:
    KrfbConfigHelper() : q(0) {}
    ~KrfbConfigHelper() { delete q; }
    KrfbConfig *q;
};
K_GLOBAL_STATIC(KrfbConfigHelper, s_globalKrfbConfig)
KrfbConfig *KrfbConfig::self()
{
  if (!s_globalKrfbConfig->q) {
    new KrfbConfig;
    s_globalKrfbConfig->q->readConfig();
  }

  return s_globalKrfbConfig->q;
}

KrfbConfig::KrfbConfig(  )
  : KConfigSkeleton()
{
  Q_ASSERT(!s_globalKrfbConfig->q);
  s_globalKrfbConfig->q = this;
  setCurrentGroup( QLatin1String( "TCP" ) );

  KConfigSkeleton::ItemBool  *itemUseDefaultPort;
  itemUseDefaultPort = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "useDefaultPort" ), mUseDefaultPort, true );
  addItem( itemUseDefaultPort, QLatin1String( "useDefaultPort" ) );
  KConfigSkeleton::ItemInt  *itemPort;
  itemPort = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "port" ), mPort, 5900 );
  addItem( itemPort, QLatin1String( "port" ) );
  KConfigSkeleton::ItemBool  *itemPublishService;
  itemPublishService = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "publishService" ), mPublishService, true );
  addItem( itemPublishService, QLatin1String( "publishService" ) );

  setCurrentGroup( QLatin1String( "Security" ) );

  KConfigSkeleton::ItemBool  *itemAllowDesktopControl;
  itemAllowDesktopControl = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "allowDesktopControl" ), mAllowDesktopControl, true );
  addItem( itemAllowDesktopControl, QLatin1String( "allowDesktopControl" ) );
  KConfigSkeleton::ItemBool  *itemAllowUnattendedAccess;
  itemAllowUnattendedAccess = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "allowUnattendedAccess" ), mAllowUnattendedAccess, false );
  addItem( itemAllowUnattendedAccess, QLatin1String( "allowUnattendedAccess" ) );
  KConfigSkeleton::ItemString  *itemUnattendedAccessPassword;
  itemUnattendedAccessPassword = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "unattendedAccessPassword" ), mUnattendedAccessPassword );
  addItem( itemUnattendedAccessPassword, QLatin1String( "unattendedAccessPassword" ) );
  KConfigSkeleton::ItemString  *itemDesktopSharingPassword;
  itemDesktopSharingPassword = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "desktopSharingPassword" ), mDesktopSharingPassword );
  addItem( itemDesktopSharingPassword, QLatin1String( "desktopSharingPassword" ) );

  setCurrentGroup( QLatin1String( "FrameBuffer" ) );

  KConfigSkeleton::ItemString  *itemPreferredFrameBufferPlugin;
  itemPreferredFrameBufferPlugin = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "preferredFrameBufferPlugin" ), mPreferredFrameBufferPlugin, QLatin1String( "krfb_framebuffer_x11" ) );
  addItem( itemPreferredFrameBufferPlugin, QLatin1String( "preferredFrameBufferPlugin" ) );
}

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

