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

#include "cervisiasettings.h"

#include <kcolorscheme.h>
#include <kglobalsettings.h>

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

class CervisiaSettingsHelper
{
  public:
    CervisiaSettingsHelper() : q(0) {}
    ~CervisiaSettingsHelper() { delete q; }
    CervisiaSettings *q;
};
K_GLOBAL_STATIC(CervisiaSettingsHelper, s_globalCervisiaSettings)
CervisiaSettings *CervisiaSettings::self()
{
  if (!s_globalCervisiaSettings->q) {
    new CervisiaSettings;
    s_globalCervisiaSettings->q->readConfig();
  }

  return s_globalCervisiaSettings->q;
}

CervisiaSettings::CervisiaSettings(  )
  : KConfigSkeleton( QLatin1String( "cervisiapartrc" ) )
{
  Q_ASSERT(!s_globalCervisiaSettings->q);
  s_globalCervisiaSettings->q = this;
  setCurrentGroup( QLatin1String( "Colors" ) );

  KConfigSkeleton::ItemColor  *itemDiffChangeColor;
  itemDiffChangeColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "DiffChange" ), mDiffChangeColor, QColor( "#edbebe" ) );
  addItem( itemDiffChangeColor, QLatin1String( "DiffChangeColor" ) );
  KConfigSkeleton::ItemColor  *itemDiffDeleteColor;
  itemDiffDeleteColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "DiffDelete" ), mDiffDeleteColor, QColor( "#beedbe" ) );
  addItem( itemDiffDeleteColor, QLatin1String( "DiffDeleteColor" ) );
  KConfigSkeleton::ItemColor  *itemDiffInsertColor;
  itemDiffInsertColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "DiffInsert" ), mDiffInsertColor, QColor( "#bebeed" ) );
  addItem( itemDiffInsertColor, QLatin1String( "DiffInsertColor" ) );
  KConfigSkeleton::ItemColor  *itemLocalChangeColor;
  itemLocalChangeColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "LocalChange" ), mLocalChangeColor, QColor( "#8282ff" ) );
  addItem( itemLocalChangeColor, QLatin1String( "LocalChangeColor" ) );
  KConfigSkeleton::ItemColor  *itemRemoteChangeColor;
  itemRemoteChangeColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "RemoteChange" ), mRemoteChangeColor, QColor( "#46d246" ) );
  addItem( itemRemoteChangeColor, QLatin1String( "RemoteChangeColor" ) );
  KConfigSkeleton::ItemColor  *itemConflictColor;
  itemConflictColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "Conflict" ), mConflictColor, QColor( "#ff8282" ) );
  addItem( itemConflictColor, QLatin1String( "ConflictColor" ) );
  KConfigSkeleton::ItemColor  *itemNotInCvsColor;
  itemNotInCvsColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "NotInCvsColor" ), mNotInCvsColor, KColorScheme(QPalette::Active, KColorScheme::View).foreground().color() );
  addItem( itemNotInCvsColor, QLatin1String( "NotInCvsColor" ) );

  setCurrentGroup( QLatin1String( "LookAndFeel" ) );

  KConfigSkeleton::ItemFont  *itemProtocolFont;
  itemProtocolFont = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "ProtocolFont" ), mProtocolFont );
  addItem( itemProtocolFont, QLatin1String( "ProtocolFont" ) );
  KConfigSkeleton::ItemFont  *itemAnnotateFont;
  itemAnnotateFont = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "AnnotateFont" ), mAnnotateFont, KGlobalSettings::fixedFont() );
  addItem( itemAnnotateFont, QLatin1String( "AnnotateFont" ) );
  KConfigSkeleton::ItemFont  *itemDiffFont;
  itemDiffFont = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "DiffFont" ), mDiffFont, KGlobalSettings::fixedFont() );
  addItem( itemDiffFont, QLatin1String( "DiffFont" ) );
  KConfigSkeleton::ItemFont  *itemChangeLogFont;
  itemChangeLogFont = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "ChangeLogFont" ), mChangeLogFont, KGlobalSettings::fixedFont() );
  addItem( itemChangeLogFont, QLatin1String( "ChangeLogFont" ) );

  setCurrentGroup( QLatin1String( "General" ) );

  KConfigSkeleton::ItemUInt  *itemTimeout;
  itemTimeout = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "Timeout" ), mTimeout, 4000 );
  addItem( itemTimeout, QLatin1String( "Timeout" ) );

  setCurrentGroup( QLatin1String( "CheckoutDialog" ) );

  KConfigSkeleton::ItemString  *itemRepository;
  itemRepository = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Repository" ), mRepository );
  addItem( itemRepository, QLatin1String( "Repository" ) );
  KConfigSkeleton::ItemString  *itemModule;
  itemModule = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Module" ), mModule );
  addItem( itemModule, QLatin1String( "Module" ) );
  KConfigSkeleton::ItemPath  *itemWorkingFolder;
  itemWorkingFolder = new KConfigSkeleton::ItemPath( currentGroup(), QLatin1String( "Working directory" ), mWorkingFolder );
  addItem( itemWorkingFolder, QLatin1String( "WorkingFolder" ) );
}

CervisiaSettings::~CervisiaSettings()
{
  if (!s_globalCervisiaSettings.isDestroyed()) {
    s_globalCervisiaSettings->q = 0;
  }
}

