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

#include "kgpgsettings.h"

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

class KGpgSettingsHelper
{
  public:
    KGpgSettingsHelper() : q(nullptr) {}
    ~KGpgSettingsHelper() { delete q; q = nullptr; }
    KGpgSettingsHelper(const KGpgSettingsHelper&) = delete;
    KGpgSettingsHelper& operator=(const KGpgSettingsHelper&) = delete;
    KGpgSettings *q;
};
Q_GLOBAL_STATIC(KGpgSettingsHelper, s_globalKGpgSettings)
KGpgSettings *KGpgSettings::self()
{
  if (!s_globalKGpgSettings()->q) {
    new KGpgSettings;
    s_globalKGpgSettings()->q->read();
  }

  return s_globalKGpgSettings()->q;
}

KGpgSettings::KGpgSettings( )
  : KConfigSkeleton( QStringLiteral( "kgpgrc" ) )
{
  Q_ASSERT(!s_globalKGpgSettings()->q);
  s_globalKGpgSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Decryption" ) );

  KConfigSkeleton::ItemString  *itemCustomDecrypt;
  itemCustomDecrypt = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "custom_decrypt" ), mCustomDecrypt );
  addItem( itemCustomDecrypt, QStringLiteral( "CustomDecrypt" ) );

  setCurrentGroup( QStringLiteral( "Encryption" ) );

  KConfigSkeleton::ItemString  *itemCustomEncryptionOptions;
  itemCustomEncryptionOptions = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "custom_option" ), mCustomEncryptionOptions );
  addItem( itemCustomEncryptionOptions, QStringLiteral( "CustomEncryptionOptions" ) );
  KConfigSkeleton::ItemBool  *itemAllowCustomEncryptionOptions;
  itemAllowCustomEncryptionOptions = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "allow_custom_option" ), mAllowCustomEncryptionOptions, false );
  addItem( itemAllowCustomEncryptionOptions, QStringLiteral( "AllowCustomEncryptionOptions" ) );
  KConfigSkeleton::ItemString  *itemFileEncryptionKey;
  itemFileEncryptionKey = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "file key" ), mFileEncryptionKey );
  addItem( itemFileEncryptionKey, QStringLiteral( "FileEncryptionKey" ) );
  KConfigSkeleton::ItemBool  *itemEncryptFilesTo;
  itemEncryptFilesTo = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "encrypt_files_to" ), mEncryptFilesTo, false );
  addItem( itemEncryptFilesTo, QStringLiteral( "EncryptFilesTo" ) );
  KConfigSkeleton::ItemBool  *itemAsciiArmor;
  itemAsciiArmor = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Ascii_armor" ), mAsciiArmor, true );
  addItem( itemAsciiArmor, QStringLiteral( "AsciiArmor" ) );
  KConfigSkeleton::ItemBool  *itemAllowUntrustedKeys;
  itemAllowUntrustedKeys = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Allow_untrusted_keys" ), mAllowUntrustedKeys, false );
  addItem( itemAllowUntrustedKeys, QStringLiteral( "AllowUntrustedKeys" ) );
  KConfigSkeleton::ItemBool  *itemAllowUntrustedGroupMembers;
  itemAllowUntrustedGroupMembers = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Allow_untrusted_group_members" ), mAllowUntrustedGroupMembers, false );
  addItem( itemAllowUntrustedGroupMembers, QStringLiteral( "AllowUntrustedGroupMembers" ) );
  KConfigSkeleton::ItemBool  *itemHideUserID;
  itemHideUserID = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Hide_user_ID" ), mHideUserID, false );
  addItem( itemHideUserID, QStringLiteral( "HideUserID" ) );
  KConfigSkeleton::ItemBool  *itemPgpCompatibility;
  itemPgpCompatibility = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "PGP_compatibility" ), mPgpCompatibility, false );
  addItem( itemPgpCompatibility, QStringLiteral( "PgpCompatibility" ) );
  KConfigSkeleton::ItemBool  *itemPgpExtension;
  itemPgpExtension = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Pgp_extension" ), mPgpExtension, false );
  addItem( itemPgpExtension, QStringLiteral( "PgpExtension" ) );

  setCurrentGroup( QStringLiteral( "GPG Settings" ) );

  KConfigSkeleton::ItemPath  *itemGpgConfigPath;
  itemGpgConfigPath = new KConfigSkeleton::ItemPath( currentGroup(), QStringLiteral( "gpg_config_path" ), mGpgConfigPath );
  addItem( itemGpgConfigPath, QStringLiteral( "GpgConfigPath" ) );
  KConfigSkeleton::ItemPath  *itemGpgBinaryPath;
  itemGpgBinaryPath = new KConfigSkeleton::ItemPath( currentGroup(), QStringLiteral( "gpg_bin_path" ), mGpgBinaryPath, QStringLiteral( "gpg" ) );
  addItem( itemGpgBinaryPath, QStringLiteral( "GpgBinaryPath" ) );

  setCurrentGroup( QStringLiteral( "General Options" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesPhotoProperties;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Disable");
    valuesPhotoProperties.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Small");
    valuesPhotoProperties.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Medium");
    valuesPhotoProperties.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Big");
    valuesPhotoProperties.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemPhotoProperties;
  itemPhotoProperties = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "photo properties" ), mPhotoProperties, valuesPhotoProperties, EnumPhotoProperties::Disable );
  addItem( itemPhotoProperties, QStringLiteral( "PhotoProperties" ) );
  KConfigSkeleton::ItemBool  *itemFirstRun;
  itemFirstRun = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "First run" ), mFirstRun, true );
  addItem( itemFirstRun, QStringLiteral( "FirstRun" ) );
  KConfigSkeleton::ItemSize  *itemEditorGeometry;
  itemEditorGeometry = new KConfigSkeleton::ItemSize( currentGroup(), QStringLiteral( "Geometry" ), mEditorGeometry );
  addItem( itemEditorGeometry, QStringLiteral( "EditorGeometry" ) );
  KConfigSkeleton::ItemBool  *itemShowTrust;
  itemShowTrust = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "show_trust" ), mShowTrust, true );
  addItem( itemShowTrust, QStringLiteral( "ShowTrust" ) );
  KConfigSkeleton::ItemBool  *itemShowExpi;
  itemShowExpi = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "show_expi" ), mShowExpi, true );
  addItem( itemShowExpi, QStringLiteral( "ShowExpi" ) );
  KConfigSkeleton::ItemBool  *itemShowSize;
  itemShowSize = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "show_size" ), mShowSize, true );
  addItem( itemShowSize, QStringLiteral( "ShowSize" ) );
  KConfigSkeleton::ItemBool  *itemShowCreat;
  itemShowCreat = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "show_creat" ), mShowCreat, true );
  addItem( itemShowCreat, QStringLiteral( "ShowCreat" ) );
  KConfigSkeleton::ItemBool  *itemShowSecret;
  itemShowSecret = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "show_secret" ), mShowSecret, false );
  addItem( itemShowSecret, QStringLiteral( "ShowSecret" ) );
  KConfigSkeleton::ItemBool  *itemShowLongKeyId;
  itemShowLongKeyId = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "show_long_keyid" ), mShowLongKeyId, true );
  addItem( itemShowLongKeyId, QStringLiteral( "ShowLongKeyId" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesTrustLevel;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Unknown");
    valuesTrustLevel.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Undefined");
    valuesTrustLevel.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Marginal");
    valuesTrustLevel.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Full");
    valuesTrustLevel.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Ultimate");
    valuesTrustLevel.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemTrustLevel;
  itemTrustLevel = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "trust filter" ), mTrustLevel, valuesTrustLevel, EnumTrustLevel::Undefined );
  addItem( itemTrustLevel, QStringLiteral( "TrustLevel" ) );

  setCurrentGroup( QStringLiteral( "User Interface" ) );

  KConfigSkeleton::ItemBool  *itemUseMouseSelection;
  itemUseMouseSelection = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "selection_clipboard" ), mUseMouseSelection, false );
  addItem( itemUseMouseSelection, QStringLiteral( "UseMouseSelection" ) );
  KConfigSkeleton::ItemBool  *itemAutoStart;
  itemAutoStart = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoStart" ), mAutoStart, false );
  addItem( itemAutoStart, QStringLiteral( "AutoStart" ) );
  KConfigSkeleton::ItemBool  *itemRemoteFileWarn;
  itemRemoteFileWarn = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "remote_file_warn" ), mRemoteFileWarn, false );
  addItem( itemRemoteFileWarn, QStringLiteral( "RemoteFileWarn" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesLeftClick;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("KeyManager");
    valuesLeftClick.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Editor");
    valuesLeftClick.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemLeftClick;
  itemLeftClick = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "left_click" ), mLeftClick, valuesLeftClick );
  addItem( itemLeftClick, QStringLiteral( "LeftClick" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesEncryptedDropEvent;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("DecryptAndSave");
    valuesEncryptedDropEvent.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("DecryptAndOpen");
    valuesEncryptedDropEvent.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Ask");
    valuesEncryptedDropEvent.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemEncryptedDropEvent;
  itemEncryptedDropEvent = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "encrypted_drop_event" ), mEncryptedDropEvent, valuesEncryptedDropEvent );
  addItem( itemEncryptedDropEvent, QStringLiteral( "EncryptedDropEvent" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesUnencryptedDropEvent;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Encrypt");
    valuesUnencryptedDropEvent.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Sign");
    valuesUnencryptedDropEvent.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Ask");
    valuesUnencryptedDropEvent.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemUnencryptedDropEvent;
  itemUnencryptedDropEvent = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "unencrypted_drop_event" ), mUnencryptedDropEvent, valuesUnencryptedDropEvent );
  addItem( itemUnencryptedDropEvent, QStringLiteral( "UnencryptedDropEvent" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesSignMenu;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Disabled");
    valuesSignMenu.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("AllFiles");
    valuesSignMenu.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemSignMenu;
  itemSignMenu = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "sign_menu" ), mSignMenu, valuesSignMenu, EnumSignMenu::Disabled );
  addItem( itemSignMenu, QStringLiteral( "SignMenu" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesDecryptMenu;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Disabled");
    valuesDecryptMenu.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("AllFiles");
    valuesDecryptMenu.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("EncryptedFiles");
    valuesDecryptMenu.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemDecryptMenu;
  itemDecryptMenu = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "decrypt_menu" ), mDecryptMenu, valuesDecryptMenu, EnumDecryptMenu::Disabled );
  addItem( itemDecryptMenu, QStringLiteral( "DecryptMenu" ) );
  KConfigSkeleton::ItemBool  *itemShowSystray;
  itemShowSystray = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "systray_icon" ), mShowSystray, true );
  addItem( itemShowSystray, QStringLiteral( "ShowSystray" ) );
  KConfigSkeleton::ItemUInt  *itemRecentFiles;
  itemRecentFiles = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "recent_files" ), mRecentFiles, 10 );
  addItem( itemRecentFiles, QStringLiteral( "RecentFiles" ) );

  setCurrentGroup( QStringLiteral( "TipOfDay" ) );

  KConfigSkeleton::ItemBool  *itemShowTipOfDay;
  itemShowTipOfDay = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "RunOnStart" ), mShowTipOfDay, true );
  addItem( itemShowTipOfDay, QStringLiteral( "ShowTipOfDay" ) );

  setCurrentGroup( QStringLiteral( "Key Colors" ) );

  KConfigSkeleton::ItemColor  *itemColorGood;
  itemColorGood = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "color_good" ), mColorGood, QColor( 144,255,0 ) );
  addItem( itemColorGood, QStringLiteral( "ColorGood" ) );
  KConfigSkeleton::ItemColor  *itemColorRev;
  itemColorRev = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "color_revoked" ), mColorRev, QColor( 30,30,30 ) );
  addItem( itemColorRev, QStringLiteral( "ColorRev" ) );
  KConfigSkeleton::ItemColor  *itemColorUnknown;
  itemColorUnknown = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "color_unknown" ), mColorUnknown, QColor( 255,255,255 ) );
  addItem( itemColorUnknown, QStringLiteral( "ColorUnknown" ) );
  KConfigSkeleton::ItemColor  *itemColorBad;
  itemColorBad = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "color_bad" ), mColorBad, QColor( 172,0,0 ) );
  addItem( itemColorBad, QStringLiteral( "ColorBad" ) );
  KConfigSkeleton::ItemColor  *itemColorUltimate;
  itemColorUltimate = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "color_ultimate" ), mColorUltimate, QColor( 68,0,255 ) );
  addItem( itemColorUltimate, QStringLiteral( "ColorUltimate" ) );
  KConfigSkeleton::ItemColor  *itemColorMarginal;
  itemColorMarginal = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "color_marginal" ), mColorMarginal, QColor( 255,255,0 ) );
  addItem( itemColorMarginal, QStringLiteral( "ColorMarginal" ) );
  KConfigSkeleton::ItemColor  *itemColorExpired;
  itemColorExpired = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "color_expired" ), mColorExpired, QColor( 150,150,150 ) );
  addItem( itemColorExpired, QStringLiteral( "ColorExpired" ) );

  setCurrentGroup( QStringLiteral( "Text Font" ) );

  KConfigSkeleton::ItemFont  *itemFont;
  itemFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "KEditFont" ), mFont, QFontDatabase::systemFont(QFontDatabase::FixedFont) );
  addItem( itemFont, QStringLiteral( "Font" ) );

  setCurrentGroup( QStringLiteral( "Key List" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesEmailSorting;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Alphabetical");
    valuesEmailSorting.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("TLDfirst");
    valuesEmailSorting.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("DomainFirst");
    valuesEmailSorting.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("FQDNFirst");
    valuesEmailSorting.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemEmailSorting;
  itemEmailSorting = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "EmailSorting" ), mEmailSorting, valuesEmailSorting, EnumEmailSorting::Alphabetical );
  addItem( itemEmailSorting, QStringLiteral( "EmailSorting" ) );

  setCurrentGroup( QStringLiteral( "Servers" ) );

  QStringList defaultKeyServers;
  defaultKeyServers.append( QString::fromUtf8( "hkp://pool.sks-keyservers.net" ) );
  defaultKeyServers.append( QString::fromUtf8( "hkp://subkeys.pgp.net" ) );
  defaultKeyServers.append( QString::fromUtf8( "hkp://search.keyserver.net" ) );
  defaultKeyServers.append( QString::fromUtf8( "hkp://pgp.dtype.org" ) );
  defaultKeyServers.append( QString::fromUtf8( "hkp://wwwkeys.pgp.net" ) );

  KConfigSkeleton::ItemStringList  *itemKeyServers;
  itemKeyServers = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "Server_List" ), mKeyServers, defaultKeyServers );
  addItem( itemKeyServers, QStringLiteral( "KeyServers" ) );
  QStringList defaultInfoServers;
  defaultInfoServers.append( QString::fromUtf8( "https://pgp.cs.uu.nl/stats/$$id16$$.html" ) );
  defaultInfoServers.append( QString::fromUtf8( "http://pgp.surfnet.nl:11371/pks/lookup?op=vindex&fingerprint=on&search=0x$$ID8$$;http://biglumber.com/x/web?pk=$$FPR$$" ) );

  KConfigSkeleton::ItemStringList  *itemInfoServers;
  itemInfoServers = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "Info_Server_List" ), mInfoServers, defaultInfoServers );
  addItem( itemInfoServers, QStringLiteral( "InfoServers" ) );

  setCurrentGroup( QStringLiteral( "Key Servers" ) );

  KConfigSkeleton::ItemBool  *itemUseProxy;
  itemUseProxy = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "use_proxy" ), mUseProxy, false );
  addItem( itemUseProxy, QStringLiteral( "UseProxy" ) );

  setCurrentGroup( QStringLiteral( "Key Signing" ) );

  KConfigSkeleton::ItemString  *itemEmailTemplate;
  itemEmailTemplate = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "Email_Template" ), mEmailTemplate, EMailTemplateText );
  addItem( itemEmailTemplate, QStringLiteral( "EmailTemplate" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesMailUats;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("All");
    valuesMailUats.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("First");
    valuesMailUats.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("None");
    valuesMailUats.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemMailUats;
  itemMailUats = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "Mail_Uats" ), mMailUats, valuesMailUats, EnumMailUats::All );
  addItem( itemMailUats, QStringLiteral( "MailUats" ) );
}

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

