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

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

class UpdatesSettings : public KConfigSkeleton
{
  Q_OBJECT
  public:

    UpdatesSettings( QObject *parent = nullptr );
    ~UpdatesSettings() override;

    /**
      Set UseUnattendedUpdates
    */
    void setUseUnattendedUpdates( bool v )
    {
      if (v != mUseUnattendedUpdates && !isUseUnattendedUpdatesImmutable()) {
        mUseUnattendedUpdates = v;
        Q_EMIT UseUnattendedUpdatesChanged();
      }
    }

    Q_PROPERTY(bool useUnattendedUpdates READ useUnattendedUpdates WRITE setUseUnattendedUpdates NOTIFY UseUnattendedUpdatesChanged)
    Q_PROPERTY(bool isUseUnattendedUpdatesImmutable READ isUseUnattendedUpdatesImmutable CONSTANT)
    Q_PROPERTY(bool defaultUseUnattendedUpdatesValue READ defaultUseUnattendedUpdatesValue CONSTANT)
    /**
      Get UseUnattendedUpdates
    */
    bool useUnattendedUpdates() const
    {
      return mUseUnattendedUpdates;
    }

    /**
      Is UseUnattendedUpdates Immutable
    */
    bool isUseUnattendedUpdatesImmutable() const
    {
      return isImmutable( QStringLiteral( "UseUnattendedUpdates" ) );
    }

    /**
      Get UseUnattendedUpdates default value
    */
    bool defaultUseUnattendedUpdatesValue() const
    {
        return defaultUseUnattendedUpdatesValue_helper();
    }

    /**
      Set LastUnattendedTrigger
    */
    void setLastUnattendedTrigger( const QDateTime & v )
    {
      if (v != mLastUnattendedTrigger && !isLastUnattendedTriggerImmutable()) {
        mLastUnattendedTrigger = v;
        Q_EMIT LastUnattendedTriggerChanged();
      }
    }

    Q_PROPERTY(QDateTime lastUnattendedTrigger READ lastUnattendedTrigger WRITE setLastUnattendedTrigger NOTIFY LastUnattendedTriggerChanged)
    Q_PROPERTY(bool isLastUnattendedTriggerImmutable READ isLastUnattendedTriggerImmutable CONSTANT)
    /**
      Get LastUnattendedTrigger
    */
    QDateTime lastUnattendedTrigger() const
    {
      return mLastUnattendedTrigger;
    }

    /**
      Is LastUnattendedTrigger Immutable
    */
    bool isLastUnattendedTriggerImmutable() const
    {
      return isImmutable( QStringLiteral( "LastUnattendedTrigger" ) );
    }

    /**
      Set RequiredNotificationInterval
    */
    void setRequiredNotificationInterval( int v )
    {
      if (v != mRequiredNotificationInterval && !isRequiredNotificationIntervalImmutable()) {
        mRequiredNotificationInterval = v;
        Q_EMIT RequiredNotificationIntervalChanged();
      }
    }

    Q_PROPERTY(int requiredNotificationInterval READ requiredNotificationInterval WRITE setRequiredNotificationInterval NOTIFY RequiredNotificationIntervalChanged)
    Q_PROPERTY(bool isRequiredNotificationIntervalImmutable READ isRequiredNotificationIntervalImmutable CONSTANT)
    Q_PROPERTY(int defaultRequiredNotificationIntervalValue READ defaultRequiredNotificationIntervalValue CONSTANT)
    /**
      Get RequiredNotificationInterval
    */
    int requiredNotificationInterval() const
    {
      return mRequiredNotificationInterval;
    }

    /**
      Is RequiredNotificationInterval Immutable
    */
    bool isRequiredNotificationIntervalImmutable() const
    {
      return isImmutable( QStringLiteral( "RequiredNotificationInterval" ) );
    }

    /**
      Get RequiredNotificationInterval default value
    */
    int defaultRequiredNotificationIntervalValue() const
    {
        return defaultRequiredNotificationIntervalValue_helper();
    }


    enum {
      signalUseUnattendedUpdatesChanged = 1,
      signalLastUnattendedTriggerChanged = 2,
      signalRequiredNotificationIntervalChanged = 3
    };

  Q_SIGNALS:
    void UseUnattendedUpdatesChanged();

    void LastUnattendedTriggerChanged();

    void RequiredNotificationIntervalChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:

    // Global
    bool mUseUnattendedUpdates;
    bool defaultUseUnattendedUpdatesValue_helper() const;
    QDateTime mLastUnattendedTrigger;
    QDateTime defaultLastUnattendedTriggerValue_helper() const;
    int mRequiredNotificationInterval;
    int defaultRequiredNotificationIntervalValue_helper() const;
};

#endif

