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

#include "settings.h"

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

class SettingsHelper
{
  public:
    SettingsHelper() : q(0) {}
    ~SettingsHelper() { delete q; }
    Settings *q;
};
Q_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
Settings *Settings::self()
{
  if (!s_globalSettings()->q) {
    new Settings;
    s_globalSettings()->q->read();
  }

  return s_globalSettings()->q;
}

Settings::Settings(  )
  : KConfigSkeleton( QLatin1String( "kmplotrc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QLatin1String( "Coordinate System" ) );

  KConfigSkeleton::ItemDouble  *itemAxesLineWidth;
  itemAxesLineWidth = new KConfigSkeleton::ItemDouble( currentGroup(), QLatin1String( "AxesLineWidth" ), mAxesLineWidth, 0.2 );
  addItem( itemAxesLineWidth, QLatin1String( "AxesLineWidth" ) );
  KConfigSkeleton::ItemBool  *itemShowLabel;
  itemShowLabel = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ShowLabel" ), mShowLabel, true );
  addItem( itemShowLabel, QLatin1String( "ShowLabel" ) );
  KConfigSkeleton::ItemBool  *itemShowAxes;
  itemShowAxes = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ShowAxes" ), mShowAxes, true );
  addItem( itemShowAxes, QLatin1String( "ShowAxes" ) );
  KConfigSkeleton::ItemBool  *itemShowArrows;
  itemShowArrows = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ShowArrows" ), mShowArrows, true );
  addItem( itemShowArrows, QLatin1String( "ShowArrows" ) );
  KConfigSkeleton::ItemDouble  *itemGridLineWidth;
  itemGridLineWidth = new KConfigSkeleton::ItemDouble( currentGroup(), QLatin1String( "GridLineWidth" ), mGridLineWidth, 0.1 );
  addItem( itemGridLineWidth, QLatin1String( "GridLineWidth" ) );
  KConfigSkeleton::ItemInt  *itemGridStyle;
  itemGridStyle = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "GridStyle" ), mGridStyle, 1 );
  addItem( itemGridStyle, QLatin1String( "GridStyle" ) );
  KConfigSkeleton::ItemDouble  *itemTicLength;
  itemTicLength = new KConfigSkeleton::ItemDouble( currentGroup(), QLatin1String( "TicLength" ), mTicLength, 0.5 );
  addItem( itemTicLength, QLatin1String( "TicLength" ) );
  KConfigSkeleton::ItemDouble  *itemTicWidth;
  itemTicWidth = new KConfigSkeleton::ItemDouble( currentGroup(), QLatin1String( "TicWidth" ), mTicWidth, 0.3 );
  addItem( itemTicWidth, QLatin1String( "TicWidth" ) );
  KConfigSkeleton::ItemString  *itemXMin;
  itemXMin = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "XMin" ), mXMin, QLatin1String( "-8" ) );
  addItem( itemXMin, QLatin1String( "XMin" ) );
  KConfigSkeleton::ItemString  *itemXMax;
  itemXMax = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "XMax" ), mXMax, QLatin1String( "8" ) );
  addItem( itemXMax, QLatin1String( "XMax" ) );
  KConfigSkeleton::ItemString  *itemYMin;
  itemYMin = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "YMin" ), mYMin, QLatin1String( "-8" ) );
  addItem( itemYMin, QLatin1String( "YMin" ) );
  KConfigSkeleton::ItemString  *itemYMax;
  itemYMax = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "YMax" ), mYMax, QLatin1String( "8" ) );
  addItem( itemYMax, QLatin1String( "YMax" ) );
  KConfigSkeleton::ItemString  *itemLabelHorizontalAxis;
  itemLabelHorizontalAxis = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "LabelHorizontalAxis" ), mLabelHorizontalAxis, QLatin1String( "X" ) );
  addItem( itemLabelHorizontalAxis, QLatin1String( "LabelHorizontalAxis" ) );
  KConfigSkeleton::ItemString  *itemLabelVerticalAxis;
  itemLabelVerticalAxis = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "LabelVerticalAxis" ), mLabelVerticalAxis, QLatin1String( "Y" ) );
  addItem( itemLabelVerticalAxis, QLatin1String( "LabelVerticalAxis" ) );

  setCurrentGroup( QLatin1String( "Scaling" ) );

  KConfigSkeleton::ItemInt  *itemXScalingMode;
  itemXScalingMode = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "XScalingMode" ), mXScalingMode, 0 );
  addItem( itemXScalingMode, QLatin1String( "XScalingMode" ) );
  KConfigSkeleton::ItemInt  *itemYScalingMode;
  itemYScalingMode = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "YScalingMode" ), mYScalingMode, 0 );
  addItem( itemYScalingMode, QLatin1String( "YScalingMode" ) );
  KConfigSkeleton::ItemString  *itemXScaling;
  itemXScaling = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "XScaling" ), mXScaling, QLatin1String( "1" ) );
  addItem( itemXScaling, QLatin1String( "XScaling" ) );
  KConfigSkeleton::ItemString  *itemYScaling;
  itemYScaling = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "YScaling" ), mYScaling, QLatin1String( "1" ) );
  addItem( itemYScaling, QLatin1String( "YScaling" ) );

  setCurrentGroup( QLatin1String( "Fonts" ) );

  KConfigSkeleton::ItemFont  *itemAxesFont;
  itemAxesFont = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "AxesFont" ), mAxesFont, QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
  addItem( itemAxesFont, QLatin1String( "AxesFont" ) );
  KConfigSkeleton::ItemFont  *itemHeaderTableFont;
  itemHeaderTableFont = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "HeaderTableFont" ), mHeaderTableFont, QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
  addItem( itemHeaderTableFont, QLatin1String( "HeaderTableFont" ) );
  KConfigSkeleton::ItemFont  *itemLabelFont;
  itemLabelFont = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "LabelFont" ), mLabelFont, QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
  addItem( itemLabelFont, QLatin1String( "LabelFont" ) );

  setCurrentGroup( QLatin1String( "Colors" ) );

  KConfigSkeleton::ItemColor  *itemAxesColor;
  itemAxesColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "AxesColor" ), mAxesColor, QColor( "#282828" ) );
  addItem( itemAxesColor, QLatin1String( "AxesColor" ) );
  KConfigSkeleton::ItemColor  *itemGridColor;
  itemGridColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "GridColor" ), mGridColor, QColor( "#AEAEAE" ) );
  addItem( itemGridColor, QLatin1String( "GridColor" ) );
  KConfigSkeleton::ItemColor  *itemColor0;
  itemColor0 = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "Color0" ), mColor0, QColor( "#191970" ) );
  addItem( itemColor0, QLatin1String( "Color0" ) );
  KConfigSkeleton::ItemColor  *itemColor1;
  itemColor1 = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "Color1" ), mColor1, QColor( "#006400" ) );
  addItem( itemColor1, QLatin1String( "Color1" ) );
  KConfigSkeleton::ItemColor  *itemColor2;
  itemColor2 = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "Color2" ), mColor2, QColor( "#FF4500" ) );
  addItem( itemColor2, QLatin1String( "Color2" ) );
  KConfigSkeleton::ItemColor  *itemColor3;
  itemColor3 = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "Color3" ), mColor3, QColor( "#808000" ) );
  addItem( itemColor3, QLatin1String( "Color3" ) );
  KConfigSkeleton::ItemColor  *itemColor4;
  itemColor4 = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "Color4" ), mColor4, QColor( "#FF1493" ) );
  addItem( itemColor4, QLatin1String( "Color4" ) );
  KConfigSkeleton::ItemColor  *itemColor5;
  itemColor5 = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "Color5" ), mColor5, QColor( "#B111DD" ) );
  addItem( itemColor5, QLatin1String( "Color5" ) );
  KConfigSkeleton::ItemColor  *itemColor6;
  itemColor6 = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "Color6" ), mColor6, QColor( "#800000" ) );
  addItem( itemColor6, QLatin1String( "Color6" ) );
  KConfigSkeleton::ItemColor  *itemColor7;
  itemColor7 = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "Color7" ), mColor7, QColor( "#0000CD" ) );
  addItem( itemColor7, QLatin1String( "Color7" ) );
  KConfigSkeleton::ItemColor  *itemColor8;
  itemColor8 = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "Color8" ), mColor8, QColor( "#FF8C00" ) );
  addItem( itemColor8, QLatin1String( "Color8" ) );
  KConfigSkeleton::ItemColor  *itemColor9;
  itemColor9 = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "Color9" ), mColor9, QColor( "#3CB400" ) );
  addItem( itemColor9, QLatin1String( "Color9" ) );

  setCurrentGroup( QLatin1String( "General" ) );

  KConfigSkeleton::ItemInt  *itemAnglemode;
  itemAnglemode = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "anglemode" ), mAnglemode, 0 );
  addItem( itemAnglemode, QLatin1String( "anglemode" ) );
  KConfigSkeleton::ItemColor  *itemBackgroundcolor;
  itemBackgroundcolor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "backgroundcolor" ), mBackgroundcolor, QColor( "#FFFFFF" ) );
  addItem( itemBackgroundcolor, QLatin1String( "backgroundcolor" ) );
  KConfigSkeleton::ItemInt  *itemZoomInStep;
  itemZoomInStep = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "zoomInStep" ), mZoomInStep, 20 );
  addItem( itemZoomInStep, QLatin1String( "zoomInStep" ) );
  KConfigSkeleton::ItemInt  *itemZoomOutStep;
  itemZoomOutStep = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "zoomOutStep" ), mZoomOutStep, 25 );
  addItem( itemZoomOutStep, QLatin1String( "zoomOutStep" ) );
  KConfigSkeleton::ItemBool  *itemDetailedTracing;
  itemDetailedTracing = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "DetailedTracing" ), mDetailedTracing, false );
  addItem( itemDetailedTracing, QLatin1String( "DetailedTracing" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesDefaultEquationForm;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QLatin1String("Function");
    valuesDefaultEquationForm.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QLatin1String("Implicit");
    valuesDefaultEquationForm.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemDefaultEquationForm;
  itemDefaultEquationForm = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "DefaultEquationForm" ), mDefaultEquationForm, valuesDefaultEquationForm, EnumDefaultEquationForm::Function );
  addItem( itemDefaultEquationForm, QLatin1String( "DefaultEquationForm" ) );
}

Settings::~Settings()
{
  s_globalSettings()->q = 0;
}

