mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
feat(Settings): add an developer option to disable mute button
This commit is contained in:
parent
9c3615e15c
commit
4fadc52ee8
5 changed files with 30 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue