9 #ifndef hifi_AvatarInputs_h
10 #define hifi_AvatarInputs_h
13 #include <OffscreenUi.h>
15 #define AI_PROPERTY(type, name, initialValue) \
16 Q_PROPERTY(type name READ name NOTIFY name##Changed) \
18 type name() { return _##name; }; \
20 type _##name{ initialValue };
22 class AvatarInputs :
public QObject {
54 AI_PROPERTY(
bool, isHMD,
false)
56 Q_PROPERTY(
bool showAudioTools READ showAudioTools WRITE setShowAudioTools NOTIFY showAudioToolsChanged)
57 Q_PROPERTY(
bool showBubbleTools READ showBubbleTools WRITE setShowBubbleTools NOTIFY showBubbleToolsChanged)
58 Q_PROPERTY(
bool ignoreRadiusEnabled READ getIgnoreRadiusEnabled NOTIFY ignoreRadiusEnabledChanged)
62 static AvatarInputs* getInstance();
70 Q_INVOKABLE
float loudnessToAudioLevel(
float loudness);
72 AvatarInputs(QObject* parent =
nullptr);
74 bool showAudioTools()
const {
return _showAudioTools; }
75 bool showBubbleTools()
const {
return _showBubbleTools; }
76 bool getIgnoreRadiusEnabled()
const;
87 void setShowAudioTools(
bool showAudioTools);
94 void setShowBubbleTools(
bool showBubbleTools);
126 void showAudioToolsChanged(
bool show);
135 void showBubbleToolsChanged(
bool show);
147 void avatarEnteredIgnoreRadius(QUuid avatarID);
157 void avatarLeftIgnoreRadius(QUuid avatarID);
165 void ignoreRadiusEnabledChanged(
bool enabled);
172 void enteredIgnoreRadiusChanged();
180 Q_INVOKABLE
void resetSensors();
189 void onAvatarEnteredIgnoreRadius();
190 void onAvatarLeftIgnoreRadius();
191 float _trailingAudioLoudness{ 0 };
192 bool _showAudioTools {
true };
193 bool _showBubbleTools{
true };