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

#include "KonsoleSettings.h"

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

using namespace Konsole;

namespace Konsole {

class KonsoleSettingsHelper
{
  public:
    KonsoleSettingsHelper() : q(nullptr) {}
    ~KonsoleSettingsHelper() { delete q; }
    KonsoleSettings *q;
};
}

Q_GLOBAL_STATIC(KonsoleSettingsHelper, s_globalKonsoleSettings)
KonsoleSettings *KonsoleSettings::self()
{
  if (!s_globalKonsoleSettings()->q) {
    new KonsoleSettings;
    s_globalKonsoleSettings()->q->read();
  }

  return s_globalKonsoleSettings()->q;
}

KonsoleSettings::KonsoleSettings(  )
  : KConfigSkeleton( QStringLiteral( "konsolerc" ) )
{
  Q_ASSERT(!s_globalKonsoleSettings()->q);
  s_globalKonsoleSettings()->q = this;
  setCurrentGroup( QStringLiteral( "KonsoleWindow" ) );

  mShowMenuBarByDefaultItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowMenuBarByDefault" ), mShowMenuBarByDefault, true );
  mShowMenuBarByDefaultItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Show menubar by default") );
  mShowMenuBarByDefaultItem->setToolTip( QCoreApplication::translate("KonsoleSettings", "Show menubar by default in each Konsole window") );
  addItem( mShowMenuBarByDefaultItem, QStringLiteral( "ShowMenuBarByDefault" ) );
  mShowWindowTitleOnTitleBarItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowWindowTitleOnTitleBar" ), mShowWindowTitleOnTitleBar, false );
  mShowWindowTitleOnTitleBarItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Show window title on the titlebar") );
  mShowWindowTitleOnTitleBarItem->setToolTip( QCoreApplication::translate("KonsoleSettings", "Show window title set by escape sequence on the titlebar") );
  addItem( mShowWindowTitleOnTitleBarItem, QStringLiteral( "ShowWindowTitleOnTitleBar" ) );
  mShowAppNameOnTitleBarItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowAppNameOnTitleBar" ), mShowAppNameOnTitleBar, true );
  mShowAppNameOnTitleBarItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Show \"- Konsole\" on the titlebar") );
  mShowAppNameOnTitleBarItem->setToolTip( QCoreApplication::translate("KonsoleSettings", "Show \"- Konsole\" on the titlebar") );
  addItem( mShowAppNameOnTitleBarItem, QStringLiteral( "ShowAppNameOnTitleBar" ) );
  mAllowMenuAcceleratorsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AllowMenuAccelerators" ), mAllowMenuAccelerators, false );
  mAllowMenuAcceleratorsItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Enable menu accelerators") );
  mAllowMenuAcceleratorsItem->setToolTip( QCoreApplication::translate("KonsoleSettings", "Allow users to access top menu through Alt+Key combination") );
  addItem( mAllowMenuAcceleratorsItem, QStringLiteral( "AllowMenuAccelerators" ) );
  mShowTerminalSizeHintItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowTerminalSizeHint" ), mShowTerminalSizeHint, true );
  mShowTerminalSizeHintItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Show hint for terminal size after resizing") );
  mShowTerminalSizeHintItem->setToolTip( QCoreApplication::translate("KonsoleSettings", "Show terminal size in columns and lines in the center of window after resizing") );
  addItem( mShowTerminalSizeHintItem, QStringLiteral( "ShowTerminalSizeHint" ) );
  mSaveGeometryOnExitItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SaveGeometryOnExit" ), mSaveGeometryOnExit, true );
  mSaveGeometryOnExitItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Use current window size on next startup") );
  mSaveGeometryOnExitItem->setToolTip( QCoreApplication::translate("KonsoleSettings", "The window size will be saved upon exiting Konsole") );
  addItem( mSaveGeometryOnExitItem, QStringLiteral( "SaveGeometryOnExit" ) );
  mUseSingleInstanceItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseSingleInstance" ), mUseSingleInstance, false );
  mUseSingleInstanceItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Run all Konsole windows in a single process") );
  mUseSingleInstanceItem->setToolTip( QCoreApplication::translate("KonsoleSettings", "When launching Konsole re-use existing process if possible") );
  addItem( mUseSingleInstanceItem, QStringLiteral( "UseSingleInstance" ) );

  setCurrentGroup( QStringLiteral( "SearchSettings" ) );

  mSearchCaseSensitiveItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SearchCaseSensitive" ), mSearchCaseSensitive, false );
  mSearchCaseSensitiveItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Search is case sensitive") );
  mSearchCaseSensitiveItem->setToolTip( QCoreApplication::translate("KonsoleSettings", "Sets whether the search is case sensitive") );
  addItem( mSearchCaseSensitiveItem, QStringLiteral( "SearchCaseSensitive" ) );
  mSearchRegExpressionItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SearchRegExpression" ), mSearchRegExpression, false );
  mSearchRegExpressionItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Match using regular expressions") );
  addItem( mSearchRegExpressionItem, QStringLiteral( "SearchRegExpression" ) );
  mSearchHighlightMatchesItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SearchHighlightMatches" ), mSearchHighlightMatches, true );
  mSearchHighlightMatchesItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Highlight all search matches") );
  mSearchHighlightMatchesItem->setToolTip( QCoreApplication::translate("KonsoleSettings", "Sets whether matching text should be highlighted") );
  addItem( mSearchHighlightMatchesItem, QStringLiteral( "SearchHighlightMatches" ) );
  mSearchReverseSearchItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SearchReverseSearch" ), mSearchReverseSearch, true );
  mSearchReverseSearchItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Search backwards") );
  mSearchReverseSearchItem->setToolTip( QCoreApplication::translate("KonsoleSettings", "Sets whether search should start from the bottom") );
  addItem( mSearchReverseSearchItem, QStringLiteral( "SearchReverseSearch" ) );

  setCurrentGroup( QStringLiteral( "TabBar" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesTabBarVisibility;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("AlwaysShowTabBar");
    valuesTabBarVisibility.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("ShowTabBarWhenNeeded");
    valuesTabBarVisibility.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("AlwaysHideTabBar");
    valuesTabBarVisibility.append( choice );
  }
  mTabBarVisibilityItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "TabBarVisibility" ), mTabBarVisibility, valuesTabBarVisibility, AlwaysShowTabBar );
  mTabBarVisibilityItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Control the visibility of the whole tab bar") );
  addItem( mTabBarVisibilityItem, QStringLiteral( "TabBarVisibility" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesTabBarPosition;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Top");
    valuesTabBarPosition.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Bottom");
    valuesTabBarPosition.append( choice );
  }
  mTabBarPositionItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "TabBarPosition" ), mTabBarPosition, valuesTabBarPosition, Bottom );
  mTabBarPositionItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Control the position of the tab bar") );
  addItem( mTabBarPositionItem, QStringLiteral( "TabBarPosition" ) );
  mTabBarStyleSheetItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "TabBarStyleSheet" ), mTabBarStyleSheet, QStringLiteral( "QTabBar::tab { min-width: 2em ; max-width: 25em }" ) );
  mTabBarStyleSheetItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Control the visual style of the tab bar") );
  addItem( mTabBarStyleSheetItem, QStringLiteral( "TabBarStyleSheet" ) );
  mTabBarUseUserStyleSheetItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "TabBarUseUserStyleSheet" ), mTabBarUseUserStyleSheet, false );
  mTabBarUseUserStyleSheetItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Use a user-defined .css file for the tab bar") );
  addItem( mTabBarUseUserStyleSheetItem, QStringLiteral( "TabBarUseUserStyleSheet" ) );
  mTabBarUserStyleSheetFileItem = new KConfigSkeleton::ItemUrl( currentGroup(), QStringLiteral( "TabBarUserStyleSheetFile" ), mTabBarUserStyleSheetFile );
  mTabBarUserStyleSheetFileItem->setLabel( QCoreApplication::translate("KonsoleSettings", "The .css file to use for the tab bar style") );
  addItem( mTabBarUserStyleSheetFileItem, QStringLiteral( "TabBarUserStyleSheetFile" ) );
  mShowQuickButtonsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowQuickButtons" ), mShowQuickButtons, false );
  mShowQuickButtonsItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Control the visibility of quick buttons on the tab bar") );
  addItem( mShowQuickButtonsItem, QStringLiteral( "ShowQuickButtons" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesNewTabBehavior;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("PutNewTabAtTheEnd");
    valuesNewTabBehavior.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("PutNewTabAfterCurrentTab");
    valuesNewTabBehavior.append( choice );
  }
  mNewTabBehaviorItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "NewTabBehavior" ), mNewTabBehavior, valuesNewTabBehavior, PutNewTabAtTheEnd );
  mNewTabBehaviorItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Control where to put the new tab") );
  addItem( mNewTabBehaviorItem, QStringLiteral( "NewTabBehavior" ) );
  mExpandTabWidthItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ExpandTabWidth" ), mExpandTabWidth, false );
  mExpandTabWidthItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Expand the tab widths (Qt5.9+ uses the full window width)") );
  addItem( mExpandTabWidthItem, QStringLiteral( "ExpandTabWidth" ) );

  setCurrentGroup( QStringLiteral( "PrintOptions" ) );

  mPrinterFriendlyItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "PrinterFriendly" ), mPrinterFriendly, true );
  mPrinterFriendlyItem->setLabel( QCoreApplication::translate("KonsoleSettings", "Printer &friendly mode (black text, no background)") );
  addItem( mPrinterFriendlyItem, QStringLiteral( "PrinterFriendly" ) );
  mScaleOutputItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ScaleOutput" ), mScaleOutput, true );
  mScaleOutputItem->setLabel( QCoreApplication::translate("KonsoleSettings", "&Scale output") );
  addItem( mScaleOutputItem, QStringLiteral( "ScaleOutput" ) );

  setCurrentGroup( QStringLiteral( "FileLocation" ) );

  mScrollbackUseSystemLocationItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "scrollbackUseSystemLocation" ), mScrollbackUseSystemLocation, true );
  mScrollbackUseSystemLocationItem->setLabel( QCoreApplication::translate("KonsoleSettings", "For scrollback files, use system-wide folder location") );
  addItem( mScrollbackUseSystemLocationItem, QStringLiteral( "scrollbackUseSystemLocation" ) );
  mScrollbackUseCacheLocationItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "scrollbackUseCacheLocation" ), mScrollbackUseCacheLocation, false );
  mScrollbackUseCacheLocationItem->setLabel( QCoreApplication::translate("KonsoleSettings", "For scrollback files, use user's specific folder location") );
  addItem( mScrollbackUseCacheLocationItem, QStringLiteral( "scrollbackUseCacheLocation" ) );
  mScrollbackUseSpecifiedLocationItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "scrollbackUseSpecifiedLocation" ), mScrollbackUseSpecifiedLocation, false );
  mScrollbackUseSpecifiedLocationItem->setLabel( QCoreApplication::translate("KonsoleSettings", "For scrollback files, use specified folder location") );
  addItem( mScrollbackUseSpecifiedLocationItem, QStringLiteral( "scrollbackUseSpecifiedLocation" ) );
  mScrollbackUseSpecifiedLocationDirectoryItem = new KConfigSkeleton::ItemUrl( currentGroup(), QStringLiteral( "scrollbackUseSpecifiedLocationDirectory" ), mScrollbackUseSpecifiedLocationDirectory );
  mScrollbackUseSpecifiedLocationDirectoryItem->setLabel( QCoreApplication::translate("KonsoleSettings", "For scrollback files, use this folder") );
  addItem( mScrollbackUseSpecifiedLocationDirectoryItem, QStringLiteral( "scrollbackUseSpecifiedLocationDirectory" ) );
}

KonsoleSettings::~KonsoleSettings()
{
  s_globalKonsoleSettings()->q = nullptr;
}

