// This file is generated by kconfig_compiler_kf5 from krdc.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; }
    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( "krdcrc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

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

  setCurrentGroup( QStringLiteral( "VNC" ) );

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

  setCurrentGroup( QStringLiteral( "RDP" ) );

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

  setCurrentGroup( QStringLiteral( "NX" ) );

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

Settings::~Settings()
{
  s_globalSettings()->q = nullptr;
}

