// This file is generated by kconfig_compiler_kf6 from mixedmaildirresource.kcfg.
// All changes you do to this file will be lost.
#ifndef SETTINGS_H
#define SETTINGS_H

#include <kconfigskeleton.h>
#include <QCoreApplication>
#include <QDebug>

class Settings : public KConfigSkeleton
{
  public:

    static Settings *self();
    static void instance(const QString& cfgfilename);
    static void instance(KSharedConfig::Ptr config);
    ~Settings() override;

    /**
      Set Path to KMail mail folder
    */
    static
    void setPath( const QString & v )
    {
      if (!self()->isPathImmutable())
        self()->mPath = v;
    }

    /**
      Get Path to KMail mail folder
    */
    static
    QString path()
    {
      return self()->mPath;
    }

    /**
      Is Path to KMail mail folder Immutable
    */
    static
    bool isPathImmutable()
    {
      return self()->isImmutable( QStringLiteral( "Path" ) );
    }

    /**
      Get Item object corresponding to Path()
    */
    ItemPath *pathItem()
    {
      return mPathItem;
    }

    /**
      Set Path points to a folder containing Maildirs instead of to a maildir itself.
    */
    static
    void setTopLevelIsContainer( bool v )
    {
      if (!self()->isTopLevelIsContainerImmutable())
        self()->mTopLevelIsContainer = v;
    }

    /**
      Get Path points to a folder containing Maildirs instead of to a maildir itself.
    */
    static
    bool topLevelIsContainer()
    {
      return self()->mTopLevelIsContainer;
    }

    /**
      Is Path points to a folder containing Maildirs instead of to a maildir itself. Immutable
    */
    static
    bool isTopLevelIsContainerImmutable()
    {
      return self()->isImmutable( QStringLiteral( "TopLevelIsContainer" ) );
    }

    /**
      Get Item object corresponding to TopLevelIsContainer()
    */
    ItemBool *topLevelIsContainerItem()
    {
      return mTopLevelIsContainerItem;
    }

    /**
      Set Do not change the actual backend data.
    */
    static
    void setReadOnly( bool v )
    {
      if (!self()->isReadOnlyImmutable())
        self()->mReadOnly = v;
    }

    /**
      Get Do not change the actual backend data.
    */
    static
    bool readOnly()
    {
      return self()->mReadOnly;
    }

    /**
      Is Do not change the actual backend data. Immutable
    */
    static
    bool isReadOnlyImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ReadOnly" ) );
    }

    /**
      Get Item object corresponding to ReadOnly()
    */
    ItemBool *readOnlyItem()
    {
      return mReadOnlyItem;
    }

  protected:
    Settings(KSharedConfig::Ptr config);
    friend class SettingsHelper;


    // General
    QString mPath;
    bool mTopLevelIsContainer;
    bool mReadOnly;

  private:
    ItemPath *mPathItem;
    ItemBool *mTopLevelIsContainerItem;
    ItemBool *mReadOnlyItem;
};

#endif

