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

#include "kgpgsettings.h"

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

class KGpgSettingsHelper
{
  public:
    KGpgSettingsHelper() : q(0) {}
    ~KGpgSettingsHelper() { delete q; }
    KGpgSettings *q;
};
K_GLOBAL_STATIC(KGpgSettingsHelper, s_globalKGpgSettings)
KGpgSettings *KGpgSettings::self()
{
  if (!s_globalKGpgSettings->q) {
    new KGpgSettings;
    s_globalKGpgSettings->q->readConfig();
  }

  return s_globalKGpgSettings->q;
}

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

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

  setCurrentGroup( QLatin1String( "Encryption" ) );

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

  setCurrentGroup( QLatin1String( "GPG Settings" ) );

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

  setCurrentGroup( QLatin1String( "General Options" ) );

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

  setCurrentGroup( QLatin1String( "User Interface" ) );

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

  setCurrentGroup( QLatin1String( "TipOfDay" ) );

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

  setCurrentGroup( QLatin1String( "Key Colors" ) );

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

  setCurrentGroup( QLatin1String( "Text Font" ) );

  KConfigSkeleton::ItemFont  *itemFont;
  itemFont = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "KEditFont" ), mFont, KGlobalSettings::fixedFont() );
  addItem( itemFont, QLatin1String( "Font" ) );

  setCurrentGroup( QLatin1String( "Key List" ) );

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

  setCurrentGroup( QLatin1String( "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(), QLatin1String( "Server_List" ), mKeyServers, defaultKeyServers );
  addItem( itemKeyServers, QLatin1String( "KeyServers" ) );
  QStringList defaultInfoServers;
  defaultInfoServers.append( QString::fromUtf8( "http://pgp.cs.uu.nl/stats/$$ID8$$.html" ) );
  defaultInfoServers.append( QString::fromUtf8( "http://webware.lysator.liu.se/jc/wotsap/wots/latest/keystatistics/0x$$ID8$$.txt" ) );
  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(), QLatin1String( "Info_Server_List" ), mInfoServers, defaultInfoServers );
  addItem( itemInfoServers, QLatin1String( "InfoServers" ) );

  setCurrentGroup( QLatin1String( "Key Servers" ) );

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

  setCurrentGroup( QLatin1String( "Key Signing" ) );

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

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

