Commit 4fadc52e authored by Ronan's avatar Ronan

feat(Settings): add an developer option to disable mute button

parent 9c3615e1
......@@ -292,6 +292,17 @@ void SettingsModel::setCallRecorderEnabled (bool status) {
// -----------------------------------------------------------------------------
bool SettingsModel::getMuteMicrophoneEnabled () const {
return !!mConfig->getInt(UiSection, "mute_microphone_enabled", 1);
}
void SettingsModel::setMuteMicrophoneEnabled (bool status) {
mConfig->setInt(UiSection, "mute_microphone_enabled", status);
emit muteMicrophoneEnabledChanged(status);
}
// -----------------------------------------------------------------------------
bool SettingsModel::getChatEnabled () const {
return !!mConfig->getInt(UiSection, "chat_enabled", 1);
}
......
......@@ -71,6 +71,8 @@ class SettingsModel : public QObject {
Q_PROPERTY(bool callRecorderEnabled READ getCallRecorderEnabled WRITE setCallRecorderEnabled NOTIFY callRecorderEnabledChanged);
Q_PROPERTY(bool muteMicrophoneEnabled READ getMuteMicrophoneEnabled WRITE setMuteMicrophoneEnabled NOTIFY muteMicrophoneEnabledChanged);
Q_PROPERTY(bool chatEnabled READ getChatEnabled WRITE setChatEnabled NOTIFY chatEnabledChanged);
Q_PROPERTY(bool conferenceEnabled READ getConferenceEnabled WRITE setConferenceEnabled NOTIFY conferenceEnabledChanged);
......@@ -221,6 +223,9 @@ public:
bool getCallRecorderEnabled () const;
void setCallRecorderEnabled (bool status);
bool getMuteMicrophoneEnabled () const;
void setMuteMicrophoneEnabled (bool status);
bool getChatEnabled () const;
void setChatEnabled (bool status);
......@@ -388,6 +393,8 @@ signals:
void callRecorderEnabledChanged (bool status);
void muteMicrophoneEnabledChanged (bool status);
void chatEnabledChanged (bool status);
void conferenceEnabledChanged (bool status);
......
......@@ -293,6 +293,7 @@ Rectangle {
Row {
spacing: CallStyle.actionArea.vu.spacing
visible: SettingsModel.muteMicrophoneEnabled
VuMeter {
Timer {
......
......@@ -281,6 +281,7 @@ Window {
Row {
spacing: CallStyle.actionArea.vu.spacing
visible: SettingsModel.muteMicrophoneEnabled
VuMeter {
Timer {
......
......@@ -113,6 +113,16 @@ TabContainer {
onClicked: SettingsModel.callRecorderEnabled = !checked
}
}
FormGroup {
label: qsTr('muteMicrophoneEnabledLabel')
Switch {
checked: SettingsModel.muteMicrophoneEnabled
onClicked: SettingsModel.muteMicrophoneEnabled = !checked
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment