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

#include "settingsclass.h"

#include <kstaticdeleter.h>

SettingsClass *SettingsClass::mSelf = 0;
static KStaticDeleter<SettingsClass> staticSettingsClassDeleter;

SettingsClass *SettingsClass::self()
{
  if ( !mSelf ) {
    staticSettingsClassDeleter.setObject( mSelf, new SettingsClass() );
    mSelf->readConfig();
  }

  return mSelf;
}

SettingsClass::SettingsClass(  )
  : TDEConfigSkeleton( TQString::fromLatin1( "kbruchrc" ) )
{
  mSelf = this;
  setCurrentGroup( TQString::fromLatin1( "General" ) );

  TDEConfigSkeleton::ItemInt  *itemActiveExercise;
  itemActiveExercise = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "activeExercise" ), mActiveExercise, 0 );
  addItem( itemActiveExercise, TQString::fromLatin1( "activeExercise" ) );

  setCurrentGroup( TQString::fromLatin1( "Task" ) );

  TDEConfigSkeleton::ItemBool  *itemAddsub;
  itemAddsub = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "addsub" ), mAddsub, true );
  addItem( itemAddsub, TQString::fromLatin1( "addsub" ) );
  TDEConfigSkeleton::ItemBool  *itemMuldiv;
  itemMuldiv = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "muldiv" ), mMuldiv, false );
  addItem( itemMuldiv, TQString::fromLatin1( "muldiv" ) );
  TDEConfigSkeleton::ItemUInt  *itemNumber_ratios;
  itemNumber_ratios = new TDEConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "number_ratios" ), mNumber_ratios, 2 );
  addItem( itemNumber_ratios, TQString::fromLatin1( "number_ratios" ) );
  TDEConfigSkeleton::ItemUInt  *itemMax_main_denominator;
  itemMax_main_denominator = new TDEConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "max_main_denominator" ), mMax_main_denominator, 10 );
  addItem( itemMax_main_denominator, TQString::fromLatin1( "max_main_denominator" ) );

  setCurrentGroup( TQString::fromLatin1( "Statistics" ) );

  TDEConfigSkeleton::ItemInt  *itemCorrect;
  itemCorrect = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "correct" ), mCorrect, 0 );
  addItem( itemCorrect, TQString::fromLatin1( "correct" ) );
  TDEConfigSkeleton::ItemInt  *itemCount;
  itemCount = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "count" ), mCount, 0 );
  addItem( itemCount, TQString::fromLatin1( "count" ) );

  setCurrentGroup( TQString::fromLatin1( "TaskViewer" ) );

  TDEConfigSkeleton::ItemColor  *itemNumberColor;
  itemNumberColor = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "numberColor" ), mNumberColor, TQt::darkGreen );
  addItem( itemNumberColor, TQString::fromLatin1( "numberColor" ) );
  TDEConfigSkeleton::ItemColor  *itemOperationColor;
  itemOperationColor = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "operationColor" ), mOperationColor, TQt::blue );
  addItem( itemOperationColor, TQString::fromLatin1( "operationColor" ) );
  TDEConfigSkeleton::ItemColor  *itemFractionBarColor;
  itemFractionBarColor = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "fractionBarColor" ), mFractionBarColor, TQt::red );
  addItem( itemFractionBarColor, TQString::fromLatin1( "fractionBarColor" ) );
  TDEConfigSkeleton::ItemFont  *itemTaskFont;
  itemTaskFont = new TDEConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "taskFont" ), mTaskFont, TDEGlobalSettings::generalFont() );
  addItem( itemTaskFont, TQString::fromLatin1( "taskFont" ) );
  TDEConfigSkeleton::ItemBool  *itemShowSpecialRatioNotation;
  itemShowSpecialRatioNotation = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "showSpecialRatioNotation" ), mShowSpecialRatioNotation, true );
  addItem( itemShowSpecialRatioNotation, TQString::fromLatin1( "showSpecialRatioNotation" ) );
}

SettingsClass::~SettingsClass()
{
  if ( mSelf == this )
    staticSettingsClassDeleter.setObject( mSelf, 0, false );
}

