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

#include "settings.h"

#include <klocalizedstring.h>

Settings::Settings( KSharedConfig::Ptr config )
  : KConfigSkeleton( std::move( config ) )
{
  setCurrentGroup( QStringLiteral( "General" ) );

  mPathItem = new KConfigSkeleton::ItemPath( currentGroup(), QStringLiteral( "Path" ), mPath );
  mPathItem->setLabel( i18n("Path to mbox file.") );
  addItem( mPathItem, QStringLiteral( "Path" ) );
  mDisplayNameItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "DisplayName" ), mDisplayName );
  mDisplayNameItem->setLabel( i18n("Display name.") );
  addItem( mDisplayNameItem, QStringLiteral( "DisplayName" ) );
  mReadOnlyItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ReadOnly" ), mReadOnly, false );
  mReadOnlyItem->setLabel( i18n("Do not change the actual backend data.") );
  addItem( mReadOnlyItem, QStringLiteral( "ReadOnly" ) );
  mMonitorFileItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "MonitorFile" ), mMonitorFile, true );
  mMonitorFileItem->setLabel( i18n("Monitor file for changes.") );
  addItem( mMonitorFileItem, QStringLiteral( "MonitorFile" ) );
  mPeriodicUpdateItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "PeriodicUpdate" ), mPeriodicUpdate, false );
  mPeriodicUpdateItem->setLabel( i18n("Periodically update the file.") );
  addItem( mPeriodicUpdateItem, QStringLiteral( "PeriodicUpdate" ) );
  mUpdatePeriodItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "UpdatePeriod" ), mUpdatePeriod, 60 );
  mUpdatePeriodItem->setLabel( i18n("Automatic update period in minutes.") );
  addItem( mUpdatePeriodItem, QStringLiteral( "UpdatePeriod" ) );

  setCurrentGroup( QStringLiteral( "Locking" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesLockfileMethod;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("procmail");
    valuesLockfileMethod.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("mutt_dotlock");
    valuesLockfileMethod.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("mutt_dotlock_privileged");
    valuesLockfileMethod.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("none");
    valuesLockfileMethod.append( choice );
  }
  mLockfileMethodItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "LockfileMethod" ), mLockfileMethod, valuesLockfileMethod, none );
  mLockfileMethodItem->setLabel( i18n("LockfileMethod") );
  addItem( mLockfileMethodItem, QStringLiteral( "LockfileMethod" ) );
  mLockfileItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "Lockfile" ), mLockfile );
  mLockfileItem->setLabel( i18n("Lockfile") );
  addItem( mLockfileItem, QStringLiteral( "Lockfile" ) );

  setCurrentGroup( QStringLiteral( "Compacting" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesCompactFrequency;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("never");
    valuesCompactFrequency.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("per_x_messages");
    valuesCompactFrequency.append( choice );
  }
  mCompactFrequencyItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "CompactFrequency" ), mCompactFrequency, valuesCompactFrequency, per_x_messages );
  mCompactFrequencyItem->setLabel( i18n("CompactFrequency") );
  addItem( mCompactFrequencyItem, QStringLiteral( "CompactFrequency" ) );
  mMessageCountItem = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "MessageCount" ), mMessageCount, 50 );
  mMessageCountItem->setLabel( i18n("Number of deleted messages before a purge is started.") );
  addItem( mMessageCountItem, QStringLiteral( "MessageCount" ) );
}

Settings::~Settings()
{
}

