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

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

class IcalDirResourceSettings : public KConfigSkeleton
{
  public:

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

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

    /**
      Get Path to iCal directory
    */
    static
    QString path()
    {
      return self()->mPath;
    }

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

    /**
      Set Autosave interval time (in minutes).
    */
    static
    void setAutosaveInterval( uint v )
    {
      if (!self()->isAutosaveIntervalImmutable())
        self()->mAutosaveInterval = v;
    }

    /**
      Get Autosave interval time (in minutes).
    */
    static
    uint autosaveInterval()
    {
      return self()->mAutosaveInterval;
    }

    /**
      Is Autosave interval time (in minutes). Immutable
    */
    static
    bool isAutosaveIntervalImmutable()
    {
      return self()->isImmutable( QStringLiteral( "AutosaveInterval" ) );
    }

    /**
      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" ) );
    }

  protected:
    IcalDirResourceSettings(KSharedConfig::Ptr config);
    friend class IcalDirResourceSettingsHelper;


    // General
    QString mPath;
    uint mAutosaveInterval;
    bool mReadOnly;
};

#endif

