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

#include "cervisiasettings.h"

#include <kcolorscheme.h>
#include <QFontDatabase>

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

class CervisiaSettingsHelper
{
  public:
    CervisiaSettingsHelper() : q(nullptr) {}
    ~CervisiaSettingsHelper() { delete q; }
    CervisiaSettings *q;
};
Q_GLOBAL_STATIC(CervisiaSettingsHelper, s_globalCervisiaSettings)
CervisiaSettings *CervisiaSettings::self()
{
  if (!s_globalCervisiaSettings()->q) {
    new CervisiaSettings;
    s_globalCervisiaSettings()->q->read();
  }

  return s_globalCervisiaSettings()->q;
}

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

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

  setCurrentGroup( QStringLiteral( "LookAndFeel" ) );

  KConfigSkeleton::ItemFont  *itemProtocolFont;
  itemProtocolFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "ProtocolFont" ), mProtocolFont );
  addItem( itemProtocolFont, QStringLiteral( "ProtocolFont" ) );
  KConfigSkeleton::ItemFont  *itemAnnotateFont;
  itemAnnotateFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "AnnotateFont" ), mAnnotateFont, QFontDatabase::systemFont(QFontDatabase::FixedFont) );
  addItem( itemAnnotateFont, QStringLiteral( "AnnotateFont" ) );
  KConfigSkeleton::ItemFont  *itemDiffFont;
  itemDiffFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "DiffFont" ), mDiffFont, QFontDatabase::systemFont(QFontDatabase::FixedFont) );
  addItem( itemDiffFont, QStringLiteral( "DiffFont" ) );
  KConfigSkeleton::ItemFont  *itemChangeLogFont;
  itemChangeLogFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "ChangeLogFont" ), mChangeLogFont, QFontDatabase::systemFont(QFontDatabase::FixedFont) );
  addItem( itemChangeLogFont, QStringLiteral( "ChangeLogFont" ) );

  setCurrentGroup( QStringLiteral( "General" ) );

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

  setCurrentGroup( QStringLiteral( "CheckoutDialog" ) );

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

CervisiaSettings::~CervisiaSettings()
{
  s_globalCervisiaSettings()->q = nullptr;
}

