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

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

namespace Akonadi_VCard_Resource {

class Settings : public KConfigSkeleton
{
  public:

    Settings( KSharedConfig::Ptr config = KSharedConfig::openConfig() );
    ~Settings() override;

    /**
      Set Path to vCard file.
    */
    void setPath( const QString & v )
    {
      if (!isPathImmutable())
        mPath = v;
    }

    /**
      Get Path to vCard file.
    */
    QString path() const
    {
      return mPath;
    }

    /**
      Is Path to vCard file. Immutable
    */
    bool isPathImmutable() const
    {
      return isImmutable( QStringLiteral( "Path" ) );
    }

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

    /**
      Set Display name.
    */
    void setDisplayName( const QString & v )
    {
      if (!isDisplayNameImmutable())
        mDisplayName = v;
    }

    /**
      Get Display name.
    */
    QString displayName() const
    {
      return mDisplayName;
    }

    /**
      Is Display name. Immutable
    */
    bool isDisplayNameImmutable() const
    {
      return isImmutable( QStringLiteral( "DisplayName" ) );
    }

    /**
      Get Item object corresponding to DisplayName()
    */
    ItemString *displayNameItem()
    {
      return mDisplayNameItem;
    }

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

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

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

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

    /**
      Set Monitor file for changes.
    */
    void setMonitorFile( bool v )
    {
      if (!isMonitorFileImmutable())
        mMonitorFile = v;
    }

    /**
      Get Monitor file for changes.
    */
    bool monitorFile() const
    {
      return mMonitorFile;
    }

    /**
      Is Monitor file for changes. Immutable
    */
    bool isMonitorFileImmutable() const
    {
      return isImmutable( QStringLiteral( "MonitorFile" ) );
    }

    /**
      Get Item object corresponding to MonitorFile()
    */
    ItemBool *monitorFileItem()
    {
      return mMonitorFileItem;
    }

    /**
      Set Periodically update the file.
    */
    void setPeriodicUpdate( bool v )
    {
      if (!isPeriodicUpdateImmutable())
        mPeriodicUpdate = v;
    }

    /**
      Get Periodically update the file.
    */
    bool periodicUpdate() const
    {
      return mPeriodicUpdate;
    }

    /**
      Is Periodically update the file. Immutable
    */
    bool isPeriodicUpdateImmutable() const
    {
      return isImmutable( QStringLiteral( "PeriodicUpdate" ) );
    }

    /**
      Get Item object corresponding to PeriodicUpdate()
    */
    ItemBool *periodicUpdateItem()
    {
      return mPeriodicUpdateItem;
    }

    /**
      Set Automatic update period in minutes.
    */
    void setUpdatePeriod( int v )
    {
      if (!isUpdatePeriodImmutable())
        mUpdatePeriod = v;
    }

    /**
      Get Automatic update period in minutes.
    */
    int updatePeriod() const
    {
      return mUpdatePeriod;
    }

    /**
      Is Automatic update period in minutes. Immutable
    */
    bool isUpdatePeriodImmutable() const
    {
      return isImmutable( QStringLiteral( "UpdatePeriod" ) );
    }

    /**
      Get Item object corresponding to UpdatePeriod()
    */
    ItemInt *updatePeriodItem()
    {
      return mUpdatePeriodItem;
    }

  protected:

    // General
    QString mPath;
    QString mDisplayName;
    bool mReadOnly;
    bool mMonitorFile;
    bool mPeriodicUpdate;
    int mUpdatePeriod;

  private:
    ItemPath *mPathItem;
    ItemString *mDisplayNameItem;
    ItemBool *mReadOnlyItem;
    ItemBool *mMonitorFileItem;
    ItemBool *mPeriodicUpdateItem;
    ItemInt *mUpdatePeriodItem;
};

}

#endif

