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

#include "settings.h"

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

class SettingsHelper
{
  public:
    SettingsHelper() : q(0) {}
    ~SettingsHelper() { delete q; }
    Settings *q;
};
K_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
Settings *Settings::self()
{
  if (!s_globalSettings->q) {
    new Settings;
    s_globalSettings->q->readConfig();
  }

  return s_globalSettings->q;
}

Settings::Settings(  )
  : KConfigSkeleton( QLatin1String( "krdcrc" ) )
{
  Q_ASSERT(!s_globalSettings->q);
  s_globalSettings->q = this;
  setCurrentGroup( QLatin1String( "General" ) );

  KConfigSkeleton::ItemBool  *itemRememberSessions;
  itemRememberSessions = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "RememberSessions" ), mRememberSessions, false );
  addItem( itemRememberSessions, QLatin1String( "RememberSessions" ) );
  KConfigSkeleton::ItemBool  *itemRememberHistory;
  itemRememberHistory = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "RememberHistory" ), mRememberHistory, true );
  addItem( itemRememberHistory, QLatin1String( "RememberHistory" ) );
  KConfigSkeleton::ItemStringList  *itemOpenSessions;
  itemOpenSessions = new KConfigSkeleton::ItemStringList( currentGroup(), QLatin1String( "Items" ), mOpenSessions );
  addItem( itemOpenSessions, QLatin1String( "OpenSessions" ) );
  KConfigSkeleton::ItemBool  *itemNormalUrlInputLine;
  itemNormalUrlInputLine = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "NormalUrlInputLine" ), mNormalUrlInputLine, true );
  addItem( itemNormalUrlInputLine, QLatin1String( "NormalUrlInputLine" ) );
  KConfigSkeleton::ItemBool  *itemShowPreferencesForNewConnections;
  itemShowPreferencesForNewConnections = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ShowPreferencesForNewConnections" ), mShowPreferencesForNewConnections, true );
  addItem( itemShowPreferencesForNewConnections, QLatin1String( "ShowPreferencesForNewConnections" ) );
  KConfigSkeleton::ItemBool  *itemResizeOnConnect;
  itemResizeOnConnect = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ResizeOnConnect" ), mResizeOnConnect, true );
  addItem( itemResizeOnConnect, QLatin1String( "ResizeOnConnect" ) );
  KConfigSkeleton::ItemBool  *itemFullscreenOnConnect;
  itemFullscreenOnConnect = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "FullscreenOnConnect" ), mFullscreenOnConnect, false );
  addItem( itemFullscreenOnConnect, QLatin1String( "FullscreenOnConnect" ) );
  KConfigSkeleton::ItemColor  *itemBackgroundColor;
  itemBackgroundColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "BackgroundColor" ), mBackgroundColor, QColor( "#00417F" ) );
  addItem( itemBackgroundColor, QLatin1String( "BackgroundColor" ) );
  KConfigSkeleton::ItemBool  *itemWalletSupport;
  itemWalletSupport = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "WalletSupport" ), mWalletSupport, true );
  addItem( itemWalletSupport, QLatin1String( "WalletSupport" ) );
  KConfigSkeleton::ItemBool  *itemSystemTrayIcon;
  itemSystemTrayIcon = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "SystemTrayIcon" ), mSystemTrayIcon, false );
  addItem( itemSystemTrayIcon, QLatin1String( "SystemTrayIcon" ) );
  KConfigSkeleton::ItemBool  *itemKeepAspectRatio;
  itemKeepAspectRatio = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "KeepAspectRatio" ), mKeepAspectRatio, true );
  addItem( itemKeepAspectRatio, QLatin1String( "KeepAspectRatio" ) );
  KConfigSkeleton::ItemBool  *itemTabCloseButton;
  itemTabCloseButton = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "TabCloseButton" ), mTabCloseButton, true );
  addItem( itemTabCloseButton, QLatin1String( "TabCloseButton" ) );
  KConfigSkeleton::ItemBool  *itemTabMiddleClick;
  itemTabMiddleClick = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "TabMiddleClick" ), mTabMiddleClick, true );
  addItem( itemTabMiddleClick, QLatin1String( "TabMiddleClick" ) );
  KConfigSkeleton::ItemInt  *itemTabPosition;
  itemTabPosition = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "TabPosition" ), mTabPosition, 0 );
  addItem( itemTabPosition, QLatin1String( "TabPosition" ) );
  KConfigSkeleton::ItemBool  *itemShowTabBar;
  itemShowTabBar = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ShowTabBar" ), mShowTabBar, false );
  addItem( itemShowTabBar, QLatin1String( "ShowTabBar" ) );
  KConfigSkeleton::ItemBool  *itemShowStatusBar;
  itemShowStatusBar = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ShowStatusBar" ), mShowStatusBar, false );
  addItem( itemShowStatusBar, QLatin1String( "ShowStatusBar" ) );
  KConfigSkeleton::ItemInt  *itemConnectionListSortColumn;
  itemConnectionListSortColumn = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "ConnectionListSortColumn" ), mConnectionListSortColumn, 2 );
  addItem( itemConnectionListSortColumn, QLatin1String( "ConnectionListSortColumn" ) );
  KConfigSkeleton::ItemInt  *itemConnectionListSortOrder;
  itemConnectionListSortOrder = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "ConnectionListSortOrder" ), mConnectionListSortOrder, 1 );
  addItem( itemConnectionListSortOrder, QLatin1String( "ConnectionListSortOrder" ) );

  setCurrentGroup( QLatin1String( "VNC" ) );

  KConfigSkeleton::ItemInt  *itemQuality;
  itemQuality = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Quality" ), mQuality, 1 );
  addItem( itemQuality, QLatin1String( "Quality" ) );
  KConfigSkeleton::ItemBool  *itemScaling;
  itemScaling = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Scaling" ), mScaling, false );
  addItem( itemScaling, QLatin1String( "Scaling" ) );
  KConfigSkeleton::ItemInt  *itemScalingWidth;
  itemScalingWidth = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "ScalingWidth" ), mScalingWidth, 800 );
  addItem( itemScalingWidth, QLatin1String( "ScalingWidth" ) );
  KConfigSkeleton::ItemInt  *itemScalingHeight;
  itemScalingHeight = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "ScalingHeight" ), mScalingHeight, 600 );
  addItem( itemScalingHeight, QLatin1String( "ScalingHeight" ) );

  setCurrentGroup( QLatin1String( "RDP" ) );

  KConfigSkeleton::ItemInt  *itemWidth;
  itemWidth = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Width" ), mWidth, 800 );
  addItem( itemWidth, QLatin1String( "Width" ) );
  KConfigSkeleton::ItemInt  *itemHeight;
  itemHeight = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Height" ), mHeight, 600 );
  addItem( itemHeight, QLatin1String( "Height" ) );
  KConfigSkeleton::ItemInt  *itemKeyboardLayout;
  itemKeyboardLayout = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "KeyboardLayout" ), mKeyboardLayout, 7 );
  addItem( itemKeyboardLayout, QLatin1String( "KeyboardLayout" ) );
  KConfigSkeleton::ItemInt  *itemColorDepth;
  itemColorDepth = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "ColorDepth" ), mColorDepth, 2 );
  addItem( itemColorDepth, QLatin1String( "ColorDepth" ) );
  KConfigSkeleton::ItemInt  *itemSound;
  itemSound = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Sound" ), mSound, 0 );
  addItem( itemSound, QLatin1String( "Sound" ) );
  KConfigSkeleton::ItemBool  *itemConsole;
  itemConsole = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Console" ), mConsole, false );
  addItem( itemConsole, QLatin1String( "Console" ) );
  KConfigSkeleton::ItemString  *itemExtraOptions;
  itemExtraOptions = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "ExtraOptions" ), mExtraOptions );
  addItem( itemExtraOptions, QLatin1String( "ExtraOptions" ) );
  KConfigSkeleton::ItemString  *itemDefaultRdpUserName;
  itemDefaultRdpUserName = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "DefaultRdpUserName" ), mDefaultRdpUserName );
  addItem( itemDefaultRdpUserName, QLatin1String( "DefaultRdpUserName" ) );
  KConfigSkeleton::ItemBool  *itemRecognizeLdapLogins;
  itemRecognizeLdapLogins = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "RecognizeLdapLogins" ), mRecognizeLdapLogins, true );
  addItem( itemRecognizeLdapLogins, QLatin1String( "RecognizeLdapLogins" ) );
  KConfigSkeleton::ItemBool  *itemRemoteFX;
  itemRemoteFX = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "RemoteFX" ), mRemoteFX, true );
  addItem( itemRemoteFX, QLatin1String( "RemoteFX" ) );
  KConfigSkeleton::ItemInt  *itemPerformance;
  itemPerformance = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Performance" ), mPerformance, 2 );
  addItem( itemPerformance, QLatin1String( "Performance" ) );
  KConfigSkeleton::ItemString  *itemShareMedia;
  itemShareMedia = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "ShareMedia" ), mShareMedia, QLatin1String( "/media" ) );
  addItem( itemShareMedia, QLatin1String( "ShareMedia" ) );

  setCurrentGroup( QLatin1String( "NX" ) );

  KConfigSkeleton::ItemInt  *itemNxWidth;
  itemNxWidth = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "NxWidth" ), mNxWidth, 800 );
  addItem( itemNxWidth, QLatin1String( "NxWidth" ) );
  KConfigSkeleton::ItemInt  *itemNxHeight;
  itemNxHeight = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "NxHeight" ), mNxHeight, 600 );
  addItem( itemNxHeight, QLatin1String( "NxHeight" ) );
  KConfigSkeleton::ItemInt  *itemNxDesktopType;
  itemNxDesktopType = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "NxDesktopType" ), mNxDesktopType, 0 );
  addItem( itemNxDesktopType, QLatin1String( "NxDesktopType" ) );
  KConfigSkeleton::ItemInt  *itemNxKeyboardLayout;
  itemNxKeyboardLayout = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "NxKeyboardLayout" ), mNxKeyboardLayout, 7 );
  addItem( itemNxKeyboardLayout, QLatin1String( "NxKeyboardLayout" ) );
  KConfigSkeleton::ItemString  *itemNxPrivateKey;
  itemNxPrivateKey = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "NxPrivateKey" ), mNxPrivateKey, QLatin1String( "default" ) );
  addItem( itemNxPrivateKey, QLatin1String( "NxPrivateKey" ) );
}

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

