Add config RC to show/hide some UI items.

This commit is contained in:
Julien Wadel 2024-07-03 10:24:10 +02:00
parent b9d0c99276
commit 846f043b6d
17 changed files with 285 additions and 106 deletions

View file

@ -68,6 +68,22 @@ Settings::Settings(QObject *parent) : QObject(parent) {
mFullLogsEnabled = mSettingsModel->getFullLogsEnabled(); mFullLogsEnabled = mSettingsModel->getFullLogsEnabled();
mLogsFolder = mSettingsModel->getLogsFolder(); mLogsFolder = mSettingsModel->getLogsFolder();
mLogsEmail = mSettingsModel->getLogsEmail(); mLogsEmail = mSettingsModel->getLogsEmail();
// Ui
INIT_CORE_MEMBER(DisableChatFeature, mSettingsModel)
INIT_CORE_MEMBER(DisableMeetingsFeature, mSettingsModel)
INIT_CORE_MEMBER(DisableBroadcastFeature, mSettingsModel)
INIT_CORE_MEMBER(HideSettings, mSettingsModel)
INIT_CORE_MEMBER(HideAccountSettings, mSettingsModel)
INIT_CORE_MEMBER(DisableCallRecordings, mSettingsModel)
INIT_CORE_MEMBER(AssistantHideCreateAccount, mSettingsModel)
INIT_CORE_MEMBER(AssistantHideCreateAccount, mSettingsModel)
INIT_CORE_MEMBER(AssistantDisableQrCode, mSettingsModel)
INIT_CORE_MEMBER(AssistantHideThirdPartyAccount, mSettingsModel)
INIT_CORE_MEMBER(OnlyDisplaySipUriUsername, mSettingsModel)
INIT_CORE_MEMBER(DarkModeAllowed, mSettingsModel)
INIT_CORE_MEMBER(MaxAccount, mSettingsModel)
} }
Settings::~Settings() { Settings::~Settings() {
@ -238,6 +254,33 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
}); });
}); });
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
disableChatFeature, DisableChatFeature)
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
disableMeetingsFeature, DisableMeetingsFeature)
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
disableBroadcastFeature, DisableBroadcastFeature)
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool, hideSettings,
HideSettings)
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
hideAccountSettings, HideAccountSettings)
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
disableCallRecordings, DisableCallRecordings)
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
assistantHideCreateAccount, AssistantHideCreateAccount)
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
assistantHideCreateAccount, AssistantHideCreateAccount)
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
assistantDisableQrCode, AssistantDisableQrCode)
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
assistantHideThirdPartyAccount, AssistantHideThirdPartyAccount)
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool,
onlyDisplaySipUriUsername, OnlyDisplaySipUriUsername)
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, bool, darkModeAllowed,
DarkModeAllowed)
DEFINE_CORE_GETSET_CONNECT(mSettingsModelConnection, Settings, SettingsModel, mSettingsModel, int, maxAccount,
MaxAccount)
auto coreModelConnection = QSharedPointer<SafeConnection<Settings, CoreModel>>( auto coreModelConnection = QSharedPointer<SafeConnection<Settings, CoreModel>>(
new SafeConnection<Settings, CoreModel>(me, CoreModel::getInstance()), &QObject::deleteLater); new SafeConnection<Settings, CoreModel>(me, CoreModel::getInstance()), &QObject::deleteLater);

View file

@ -132,6 +132,19 @@ public:
QString getLogsEmail() const; QString getLogsEmail() const;
QString getLogsFolder() const; QString getLogsFolder() const;
DECLARE_CORE_GETSET(bool, disableChatFeature, DisableChatFeature)
DECLARE_CORE_GETSET(bool, disableMeetingsFeature, DisableMeetingsFeature)
DECLARE_CORE_GETSET(bool, disableBroadcastFeature, DisableBroadcastFeature)
DECLARE_CORE_GETSET(bool, hideSettings, HideSettings)
DECLARE_CORE_GETSET(bool, hideAccountSettings, HideAccountSettings)
DECLARE_CORE_GETSET(bool, disableCallRecordings, DisableCallRecordings)
DECLARE_CORE_GETSET(bool, assistantHideCreateAccount, AssistantHideCreateAccount)
DECLARE_CORE_GETSET(bool, assistantDisableQrCode, AssistantDisableQrCode)
DECLARE_CORE_GETSET(bool, assistantHideThirdPartyAccount, AssistantHideThirdPartyAccount)
DECLARE_CORE_GETSET(bool, onlyDisplaySipUriUsername, OnlyDisplaySipUriUsername)
DECLARE_CORE_GETSET(bool, darkModeAllowed, DarkModeAllowed)
DECLARE_CORE_GETSET(int, maxAccount, MaxAccount)
signals: signals:
// Security // Security

View file

@ -280,8 +280,7 @@ void SettingsModel::setPlaybackDevice(const QString &device) {
CoreModel::getInstance()->getCore()->setRingerDevice(devId); CoreModel::getInstance()->getCore()->setRingerDevice(devId);
emit playbackDeviceChanged(device); emit playbackDeviceChanged(device);
resetCaptureGraph(); resetCaptureGraph();
}else } else qWarning() << "Cannot set Playback device. The ID cannot be matched with an existant device : " << device;
qWarning() << "Cannot set Playback device. The ID cannot be matched with an existant device : " << device;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@ -416,3 +415,47 @@ QString SettingsModel::getLogsEmail() const {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
return Utils::coreStringToAppString(mConfig->getString(UiSection, "logs_email", Constants::DefaultLogsEmail)); return Utils::coreStringToAppString(mConfig->getString(UiSection, "logs_email", Constants::DefaultLogsEmail));
} }
// =============================================================================
// Ui.
// =============================================================================
/*
bool SettingsModel::getShowChats() const {
return mConfig->getBool(UiSection, "disable_chat_feature", false);
}*/
DEFINE_GETSET_CONFIG(SettingsModel, bool, Bool, disableChatFeature, DisableChatFeature, "disable_chat_feature", false)
DEFINE_GETSET_CONFIG(
SettingsModel, bool, Bool, disableMeetingsFeature, DisableMeetingsFeature, "disable_meetings_feature", false)
DEFINE_GETSET_CONFIG(
SettingsModel, bool, Bool, disableBroadcastFeature, DisableBroadcastFeature, "disable_broadcast_feature", false)
DEFINE_GETSET_CONFIG(SettingsModel, bool, Bool, hideSettings, HideSettings, "hide_settings", false)
DEFINE_GETSET_CONFIG(
SettingsModel, bool, Bool, hideAccountSettings, HideAccountSettings, "hide_account_settings", false)
DEFINE_GETSET_CONFIG(
SettingsModel, bool, Bool, disableCallRecordings, DisableCallRecordings, "disable_call_recordings_feature", false)
DEFINE_GETSET_CONFIG(SettingsModel,
bool,
Bool,
assistantHideCreateAccount,
AssistantHideCreateAccount,
"assistant_hide_create_account",
false)
DEFINE_GETSET_CONFIG(
SettingsModel, bool, Bool, assistantDisableQrCode, AssistantDisableQrCode, "assistant_disable_qr_code", true)
DEFINE_GETSET_CONFIG(SettingsModel,
bool,
Bool,
assistantHideThirdPartyAccount,
AssistantHideThirdPartyAccount,
"assistant_hide_third_party_account",
false)
DEFINE_GETSET_CONFIG(SettingsModel,
bool,
Bool,
onlyDisplaySipUriUsername,
OnlyDisplaySipUriUsername,
"only_display_sip_uri_username",
false)
DEFINE_GETSET_CONFIG(SettingsModel, bool, Bool, darkModeAllowed, DarkModeAllowed, "dark_mode_allowed", false)
DEFINE_GETSET_CONFIG(SettingsModel, int, Int, maxAccount, MaxAccount, "max_account", 0)

View file

@ -21,11 +21,11 @@
#ifndef SETTINGS_MODEL_H_ #ifndef SETTINGS_MODEL_H_
#define SETTINGS_MODEL_H_ #define SETTINGS_MODEL_H_
#include "MediastreamerUtils.hpp"
#include <QFont> #include <QFont>
#include <QObject> #include <QObject>
#include <QVariantMap> #include <QVariantMap>
#include <linphone++/linphone.hh> #include <linphone++/linphone.hh>
#include "MediastreamerUtils.hpp"
#include "tool/AbstractObject.hpp" #include "tool/AbstractObject.hpp"
@ -41,7 +41,6 @@ public:
getEntryFullName(const std::string &section, getEntryFullName(const std::string &section,
const std::string &name) const; // Return the full name of the entry : 'name/readonly' or 'name' const std::string &name) const; // Return the full name of the entry : 'name/readonly' or 'name'
static const std::string UiSection; static const std::string UiSection;
std::shared_ptr<linphone::Config> mConfig; std::shared_ptr<linphone::Config> mConfig;
@ -64,7 +63,8 @@ public:
void closeCallSettings(); void closeCallSettings();
void startCaptureGraph(); void startCaptureGraph();
void stopCaptureGraph();; void stopCaptureGraph();
;
void stopCaptureGraphs(); void stopCaptureGraphs();
void resetCaptureGraph(); void resetCaptureGraph();
void createCaptureGraph(); void createCaptureGraph();
@ -120,6 +120,20 @@ public:
QString getLogsEmail() const; QString getLogsEmail() const;
// UI
DECLARE_GETSET(bool, disableChatFeature, DisableChatFeature)
DECLARE_GETSET(bool, disableMeetingsFeature, DisableMeetingsFeature)
DECLARE_GETSET(bool, disableBroadcastFeature, DisableBroadcastFeature)
DECLARE_GETSET(bool, hideSettings, HideSettings)
DECLARE_GETSET(bool, hideAccountSettings, HideAccountSettings)
DECLARE_GETSET(bool, disableCallRecordings, DisableCallRecordings)
DECLARE_GETSET(bool, assistantHideCreateAccount, AssistantHideCreateAccount)
DECLARE_GETSET(bool, assistantDisableQrCode, AssistantDisableQrCode)
DECLARE_GETSET(bool, assistantHideThirdPartyAccount, AssistantHideThirdPartyAccount)
DECLARE_GETSET(bool, onlyDisplaySipUriUsername, OnlyDisplaySipUriUsername)
DECLARE_GETSET(bool, darkModeAllowed, DarkModeAllowed)
DECLARE_GETSET(int, maxAccount, MaxAccount)
signals: signals:
// VFS. -------------------------------------------------------------------- // VFS. --------------------------------------------------------------------

View file

@ -61,6 +61,41 @@ public:
} \ } \
} }
#define DECLARE_CORE_GETSET(type, x, X) \
Q_PROPERTY(type x MEMBER m##X WRITE set##X NOTIFY x##Changed) \
Q_SIGNAL void set##X(type data); \
Q_SIGNAL void x##Changed(); \
type m##X;
#define DECLARE_GETSET(type, x, X) \
type get##X() const; \
void set##X(type data); \
Q_SIGNAL void x##Changed(type x);
#define INIT_CORE_MEMBER(X, model) m##X = model->get##X();
#define DEFINE_CORE_GETSET_CONNECT(safe, CoreClass, ModelClass, model, type, x, X) \
safe->makeConnectToCore(&CoreClass::set##X, \
[this](type data) { safe->invokeToModel([this, data]() { model->set##X(data); }); }); \
safe->makeConnectToModel(&ModelClass::x##Changed, [this](type data) { \
safe->invokeToCore([this, data]() { \
m##X = data; \
emit x##Changed(); \
}); \
});
#define DEFINE_GETSET_CONFIG(Class, type, Type, x, X, key, def) \
type Class::get##X() const { \
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); \
return !!mConfig->get##Type(UiSection, key, def); \
} \
void Class::set##X(type data) { \
if (get##X() != data) { \
mConfig->set##Type(UiSection, key, data); \
emit x##Changed(data); \
} \
}
class AbstractObject { class AbstractObject {
public: public:
virtual QString getClassName() const = 0; virtual QString getClassName() const = 0;

View file

@ -10,6 +10,7 @@ import QtQuick.Effects
import Linphone import Linphone
import UtilsCpp import UtilsCpp
import SettingsCpp
Item { Item {
id: mainItem id: mainItem
@ -123,6 +124,7 @@ Item {
anchors.fill: parent anchors.fill: parent
spacing: 0 spacing: 0
anchors.topMargin: 25 * DefaultStyle.dp anchors.topMargin: 25 * DefaultStyle.dp
VerticalTabBar { VerticalTabBar {
id: tabbar id: tabbar
Layout.fillHeight: true Layout.fillHeight: true
@ -132,8 +134,8 @@ Item {
model: [ model: [
{icon: AppIcons.phone, selectedIcon: AppIcons.phoneSelected, label: qsTr("Appels")}, {icon: AppIcons.phone, selectedIcon: AppIcons.phoneSelected, label: qsTr("Appels")},
{icon: AppIcons.adressBook, selectedIcon: AppIcons.adressBookSelected, label: qsTr("Contacts")}, {icon: AppIcons.adressBook, selectedIcon: AppIcons.adressBookSelected, label: qsTr("Contacts")},
{icon: AppIcons.chatTeardropText, selectedIcon: AppIcons.chatTeardropTextSelected, label: qsTr("Conversations")}, {icon: AppIcons.chatTeardropText, selectedIcon: AppIcons.chatTeardropTextSelected, label: qsTr("Conversations"), visible: !SettingsCpp.disableChatFeature},
{icon: AppIcons.videoconference, selectedIcon: AppIcons.videoconferenceSelected, label: qsTr("Réunions")} {icon: AppIcons.videoconference, selectedIcon: AppIcons.videoconferenceSelected, label: qsTr("Réunions"), visible: !SettingsCpp.disableMeetingsFeature}
] ]
onCurrentIndexChanged: { onCurrentIndexChanged: {
if (currentIndex === 0) accountProxy.defaultAccount.core.lResetMissedCalls() if (currentIndex === 0) accountProxy.defaultAccount.core.lResetMissedCalls()
@ -337,6 +339,7 @@ Item {
spacing: 20 * DefaultStyle.dp spacing: 20 * DefaultStyle.dp
IconLabelButton { IconLabelButton {
Layout.preferredHeight: 32 * DefaultStyle.dp Layout.preferredHeight: 32 * DefaultStyle.dp
visible: !SettingsCpp.hideAccountSettings
iconSize: 32 * DefaultStyle.dp iconSize: 32 * DefaultStyle.dp
text: qsTr("Mon compte") text: qsTr("Mon compte")
iconSource: AppIcons.manageProfile iconSource: AppIcons.manageProfile
@ -344,6 +347,7 @@ Item {
} }
IconLabelButton { IconLabelButton {
Layout.preferredHeight: 32 * DefaultStyle.dp Layout.preferredHeight: 32 * DefaultStyle.dp
visible: !SettingsCpp.hideSettings
iconSize: 32 * DefaultStyle.dp iconSize: 32 * DefaultStyle.dp
text: qsTr("Paramètres") text: qsTr("Paramètres")
iconSource: AppIcons.settings iconSource: AppIcons.settings
@ -363,6 +367,7 @@ Item {
} }
IconLabelButton { IconLabelButton {
Layout.preferredHeight: 32 * DefaultStyle.dp Layout.preferredHeight: 32 * DefaultStyle.dp
visible: !SettingsCpp.disableCallRecordingsFeature
iconSize: 32 * DefaultStyle.dp iconSize: 32 * DefaultStyle.dp
text: qsTr("Enregistrements") text: qsTr("Enregistrements")
iconSource: AppIcons.micro iconSource: AppIcons.micro
@ -389,10 +394,13 @@ Item {
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 1 * DefaultStyle.dp Layout.preferredHeight: 1 * DefaultStyle.dp
visible: addAccountButton.visible
color: DefaultStyle.main2_400 color: DefaultStyle.main2_400
} }
IconLabelButton { IconLabelButton {
id: addAccountButton
Layout.preferredHeight: 32 * DefaultStyle.dp Layout.preferredHeight: 32 * DefaultStyle.dp
visible: SettingsCpp.maxAccount == 0 || SettingsCpp.maxAccount > accountProxy.count
iconSize: 32 * DefaultStyle.dp iconSize: 32 * DefaultStyle.dp
text: qsTr("Ajouter un compte") text: qsTr("Ajouter un compte")
iconSource: AppIcons.plusCircle iconSource: AppIcons.plusCircle

View file

@ -6,6 +6,7 @@ import QtQuick.Dialogs
import Linphone import Linphone
import UtilsCpp import UtilsCpp
import SettingsCpp
Item { Item {
id: mainItem id: mainItem
@ -58,12 +59,15 @@ Item {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: mainItem.spacing Layout.topMargin: mainItem.spacing
Layout.bottomMargin: mainItem.spacing Layout.bottomMargin: mainItem.spacing
visible: addAccountButton.visible
height: 1 * DefaultStyle.dp height: 1 * DefaultStyle.dp
color: DefaultStyle.main2_300 color: DefaultStyle.main2_300
} }
MouseArea{ MouseArea{
id: addAccountButton
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 32 * DefaultStyle.dp Layout.preferredHeight: 32 * DefaultStyle.dp
visible: SettingsCpp.maxAccount == 0 || SettingsCpp.maxAccount > accountProxy.count
onClicked: mainItem.addAccountRequest() onClicked: mainItem.addAccountRequest()
RowLayout{ RowLayout{
id: newAccountArea id: newAccountArea

View file

@ -1,10 +1,11 @@
import QtQuick import QtQuick
import QtQuick.Layouts 1.3 import QtQuick.Layouts
import QtQuick.Controls 2.2 as Control import QtQuick.Controls as Control
import QtQuick.Effects import QtQuick.Effects
import Linphone import Linphone
import UtilsCpp 1.0 import UtilsCpp
import SettingsCpp
Item { Item {
id: mainItem id: mainItem
@ -152,7 +153,7 @@ Item {
width: parent.width width: parent.width
spacing: 32 * DefaultStyle.dp spacing: 32 * DefaultStyle.dp
Button { Button {
visible: mainItem.groupCallVisible visible: mainItem.groupCallVisible && !SettingsCpp.disableMeetingsFeature
Layout.preferredWidth: 320 * DefaultStyle.dp Layout.preferredWidth: 320 * DefaultStyle.dp
padding: 0 padding: 0
background: Rectangle { background: Rectangle {

View file

@ -7,6 +7,7 @@ import QtQuick.Controls as Control
import Linphone import Linphone
import UtilsCpp import UtilsCpp
import SettingsCpp
Rectangle{ Rectangle{
id: mainItem id: mainItem
@ -143,6 +144,7 @@ Rectangle{
Layout.preferredWidth: 24 * DefaultStyle.dp Layout.preferredWidth: 24 * DefaultStyle.dp
Layout.preferredHeight: 24 * DefaultStyle.dp Layout.preferredHeight: 24 * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
visible: !SettingsCpp.hideAccountSettings
width: 24 * DefaultStyle.dp width: 24 * DefaultStyle.dp
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
colorizationColor: DefaultStyle.main2_500main colorizationColor: DefaultStyle.main2_500main

View file

@ -1,9 +1,10 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Effects import QtQuick.Effects
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Controls as Control import QtQuick.Controls as Control
import Linphone import Linphone
import UtilsCpp 1.0 import UtilsCpp
import SettingsCpp
ColumnLayout { ColumnLayout {
id: mainItem id: mainItem
@ -59,7 +60,7 @@ ColumnLayout {
} }
} }
RowLayout { RowLayout {
visible: mainItem.isCreation visible: mainItem.isCreation && !SettingsCpp.disableBroadcastFeature
Layout.topMargin: 20 * DefaultStyle.dp Layout.topMargin: 20 * DefaultStyle.dp
Layout.bottomMargin: 20 * DefaultStyle.dp Layout.bottomMargin: 20 * DefaultStyle.dp
spacing: 18 * DefaultStyle.dp spacing: 18 * DefaultStyle.dp

View file

@ -7,7 +7,7 @@ Rectangle {
id: mainItem id: mainItem
height: 50 * DefaultStyle.dp height: visible ? 50 * DefaultStyle.dp : 0
anchors.right: parent.right anchors.right: parent.right
anchors.left: parent.left anchors.left: parent.left

View file

@ -7,7 +7,7 @@ import Linphone
Control.TabBar { Control.TabBar {
id: mainItem id: mainItem
spacing: 32 * DefaultStyle.dp //spacing: 32 * DefaultStyle.dp
topPadding: 36 * DefaultStyle.dp topPadding: 36 * DefaultStyle.dp
property var model property var model
@ -85,7 +85,11 @@ Control.TabBar {
Control.TabButton { Control.TabButton {
id: tabButton id: tabButton
width: mainItem.width width: mainItem.width
height: visible ? undefined : 0
bottomInset: 32 * DefaultStyle.dp
topInset: 32 * DefaultStyle.dp
visible: modelData?.visible != undefined ? modelData?.visible : true
UnreadNotification { UnreadNotification {
unread: index == 0 ? defaultAccount.core.unreadCallNotifications : index == 2 ? defaultAccount.core.unreadMessageNotifications : 0// modelData.unreadNotifications unread: index == 0 ? defaultAccount.core.unreadCallNotifications : index == 2 ? defaultAccount.core.unreadMessageNotifications : 0// modelData.unreadNotifications
anchors.right: parent.right anchors.right: parent.right

View file

@ -1,9 +1,10 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Effects import QtQuick.Effects
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Controls as Control import QtQuick.Controls as Control
import Linphone import Linphone
import UtilsCpp 1.0 import UtilsCpp
import SettingsCpp
ColumnLayout { ColumnLayout {
id: mainItem id: mainItem
@ -125,7 +126,7 @@ ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: childrenRect.height Layout.preferredHeight: childrenRect.height
Button { Button {
visible: mainItem.isConference visible: mainItem.isConference && !SettingsCpp.disableMeetingsFeature
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
text: qsTr("Rejoindre la réunion") text: qsTr("Rejoindre la réunion")
color: DefaultStyle.main2_200 color: DefaultStyle.main2_200
@ -152,7 +153,7 @@ ColumnLayout {
} }
} }
LabelButton { LabelButton {
visible: !mainItem.isConference visible: !mainItem.isConference && !SettingsCpp.disableChatFeature
width: 56 * DefaultStyle.dp width: 56 * DefaultStyle.dp
height: 56 * DefaultStyle.dp height: 56 * DefaultStyle.dp
button.icon.width: 24 * DefaultStyle.dp button.icon.width: 24 * DefaultStyle.dp

View file

@ -2,8 +2,9 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Controls as Control import QtQuick.Controls as Control
import Linphone 1.0 import Linphone
import UtilsCpp 1.0 import UtilsCpp
import SettingsCpp
LoginLayout { LoginLayout {
id: mainItem id: mainItem
@ -53,6 +54,7 @@ LoginLayout {
Layout.fillWidth: true Layout.fillWidth: true
}, },
RowLayout { RowLayout {
visible: !SettingsCpp.assistantHideCreateAccount
spacing: 20 * DefaultStyle.dp spacing: 20 * DefaultStyle.dp
Layout.rightMargin: 51 * DefaultStyle.dp Layout.rightMargin: 51 * DefaultStyle.dp
Text { Text {
@ -91,6 +93,7 @@ LoginLayout {
Layout.preferredWidth: loginForm.width Layout.preferredWidth: loginForm.width
Layout.preferredHeight: 47 * DefaultStyle.dp Layout.preferredHeight: 47 * DefaultStyle.dp
Layout.topMargin: 39 * DefaultStyle.dp Layout.topMargin: 39 * DefaultStyle.dp
visible: !SettingsCpp.assistantHideThirdPartyAccount
text: qsTr("Compte SIP tiers") text: qsTr("Compte SIP tiers")
onClicked: {mainItem.useSIPButtonClicked()} onClicked: {mainItem.useSIPButtonClicked()}
} }

View file

@ -1,8 +1,9 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.3 import QtQuick.Layouts
import QtQuick.Controls as Control import QtQuick.Controls as Control
import Linphone import Linphone
import ConstantsCpp 1.0 import ConstantsCpp
import SettingsCpp
LoginLayout { LoginLayout {
id: mainItem id: mainItem
@ -13,6 +14,7 @@ LoginLayout {
titleContent: [ titleContent: [
RowLayout { RowLayout {
Layout.leftMargin: 119 * DefaultStyle.dp Layout.leftMargin: 119 * DefaultStyle.dp
visible: !SettingsCpp.assistantHideThirdPartyAccount
spacing: 21 * DefaultStyle.dp spacing: 21 * DefaultStyle.dp
Button { Button {
Layout.preferredHeight: 24 * DefaultStyle.dp Layout.preferredHeight: 24 * DefaultStyle.dp
@ -49,6 +51,7 @@ LoginLayout {
Layout.fillWidth: true Layout.fillWidth: true
}, },
RowLayout { RowLayout {
visible: !SettingsCpp.assistantHideCreateAccount
Layout.rightMargin: 51 * DefaultStyle.dp Layout.rightMargin: 51 * DefaultStyle.dp
spacing: 20 * DefaultStyle.dp spacing: 20 * DefaultStyle.dp
Text { Text {

View file

@ -1,9 +1,10 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Effects import QtQuick.Effects
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Controls as Control import QtQuick.Controls as Control
import Linphone import Linphone
import UtilsCpp 1.0 import UtilsCpp
import SettingsCpp
AbstractMainPage { AbstractMainPage {
id: mainItem id: mainItem
@ -429,6 +430,7 @@ AbstractMainPage {
id: groupCallTitle id: groupCallTitle
RowLayout { RowLayout {
spacing: 10 * DefaultStyle.dp spacing: 10 * DefaultStyle.dp
visible: !SettingsCpp.disableMeetingsFeature
Button { Button {
background: Item{} background: Item{}
icon.source: AppIcons.leftArrow icon.source: AppIcons.leftArrow

View file

@ -3,7 +3,8 @@ import QtQuick.Effects
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Controls as Control import QtQuick.Controls as Control
import Linphone import Linphone
import UtilsCpp 1.0 import UtilsCpp
import SettingsCpp
AbstractMainPage { AbstractMainPage {
@ -19,9 +20,9 @@ AbstractMainPage {
property var settingsFamilies: [ property var settingsFamilies: [
{title: qsTr("Appels"), layout: "CallSettingsLayout"}, {title: qsTr("Appels"), layout: "CallSettingsLayout"},
//{title: qsTr("Sécurité"), layout: "SecuritySettingsLayout"}, //{title: qsTr("Sécurité"), layout: "SecuritySettingsLayout"},
{title: qsTr("Conversations"), layout: "ChatSettingsLayout"}, {title: qsTr("Conversations"), layout: "ChatSettingsLayout", visible: !SettingsCpp.disableChatFeature},
{title: qsTr("Contacts"), layout: "ContactSettingsLayout"}, {title: qsTr("Contacts"), layout: "ContactSettingsLayout"},
{title: qsTr("Réunions"), layout: "MeetingsSettingsLayout"}, {title: qsTr("Réunions"), layout: "MeetingsSettingsLayout", visible: !SettingsCpp.disableMeetingsFeature},
{title: qsTr("Affichage"), layout: "DisplaySettingsLayout"}, {title: qsTr("Affichage"), layout: "DisplaySettingsLayout"},
{title: qsTr("Réseau"), layout: "NetworkSettingsLayout"}, {title: qsTr("Réseau"), layout: "NetworkSettingsLayout"},
{title: qsTr("Paramètres avancés"), layout: "AdvancedSettingsLayout"} {title: qsTr("Paramètres avancés"), layout: "AdvancedSettingsLayout"}
@ -71,6 +72,7 @@ AbstractMainPage {
delegate: SettingsFamily { delegate: SettingsFamily {
titleText: modelData.title titleText: modelData.title
visible: modelData.visible != undefined ? modelData.visible : true
isSelected: settingsFamiliesList.selectedIndex == index isSelected: settingsFamiliesList.selectedIndex == index
onSelected: { onSelected: {
settingsFamiliesList.selectedIndex = index settingsFamiliesList.selectedIndex = index