6#ifndef SWIFT_MISC_AUDIO_SETTINGS_H
7#define SWIFT_MISC_AUDIO_SETTINGS_H
21namespace swift::misc::audio
29 static constexpr int InMax = 100;
53 return static_cast<CNotificationSounds::Notification
>(m_notification);
59 m_notification =
static_cast<int>(notification);
84 void setNotificationSoundDirectory(
const QString &dir);
90 const QString &getNotificationSoundDirectoryOrDefault()
const;
98 void setNotificationVolume(
int volume);
104 void setOutVolume(
int volume);
110 void setOutVolumeCom1(
int volume);
116 void setOutVolumeCom2(
int volume);
122 void setInVolume(
int volume);
134 QString convertToQString(
bool i18n =
false)
const;
137 QString m_notificationSoundDir;
138 int m_notification =
static_cast<int>(
141 int m_notificationVolume = 90;
142 int m_outVolume = 40;
143 int m_outVolumeCom1 = 100;
144 int m_outVolumeCom2 = 100;
146 bool m_audioEffects =
true;
164 static const char *
key() {
return "audio/%Application%/setup"; }
169 static const QString name(
"Audio");
Value object encapsulating information of audio related settings.
void setAudioEffectsEnabled(bool enabled)
Audio effects.
static constexpr int OutMin
Ranges for audio.
static constexpr int OutMax
Ranges for audio.
CNotificationSounds::Notification getNotification() const
Get notification.
bool afvClicked() const
Simplified functions.
static constexpr int InMin
Ranges for audio.
void setNotificationFlag(CNotificationSounds::NotificationFlag notification, bool value)
Notification flag (play notification?).
bool textMessageSupervisor() const
Simplified functions.
int getNotificationVolume() const
Get volume (notifications).
bool textMessagePrivate() const
Simplified functions.
void setNotification(CNotificationSounds::Notification notification)
Set notification.
CSettings()=default
Default constructor.
int getOutVolumeCom2() const
Get volume for com2 (audio) 0..100.
const QString & getNotificationSoundDirectory() const
Notification directory.
static int fixInVolume(int v)
Make sure the volume is within the range.
bool afvBlocked() const
Simplified functions.
bool isNotificationFlagSet(CNotificationSounds::NotificationFlag notification) const
Notification flag (play notification?).
int getOutVolume() const
Get volume (audio) 0..100.
bool pttClickUp() const
Simplified functions.
bool isAudioEffectsEnabled() const
Audio effects enabled?
int getInVolume() const
Get mic.volume (audio 0..100).
bool pttClickDown() const
Simplified functions.
bool textCallsignMentioned() const
Simplified functions.
int getOutVolumeCom1() const
Get volume for com1 (audio) 0..100.
static constexpr int InMax
Ranges for audio.
static int fixOutVolume(int v)
Make sure the volume is within the range.
static constexpr Notification DefaultNotifications
Default notification flags.
NotificationFlag
Play notification.
static bool isValid(const swift::misc::audio::CSettings &value, QString &)
Validator function. Return true if the argument is valid, false otherwise. Default implementation jus...
static const QString & humanReadable()
Optional human readable name.
static const char * key()
Key string of the value. Reimplemented in derived class.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...