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

#include "globalconfigskeleton.h"

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

class GlobalConfig : public GlobalConfigSkeleton
{
  Q_OBJECT
  public:

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

    /**
      Set Percent step for changing volume.
    */
    void setVolumeStep( int v )
    {
      if (v != mVolumeStep && !isVolumeStepImmutable()) {
        mVolumeStep = v;
        Q_EMIT VolumeStepChanged();
      }
    }

    Q_PROPERTY(int volumeStep READ volumeStep WRITE setVolumeStep NOTIFY VolumeStepChanged)
    Q_PROPERTY(bool isVolumeStepImmutable READ isVolumeStepImmutable CONSTANT)
    /**
      Get Percent step for changing volume.
    */
    int volumeStep() const
    {
      return mVolumeStep;
    }

    /**
      Is Percent step for changing volume. Immutable
    */
    bool isVolumeStepImmutable() const
    {
      return isImmutable( QStringLiteral( "VolumeStep" ) );
    }

    /**
      Set Allow raising volume over 100%.
    */
    void setRaiseMaximumVolume( bool v )
    {
      if (v != mRaiseMaximumVolume && !isRaiseMaximumVolumeImmutable()) {
        mRaiseMaximumVolume = v;
        Q_EMIT RaiseMaximumVolumeChanged();
      }
    }

    Q_PROPERTY(bool raiseMaximumVolume READ raiseMaximumVolume WRITE setRaiseMaximumVolume NOTIFY RaiseMaximumVolumeChanged)
    Q_PROPERTY(bool isRaiseMaximumVolumeImmutable READ isRaiseMaximumVolumeImmutable CONSTANT)
    /**
      Get Allow raising volume over 100%.
    */
    bool raiseMaximumVolume() const
    {
      return mRaiseMaximumVolume;
    }

    /**
      Is Allow raising volume over 100%. Immutable
    */
    bool isRaiseMaximumVolumeImmutable() const
    {
      return isImmutable( QStringLiteral( "RaiseMaximumVolume" ) );
    }

    /**
      Set Play audio feedback when changing volume.
    */
    void setAudioFeedback( bool v )
    {
      if (v != mAudioFeedback && !isAudioFeedbackImmutable()) {
        mAudioFeedback = v;
        Q_EMIT AudioFeedbackChanged();
      }
    }

    Q_PROPERTY(bool audioFeedback READ audioFeedback WRITE setAudioFeedback NOTIFY AudioFeedbackChanged)
    Q_PROPERTY(bool isAudioFeedbackImmutable READ isAudioFeedbackImmutable CONSTANT)
    /**
      Get Play audio feedback when changing volume.
    */
    bool audioFeedback() const
    {
      return mAudioFeedback;
    }

    /**
      Is Play audio feedback when changing volume. Immutable
    */
    bool isAudioFeedbackImmutable() const
    {
      return isImmutable( QStringLiteral( "AudioFeedback" ) );
    }

    /**
      Set Show OSD when changing volume.
    */
    void setVolumeOsd( bool v )
    {
      if (v != mVolumeOsd && !isVolumeOsdImmutable()) {
        mVolumeOsd = v;
        Q_EMIT VolumeOsdChanged();
      }
    }

    Q_PROPERTY(bool volumeOsd READ volumeOsd WRITE setVolumeOsd NOTIFY VolumeOsdChanged)
    Q_PROPERTY(bool isVolumeOsdImmutable READ isVolumeOsdImmutable CONSTANT)
    /**
      Get Show OSD when changing volume.
    */
    bool volumeOsd() const
    {
      return mVolumeOsd;
    }

    /**
      Is Show OSD when changing volume. Immutable
    */
    bool isVolumeOsdImmutable() const
    {
      return isImmutable( QStringLiteral( "VolumeOsd" ) );
    }

    /**
      Set Show OSD when changing microphone sensitivity.
    */
    void setMicrophoneSensitivityOsd( bool v )
    {
      if (v != mMicrophoneSensitivityOsd && !isMicrophoneSensitivityOsdImmutable()) {
        mMicrophoneSensitivityOsd = v;
        Q_EMIT MicrophoneSensitivityOsdChanged();
      }
    }

    Q_PROPERTY(bool microphoneSensitivityOsd READ microphoneSensitivityOsd WRITE setMicrophoneSensitivityOsd NOTIFY MicrophoneSensitivityOsdChanged)
    Q_PROPERTY(bool isMicrophoneSensitivityOsdImmutable READ isMicrophoneSensitivityOsdImmutable CONSTANT)
    /**
      Get Show OSD when changing microphone sensitivity.
    */
    bool microphoneSensitivityOsd() const
    {
      return mMicrophoneSensitivityOsd;
    }

    /**
      Is Show OSD when changing microphone sensitivity. Immutable
    */
    bool isMicrophoneSensitivityOsdImmutable() const
    {
      return isImmutable( QStringLiteral( "MicrophoneSensitivityOsd" ) );
    }

    /**
      Set Show OSD when muting/unmuting.
    */
    void setMuteOsd( bool v )
    {
      if (v != mMuteOsd && !isMuteOsdImmutable()) {
        mMuteOsd = v;
        Q_EMIT MuteOsdChanged();
      }
    }

    Q_PROPERTY(bool muteOsd READ muteOsd WRITE setMuteOsd NOTIFY MuteOsdChanged)
    Q_PROPERTY(bool isMuteOsdImmutable READ isMuteOsdImmutable CONSTANT)
    /**
      Get Show OSD when muting/unmuting.
    */
    bool muteOsd() const
    {
      return mMuteOsd;
    }

    /**
      Is Show OSD when muting/unmuting. Immutable
    */
    bool isMuteOsdImmutable() const
    {
      return isImmutable( QStringLiteral( "MuteOsd" ) );
    }

    /**
      Set Show OSD when using push to talk.
    */
    void setPushToTalkOsd( bool v )
    {
      if (v != mPushToTalkOsd && !isPushToTalkOsdImmutable()) {
        mPushToTalkOsd = v;
        Q_EMIT PushToTalkOsdChanged();
      }
    }

    Q_PROPERTY(bool pushToTalkOsd READ pushToTalkOsd WRITE setPushToTalkOsd NOTIFY PushToTalkOsdChanged)
    Q_PROPERTY(bool isPushToTalkOsdImmutable READ isPushToTalkOsdImmutable CONSTANT)
    /**
      Get Show OSD when using push to talk.
    */
    bool pushToTalkOsd() const
    {
      return mPushToTalkOsd;
    }

    /**
      Is Show OSD when using push to talk. Immutable
    */
    bool isPushToTalkOsdImmutable() const
    {
      return isImmutable( QStringLiteral( "PushToTalkOsd" ) );
    }

    /**
      Set Show OSD when application starts using muted microphone.
    */
    void setMutedMicrophoneReminderOsd( bool v )
    {
      if (v != mMutedMicrophoneReminderOsd && !isMutedMicrophoneReminderOsdImmutable()) {
        mMutedMicrophoneReminderOsd = v;
        Q_EMIT MutedMicrophoneReminderOsdChanged();
      }
    }

    Q_PROPERTY(bool mutedMicrophoneReminderOsd READ mutedMicrophoneReminderOsd WRITE setMutedMicrophoneReminderOsd NOTIFY MutedMicrophoneReminderOsdChanged)
    Q_PROPERTY(bool isMutedMicrophoneReminderOsdImmutable READ isMutedMicrophoneReminderOsdImmutable CONSTANT)
    /**
      Get Show OSD when application starts using muted microphone.
    */
    bool mutedMicrophoneReminderOsd() const
    {
      return mMutedMicrophoneReminderOsd;
    }

    /**
      Is Show OSD when application starts using muted microphone. Immutable
    */
    bool isMutedMicrophoneReminderOsdImmutable() const
    {
      return isImmutable( QStringLiteral( "MutedMicrophoneReminderOsd" ) );
    }

    /**
      Set Show OSD when changing default output device.
    */
    void setDefaultOutputDeviceOsd( bool v )
    {
      if (v != mDefaultOutputDeviceOsd && !isDefaultOutputDeviceOsdImmutable()) {
        mDefaultOutputDeviceOsd = v;
        Q_EMIT DefaultOutputDeviceOsdChanged();
      }
    }

    Q_PROPERTY(bool defaultOutputDeviceOsd READ defaultOutputDeviceOsd WRITE setDefaultOutputDeviceOsd NOTIFY DefaultOutputDeviceOsdChanged)
    Q_PROPERTY(bool isDefaultOutputDeviceOsdImmutable READ isDefaultOutputDeviceOsdImmutable CONSTANT)
    /**
      Get Show OSD when changing default output device.
    */
    bool defaultOutputDeviceOsd() const
    {
      return mDefaultOutputDeviceOsd;
    }

    /**
      Is Show OSD when changing default output device. Immutable
    */
    bool isDefaultOutputDeviceOsdImmutable() const
    {
      return isImmutable( QStringLiteral( "DefaultOutputDeviceOsd" ) );
    }

    /**
      Set Mute all audio.
    */
    void setGlobalMuteSinks( bool v )
    {
      if (v != mGlobalMuteSinks && !isGlobalMuteSinksImmutable()) {
        mGlobalMuteSinks = v;
        Q_EMIT GlobalMuteSinksChanged();
      }
    }

    Q_PROPERTY(bool globalMuteSinks READ globalMuteSinks WRITE setGlobalMuteSinks NOTIFY GlobalMuteSinksChanged)
    Q_PROPERTY(bool isGlobalMuteSinksImmutable READ isGlobalMuteSinksImmutable CONSTANT)
    /**
      Get Mute all audio.
    */
    bool globalMuteSinks() const
    {
      return mGlobalMuteSinks;
    }

    /**
      Is Mute all audio. Immutable
    */
    bool isGlobalMuteSinksImmutable() const
    {
      return isImmutable( QStringLiteral( "GlobalMuteSinks" ) );
    }

    /**
      Set Devices that were muted by global mute, and should be unmuted after global mute is disabled.
    */
    void setGlobalMuteSinksMutedDevices( const QStringList & v )
    {
      if (v != mGlobalMuteSinksMutedDevices && !isGlobalMuteSinksMutedDevicesImmutable()) {
        mGlobalMuteSinksMutedDevices = v;
        Q_EMIT GlobalMuteSinksMutedDevicesChanged();
      }
    }

    Q_PROPERTY(QStringList globalMuteSinksMutedDevices READ globalMuteSinksMutedDevices WRITE setGlobalMuteSinksMutedDevices NOTIFY GlobalMuteSinksMutedDevicesChanged)
    Q_PROPERTY(bool isGlobalMuteSinksMutedDevicesImmutable READ isGlobalMuteSinksMutedDevicesImmutable CONSTANT)
    /**
      Get Devices that were muted by global mute, and should be unmuted after global mute is disabled.
    */
    QStringList globalMuteSinksMutedDevices() const
    {
      return mGlobalMuteSinksMutedDevices;
    }

    /**
      Is Devices that were muted by global mute, and should be unmuted after global mute is disabled. Immutable
    */
    bool isGlobalMuteSinksMutedDevicesImmutable() const
    {
      return isImmutable( QStringLiteral( "GlobalMuteSinksMutedDevices" ) );
    }

    /**
      Set Mute all sources.
    */
    void setGlobalMuteSources( bool v )
    {
      if (v != mGlobalMuteSources && !isGlobalMuteSourcesImmutable()) {
        mGlobalMuteSources = v;
        Q_EMIT GlobalMuteSourcesChanged();
      }
    }

    Q_PROPERTY(bool globalMuteSources READ globalMuteSources WRITE setGlobalMuteSources NOTIFY GlobalMuteSourcesChanged)
    Q_PROPERTY(bool isGlobalMuteSourcesImmutable READ isGlobalMuteSourcesImmutable CONSTANT)
    /**
      Get Mute all sources.
    */
    bool globalMuteSources() const
    {
      return mGlobalMuteSources;
    }

    /**
      Is Mute all sources. Immutable
    */
    bool isGlobalMuteSourcesImmutable() const
    {
      return isImmutable( QStringLiteral( "GlobalMuteSources" ) );
    }

    /**
      Set Sources that were muted globally, and should be unmuted after global mute is disabled.
    */
    void setGlobalMuteSourcesMutedDevices( const QStringList & v )
    {
      if (v != mGlobalMuteSourcesMutedDevices && !isGlobalMuteSourcesMutedDevicesImmutable()) {
        mGlobalMuteSourcesMutedDevices = v;
        Q_EMIT GlobalMuteSourcesMutedDevicesChanged();
      }
    }

    Q_PROPERTY(QStringList globalMuteSourcesMutedDevices READ globalMuteSourcesMutedDevices WRITE setGlobalMuteSourcesMutedDevices NOTIFY GlobalMuteSourcesMutedDevicesChanged)
    Q_PROPERTY(bool isGlobalMuteSourcesMutedDevicesImmutable READ isGlobalMuteSourcesMutedDevicesImmutable CONSTANT)
    /**
      Get Sources that were muted globally, and should be unmuted after global mute is disabled.
    */
    QStringList globalMuteSourcesMutedDevices() const
    {
      return mGlobalMuteSourcesMutedDevices;
    }

    /**
      Is Sources that were muted globally, and should be unmuted after global mute is disabled. Immutable
    */
    bool isGlobalMuteSourcesMutedDevicesImmutable() const
    {
      return isImmutable( QStringLiteral( "GlobalMuteSourcesMutedDevices" ) );
    }


    enum {
      signalVolumeStepChanged = 1,
      signalRaiseMaximumVolumeChanged = 2,
      signalAudioFeedbackChanged = 3,
      signalVolumeOsdChanged = 4,
      signalMicrophoneSensitivityOsdChanged = 5,
      signalMuteOsdChanged = 6,
      signalPushToTalkOsdChanged = 7,
      signalMutedMicrophoneReminderOsdChanged = 8,
      signalDefaultOutputDeviceOsdChanged = 9,
      signalGlobalMuteSinksChanged = 10,
      signalGlobalMuteSinksMutedDevicesChanged = 11,
      signalGlobalMuteSourcesChanged = 12,
      signalGlobalMuteSourcesMutedDevicesChanged = 13
    };

  Q_SIGNALS:
    void VolumeStepChanged();

    void RaiseMaximumVolumeChanged();

    void AudioFeedbackChanged();

    void VolumeOsdChanged();

    void MicrophoneSensitivityOsdChanged();

    void MuteOsdChanged();

    void PushToTalkOsdChanged();

    void MutedMicrophoneReminderOsdChanged();

    void DefaultOutputDeviceOsdChanged();

    void GlobalMuteSinksChanged();

    void GlobalMuteSinksMutedDevicesChanged();

    void GlobalMuteSourcesChanged();

    void GlobalMuteSourcesMutedDevicesChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:

    // General
    int mVolumeStep;
    bool mRaiseMaximumVolume;
    bool mAudioFeedback;
    bool mVolumeOsd;
    bool mMicrophoneSensitivityOsd;
    bool mMuteOsd;
    bool mPushToTalkOsd;
    bool mMutedMicrophoneReminderOsd;
    bool mDefaultOutputDeviceOsd;
    bool mGlobalMuteSinks;
    QStringList mGlobalMuteSinksMutedDevices;
    bool mGlobalMuteSources;
    QStringList mGlobalMuteSourcesMutedDevices;
};

#endif

