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

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

class SMServerSettings : public KConfigSkeleton
{
  Q_OBJECT
  public:
    enum LoginModeType { restorePreviousLogout, restoreSavedSession, emptySession };
    Q_ENUM(LoginModeType)

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

    /**
      Set Confirm logout
    */
    void setConfirmLogout( bool v )
    {
      if (v != mConfirmLogout && !isConfirmLogoutImmutable()) {
        mConfirmLogout = v;
        Q_EMIT confirmLogoutChanged();
      }
    }

    Q_PROPERTY(bool confirmLogout READ confirmLogout WRITE setConfirmLogout NOTIFY confirmLogoutChanged)
    Q_PROPERTY(bool isConfirmLogoutImmutable READ isConfirmLogoutImmutable CONSTANT)
    Q_PROPERTY(bool defaultConfirmLogoutValue READ defaultConfirmLogoutValue CONSTANT)
    /**
      Get Confirm logout
    */
    bool confirmLogout() const
    {
      return mConfirmLogout;
    }

    /**
      Is Confirm logout Immutable
    */
    bool isConfirmLogoutImmutable() const
    {
      return isImmutable( QStringLiteral( "confirmLogout" ) );
    }

    /**
      Get Confirm logout default value
    */
    bool defaultConfirmLogoutValue() const
    {
        return defaultConfirmLogoutValue_helper();
    }

    /**
      Set Default leave option
    */
    void setShutdownType( int v )
    {
      if (v != mShutdownType && !isShutdownTypeImmutable()) {
        mShutdownType = v;
        Q_EMIT shutdownTypeChanged();
      }
    }

    Q_PROPERTY(int shutdownType READ shutdownType WRITE setShutdownType NOTIFY shutdownTypeChanged)
    Q_PROPERTY(bool isShutdownTypeImmutable READ isShutdownTypeImmutable CONSTANT)
    Q_PROPERTY(int defaultShutdownTypeValue READ defaultShutdownTypeValue CONSTANT)
    /**
      Get Default leave option
    */
    int shutdownType() const
    {
      return mShutdownType;
    }

    /**
      Is Default leave option Immutable
    */
    bool isShutdownTypeImmutable() const
    {
      return isImmutable( QStringLiteral( "shutdownType" ) );
    }

    /**
      Get Default leave option default value
    */
    int defaultShutdownTypeValue() const
    {
        return defaultShutdownTypeValue_helper();
    }

    /**
      Set On login
    */
    void setLoginMode( int v )
    {
      if (v != mLoginMode && !isLoginModeImmutable()) {
        mLoginMode = v;
        Q_EMIT loginModeChanged();
      }
    }

    Q_PROPERTY(int loginMode READ loginMode WRITE setLoginMode NOTIFY loginModeChanged)
    Q_PROPERTY(bool isLoginModeImmutable READ isLoginModeImmutable CONSTANT)
    Q_PROPERTY(int defaultLoginModeValue READ defaultLoginModeValue CONSTANT)
    /**
      Get On login
    */
    int loginMode() const
    {
      return mLoginMode;
    }

    /**
      Is On login Immutable
    */
    bool isLoginModeImmutable() const
    {
      return isImmutable( QStringLiteral( "loginMode" ) );
    }

    /**
      Get On login default value
    */
    int defaultLoginModeValue() const
    {
        return defaultLoginModeValue_helper();
    }

    /**
      Set Applications to be excluded from session
    */
    void setExcludeApps( const QString & v )
    {
      if (v != mExcludeApps && !isExcludeAppsImmutable()) {
        mExcludeApps = v;
        Q_EMIT excludeAppsChanged();
      }
    }

    Q_PROPERTY(QString excludeApps READ excludeApps WRITE setExcludeApps NOTIFY excludeAppsChanged)
    Q_PROPERTY(bool isExcludeAppsImmutable READ isExcludeAppsImmutable CONSTANT)
    /**
      Get Applications to be excluded from session
    */
    QString excludeApps() const
    {
      return mExcludeApps;
    }

    /**
      Is Applications to be excluded from session Immutable
    */
    bool isExcludeAppsImmutable() const
    {
      return isImmutable( QStringLiteral( "excludeApps" ) );
    }


    enum {
      signalConfirmLogoutChanged = 1,
      signalShutdownTypeChanged = 2,
      signalLoginModeChanged = 3,
      signalExcludeAppsChanged = 4
    };

  Q_SIGNALS:
    void confirmLogoutChanged();

    void shutdownTypeChanged();

    void loginModeChanged();

    void excludeAppsChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:

    // General
    bool mConfirmLogout;
    bool defaultConfirmLogoutValue_helper() const;
    int mShutdownType;
    int defaultShutdownTypeValue_helper() const;
    int mLoginMode;
    int defaultLoginModeValue_helper() const;
    QString mExcludeApps;
    QString defaultExcludeAppsValue_helper() const;
};

#endif

