Commit 7a4764b6 authored by Ronan's avatar Ronan

feat(Settings): add an developer option to show network settings

parent 3ad8dc29
Pipeline #180 failed with stage
in 0 seconds
......@@ -1362,6 +1362,14 @@ Server URL ist nicht konfiguriert.</translation>
<source>rlsUriDisabled</source>
<translation>NIE</translation>
</message>
<message>
<source>showNetworkSettingsLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>generalTitle</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsSipAccounts</name>
......
......@@ -1367,6 +1367,14 @@ your friend&apos;s SIP address or username.</translation>
<source>rlsUriDisabled</source>
<translation>NEVER</translation>
</message>
<message>
<source>showNetworkSettingsLabel</source>
<translation>Show network settings</translation>
</message>
<message>
<source>generalTitle</source>
<translation>General</translation>
</message>
</context>
<context>
<name>SettingsSipAccounts</name>
......
......@@ -1365,6 +1365,14 @@ Cliquez ici : &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>rlsUriDisabled</source>
<translation>JAMAIS</translation>
</message>
<message>
<source>showNetworkSettingsLabel</source>
<translation>Afficher les paramètres réseaux</translation>
</message>
<message>
<source>generalTitle</source>
<translation>Général</translation>
</message>
</context>
<context>
<name>SettingsSipAccounts</name>
......
......@@ -1362,6 +1362,14 @@
<source>rlsUriDisabled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>showNetworkSettingsLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>generalTitle</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsSipAccounts</name>
......
......@@ -1364,6 +1364,14 @@ Tiesiog, įveskite savo draugo SIP adresą ar naudotojo vardą.</translation>
<source>rlsUriDisabled</source>
<translation>NIEKADA</translation>
</message>
<message>
<source>showNetworkSettingsLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>generalTitle</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsSipAccounts</name>
......
......@@ -1367,6 +1367,14 @@ o endereço SIP ou nome de usuário do seu amigo.</translation>
<source>rlsUriDisabled</source>
<translation>NUNCA</translation>
</message>
<message>
<source>showNetworkSettingsLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>generalTitle</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsSipAccounts</name>
......
......@@ -1365,6 +1365,14 @@
<source>rlsUriDisabled</source>
<translation>НИКОГДА</translation>
</message>
<message>
<source>showNetworkSettingsLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>generalTitle</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsSipAccounts</name>
......
......@@ -1364,6 +1364,14 @@ Klicka här: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>rlsUriDisabled</source>
<translation>ALDRIG</translation>
</message>
<message>
<source>showNetworkSettingsLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>generalTitle</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsSipAccounts</name>
......
......@@ -1364,6 +1364,14 @@ arkadaşınızın SIP adresini veya kullanıcı adını girin.</translation>
<source>rlsUriDisabled</source>
<translation>ASLA</translation>
</message>
<message>
<source>showNetworkSettingsLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>generalTitle</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsSipAccounts</name>
......
......@@ -533,6 +533,17 @@ void SettingsModel::setContactsEnabled (bool status) {
// Network.
// =============================================================================
bool SettingsModel::getShowNetworkSettings () const {
return !!mConfig->getInt(UiSection, "show_network_settings", 1);
}
void SettingsModel::setShowNetworkSettings (bool status) {
mConfig->setInt(UiSection, "show_network_settings", status);
emit showNetworkSettingsChanged(status);
}
// -----------------------------------------------------------------------------
bool SettingsModel::getUseSipInfoForDtmfs () const {
return CoreManager::getInstance()->getCore()->getUseInfoForDtmf();
}
......
......@@ -107,6 +107,8 @@ class SettingsModel : public QObject {
// Network. ------------------------------------------------------------------
Q_PROPERTY(bool showNetworkSettings READ getShowNetworkSettings WRITE setShowNetworkSettings NOTIFY showNetworkSettingsChanged);
Q_PROPERTY(bool useSipInfoForDtmfs READ getUseSipInfoForDtmfs WRITE setUseSipInfoForDtmfs NOTIFY dtmfsProtocolChanged);
Q_PROPERTY(bool useRfc2833ForDtmfs READ getUseRfc2833ForDtmfs WRITE setUseRfc2833ForDtmfs NOTIFY dtmfsProtocolChanged);
......@@ -296,6 +298,9 @@ public:
// Network. ------------------------------------------------------------------
bool getShowNetworkSettings () const;
void setShowNetworkSettings (bool status);
bool getUseSipInfoForDtmfs () const;
void setUseSipInfoForDtmfs (bool status);
......@@ -467,6 +472,8 @@ signals:
// Network. ------------------------------------------------------------------
void showNetworkSettingsChanged (bool status);
void dtmfsProtocolChanged ();
void ipv6EnabledChanged (bool status);
......
......@@ -12,6 +12,28 @@ TabContainer {
spacing: SettingsWindowStyle.forms.spacing
width: parent.width
// -------------------------------------------------------------------------
// General.
// -------------------------------------------------------------------------
Form {
title: qsTr('generalTitle')
visible: SettingsModel.developerSettingsEnabled
width: parent.width
FormLine {
FormGroup {
label: qsTr('showNetworkSettingsLabel')
Switch {
checked: SettingsModel.showNetworkSettings
onClicked: SettingsModel.showNetworkSettings = !checked
}
}
}
}
// -------------------------------------------------------------------------
// Transport.
// -------------------------------------------------------------------------
......
......@@ -74,6 +74,7 @@ ApplicationWindow {
}
TabButton {
enabled: SettingsModel.showNetworkSettings || SettingsModel.developerSettingsEnabled
iconName: 'settings_network'
text: qsTr('networkTab')
width: implicitWidth
......
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