// This file is generated by kconfig_compiler_kf6 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() noexcept : q(nullptr) {}
    ~SettingsHelper() noexcept { delete q; q = nullptr; }
    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::ItemBool  *itemGrabAllKeysOnFullscreen;
  itemGrabAllKeysOnFullscreen = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "GrabAllKeysOnFullscreen" ), mGrabAllKeysOnFullscreen, true );
  addItem( itemGrabAllKeysOnFullscreen, QStringLiteral( "GrabAllKeysOnFullscreen" ) );
  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, 1920 );
  addItem( itemWidth, QStringLiteral( "Width" ) );
  KConfigSkeleton::ItemInt  *itemHeight;
  itemHeight = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Height" ), mHeight, 1080 );
  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, 3 );
  addItem( itemResolution, QStringLiteral( "Resolution" ) );
  KConfigSkeleton::ItemInt  *itemAcceleration;
  itemAcceleration = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Acceleration" ), mAcceleration, 0 );
  addItem( itemAcceleration, QStringLiteral( "Acceleration" ) );
  KConfigSkeleton::ItemInt  *itemColorDepth;
  itemColorDepth = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "ColorDepth" ), mColorDepth, 0 );
  addItem( itemColorDepth, QStringLiteral( "ColorDepth" ) );
  KConfigSkeleton::ItemInt  *itemDesktopScaleFactor;
  itemDesktopScaleFactor = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "DesktopScaleFactor" ), mDesktopScaleFactor, 0 );
  addItem( itemDesktopScaleFactor, QStringLiteral( "DesktopScaleFactor" ) );
  KConfigSkeleton::ItemInt  *itemDesktopScaleFactorCustom;
  itemDesktopScaleFactorCustom = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "DesktopScaleFactorCustom" ), mDesktopScaleFactorCustom, 100 );
  addItem( itemDesktopScaleFactorCustom, QStringLiteral( "DesktopScaleFactorCustom" ) );
  KConfigSkeleton::ItemInt  *itemDeviceScaleFactor;
  itemDeviceScaleFactor = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "DeviceScaleFactor" ), mDeviceScaleFactor, 0 );
  addItem( itemDeviceScaleFactor, QStringLiteral( "DeviceScaleFactor" ) );
  KConfigSkeleton::ItemInt  *itemSound;
  itemSound = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Sound" ), mSound, 0 );
  addItem( itemSound, QStringLiteral( "Sound" ) );
  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::ItemString  *itemShareMedia;
  itemShareMedia = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ShareMedia" ), mShareMedia, QStringLiteral( "/media" ) );
  addItem( itemShareMedia, QStringLiteral( "ShareMedia" ) );
  KConfigSkeleton::ItemBool  *itemScaleToSize;
  itemScaleToSize = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ScaleToSize" ), mScaleToSize, true );
  addItem( itemScaleToSize, QStringLiteral( "ScaleToSize" ) );
  KConfigSkeleton::ItemBool  *itemConsoleMode;
  itemConsoleMode = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ConsoleMode" ), mConsoleMode, false );
  addItem( itemConsoleMode, QStringLiteral( "ConsoleMode" ) );
  KConfigSkeleton::ItemBool  *itemPreventSessionLock;
  itemPreventSessionLock = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "PreventSessionLock" ), mPreventSessionLock, false );
  addItem( itemPreventSessionLock, QStringLiteral( "PreventSessionLock" ) );
  KConfigSkeleton::ItemInt  *itemTlsSecLevel;
  itemTlsSecLevel = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "TlsSecLevel" ), mTlsSecLevel, 1 );
  addItem( itemTlsSecLevel, QStringLiteral( "TlsSecLevel" ) );
  KConfigSkeleton::ItemInt  *itemProxyProtocol;
  itemProxyProtocol = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "ProxyProtocol" ), mProxyProtocol, 0 );
  addItem( itemProxyProtocol, QStringLiteral( "ProxyProtocol" ) );
  KConfigSkeleton::ItemString  *itemProxyUsername;
  itemProxyUsername = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ProxyUsername" ), mProxyUsername );
  addItem( itemProxyUsername, QStringLiteral( "ProxyUsername" ) );
  KConfigSkeleton::ItemString  *itemProxyPassword;
  itemProxyPassword = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ProxyPassword" ), mProxyPassword );
  addItem( itemProxyPassword, QStringLiteral( "ProxyPassword" ) );
  KConfigSkeleton::ItemString  *itemProxyHost;
  itemProxyHost = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ProxyHost" ), mProxyHost );
  addItem( itemProxyHost, QStringLiteral( "ProxyHost" ) );
  KConfigSkeleton::ItemInt  *itemGatewayTransportType;
  itemGatewayTransportType = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "GatewayTransportType" ), mGatewayTransportType, 0 );
  addItem( itemGatewayTransportType, QStringLiteral( "GatewayTransportType" ) );
  KConfigSkeleton::ItemString  *itemGatewayUsername;
  itemGatewayUsername = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "GatewayUsername" ), mGatewayUsername );
  addItem( itemGatewayUsername, QStringLiteral( "GatewayUsername" ) );
  KConfigSkeleton::ItemString  *itemGatewayPassword;
  itemGatewayPassword = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "GatewayPassword" ), mGatewayPassword );
  addItem( itemGatewayPassword, QStringLiteral( "GatewayPassword" ) );
  KConfigSkeleton::ItemString  *itemGatewayServer;
  itemGatewayServer = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "GatewayServer" ), mGatewayServer );
  addItem( itemGatewayServer, QStringLiteral( "GatewayServer" ) );
  KConfigSkeleton::ItemString  *itemGatewayDomain;
  itemGatewayDomain = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "GatewayDomain" ), mGatewayDomain );
  addItem( itemGatewayDomain, QStringLiteral( "GatewayDomain" ) );
  KConfigSkeleton::ItemString  *itemSmartcardName;
  itemSmartcardName = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "SmartcardName" ), mSmartcardName );
  addItem( itemSmartcardName, QStringLiteral( "SmartcardName" ) );
  KConfigSkeleton::ItemBool  *itemSecurityNLA;
  itemSecurityNLA = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SecurityNLA" ), mSecurityNLA, true );
  addItem( itemSecurityNLA, QStringLiteral( "SecurityNLA" ) );
  KConfigSkeleton::ItemBool  *itemSecurityTLS;
  itemSecurityTLS = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SecurityTLS" ), mSecurityTLS, true );
  addItem( itemSecurityTLS, QStringLiteral( "SecurityTLS" ) );
  KConfigSkeleton::ItemBool  *itemSecurityRDP;
  itemSecurityRDP = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SecurityRDP" ), mSecurityRDP, true );
  addItem( itemSecurityRDP, QStringLiteral( "SecurityRDP" ) );
  KConfigSkeleton::ItemBool  *itemSecurityEXT;
  itemSecurityEXT = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SecurityEXT" ), mSecurityEXT, false );
  addItem( itemSecurityEXT, QStringLiteral( "SecurityEXT" ) );
  KConfigSkeleton::ItemString  *itemAuthPkgList;
  itemAuthPkgList = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "AuthPkgList" ), mAuthPkgList );
  addItem( itemAuthPkgList, QStringLiteral( "AuthPkgList" ) );

  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()
{
  if (s_globalSettings.exists() && !s_globalSettings.isDestroyed()) {
    s_globalSettings()->q = nullptr;
  }
}

