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

#include "knotesglobalconfig.h"

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

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

  return s_globalKNotesGlobalConfig()->q;
}

KNotesGlobalConfig::KNotesGlobalConfig( )
  : KConfigSkeleton()
{
  Q_ASSERT(!s_globalKNotesGlobalConfig()->q);
  s_globalKNotesGlobalConfig()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemBool  *itemAutoCreateResourceOnStart;
  itemAutoCreateResourceOnStart = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoCreateResourceOnStart" ), mAutoCreateResourceOnStart, true );
  addItem( itemAutoCreateResourceOnStart, QStringLiteral( "AutoCreateResourceOnStart" ) );

  setCurrentGroup( QStringLiteral( "Misc" ) );

  KConfigSkeleton::ItemBool  *itemSystemTrayShowNotes;
  itemSystemTrayShowNotes = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SystemTrayShowNotes" ), mSystemTrayShowNotes, false );
  addItem( itemSystemTrayShowNotes, QStringLiteral( "SystemTrayShowNotes" ) );

  setCurrentGroup( QStringLiteral( "Printing" ) );

  KConfigSkeleton::ItemString  *itemTheme;
  itemTheme = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "Theme" ), mTheme, QStringLiteral( "share/knotes/print/themes/default/" ) );
  addItem( itemTheme, QStringLiteral( "Theme" ) );

  setCurrentGroup( QStringLiteral( "Display" ) );

  KConfigSkeleton::ItemColor  *itemBgColor;
  itemBgColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "bgcolor" ), mBgColor, Qt::yellow );
  addItem( itemBgColor, QStringLiteral( "BgColor" ) );
  KConfigSkeleton::ItemColor  *itemFgColor;
  itemFgColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fgcolor" ), mFgColor, Qt::black );
  addItem( itemFgColor, QStringLiteral( "FgColor" ) );
  KConfigSkeleton::ItemUInt  *itemWidth;
  itemWidth = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "width" ), mWidth, 300 );
  addItem( itemWidth, QStringLiteral( "Width" ) );
  KConfigSkeleton::ItemUInt  *itemHeight;
  itemHeight = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "height" ), mHeight, 300 );
  addItem( itemHeight, QStringLiteral( "Height" ) );
  KConfigSkeleton::ItemBool  *itemRememberDesktop;
  itemRememberDesktop = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "RememberDesktop" ), mRememberDesktop, true );
  addItem( itemRememberDesktop, QStringLiteral( "RememberDesktop" ) );

  setCurrentGroup( QStringLiteral( "Editor" ) );

  KConfigSkeleton::ItemFont  *itemFont;
  itemFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "font" ), mFont, QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
  addItem( itemFont, QStringLiteral( "Font" ) );
  KConfigSkeleton::ItemFont  *itemTitleFont;
  itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "titlefont" ), mTitleFont, QFontDatabase::systemFont(QFontDatabase::TitleFont) );
  addItem( itemTitleFont, QStringLiteral( "TitleFont" ) );
  KConfigSkeleton::ItemBool  *itemAutoIndent;
  itemAutoIndent = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "autoindent" ), mAutoIndent, true );
  addItem( itemAutoIndent, QStringLiteral( "AutoIndent" ) );
  KConfigSkeleton::ItemBool  *itemRichText;
  itemRichText = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "richtext" ), mRichText, false );
  addItem( itemRichText, QStringLiteral( "RichText" ) );
  KConfigSkeleton::ItemUInt  *itemTabSize;
  itemTabSize = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "tabsize" ), mTabSize, 4 );
  addItem( itemTabSize, QStringLiteral( "TabSize" ) );
  KConfigSkeleton::ItemBool  *itemReadOnly;
  itemReadOnly = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ReadOnly" ), mReadOnly, false );
  addItem( itemReadOnly, QStringLiteral( "ReadOnly" ) );

  setCurrentGroup( QStringLiteral( "WindowDisplay" ) );

  KConfigSkeleton::ItemInt  *itemDesktop;
  itemDesktop = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "desktop" ), mDesktop, -10 );
  addItem( itemDesktop, QStringLiteral( "Desktop" ) );
  KConfigSkeleton::ItemBool  *itemHideNote;
  itemHideNote = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "HideNote" ), mHideNote, false );
  addItem( itemHideNote, QStringLiteral( "HideNote" ) );
  KConfigSkeleton::ItemPoint  *itemPosition;
  itemPosition = new KConfigSkeleton::ItemPoint( currentGroup(), QStringLiteral( "position" ), mPosition, QPoint( -10000, -10000 ) );
  addItem( itemPosition, QStringLiteral( "Position" ) );
  KConfigSkeleton::ItemBool  *itemShowInTaskbar;
  itemShowInTaskbar = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowInTaskbar" ), mShowInTaskbar, false );
  addItem( itemShowInTaskbar, QStringLiteral( "ShowInTaskbar" ) );
  KConfigSkeleton::ItemBool  *itemKeepAbove;
  itemKeepAbove = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "KeepAbove" ), mKeepAbove, false );
  addItem( itemKeepAbove, QStringLiteral( "KeepAbove" ) );
  KConfigSkeleton::ItemBool  *itemKeepBelow;
  itemKeepBelow = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "KeepBelow" ), mKeepBelow, false );
  addItem( itemKeepBelow, QStringLiteral( "KeepBelow" ) );
}

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

