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

#include "klippersettings.h"

#include <klocalizedstring.h>

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

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

  return s_globalKlipperSettings()->q;
}

KlipperSettings::KlipperSettings(  )
  : KConfigSkeleton( QStringLiteral( "klipperrc" ) )
{
  Q_ASSERT(!s_globalKlipperSettings()->q);
  s_globalKlipperSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemString  *itemVersion;
  itemVersion = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "Version" ), mVersion );
  itemVersion->setLabel( i18n("Klipper version") );
  addItem( itemVersion, QStringLiteral( "Version" ) );
  KConfigSkeleton::ItemBool  *itemKeepClipboardContents;
  itemKeepClipboardContents = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "KeepClipboardContents" ), mKeepClipboardContents, true );
  itemKeepClipboardContents->setLabel( i18n("Keep clipboard contents") );
  addItem( itemKeepClipboardContents, QStringLiteral( "KeepClipboardContents" ) );
  KConfigSkeleton::ItemBool  *itemPreventEmptyClipboard;
  itemPreventEmptyClipboard = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "PreventEmptyClipboard" ), mPreventEmptyClipboard, true );
  itemPreventEmptyClipboard->setLabel( i18n("Prevent empty clipboard") );
  itemPreventEmptyClipboard->setWhatsThis( i18n("Selecting this option has the effect, that the clipboard can never be emptied. E.g. when an application exits, the clipboard would usually be emptied.") );
  addItem( itemPreventEmptyClipboard, QStringLiteral( "PreventEmptyClipboard" ) );
  KConfigSkeleton::ItemBool  *itemIgnoreImages;
  itemIgnoreImages = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "IgnoreImages" ), mIgnoreImages, true );
  itemIgnoreImages->setLabel( i18n("Ignore images") );
  addItem( itemIgnoreImages, QStringLiteral( "IgnoreImages" ) );
  KConfigSkeleton::ItemBool  *itemIgnoreSelection;
  itemIgnoreSelection = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "IgnoreSelection" ), mIgnoreSelection, false );
  itemIgnoreSelection->setLabel( i18n("Ignore Selection") );
  itemIgnoreSelection->setWhatsThis( i18n("When an area of the screen is selected with mouse or keyboard, this is called \"the selection\".<br/>If this option is set, the selection is not entered into the clipboard history, though it is still available for pasting using the middle mouse button.") );
  addItem( itemIgnoreSelection, QStringLiteral( "IgnoreSelection" ) );
  KConfigSkeleton::ItemInt  *itemSynchronize;
  itemSynchronize = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Synchronize" ), mSynchronize, 3 );
  itemSynchronize->setLabel( i18n("Backwards compatibility, don't touch.") );
  addItem( itemSynchronize, QStringLiteral( "Synchronize" ) );
  KConfigSkeleton::ItemBool  *itemSyncClipboards;
  itemSyncClipboards = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SyncClipboards" ), mSyncClipboards, false );
  itemSyncClipboards->setLabel( i18n("Synchronize clipboard and selection") );
  itemSyncClipboards->setWhatsThis( i18n("When an area of the screen is selected with mouse or keyboard, this is called \"the selection\".<br/>If this option is selected, the selection and the clipboard is kept the same, so that anything in the selection is immediately available for pasting elsewhere using any method, including the traditional middle mouse button. Otherwise, the selection is recorded in the clipboard history, but the selection can only be pasted using the middle mouse button. Also see the 'Ignore Selection' option.") );
  addItem( itemSyncClipboards, QStringLiteral( "SyncClipboards" ) );
  KConfigSkeleton::ItemBool  *itemSelectionTextOnly;
  itemSelectionTextOnly = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SelectionTextOnly" ), mSelectionTextOnly, true );
  itemSelectionTextOnly->setLabel( i18n("Selection text only") );
  itemSelectionTextOnly->setWhatsThis( i18n("When an area of the screen is selected with mouse or keyboard, this is called \"the selection\".<br/>If this option is selected, only text selections are stored in the history, while images and other selections are not.") );
  addItem( itemSelectionTextOnly, QStringLiteral( "SelectionTextOnly" ) );
  KConfigSkeleton::ItemBool  *itemUseGUIRegExpEditor;
  itemUseGUIRegExpEditor = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseGUIRegExpEditor" ), mUseGUIRegExpEditor, true );
  itemUseGUIRegExpEditor->setLabel( i18n("Use graphical regexp editor") );
  addItem( itemUseGUIRegExpEditor, QStringLiteral( "UseGUIRegExpEditor" ) );
  KConfigSkeleton::ItemBool  *itemURLGrabberEnabled;
  itemURLGrabberEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "URLGrabberEnabled" ), mURLGrabberEnabled, false );
  itemURLGrabberEnabled->setLabel( i18n("URL grabber enabled") );
  addItem( itemURLGrabberEnabled, QStringLiteral( "URLGrabberEnabled" ) );
  QStringList defaultNoActionsForWM_CLASS;
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "Navigator" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "navigator:browser" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "konqueror" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "keditbookmarks" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "mozilla-bin" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "Mozilla" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "Opera main window" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "opera" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "gnumeric" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "Gnumeric" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "Galeon" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "kcontrol" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "ksirc" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "MozillaFirebird-bin" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "firefox-bin" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "Firefox-bin" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "klipper" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "Gecko" ) );
  defaultNoActionsForWM_CLASS.append( QString::fromUtf8( "gecko" ) );

  KConfigSkeleton::ItemStringList  *itemNoActionsForWM_CLASS;
  itemNoActionsForWM_CLASS = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "NoActionsForWM_CLASS" ), mNoActionsForWM_CLASS, defaultNoActionsForWM_CLASS );
  itemNoActionsForWM_CLASS->setLabel( i18n("No actions for WM_CLASS") );
  addItem( itemNoActionsForWM_CLASS, QStringLiteral( "NoActionsForWM_CLASS" ) );
  KConfigSkeleton::ItemInt  *itemTimeoutForActionPopups;
  itemTimeoutForActionPopups = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "TimeoutForActionPopups" ), mTimeoutForActionPopups, 8 );
  itemTimeoutForActionPopups->setMinValue(0);
  itemTimeoutForActionPopups->setMaxValue(200);
  itemTimeoutForActionPopups->setLabel( i18n("Timeout for action popups (seconds)") );
  itemTimeoutForActionPopups->setToolTip( i18n("A value of 0 disables the timeout") );
  addItem( itemTimeoutForActionPopups, QStringLiteral( "TimeoutForActionPopups" ) );
  KConfigSkeleton::ItemInt  *itemMaxClipItems;
  itemMaxClipItems = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MaxClipItems" ), mMaxClipItems, 7 );
  itemMaxClipItems->setMinValue(1);
  itemMaxClipItems->setMaxValue(2048);
  itemMaxClipItems->setLabel( i18n("Clipboard history size") );
  addItem( itemMaxClipItems, QStringLiteral( "MaxClipItems" ) );
  KConfigSkeleton::ItemInt  *itemActionList;
  itemActionList = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "ActionListChanged" ), mActionList, -1 );
  itemActionList->setLabel( i18n("Dummy entry for indicating changes in an action's tree widget") );
  addItem( itemActionList, QStringLiteral( "ActionList" ) );

  setCurrentGroup( QStringLiteral( "Actions" ) );

  KConfigSkeleton::ItemBool  *itemStripWhiteSpace;
  itemStripWhiteSpace = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "StripWhiteSpace" ), mStripWhiteSpace, true );
  itemStripWhiteSpace->setLabel( i18n("Strip whitespace when executing an action") );
  itemStripWhiteSpace->setWhatsThis( i18n("Sometimes, the selected text has some whitespace at the end, which, if loaded as URL in a browser would cause an error. Enabling this option removes any whitespace at the beginning or end of the selected string (the original clipboard contents will not be modified).") );
  addItem( itemStripWhiteSpace, QStringLiteral( "StripWhiteSpace" ) );
  KConfigSkeleton::ItemBool  *itemReplayActionInHistory;
  itemReplayActionInHistory = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ReplayActionInHistory" ), mReplayActionInHistory, false );
  itemReplayActionInHistory->setLabel( i18n("Replay action in history") );
  addItem( itemReplayActionInHistory, QStringLiteral( "ReplayActionInHistory" ) );
  KConfigSkeleton::ItemBool  *itemEnableMagicMimeActions;
  itemEnableMagicMimeActions = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "EnableMagicMimeActions" ), mEnableMagicMimeActions, true );
  itemEnableMagicMimeActions->setLabel( i18n("Enable MIME-based actions") );
  addItem( itemEnableMagicMimeActions, QStringLiteral( "EnableMagicMimeActions" ) );
}

KlipperSettings::~KlipperSettings()
{
  s_globalKlipperSettings()->q = nullptr;
}

