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

#include "neochatconfig.h"

#include <qglobal.h>
#include <QFile>
#include <QQmlEngine>

class NeoChatConfigHelper
{
  public:
    NeoChatConfigHelper() noexcept : q(nullptr) {}
    ~NeoChatConfigHelper() noexcept { delete q; q = nullptr; }
    NeoChatConfigHelper(const NeoChatConfigHelper&) = delete;
    NeoChatConfigHelper& operator=(const NeoChatConfigHelper&) = delete;
    NeoChatConfig *q;
};
Q_GLOBAL_STATIC(NeoChatConfigHelper, s_globalNeoChatConfig)
NeoChatConfig *NeoChatConfig::self()
{
  if (!s_globalNeoChatConfig()->q) {
    new NeoChatConfig;
    s_globalNeoChatConfig()->q->read();
  }

  return s_globalNeoChatConfig()->q;
}

NeoChatConfig *NeoChatConfig::create(QQmlEngine *, QJSEngine *)
{
  QQmlEngine::setObjectOwnership(self(), QQmlEngine::CppOwnership);
  return self();
}

NeoChatConfig::NeoChatConfig( QObject *parent )
  : KConfigSkeleton( QStringLiteral( "neochatrc" ) )
{
  setParent(parent);
  Q_ASSERT(!s_globalNeoChatConfig()->q);
  s_globalNeoChatConfig()->q = this;
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&NeoChatConfig::itemChanged);

  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigCompilerSignallingItem  *itemAllRoomsInHome;
  KConfigSkeleton::ItemBool  *innerItemAllRoomsInHome;
  innerItemAllRoomsInHome = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AllRoomsInHome" ), mAllRoomsInHome, false );
  itemAllRoomsInHome = new KConfigCompilerSignallingItem(innerItemAllRoomsInHome, this, notifyFunction, signalAllRoomsInHomeChanged);
  addItem( itemAllRoomsInHome, QStringLiteral( "AllRoomsInHome" ) );
  QList<int> defaultCollapsedSections;

  KConfigCompilerSignallingItem  *itemCollapsedSections;
  KConfigSkeleton::ItemIntList  *innerItemCollapsedSections;
  innerItemCollapsedSections = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "CollapsedSections" ), mCollapsedSections, defaultCollapsedSections );
  itemCollapsedSections = new KConfigCompilerSignallingItem(innerItemCollapsedSections, this, notifyFunction, signalCollapsedSectionsChanged);
  addItem( itemCollapsedSections, QStringLiteral( "CollapsedSections" ) );
  KConfigCompilerSignallingItem  *itemBlur;
  KConfigSkeleton::ItemBool  *innerItemBlur;
  innerItemBlur = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Blur" ), mBlur, false );
  itemBlur = new KConfigCompilerSignallingItem(innerItemBlur, this, notifyFunction, signalBlurChanged);
  addItem( itemBlur, QStringLiteral( "Blur" ) );
  KConfigCompilerSignallingItem  *itemTransparency;
  KConfigSkeleton::ItemDouble  *innerItemTransparency;
  innerItemTransparency = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "Transparency" ), mTransparency, 0.3 );
  itemTransparency = new KConfigCompilerSignallingItem(innerItemTransparency, this, notifyFunction, signalTransparencyChanged);
  addItem( itemTransparency, QStringLiteral( "Transparency" ) );
  KConfigCompilerSignallingItem  *itemAllowQuickEdit;
  KConfigSkeleton::ItemBool  *innerItemAllowQuickEdit;
  innerItemAllowQuickEdit = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AllowQuickEdit" ), mAllowQuickEdit, false );
  itemAllowQuickEdit = new KConfigCompilerSignallingItem(innerItemAllowQuickEdit, this, notifyFunction, signalAllowQuickEditChanged);
  addItem( itemAllowQuickEdit, QStringLiteral( "AllowQuickEdit" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesSendMessageWith;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Enter");
    valuesSendMessageWith.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("CtrlEnter");
    valuesSendMessageWith.append( choice );
  }
  KConfigCompilerSignallingItem  *itemSendMessageWith;
  KConfigSkeleton::ItemEnum  *innerItemSendMessageWith;
  innerItemSendMessageWith = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "SendMessageWith" ), mSendMessageWith, valuesSendMessageWith );
  itemSendMessageWith = new KConfigCompilerSignallingItem(innerItemSendMessageWith, this, notifyFunction, signalSendMessageWithChanged);
  addItem( itemSendMessageWith, QStringLiteral( "SendMessageWith" ) );
  KConfigCompilerSignallingItem  *itemShowLocalMessagesOnRight;
  KConfigSkeleton::ItemBool  *innerItemShowLocalMessagesOnRight;
  innerItemShowLocalMessagesOnRight = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowLocalMessagesOnRight" ), mShowLocalMessagesOnRight, true );
  itemShowLocalMessagesOnRight = new KConfigCompilerSignallingItem(innerItemShowLocalMessagesOnRight, this, notifyFunction, signalShowLocalMessagesOnRightChanged);
  addItem( itemShowLocalMessagesOnRight, QStringLiteral( "ShowLocalMessagesOnRight" ) );
  KConfigCompilerSignallingItem  *itemRoomDrawerWidth;
  KConfigSkeleton::ItemInt  *innerItemRoomDrawerWidth;
  innerItemRoomDrawerWidth = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "RoomDrawerWidth" ), mRoomDrawerWidth, -1 );
  itemRoomDrawerWidth = new KConfigCompilerSignallingItem(innerItemRoomDrawerWidth, this, notifyFunction, signalRoomDrawerWidthChanged);
  addItem( itemRoomDrawerWidth, QStringLiteral( "RoomDrawerWidth" ) );
  KConfigCompilerSignallingItem  *itemTypingNotifications;
  KConfigSkeleton::ItemBool  *innerItemTypingNotifications;
  innerItemTypingNotifications = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "TypingNotifications" ), mTypingNotifications, true );
  itemTypingNotifications = new KConfigCompilerSignallingItem(innerItemTypingNotifications, this, notifyFunction, signalTypingNotificationsChanged);
  addItem( itemTypingNotifications, QStringLiteral( "TypingNotifications" ) );
  KConfigCompilerSignallingItem  *itemPublicReadReceipts;
  KConfigSkeleton::ItemBool  *innerItemPublicReadReceipts;
  innerItemPublicReadReceipts = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "PublicReadReceipts" ), mPublicReadReceipts, true );
  itemPublicReadReceipts = new KConfigCompilerSignallingItem(innerItemPublicReadReceipts, this, notifyFunction, signalPublicReadReceiptsChanged);
  addItem( itemPublicReadReceipts, QStringLiteral( "PublicReadReceipts" ) );
  KConfigCompilerSignallingItem  *itemAutoRoomInfoDrawer;
  KConfigSkeleton::ItemBool  *innerItemAutoRoomInfoDrawer;
  innerItemAutoRoomInfoDrawer = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoRoomInfoDrawer" ), mAutoRoomInfoDrawer, true );
  itemAutoRoomInfoDrawer = new KConfigCompilerSignallingItem(innerItemAutoRoomInfoDrawer, this, notifyFunction, signalAutoRoomInfoDrawerChanged);
  addItem( itemAutoRoomInfoDrawer, QStringLiteral( "AutoRoomInfoDrawer" ) );
  KConfigCompilerSignallingItem  *itemDeveloperTools;
  KConfigSkeleton::ItemBool  *innerItemDeveloperTools;
  innerItemDeveloperTools = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "DeveloperTools" ), mDeveloperTools, false );
  itemDeveloperTools = new KConfigCompilerSignallingItem(innerItemDeveloperTools, this, notifyFunction, signalDeveloperToolsChanged);
  addItem( itemDeveloperTools, QStringLiteral( "DeveloperTools" ) );
  KConfigCompilerSignallingItem  *itemLastSaveDirectory;
  KConfigSkeleton::ItemString  *innerItemLastSaveDirectory;
  innerItemLastSaveDirectory = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "LastSaveDirectory" ), mLastSaveDirectory );
  itemLastSaveDirectory = new KConfigCompilerSignallingItem(innerItemLastSaveDirectory, this, notifyFunction, signalLastSaveDirectoryChanged);
  addItem( itemLastSaveDirectory, QStringLiteral( "LastSaveDirectory" ) );
  KConfigCompilerSignallingItem  *itemKeywordPushRuleDefault;
  KConfigSkeleton::ItemInt  *innerItemKeywordPushRuleDefault;
  innerItemKeywordPushRuleDefault = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "KeywordPushRuleDefault" ), mKeywordPushRuleDefault, 4 );
  itemKeywordPushRuleDefault = new KConfigCompilerSignallingItem(innerItemKeywordPushRuleDefault, this, notifyFunction, signalKeywordPushRuleDefaultChanged);
  addItem( itemKeywordPushRuleDefault, QStringLiteral( "KeywordPushRuleDefault" ) );

  setCurrentGroup( QStringLiteral( "Timeline" ) );

  KConfigCompilerSignallingItem  *itemFontScale;
  KConfigSkeleton::ItemDouble  *innerItemFontScale;
  innerItemFontScale = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "FontScale" ), mFontScale, 1.0 );
  itemFontScale = new KConfigCompilerSignallingItem(innerItemFontScale, this, notifyFunction, signalFontScaleChanged);
  addItem( itemFontScale, QStringLiteral( "FontScale" ) );
  KConfigCompilerSignallingItem  *itemShowAvatarInTimeline;
  KConfigSkeleton::ItemBool  *innerItemShowAvatarInTimeline;
  innerItemShowAvatarInTimeline = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowAvatarInTimeline" ), mShowAvatarInTimeline, true );
  itemShowAvatarInTimeline = new KConfigCompilerSignallingItem(innerItemShowAvatarInTimeline, this, notifyFunction, signalShowAvatarInTimelineChanged);
  addItem( itemShowAvatarInTimeline, QStringLiteral( "ShowAvatarInTimeline" ) );
  KConfigCompilerSignallingItem  *itemCompactLayout;
  KConfigSkeleton::ItemBool  *innerItemCompactLayout;
  innerItemCompactLayout = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "CompactLayout" ), mCompactLayout, false );
  itemCompactLayout = new KConfigCompilerSignallingItem(innerItemCompactLayout, this, notifyFunction, signalCompactLayoutChanged);
  addItem( itemCompactLayout, QStringLiteral( "CompactLayout" ) );
  KConfigCompilerSignallingItem  *itemCompactRoomList;
  KConfigSkeleton::ItemBool  *innerItemCompactRoomList;
  innerItemCompactRoomList = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "CompactRoomList" ), mCompactRoomList, false );
  itemCompactRoomList = new KConfigCompilerSignallingItem(innerItemCompactRoomList, this, notifyFunction, signalCompactRoomListChanged);
  addItem( itemCompactRoomList, QStringLiteral( "CompactRoomList" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesMarkReadCondition;
  KConfigCompilerSignallingItem  *itemMarkReadCondition;
  KConfigSkeleton::ItemEnum  *innerItemMarkReadCondition;
  innerItemMarkReadCondition = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "MarkReadCondition" ), mMarkReadCondition, valuesMarkReadCondition, 2 );
  itemMarkReadCondition = new KConfigCompilerSignallingItem(innerItemMarkReadCondition, this, notifyFunction, signalMarkReadConditionChanged);
  addItem( itemMarkReadCondition, QStringLiteral( "MarkReadCondition" ) );
  KConfigCompilerSignallingItem  *itemShowStateEvent;
  KConfigSkeleton::ItemBool  *innerItemShowStateEvent;
  innerItemShowStateEvent = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowStateEvent" ), mShowStateEvent, true );
  itemShowStateEvent = new KConfigCompilerSignallingItem(innerItemShowStateEvent, this, notifyFunction, signalShowStateEventChanged);
  addItem( itemShowStateEvent, QStringLiteral( "ShowStateEvent" ) );
  KConfigCompilerSignallingItem  *itemShowLeaveJoinEvent;
  KConfigSkeleton::ItemBool  *innerItemShowLeaveJoinEvent;
  innerItemShowLeaveJoinEvent = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowLeaveJoinEvent" ), mShowLeaveJoinEvent, true );
  itemShowLeaveJoinEvent = new KConfigCompilerSignallingItem(innerItemShowLeaveJoinEvent, this, notifyFunction, signalShowLeaveJoinEventChanged);
  addItem( itemShowLeaveJoinEvent, QStringLiteral( "ShowLeaveJoinEvent" ) );
  KConfigCompilerSignallingItem  *itemShowRename;
  KConfigSkeleton::ItemBool  *innerItemShowRename;
  innerItemShowRename = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowRename" ), mShowRename, false );
  itemShowRename = new KConfigCompilerSignallingItem(innerItemShowRename, this, notifyFunction, signalShowRenameChanged);
  addItem( itemShowRename, QStringLiteral( "ShowRename" ) );
  KConfigCompilerSignallingItem  *itemShowAvatarUpdate;
  KConfigSkeleton::ItemBool  *innerItemShowAvatarUpdate;
  innerItemShowAvatarUpdate = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowAvatarUpdate" ), mShowAvatarUpdate, false );
  itemShowAvatarUpdate = new KConfigCompilerSignallingItem(innerItemShowAvatarUpdate, this, notifyFunction, signalShowAvatarUpdateChanged);
  addItem( itemShowAvatarUpdate, QStringLiteral( "ShowAvatarUpdate" ) );
  KConfigCompilerSignallingItem  *itemShowDeletedMessages;
  KConfigSkeleton::ItemBool  *innerItemShowDeletedMessages;
  innerItemShowDeletedMessages = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowDeletedMessages" ), mShowDeletedMessages, false );
  itemShowDeletedMessages = new KConfigCompilerSignallingItem(innerItemShowDeletedMessages, this, notifyFunction, signalShowDeletedMessagesChanged);
  addItem( itemShowDeletedMessages, QStringLiteral( "ShowDeletedMessages" ) );
  KConfigCompilerSignallingItem  *itemHideImages;
  KConfigSkeleton::ItemBool  *innerItemHideImages;
  innerItemHideImages = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "HideImages" ), mHideImages, false );
  itemHideImages = new KConfigCompilerSignallingItem(innerItemHideImages, this, notifyFunction, signalHideImagesChanged);
  addItem( itemHideImages, QStringLiteral( "HideImages" ) );
  KConfigCompilerSignallingItem  *itemShowLinkPreview;
  KConfigSkeleton::ItemBool  *innerItemShowLinkPreview;
  innerItemShowLinkPreview = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowLinkPreview" ), mShowLinkPreview, true );
  itemShowLinkPreview = new KConfigCompilerSignallingItem(innerItemShowLinkPreview, this, notifyFunction, signalShowLinkPreviewChanged);
  addItem( itemShowLinkPreview, QStringLiteral( "ShowLinkPreview" ) );
  KConfigCompilerSignallingItem  *itemSystemTray;
  KConfigSkeleton::ItemBool  *innerItemSystemTray;
  innerItemSystemTray = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SystemTray" ), mSystemTray, false );
  itemSystemTray = new KConfigCompilerSignallingItem(innerItemSystemTray, this, notifyFunction, signalSystemTrayChanged);
  addItem( itemSystemTray, QStringLiteral( "SystemTray" ) );
  KConfigCompilerSignallingItem  *itemMinimizeToSystemTrayOnStartup;
  KConfigSkeleton::ItemBool  *innerItemMinimizeToSystemTrayOnStartup;
  innerItemMinimizeToSystemTrayOnStartup = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "MinimizeToSystemTrayOnStartup" ), mMinimizeToSystemTrayOnStartup, false );
  itemMinimizeToSystemTrayOnStartup = new KConfigCompilerSignallingItem(innerItemMinimizeToSystemTrayOnStartup, this, notifyFunction, signalMinimizeToSystemTrayOnStartupChanged);
  addItem( itemMinimizeToSystemTrayOnStartup, QStringLiteral( "MinimizeToSystemTrayOnStartup" ) );
  KConfigCompilerSignallingItem  *itemMediaMaxWidth;
  KConfigSkeleton::ItemInt  *innerItemMediaMaxWidth;
  innerItemMediaMaxWidth = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MediaMaxWidth" ), mMediaMaxWidth, 540 );
  itemMediaMaxWidth = new KConfigCompilerSignallingItem(innerItemMediaMaxWidth, this, notifyFunction, signalMediaMaxWidthChanged);
  addItem( itemMediaMaxWidth, QStringLiteral( "MediaMaxWidth" ) );
  KConfigCompilerSignallingItem  *itemMediaMaxHeight;
  KConfigSkeleton::ItemInt  *innerItemMediaMaxHeight;
  innerItemMediaMaxHeight = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MediaMaxHeight" ), mMediaMaxHeight, 540 );
  itemMediaMaxHeight = new KConfigCompilerSignallingItem(innerItemMediaMaxHeight, this, notifyFunction, signalMediaMaxHeightChanged);
  addItem( itemMediaMaxHeight, QStringLiteral( "MediaMaxHeight" ) );

  setCurrentGroup( QStringLiteral( "RoomDrawer" ) );

  KConfigCompilerSignallingItem  *itemShowAvatarInRoomDrawer;
  KConfigSkeleton::ItemBool  *innerItemShowAvatarInRoomDrawer;
  innerItemShowAvatarInRoomDrawer = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowAvatarInRoomDrawer" ), mShowAvatarInRoomDrawer, true );
  itemShowAvatarInRoomDrawer = new KConfigCompilerSignallingItem(innerItemShowAvatarInRoomDrawer, this, notifyFunction, signalShowAvatarInRoomDrawerChanged);
  addItem( itemShowAvatarInRoomDrawer, QStringLiteral( "ShowAvatarInRoomDrawer" ) );
  KConfigCompilerSignallingItem  *itemCollapsed;
  KConfigSkeleton::ItemBool  *innerItemCollapsed;
  innerItemCollapsed = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Collapsed" ), mCollapsed, false );
  itemCollapsed = new KConfigCompilerSignallingItem(innerItemCollapsed, this, notifyFunction, signalCollapsedChanged);
  addItem( itemCollapsed, QStringLiteral( "Collapsed" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesSortOrder;
  KConfigCompilerSignallingItem  *itemSortOrder;
  KConfigSkeleton::ItemEnum  *innerItemSortOrder;
  innerItemSortOrder = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "SortOrder" ), mSortOrder, valuesSortOrder, ::RoomSortOrder::Order::Activity );
  itemSortOrder = new KConfigCompilerSignallingItem(innerItemSortOrder, this, notifyFunction, signalSortOrderChanged);
  addItem( itemSortOrder, QStringLiteral( "SortOrder" ) );
  QList<int> defaultCustomSortOrder;

  KConfigCompilerSignallingItem  *itemCustomSortOrder;
  KConfigSkeleton::ItemIntList  *innerItemCustomSortOrder;
  innerItemCustomSortOrder = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "CustomSortOrder" ), mCustomSortOrder, defaultCustomSortOrder );
  itemCustomSortOrder = new KConfigCompilerSignallingItem(innerItemCustomSortOrder, this, notifyFunction, signalCustomSortOrderChanged);
  addItem( itemCustomSortOrder, QStringLiteral( "CustomSortOrder" ) );

  setCurrentGroup( QStringLiteral( "RoomInfo" ) );

  KConfigCompilerSignallingItem  *itemShowAvatarInRoomInfo;
  KConfigSkeleton::ItemBool  *innerItemShowAvatarInRoomInfo;
  innerItemShowAvatarInRoomInfo = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowAvatarInRoomInfo" ), mShowAvatarInRoomInfo, true );
  itemShowAvatarInRoomInfo = new KConfigCompilerSignallingItem(innerItemShowAvatarInRoomInfo, this, notifyFunction, signalShowAvatarInRoomInfoChanged);
  addItem( itemShowAvatarInRoomInfo, QStringLiteral( "ShowAvatarInRoomInfo" ) );

  setCurrentGroup( QStringLiteral( "NetworkProxy" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesProxyType;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("System");
    valuesProxyType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("HTTP");
    valuesProxyType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Socks5");
    valuesProxyType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("NoProxy");
    valuesProxyType.append( choice );
  }
  KConfigCompilerSignallingItem  *itemProxyType;
  KConfigSkeleton::ItemEnum  *innerItemProxyType;
  innerItemProxyType = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "ProxyType" ), mProxyType, valuesProxyType );
  itemProxyType = new KConfigCompilerSignallingItem(innerItemProxyType, this, notifyFunction, signalProxyTypeChanged);
  addItem( itemProxyType, QStringLiteral( "ProxyType" ) );
  KConfigCompilerSignallingItem  *itemProxyHost;
  KConfigSkeleton::ItemString  *innerItemProxyHost;
  innerItemProxyHost = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ProxyHost" ), mProxyHost, QStringLiteral( "127.0.0.1" ) );
  itemProxyHost = new KConfigCompilerSignallingItem(innerItemProxyHost, this, notifyFunction, signalProxyHostChanged);
  addItem( itemProxyHost, QStringLiteral( "ProxyHost" ) );
  KConfigCompilerSignallingItem  *itemProxyPort;
  KConfigSkeleton::ItemInt  *innerItemProxyPort;
  innerItemProxyPort = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "ProxyPort" ), mProxyPort, 1080 );
  itemProxyPort = new KConfigCompilerSignallingItem(innerItemProxyPort, this, notifyFunction, signalProxyPortChanged);
  addItem( itemProxyPort, QStringLiteral( "ProxyPort" ) );
  KConfigCompilerSignallingItem  *itemProxyUser;
  KConfigSkeleton::ItemString  *innerItemProxyUser;
  innerItemProxyUser = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "ProxyUser" ), mProxyUser );
  itemProxyUser = new KConfigCompilerSignallingItem(innerItemProxyUser, this, notifyFunction, signalProxyUserChanged);
  addItem( itemProxyUser, QStringLiteral( "ProxyUser" ) );
  KConfigCompilerSignallingItem  *itemProxyPassword;
  KConfigSkeleton::ItemPassword  *innerItemProxyPassword;
  innerItemProxyPassword = new KConfigSkeleton::ItemPassword( currentGroup(), QStringLiteral( "ProxyPassword" ), mProxyPassword );
  itemProxyPassword = new KConfigCompilerSignallingItem(innerItemProxyPassword, this, notifyFunction, signalProxyPasswordChanged);
  addItem( itemProxyPassword, QStringLiteral( "ProxyPassword" ) );

  setCurrentGroup( QStringLiteral( "Debug" ) );

  KConfigCompilerSignallingItem  *itemShowAllEvents;
  KConfigSkeleton::ItemBool  *innerItemShowAllEvents;
  innerItemShowAllEvents = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowAllEvents" ), mShowAllEvents, false );
  itemShowAllEvents = new KConfigCompilerSignallingItem(innerItemShowAllEvents, this, notifyFunction, signalShowAllEventsChanged);
  addItem( itemShowAllEvents, QStringLiteral( "ShowAllEvents" ) );
  KConfigCompilerSignallingItem  *itemRelateAnyEvent;
  KConfigSkeleton::ItemBool  *innerItemRelateAnyEvent;
  innerItemRelateAnyEvent = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "RelateAnyEvent" ), mRelateAnyEvent, false );
  itemRelateAnyEvent = new KConfigCompilerSignallingItem(innerItemRelateAnyEvent, this, notifyFunction, signalRelateAnyEventChanged);
  addItem( itemRelateAnyEvent, QStringLiteral( "RelateAnyEvent" ) );
  KConfigCompilerSignallingItem  *itemAlwaysVerifyDevice;
  KConfigSkeleton::ItemBool  *innerItemAlwaysVerifyDevice;
  innerItemAlwaysVerifyDevice = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AlwaysVerifyDevice" ), mAlwaysVerifyDevice, false );
  itemAlwaysVerifyDevice = new KConfigCompilerSignallingItem(innerItemAlwaysVerifyDevice, this, notifyFunction, signalAlwaysVerifyDeviceChanged);
  addItem( itemAlwaysVerifyDevice, QStringLiteral( "AlwaysVerifyDevice" ) );
  KConfigCompilerSignallingItem  *itemWindowTitleFocus;
  KConfigSkeleton::ItemBool  *innerItemWindowTitleFocus;
  innerItemWindowTitleFocus = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "WindowTitleFocus" ), mWindowTitleFocus, false );
  itemWindowTitleFocus = new KConfigCompilerSignallingItem(innerItemWindowTitleFocus, this, notifyFunction, signalWindowTitleFocusChanged);
  addItem( itemWindowTitleFocus, QStringLiteral( "WindowTitleFocus" ) );

  setCurrentGroup( QStringLiteral( "FeatureFlags" ) );

  KConfigCompilerSignallingItem  *itemCalls;
  KConfigSkeleton::ItemBool  *innerItemCalls;
  innerItemCalls = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Calls" ), mCalls, false );
  itemCalls = new KConfigCompilerSignallingItem(innerItemCalls, this, notifyFunction, signalCallsChanged);
  addItem( itemCalls, QStringLiteral( "Calls" ) );
  KConfigCompilerSignallingItem  *itemRichChatBar;
  KConfigSkeleton::ItemBool  *innerItemRichChatBar;
  innerItemRichChatBar = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "RichChatBar" ), mRichChatBar, true );
  itemRichChatBar = new KConfigCompilerSignallingItem(innerItemRichChatBar, this, notifyFunction, signalRichChatBarChanged);
  addItem( itemRichChatBar, QStringLiteral( "RichChatBar" ) );

  setCurrentGroup( QStringLiteral( "Security" ) );

  KConfigCompilerSignallingItem  *itemRejectUnknownInvites;
  KConfigSkeleton::ItemBool  *innerItemRejectUnknownInvites;
  innerItemRejectUnknownInvites = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "RejectUnknownInvites" ), mRejectUnknownInvites, false );
  itemRejectUnknownInvites = new KConfigCompilerSignallingItem(innerItemRejectUnknownInvites, this, notifyFunction, signalRejectUnknownInvitesChanged);
  addItem( itemRejectUnknownInvites, QStringLiteral( "RejectUnknownInvites" ) );
  KConfigCompilerSignallingItem  *itemPreferUsingEncryption;
  KConfigSkeleton::ItemBool  *innerItemPreferUsingEncryption;
  innerItemPreferUsingEncryption = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "PreferUsingEncryption" ), mPreferUsingEncryption, true );
  itemPreferUsingEncryption = new KConfigCompilerSignallingItem(innerItemPreferUsingEncryption, this, notifyFunction, signalPreferUsingEncryptionChanged);
  addItem( itemPreferUsingEncryption, QStringLiteral( "PreferUsingEncryption" ) );
}

bool NeoChatConfig::defaultAllRoomsInHomeValue_helper()
{

  return false;
}

QList<int> NeoChatConfig::defaultCollapsedSectionsValue_helper()
{
  QList<int> defaultCollapsedSections;

  return defaultCollapsedSections;
}

bool NeoChatConfig::defaultBlurValue_helper()
{

  return false;
}

double NeoChatConfig::defaultTransparencyValue_helper()
{

  return 0.3;
}

bool NeoChatConfig::defaultAllowQuickEditValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultShowLocalMessagesOnRightValue_helper()
{

  return true;
}

int NeoChatConfig::defaultRoomDrawerWidthValue_helper()
{

  return -1;
}

bool NeoChatConfig::defaultTypingNotificationsValue_helper()
{

  return true;
}

bool NeoChatConfig::defaultPublicReadReceiptsValue_helper()
{

  return true;
}

bool NeoChatConfig::defaultAutoRoomInfoDrawerValue_helper()
{

  return true;
}

bool NeoChatConfig::defaultDeveloperToolsValue_helper()
{

  return false;
}

int NeoChatConfig::defaultKeywordPushRuleDefaultValue_helper()
{

  return 4;
}

double NeoChatConfig::defaultFontScaleValue_helper()
{

  return 1.0;
}

bool NeoChatConfig::defaultShowAvatarInTimelineValue_helper()
{

  return true;
}

bool NeoChatConfig::defaultCompactLayoutValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultCompactRoomListValue_helper()
{

  return false;
}

int NeoChatConfig::defaultMarkReadConditionValue_helper()
{

  return 2;
}

bool NeoChatConfig::defaultShowStateEventValue_helper()
{

  return true;
}

bool NeoChatConfig::defaultShowLeaveJoinEventValue_helper()
{

  return true;
}

bool NeoChatConfig::defaultShowRenameValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultShowAvatarUpdateValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultShowDeletedMessagesValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultHideImagesValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultShowLinkPreviewValue_helper()
{

  return true;
}

bool NeoChatConfig::defaultSystemTrayValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultMinimizeToSystemTrayOnStartupValue_helper()
{

  return false;
}

int NeoChatConfig::defaultMediaMaxWidthValue_helper()
{

  return 540;
}

int NeoChatConfig::defaultMediaMaxHeightValue_helper()
{

  return 540;
}

bool NeoChatConfig::defaultShowAvatarInRoomDrawerValue_helper()
{

  return true;
}

bool NeoChatConfig::defaultCollapsedValue_helper()
{

  return false;
}

int NeoChatConfig::defaultSortOrderValue_helper()
{

  return ::RoomSortOrder::Order::Activity;
}

QList<int> NeoChatConfig::defaultCustomSortOrderValue_helper()
{
  QList<int> defaultCustomSortOrder;

  return defaultCustomSortOrder;
}

bool NeoChatConfig::defaultShowAvatarInRoomInfoValue_helper()
{

  return true;
}

QString NeoChatConfig::defaultProxyHostValue_helper()
{

  return QStringLiteral( "127.0.0.1" );
}

int NeoChatConfig::defaultProxyPortValue_helper()
{

  return 1080;
}

bool NeoChatConfig::defaultShowAllEventsValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultRelateAnyEventValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultAlwaysVerifyDeviceValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultWindowTitleFocusValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultCallsValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultRichChatBarValue_helper()
{

  return true;
}

bool NeoChatConfig::defaultRejectUnknownInvitesValue_helper()
{

  return false;
}

bool NeoChatConfig::defaultPreferUsingEncryptionValue_helper()
{

  return true;
}

NeoChatConfig::~NeoChatConfig()
{
  if (s_globalNeoChatConfig.exists() && !s_globalNeoChatConfig.isDestroyed()) {
    s_globalNeoChatConfig()->q = nullptr;
  }
}


void NeoChatConfig::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalAllRoomsInHomeChanged:
    Q_EMIT AllRoomsInHomeChanged();
    break;
  case signalCollapsedSectionsChanged:
    Q_EMIT CollapsedSectionsChanged();
    break;
  case signalBlurChanged:
    Q_EMIT BlurChanged();
    break;
  case signalTransparencyChanged:
    Q_EMIT TransparencyChanged();
    break;
  case signalAllowQuickEditChanged:
    Q_EMIT AllowQuickEditChanged();
    break;
  case signalSendMessageWithChanged:
    Q_EMIT SendMessageWithChanged();
    break;
  case signalShowLocalMessagesOnRightChanged:
    Q_EMIT ShowLocalMessagesOnRightChanged();
    break;
  case signalRoomDrawerWidthChanged:
    Q_EMIT RoomDrawerWidthChanged();
    break;
  case signalTypingNotificationsChanged:
    Q_EMIT TypingNotificationsChanged();
    break;
  case signalPublicReadReceiptsChanged:
    Q_EMIT PublicReadReceiptsChanged();
    break;
  case signalAutoRoomInfoDrawerChanged:
    Q_EMIT AutoRoomInfoDrawerChanged();
    break;
  case signalDeveloperToolsChanged:
    Q_EMIT DeveloperToolsChanged();
    break;
  case signalLastSaveDirectoryChanged:
    Q_EMIT LastSaveDirectoryChanged();
    break;
  case signalKeywordPushRuleDefaultChanged:
    Q_EMIT KeywordPushRuleDefaultChanged();
    break;
  case signalFontScaleChanged:
    Q_EMIT FontScaleChanged();
    break;
  case signalShowAvatarInTimelineChanged:
    Q_EMIT ShowAvatarInTimelineChanged();
    break;
  case signalCompactLayoutChanged:
    Q_EMIT CompactLayoutChanged();
    break;
  case signalCompactRoomListChanged:
    Q_EMIT CompactRoomListChanged();
    break;
  case signalMarkReadConditionChanged:
    Q_EMIT MarkReadConditionChanged();
    break;
  case signalShowStateEventChanged:
    Q_EMIT ShowStateEventChanged();
    break;
  case signalShowLeaveJoinEventChanged:
    Q_EMIT ShowLeaveJoinEventChanged();
    break;
  case signalShowRenameChanged:
    Q_EMIT ShowRenameChanged();
    break;
  case signalShowAvatarUpdateChanged:
    Q_EMIT ShowAvatarUpdateChanged();
    break;
  case signalShowDeletedMessagesChanged:
    Q_EMIT ShowDeletedMessagesChanged();
    break;
  case signalHideImagesChanged:
    Q_EMIT HideImagesChanged();
    break;
  case signalShowLinkPreviewChanged:
    Q_EMIT ShowLinkPreviewChanged();
    break;
  case signalSystemTrayChanged:
    Q_EMIT SystemTrayChanged();
    break;
  case signalMinimizeToSystemTrayOnStartupChanged:
    Q_EMIT MinimizeToSystemTrayOnStartupChanged();
    break;
  case signalMediaMaxWidthChanged:
    Q_EMIT MediaMaxWidthChanged();
    break;
  case signalMediaMaxHeightChanged:
    Q_EMIT MediaMaxHeightChanged();
    break;
  case signalShowAvatarInRoomDrawerChanged:
    Q_EMIT ShowAvatarInRoomDrawerChanged();
    break;
  case signalCollapsedChanged:
    Q_EMIT CollapsedChanged();
    break;
  case signalSortOrderChanged:
    Q_EMIT SortOrderChanged();
    break;
  case signalCustomSortOrderChanged:
    Q_EMIT CustomSortOrderChanged();
    break;
  case signalShowAvatarInRoomInfoChanged:
    Q_EMIT ShowAvatarInRoomInfoChanged();
    break;
  case signalProxyTypeChanged:
    Q_EMIT ProxyTypeChanged();
    break;
  case signalProxyHostChanged:
    Q_EMIT ProxyHostChanged();
    break;
  case signalProxyPortChanged:
    Q_EMIT ProxyPortChanged();
    break;
  case signalProxyUserChanged:
    Q_EMIT ProxyUserChanged();
    break;
  case signalProxyPasswordChanged:
    Q_EMIT ProxyPasswordChanged();
    break;
  case signalShowAllEventsChanged:
    Q_EMIT ShowAllEventsChanged();
    break;
  case signalRelateAnyEventChanged:
    Q_EMIT RelateAnyEventChanged();
    break;
  case signalAlwaysVerifyDeviceChanged:
    Q_EMIT AlwaysVerifyDeviceChanged();
    break;
  case signalWindowTitleFocusChanged:
    Q_EMIT WindowTitleFocusChanged();
    break;
  case signalCallsChanged:
    Q_EMIT CallsChanged();
    break;
  case signalRichChatBarChanged:
    Q_EMIT RichChatBarChanged();
    break;
  case signalRejectUnknownInvitesChanged:
    Q_EMIT RejectUnknownInvitesChanged();
    break;
  case signalPreferUsingEncryptionChanged:
    Q_EMIT PreferUsingEncryptionChanged();
    break;
  }
}
