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

#include "fontssettings.h"

FontsSettings::FontsSettings( QObject *parent )
  : KConfigSkeleton( QStringLiteral( "kdeglobals" ) )
{
  setParent(parent);
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&FontsSettings::itemChanged);

  setCurrentGroup( QStringLiteral( "General" ) );


      #ifdef Q_OS_MAC
      QFont generalFont = QFont("Lucida Grande", 13);
      #else
      QFont generalFont = QFont("Noto Sans", 10);
      generalFont.setStyleName("Regular");
      #endif
      
  KConfigCompilerSignallingItem  *itemFont;
  KConfigSkeleton::ItemFont  *innerItemFont;
  innerItemFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "font" ), mFont, generalFont );
  itemFont = new KConfigCompilerSignallingItem(innerItemFont, this, notifyFunction, signalFontChanged);
  itemFont->setWriteFlags(KConfigBase::Notify);
  addItem( itemFont, QStringLiteral( "font" ) );

      #ifdef Q_OS_MAC
      QFont fixedWidthFont = QFont("Monaco", 10);
      #else
      QFont fixedWidthFont = QFont("Hack", 10);
      fixedWidthFont.setStyleName("Regular");
      #endif
      
  KConfigCompilerSignallingItem  *itemFixed;
  KConfigSkeleton::ItemFont  *innerItemFixed;
  innerItemFixed = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "fixed" ), mFixed, fixedWidthFont );
  itemFixed = new KConfigCompilerSignallingItem(innerItemFixed, this, notifyFunction, signalFixedChanged);
  addItem( itemFixed, QStringLiteral( "fixed" ) );

      #ifdef Q_OS_MAC
      QFont smallFont = QFont("Lucida Grande", 9);
      #else
      QFont smallFont = QFont("Noto Sans", 8);
      smallFont.setStyleName("Regular");
      #endif
      
  KConfigCompilerSignallingItem  *itemSmallestReadableFont;
  KConfigSkeleton::ItemFont  *innerItemSmallestReadableFont;
  innerItemSmallestReadableFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "smallestReadableFont" ), mSmallestReadableFont, smallFont );
  itemSmallestReadableFont = new KConfigCompilerSignallingItem(innerItemSmallestReadableFont, this, notifyFunction, signalSmallestReadableFontChanged);
  addItem( itemSmallestReadableFont, QStringLiteral( "smallestReadableFont" ) );

      #ifdef Q_OS_MAC
      QFont toolBarFont = QFont("Lucida Grande", 11);
      #else
      QFont toolBarFont = QFont("Noto Sans", 10);
      toolBarFont.setStyleName("Regular");
      #endif
      
  KConfigCompilerSignallingItem  *itemToolBarFont;
  KConfigSkeleton::ItemFont  *innerItemToolBarFont;
  innerItemToolBarFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "toolBarFont" ), mToolBarFont, toolBarFont );
  itemToolBarFont = new KConfigCompilerSignallingItem(innerItemToolBarFont, this, notifyFunction, signalToolBarFontChanged);
  addItem( itemToolBarFont, QStringLiteral( "toolBarFont" ) );

      #ifdef Q_OS_MAC
      QFont menuFont = QFont("Lucida Grande", 13);
      #else
      QFont menuFont = QFont("Noto Sans", 10);
      menuFont.setStyleName("Regular");
      #endif
      
  KConfigCompilerSignallingItem  *itemMenuFont;
  KConfigSkeleton::ItemFont  *innerItemMenuFont;
  innerItemMenuFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "menuFont" ), mMenuFont, menuFont );
  itemMenuFont = new KConfigCompilerSignallingItem(innerItemMenuFont, this, notifyFunction, signalMenuFontChanged);
  addItem( itemMenuFont, QStringLiteral( "menuFont" ) );

  setCurrentGroup( QStringLiteral( "WM" ) );


      #ifdef Q_OS_MAC
      QFont windowTitleFont = QFont("Lucida Grande", 14);
      #else
      QFont windowTitleFont = QFont("Noto Sans", 10);
      windowTitleFont.setStyleName("Regular");
      #endif
      
  KConfigCompilerSignallingItem  *itemActiveFont;
  KConfigSkeleton::ItemFont  *innerItemActiveFont;
  innerItemActiveFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "activeFont" ), mActiveFont, windowTitleFont );
  itemActiveFont = new KConfigCompilerSignallingItem(innerItemActiveFont, this, notifyFunction, signalActiveFontChanged);
  addItem( itemActiveFont, QStringLiteral( "activeFont" ) );
}

QFont FontsSettings::defaultFontValue_helper() const
{

      #ifdef Q_OS_MAC
      QFont generalFont = QFont("Lucida Grande", 13);
      #else
      QFont generalFont = QFont("Noto Sans", 10);
      generalFont.setStyleName("Regular");
      #endif
      
  return generalFont;
}

QFont FontsSettings::defaultFixedValue_helper() const
{

      #ifdef Q_OS_MAC
      QFont fixedWidthFont = QFont("Monaco", 10);
      #else
      QFont fixedWidthFont = QFont("Hack", 10);
      fixedWidthFont.setStyleName("Regular");
      #endif
      
  return fixedWidthFont;
}

QFont FontsSettings::defaultSmallestReadableFontValue_helper() const
{

      #ifdef Q_OS_MAC
      QFont smallFont = QFont("Lucida Grande", 9);
      #else
      QFont smallFont = QFont("Noto Sans", 8);
      smallFont.setStyleName("Regular");
      #endif
      
  return smallFont;
}

QFont FontsSettings::defaultToolBarFontValue_helper() const
{

      #ifdef Q_OS_MAC
      QFont toolBarFont = QFont("Lucida Grande", 11);
      #else
      QFont toolBarFont = QFont("Noto Sans", 10);
      toolBarFont.setStyleName("Regular");
      #endif
      
  return toolBarFont;
}

QFont FontsSettings::defaultMenuFontValue_helper() const
{

      #ifdef Q_OS_MAC
      QFont menuFont = QFont("Lucida Grande", 13);
      #else
      QFont menuFont = QFont("Noto Sans", 10);
      menuFont.setStyleName("Regular");
      #endif
      
  return menuFont;
}

QFont FontsSettings::defaultActiveFontValue_helper() const
{

      #ifdef Q_OS_MAC
      QFont windowTitleFont = QFont("Lucida Grande", 14);
      #else
      QFont windowTitleFont = QFont("Noto Sans", 10);
      windowTitleFont.setStyleName("Regular");
      #endif
      
  return windowTitleFont;
}

FontsSettings::~FontsSettings()
{
}


void FontsSettings::itemChanged(quint64 flags) {

  if ( flags & signalFontChanged ) {
    Q_EMIT fontChanged();
  }
  if ( flags & signalFixedChanged ) {
    Q_EMIT fixedChanged();
  }
  if ( flags & signalSmallestReadableFontChanged ) {
    Q_EMIT smallestReadableFontChanged();
  }
  if ( flags & signalToolBarFontChanged ) {
    Q_EMIT toolBarFontChanged();
  }
  if ( flags & signalMenuFontChanged ) {
    Q_EMIT menuFontChanged();
  }
  if ( flags & signalActiveFontChanged ) {
    Q_EMIT activeFontChanged();
  }
}

#include "fontssettings.moc"

