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

#include "klippersettings.h"

#include <klocale.h>

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

class KlipperSettingsHelper
{
  public:
    KlipperSettingsHelper() : q(0) {}
    ~KlipperSettingsHelper() { delete q; }
    KlipperSettings *q;
};
K_GLOBAL_STATIC(KlipperSettingsHelper, s_globalKlipperSettings)
KlipperSettings *KlipperSettings::self()
{
  if (!s_globalKlipperSettings->q) {
    new KlipperSettings;
    s_globalKlipperSettings->q->readConfig();
  }

  return s_globalKlipperSettings->q;
}

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

  KConfigSkeleton::ItemString  *itemVersion;
  itemVersion = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Version" ), mVersion );
  itemVersion->setLabel( i18n("Klipper version") );
  addItem( itemVersion, QLatin1String( "Version" ) );
  KConfigSkeleton::ItemBool  *itemKeepClipboardContents;
  itemKeepClipboardContents = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "KeepClipboardContents" ), mKeepClipboardContents, true );
  itemKeepClipboardContents->setLabel( i18n("Keep clipboard contents") );
  addItem( itemKeepClipboardContents, QLatin1String( "KeepClipboardContents" ) );
  KConfigSkeleton::ItemBool  *itemPreventEmptyClipboard;
  itemPreventEmptyClipboard = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "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, QLatin1String( "PreventEmptyClipboard" ) );
  KConfigSkeleton::ItemBool  *itemIgnoreImages;
  itemIgnoreImages = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "IgnoreImages" ), mIgnoreImages, true );
  itemIgnoreImages->setLabel( i18n("Ignore images") );
  addItem( itemIgnoreImages, QLatin1String( "IgnoreImages" ) );
  KConfigSkeleton::ItemBool  *itemIgnoreSelection;
  itemIgnoreSelection = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "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, QLatin1String( "IgnoreSelection" ) );
  KConfigSkeleton::ItemInt  *itemSynchronize;
  itemSynchronize = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Synchronize" ), mSynchronize, 3 );
  itemSynchronize->setLabel( i18n("Backwards compatibility, don't touch.") );
  addItem( itemSynchronize, QLatin1String( "Synchronize" ) );
  KConfigSkeleton::ItemBool  *itemSyncClipboards;
  itemSyncClipboards = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "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, QLatin1String( "SyncClipboards" ) );
  KConfigSkeleton::ItemBool  *itemSelectionTextOnly;
  itemSelectionTextOnly = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "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, QLatin1String( "SelectionTextOnly" ) );
  KConfigSkeleton::ItemBool  *itemUseGUIRegExpEditor;
  itemUseGUIRegExpEditor = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "UseGUIRegExpEditor" ), mUseGUIRegExpEditor, true );
  itemUseGUIRegExpEditor->setLabel( i18n("Use graphical regexp editor") );
  addItem( itemUseGUIRegExpEditor, QLatin1String( "UseGUIRegExpEditor" ) );
  KConfigSkeleton::ItemBool  *itemURLGrabberEnabled;
  itemURLGrabberEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "URLGrabberEnabled" ), mURLGrabberEnabled, false );
  itemURLGrabberEnabled->setLabel( i18n("URL grabber enabled") );
  addItem( itemURLGrabberEnabled, QLatin1String( "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(), QLatin1String( "NoActionsForWM_CLASS" ), mNoActionsForWM_CLASS, defaultNoActionsForWM_CLASS );
  itemNoActionsForWM_CLASS->setLabel( i18n("No actions for WM_CLASS") );
  addItem( itemNoActionsForWM_CLASS, QLatin1String( "NoActionsForWM_CLASS" ) );
  KConfigSkeleton::ItemInt  *itemTimeoutForActionPopups;
  itemTimeoutForActionPopups = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "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, QLatin1String( "TimeoutForActionPopups" ) );
  KConfigSkeleton::ItemInt  *itemMaxClipItems;
  itemMaxClipItems = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "MaxClipItems" ), mMaxClipItems, 7 );
  itemMaxClipItems->setMinValue(1);
  itemMaxClipItems->setMaxValue(2048);
  itemMaxClipItems->setLabel( i18n("Clipboard history size") );
  addItem( itemMaxClipItems, QLatin1String( "MaxClipItems" ) );
  KConfigSkeleton::ItemInt  *itemActionList;
  itemActionList = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "ActionListChanged" ), mActionList, -1 );
  itemActionList->setLabel( i18n("Dummy entry for indicating changes in an action's tree widget") );
  addItem( itemActionList, QLatin1String( "ActionList" ) );

  setCurrentGroup( QLatin1String( "Actions" ) );

  KConfigSkeleton::ItemBool  *itemStripWhiteSpace;
  itemStripWhiteSpace = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "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, QLatin1String( "StripWhiteSpace" ) );
  KConfigSkeleton::ItemBool  *itemReplayActionInHistory;
  itemReplayActionInHistory = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ReplayActionInHistory" ), mReplayActionInHistory, false );
  itemReplayActionInHistory->setLabel( i18n("Replay action in history") );
  addItem( itemReplayActionInHistory, QLatin1String( "ReplayActionInHistory" ) );
  KConfigSkeleton::ItemBool  *itemEnableMagicMimeActions;
  itemEnableMagicMimeActions = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "EnableMagicMimeActions" ), mEnableMagicMimeActions, true );
  itemEnableMagicMimeActions->setLabel( i18n("Enable MIME-based actions") );
  addItem( itemEnableMagicMimeActions, QLatin1String( "EnableMagicMimeActions" ) );
}

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

