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();
mLogsFolder = mSettingsModel->getLogsFolder();
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() {
@ -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>>(
new SafeConnection<Settings, CoreModel>(me, CoreModel::getInstance()), &QObject::deleteLater);

View file

@ -132,6 +132,19 @@ public:
QString getLogsEmail() 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:
// Security

View file

@ -280,8 +280,7 @@ void SettingsModel::setPlaybackDevice(const QString &device) {
CoreModel::getInstance()->getCore()->setRingerDevice(devId);
emit playbackDeviceChanged(device);
resetCaptureGraph();
}else
qWarning() << "Cannot set Playback device. The ID cannot be matched with an existant device : " << device;
} else 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));
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_
#define SETTINGS_MODEL_H_
#include "MediastreamerUtils.hpp"
#include <QFont>
#include <QObject>
#include <QVariantMap>
#include <linphone++/linphone.hh>
#include "MediastreamerUtils.hpp"
#include "tool/AbstractObject.hpp"
@ -41,117 +41,131 @@ public:
getEntryFullName(const std::string &section,
const std::string &name) const; // Return the full name of the entry : 'name/readonly' or 'name'
static const std::string UiSection;
std::shared_ptr<linphone::Config> mConfig;
bool getVfsEnabled() const;
void setVfsEnabled(const bool enabled);
bool getVideoEnabled() const;
void setVideoEnabled(const bool enabled);
bool getAutomaticallyRecordCallsEnabled () const;
void setAutomaticallyRecordCallsEnabled (bool enabled);
bool getEchoCancellationEnabled () const;
void setEchoCancellationEnabled (bool enabled);
bool getAutomaticallyRecordCallsEnabled() const;
void setAutomaticallyRecordCallsEnabled(bool enabled);
bool getEchoCancellationEnabled() const;
void setEchoCancellationEnabled(bool enabled);
// Audio. --------------------------------------------------------------------
bool getIsInCall() const;
void accessCallSettings();
void closeCallSettings();
void startCaptureGraph();
void stopCaptureGraph();;
void stopCaptureGraph();
;
void stopCaptureGraphs();
void resetCaptureGraph();
void createCaptureGraph();
void deleteCaptureGraph();
bool getCaptureGraphRunning();
float getMicVolume();
float getPlaybackGain() const;
void setPlaybackGain(float gain);
float getCaptureGain() const;
void setCaptureGain(float gain);
QStringList getCaptureDevices () const;
QStringList getPlaybackDevices () const;
QString getCaptureDevice () const;
void setCaptureDevice (const QString &device);
QString getPlaybackDevice () const;
void setPlaybackDevice (const QString &device);
QString getRingPath () const;
void setRingPath (const QString &path);
QStringList getCaptureDevices() const;
QStringList getPlaybackDevices() const;
QString getCaptureDevice() const;
void setCaptureDevice(const QString &device);
QString getPlaybackDevice() const;
void setPlaybackDevice(const QString &device);
QString getRingPath() const;
void setRingPath(const QString &path);
void startEchoCancellerCalibration();
int getEchoCancellationCalibration() const;
QStringList getVideoDevices () const;
QString getVideoDevice () const;
void setVideoDevice (const QString &device);
bool getLogsEnabled () const;
void setLogsEnabled (bool status);
bool getFullLogsEnabled () const;
void setFullLogsEnabled (bool status);
static bool getLogsEnabled (const std::shared_ptr<linphone::Config> &config);
static bool getFullLogsEnabled (const std::shared_ptr<linphone::Config> &config);
QString getLogsFolder () const;
void setLogsFolder (const QString &folder);
static QString getLogsFolder (const std::shared_ptr<linphone::Config> &config);
QString getLogsUploadUrl () const;
void setLogsUploadUrl (const QString &url);
void cleanLogs () const;
void sendLogs () const;
QString getLogsEmail () const;
QStringList getVideoDevices() const;
QString getVideoDevice() const;
void setVideoDevice(const QString &device);
bool getLogsEnabled() const;
void setLogsEnabled(bool status);
bool getFullLogsEnabled() const;
void setFullLogsEnabled(bool status);
static bool getLogsEnabled(const std::shared_ptr<linphone::Config> &config);
static bool getFullLogsEnabled(const std::shared_ptr<linphone::Config> &config);
QString getLogsFolder() const;
void setLogsFolder(const QString &folder);
static QString getLogsFolder(const std::shared_ptr<linphone::Config> &config);
QString getLogsUploadUrl() const;
void setLogsUploadUrl(const QString &url);
void cleanLogs() const;
void sendLogs() 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:
// VFS. --------------------------------------------------------------------
void vfsEnabledChanged(bool enabled);
void videoEnabledChanged(bool enabled);
// Call. --------------------------------------------------------------------
void echoCancellationEnabledChanged(bool enabled);
void automaticallyRecordCallsEnabledChanged(bool enabled);
void captureGraphRunningChanged(bool running);
void playbackGainChanged(float gain);
void captureGainChanged(float gain);
void captureDevicesChanged (const QStringList &devices);
void playbackDevicesChanged (const QStringList &devices);
void captureDeviceChanged (const QString &device);
void playbackDeviceChanged (const QString &device);
void ringPathChanged (const QString &path);
void showAudioCodecsChanged (bool status);
void videoDevicesChanged (const QStringList &devices);
void videoDeviceChanged (const QString &device);
void captureDevicesChanged(const QStringList &devices);
void playbackDevicesChanged(const QStringList &devices);
void captureDeviceChanged(const QString &device);
void playbackDeviceChanged(const QString &device);
void ringPathChanged(const QString &path);
void showAudioCodecsChanged(bool status);
void videoDevicesChanged(const QStringList &devices);
void videoDeviceChanged(const QString &device);
void micVolumeChanged(float volume);
void logsEnabledChanged (bool status);
void fullLogsEnabledChanged (bool status);
void logsEnabledChanged(bool status);
void fullLogsEnabledChanged(bool status);
private:
MediastreamerUtils::SimpleCaptureGraph *mSimpleCaptureGraph = nullptr;

View file

@ -39,7 +39,7 @@
#define DECLARE_GUI_OBJECT \
Q_SIGNALS: \
void qmlNameChanged(); \
void qmlNameChanged(); \
\
public: \
Q_PROPERTY(QString qmlName READ getQmlName WRITE setQmlName NOTIFY qmlNameChanged) \
@ -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 {
public:
virtual QString getClassName() const = 0;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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