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

#include "plansettings.h"

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

class KPlatoSettingsHelper
{
  public:
    KPlatoSettingsHelper() : q(0) {}
    ~KPlatoSettingsHelper() { delete q; }
    KPlatoSettings *q;
};
K_GLOBAL_STATIC(KPlatoSettingsHelper, s_globalKPlatoSettings)
KPlatoSettings *KPlatoSettings::self()
{
  if (!s_globalKPlatoSettings->q) {
    new KPlatoSettings;
    s_globalKPlatoSettings->q->readConfig();
  }

  return s_globalKPlatoSettings->q;
}

KPlatoSettings::KPlatoSettings(  )
  : KPlatoConfigSkeleton()
{
  Q_ASSERT(!s_globalKPlatoSettings->q);
  s_globalKPlatoSettings->q = this;
  setCurrentGroup( QLatin1String( "Task defaults" ) );

  KPlatoConfigSkeleton::ItemString  *itemLeader;
  itemLeader = new KPlatoConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Leader" ), mLeader );
  addItem( itemLeader, QLatin1String( "Leader" ) );
  QList<KPlatoConfigSkeleton::ItemEnum::Choice2> valuesConstraintType;
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("AsSoonAsPossible");
    valuesConstraintType.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("AsLateAsPossible");
    valuesConstraintType.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("MustStartOn");
    valuesConstraintType.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("MustFinishOn");
    valuesConstraintType.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("StartNotEarlierThan");
    valuesConstraintType.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("FinishNotLaterThan");
    valuesConstraintType.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("FixedInterval");
    valuesConstraintType.append( choice );
  }
  KPlatoConfigSkeleton::ItemEnum  *itemConstraintType;
  itemConstraintType = new KPlatoConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "ConstraintType" ), mConstraintType, valuesConstraintType, EnumConstraintType::AsSoonAsPossible );
  addItem( itemConstraintType, QLatin1String( "ConstraintType" ) );
  QList<KPlatoConfigSkeleton::ItemEnum::Choice2> valuesStartTimeUsage;
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("CurrentdateTime");
    valuesStartTimeUsage.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("CurrentDate");
    valuesStartTimeUsage.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("SpecifiedDateTime");
    valuesStartTimeUsage.append( choice );
  }
  KPlatoConfigSkeleton::ItemEnum  *itemStartTimeUsage;
  itemStartTimeUsage = new KPlatoConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "StartTimeUsage" ), mStartTimeUsage, valuesStartTimeUsage, EnumStartTimeUsage::CurrentdateTime );
  addItem( itemStartTimeUsage, QLatin1String( "StartTimeUsage" ) );
  KPlatoConfigSkeleton::ItemDateTime  *itemConstraintStartTime;
  itemConstraintStartTime = new KPlatoConfigSkeleton::ItemDateTime( currentGroup(), QLatin1String( "ConstraintStartTime" ), mConstraintStartTime );
  addItem( itemConstraintStartTime, QLatin1String( "ConstraintStartTime" ) );
  QList<KPlatoConfigSkeleton::ItemEnum::Choice2> valuesEndTimeUsage;
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("CurrentdateTime");
    valuesEndTimeUsage.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("CurrentDate");
    valuesEndTimeUsage.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("SpecifiedDateTime");
    valuesEndTimeUsage.append( choice );
  }
  KPlatoConfigSkeleton::ItemEnum  *itemEndTimeUsage;
  itemEndTimeUsage = new KPlatoConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "EndTimeUsage" ), mEndTimeUsage, valuesEndTimeUsage, EnumEndTimeUsage::CurrentdateTime );
  addItem( itemEndTimeUsage, QLatin1String( "EndTimeUsage" ) );
  KPlatoConfigSkeleton::ItemDateTime  *itemConstraintEndTime;
  itemConstraintEndTime = new KPlatoConfigSkeleton::ItemDateTime( currentGroup(), QLatin1String( "ConstraintEndTime" ), mConstraintEndTime );
  addItem( itemConstraintEndTime, QLatin1String( "ConstraintEndTime" ) );
  QList<KPlatoConfigSkeleton::ItemEnum::Choice2> valuesEstimateType;
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Effort");
    valuesEstimateType.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Duration");
    valuesEstimateType.append( choice );
  }
  KPlatoConfigSkeleton::ItemEnum  *itemEstimateType;
  itemEstimateType = new KPlatoConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "EstimateType" ), mEstimateType, valuesEstimateType, EnumEstimateType::Effort );
  addItem( itemEstimateType, QLatin1String( "EstimateType" ) );
  QList<KPlatoConfigSkeleton::ItemEnum::Choice2> valuesUnit;
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Year");
    valuesUnit.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Month");
    valuesUnit.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Week");
    valuesUnit.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Day");
    valuesUnit.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Hour");
    valuesUnit.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Minute");
    valuesUnit.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Second");
    valuesUnit.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Millisecond");
    valuesUnit.append( choice );
  }
  KPlatoConfigSkeleton::ItemEnum  *itemUnit;
  itemUnit = new KPlatoConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "Unit" ), mUnit, valuesUnit, EnumUnit::Hour );
  addItem( itemUnit, QLatin1String( "Unit" ) );
  KPlatoConfigSkeleton::ItemDouble  *itemExpectedEstimate;
  itemExpectedEstimate = new KPlatoConfigSkeleton::ItemDouble( currentGroup(), QLatin1String( "ExpectedEstimate" ), mExpectedEstimate, 8.0 );
  addItem( itemExpectedEstimate, QLatin1String( "ExpectedEstimate" ) );
  KPlatoConfigSkeleton::ItemInt  *itemOptimisticRatio;
  itemOptimisticRatio = new KPlatoConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "OptimisticRatio" ), mOptimisticRatio, -75 );
  addItem( itemOptimisticRatio, QLatin1String( "OptimisticRatio" ) );
  KPlatoConfigSkeleton::ItemInt  *itemPessimisticRatio;
  itemPessimisticRatio = new KPlatoConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "PessimisticRatio" ), mPessimisticRatio, 100 );
  addItem( itemPessimisticRatio, QLatin1String( "PessimisticRatio" ) );
  KPlatoConfigSkeleton::ItemString  *itemDescription;
  itemDescription = new KPlatoConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Description" ), mDescription );
  addItem( itemDescription, QLatin1String( "Description" ) );

  setCurrentGroup( QLatin1String( "TaskColors" ) );

  QList<KPlatoConfigSkeleton::ItemEnum::Choice2> valuesColorGradientType;
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Linear");
    valuesColorGradientType.append( choice );
  }
  {
    KPlatoConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Flat");
    valuesColorGradientType.append( choice );
  }
  KPlatoConfigSkeleton::ItemEnum  *itemColorGradientType;
  itemColorGradientType = new KPlatoConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "ColorGradientType" ), mColorGradientType, valuesColorGradientType, EnumColorGradientType::Linear );
  addItem( itemColorGradientType, QLatin1String( "ColorGradientType" ) );
  KPlatoConfigSkeleton::ItemBool  *itemSummaryTaskLevelColorsEnabled;
  itemSummaryTaskLevelColorsEnabled = new KPlatoConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "SummaryTaskLevelColorsEnabled" ), mSummaryTaskLevelColorsEnabled, false );
  addItem( itemSummaryTaskLevelColorsEnabled, QLatin1String( "SummaryTaskLevelColorsEnabled" ) );
  KPlatoConfigSkeleton::ItemColor  *itemSummaryTaskDefaultColor;
  itemSummaryTaskDefaultColor = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "SummaryTaskDefaultColor" ), mSummaryTaskDefaultColor, QColor( "#0000ff" ) );
  addItem( itemSummaryTaskDefaultColor, QLatin1String( "SummaryTaskDefaultColor" ) );
  KPlatoConfigSkeleton::ItemColor  *itemSummaryTaskLevelColor_1;
  itemSummaryTaskLevelColor_1 = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "SummaryTaskLevelColor_1" ), mSummaryTaskLevelColor_1, QColor( "#0000ff" ) );
  addItem( itemSummaryTaskLevelColor_1, QLatin1String( "SummaryTaskLevelColor_1" ) );
  KPlatoConfigSkeleton::ItemColor  *itemSummaryTaskLevelColor_2;
  itemSummaryTaskLevelColor_2 = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "SummaryTaskLevelColor_2" ), mSummaryTaskLevelColor_2, QColor( "#0000ff" ) );
  addItem( itemSummaryTaskLevelColor_2, QLatin1String( "SummaryTaskLevelColor_2" ) );
  KPlatoConfigSkeleton::ItemColor  *itemSummaryTaskLevelColor_3;
  itemSummaryTaskLevelColor_3 = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "SummaryTaskLevelColor_3" ), mSummaryTaskLevelColor_3, QColor( "#0000ff" ) );
  addItem( itemSummaryTaskLevelColor_3, QLatin1String( "SummaryTaskLevelColor_3" ) );
  KPlatoConfigSkeleton::ItemColor  *itemSummaryTaskLevelColor_4;
  itemSummaryTaskLevelColor_4 = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "SummaryTaskLevelColor_4" ), mSummaryTaskLevelColor_4, QColor( "#0000ff" ) );
  addItem( itemSummaryTaskLevelColor_4, QLatin1String( "SummaryTaskLevelColor_4" ) );
  KPlatoConfigSkeleton::ItemColor  *itemTaskNormalColor;
  itemTaskNormalColor = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "TaskNormalColor" ), mTaskNormalColor, QColor( "#00ff00" ) );
  addItem( itemTaskNormalColor, QLatin1String( "TaskNormalColor" ) );
  KPlatoConfigSkeleton::ItemColor  *itemTaskCriticalColor;
  itemTaskCriticalColor = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "TaskCriticalColor" ), mTaskCriticalColor, QColor( "#ff0000" ) );
  addItem( itemTaskCriticalColor, QLatin1String( "TaskCriticalColor" ) );
  KPlatoConfigSkeleton::ItemColor  *itemTaskFinishedColor;
  itemTaskFinishedColor = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "TaskFinishedColor" ), mTaskFinishedColor, QColor( "#A0A0A0" ) );
  addItem( itemTaskFinishedColor, QLatin1String( "TaskFinishedColor" ) );
  KPlatoConfigSkeleton::ItemColor  *itemTaskErrorColor;
  itemTaskErrorColor = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "TaskErrorColor" ), mTaskErrorColor, QColor( "#ffff00" ) );
  addItem( itemTaskErrorColor, QLatin1String( "TaskErrorColor" ) );
  KPlatoConfigSkeleton::ItemColor  *itemMilestoneNormalColor;
  itemMilestoneNormalColor = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "MilestoneNormalColor" ), mMilestoneNormalColor, QColor( "#0000ff" ) );
  addItem( itemMilestoneNormalColor, QLatin1String( "MilestoneNormalColor" ) );
  KPlatoConfigSkeleton::ItemColor  *itemMilestoneCriticalColor;
  itemMilestoneCriticalColor = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "MilestoneCriticalColor" ), mMilestoneCriticalColor, QColor( "#ff0000" ) );
  addItem( itemMilestoneCriticalColor, QLatin1String( "MilestoneCriticalColor" ) );
  KPlatoConfigSkeleton::ItemColor  *itemMilestoneFinishedColor;
  itemMilestoneFinishedColor = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "MilestoneFinishedColor" ), mMilestoneFinishedColor, QColor( "#A0A0A0" ) );
  addItem( itemMilestoneFinishedColor, QLatin1String( "MilestoneFinishedColor" ) );
  KPlatoConfigSkeleton::ItemColor  *itemMilestoneErrorColor;
  itemMilestoneErrorColor = new KPlatoConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "MilestoneErrorColor" ), mMilestoneErrorColor, QColor( "#ffff00" ) );
  addItem( itemMilestoneErrorColor, QLatin1String( "MilestoneErrorColor" ) );

  setCurrentGroup( QLatin1String( "Work Package" ) );

  KPlatoConfigSkeleton::ItemBool  *itemCheckForWorkPackages;
  itemCheckForWorkPackages = new KPlatoConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "CheckForWorkPackages" ), mCheckForWorkPackages );
  addItem( itemCheckForWorkPackages, QLatin1String( "CheckForWorkPackages" ) );
  KPlatoConfigSkeleton::ItemUrl  *itemRetrieveUrl;
  itemRetrieveUrl = new KPlatoConfigSkeleton::ItemUrl( currentGroup(), QLatin1String( "RetrieveUrl" ), mRetrieveUrl );
  addItem( itemRetrieveUrl, QLatin1String( "RetrieveUrl" ) );
  KPlatoConfigSkeleton::ItemBool  *itemDeleteFile;
  itemDeleteFile = new KPlatoConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "DeleteFile" ), mDeleteFile );
  addItem( itemDeleteFile, QLatin1String( "DeleteFile" ) );
  KPlatoConfigSkeleton::ItemBool  *itemSaveFile;
  itemSaveFile = new KPlatoConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "SaveFile" ), mSaveFile );
  addItem( itemSaveFile, QLatin1String( "SaveFile" ) );
  KPlatoConfigSkeleton::ItemUrl  *itemSaveUrl;
  itemSaveUrl = new KPlatoConfigSkeleton::ItemUrl( currentGroup(), QLatin1String( "SaveUrl" ), mSaveUrl );
  addItem( itemSaveUrl, QLatin1String( "SaveUrl" ) );

  setCurrentGroup( QLatin1String( "Miscellaneous" ) );

  KPlatoConfigSkeleton::ItemInt  *itemMinimumDurationUnit;
  itemMinimumDurationUnit = new KPlatoConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "MinimumDurationUnit" ), mMinimumDurationUnit, EnumUnit::Hour );
  addItem( itemMinimumDurationUnit, QLatin1String( "MinimumDurationUnit" ) );
  KPlatoConfigSkeleton::ItemInt  *itemMaximumDurationUnit;
  itemMaximumDurationUnit = new KPlatoConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "MaximumDurationUnit" ), mMaximumDurationUnit, EnumUnit::Month );
  addItem( itemMaximumDurationUnit, QLatin1String( "MaximumDurationUnit" ) );
}

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

