add ui settings for showing/hiding past meetings

This commit is contained in:
Gaelle Braud 2026-03-04 18:00:35 +01:00
parent 9b999bcc09
commit 5f8d0e0d79
5 changed files with 57 additions and 23 deletions

View file

@ -23,6 +23,7 @@
#include "ConferenceInfoGui.hpp"
#include "core/App.hpp"
#include "model/object/VariantObject.hpp"
#include "model/setting/SettingsModel.hpp"
#include "model/tool/ToolModel.hpp"
#include "tool/Utils.hpp"
#include <QSharedPointer>
@ -163,6 +164,11 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
}
});
});
mSettingsModelConnection =
SafeConnection<ConferenceInfoList, SettingsModel>::create(me, SettingsModel::getInstance());
mSettingsModelConnection->makeConnectToModel(&SettingsModel::showPastMeetingsChanged, &ConferenceInfoList::lUpdate);
emit lUpdate();
}

View file

@ -27,6 +27,7 @@
#include <linphone++/linphone.hh>
class CoreModel;
class SettingsModel;
class ConferenceInfoCore;
class AccountCore;
@ -74,6 +75,7 @@ signals:
private:
QSharedPointer<SafeConnection<ConferenceInfoList, CoreModel>> mCoreModelConnection;
QSharedPointer<SafeConnection<ConferenceInfoList, SettingsModel>> mSettingsModelConnection;
QSharedPointer<AccountCore> mCurrentAccountCore;
bool mHaveCurrentDate = false;
bool mAccountConnected = false;

View file

@ -1230,6 +1230,14 @@ bool SettingsCore::getShowPastMeetings() const {
return mShowPastMeetings;
}
void SettingsCore::setShowPastMeetings(bool show) {
if (mShowPastMeetings != show) {
mShowPastMeetings = show;
emit showPastMeetingsChanged();
setIsSaved(false);
}
}
bool SettingsCore::getExitOnClose() const {
return mExitOnClose;
}

View file

@ -40,6 +40,7 @@ public:
Q_PROPERTY(bool videoEnabled READ getVideoEnabled WRITE setVideoEnabled NOTIFY videoEnabledChanged)
Q_PROPERTY(bool echoCancellationEnabled READ getEchoCancellationEnabled WRITE setEchoCancellationEnabled NOTIFY
echoCancellationEnabledChanged)
Q_PROPERTY(bool showPastMeetings READ getShowPastMeetings WRITE setShowPastMeetings NOTIFY showPastMeetingsChanged)
Q_PROPERTY(bool autoDownloadReceivedFiles READ getAutoDownloadReceivedFiles WRITE setAutoDownloadReceivedFiles
NOTIFY autoDownloadReceivedFilesChanged)
Q_PROPERTY(QString downloadFolder READ getDownloadFolder WRITE setDownloadFolder NOTIFY downloadFolderChanged)
@ -168,6 +169,9 @@ public:
}
void setAutomaticallyRecordCallsEnabled(bool enabled);
bool getShowPastMeetings() const;
void setShowPastMeetings(bool show);
float getPlaybackGain() const;
void setPlaybackGain(float gain);
void setPlaybackGainFromModel(float gain);
@ -279,7 +283,6 @@ public:
DECLARE_CORE_GETSET_MEMBER(bool, disableChatFeature, DisableChatFeature)
DECLARE_CORE_GETSET_MEMBER(bool, disableMeetingsFeature, DisableMeetingsFeature)
DECLARE_CORE_GETSET(bool, showPastMeetings, ShowPastMeetings)
DECLARE_CORE_GETSET_MEMBER(bool, disableBroadcastFeature, DisableBroadcastFeature)
DECLARE_CORE_GETSET_MEMBER(bool, hideSettings, HideSettings)
DECLARE_CORE_GETSET_MEMBER(bool, hideAccountSettings, HideAccountSettings)
@ -323,6 +326,8 @@ signals:
void downloadFolderChanged();
void displayNotificationContentChanged();
void showPastMeetingsChanged();
void automaticallyRecordCallsEnabledChanged();
void captureGraphRunningChanged(bool running);
@ -423,6 +428,8 @@ private:
bool mDisplayNotificationContent;
bool mAutomaticallyRecordCallsEnabled;
bool mShowPastMeetings;
// Audio
QVariantList mCaptureDevices;
QVariantList mPlaybackDevices;

View file

@ -28,31 +28,42 @@ AbstractSettingsLayout {
Component {
id: confDisplayParametersComponent
ColumnLayout {
spacing: Utils.getSizeWithScreenRatio(5)
Text {
//: "Mode daffichage par défaut"
text: qsTr("settings_meetings_default_layout_title")
font {
pixelSize: Typography.p2l.pixelSize
weight: Typography.p2l.weight
spacing: Utils.getSizeWithScreenRatio(20)
ColumnLayout {
spacing: Utils.getSizeWithScreenRatio(5)
Text {
//: "Mode daffichage par défaut"
text: qsTr("settings_meetings_default_layout_title")
font {
pixelSize: Typography.p2l.pixelSize
weight: Typography.p2l.weight
}
}
Text {
//: "Le mode daffichage des participants en réunions"
text: qsTr("settings_meetings_default_layout_subtitle")
font {
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
}
ComboSetting {
Layout.fillWidth: true
Layout.topMargin: Utils.getSizeWithScreenRatio(12)
Layout.preferredWidth: parent.width
entries: SettingsCpp.conferenceLayouts
propertyName: "conferenceLayout"
propertyOwner: SettingsCpp
textRole: 'display_name'
}
}
Text {
//: "Le mode daffichage des participants en réunions"
text: qsTr("settings_meetings_default_layout_subtitle")
font {
pixelSize: Typography.p1.pixelSize
weight: Typography.p1.weight
}
}
ComboSetting {
Layout.fillWidth: true
Layout.topMargin: Utils.getSizeWithScreenRatio(12)
Layout.preferredWidth: parent.width
entries: SettingsCpp.conferenceLayouts
propertyName: "conferenceLayout"
SwitchSetting {
//: Show past meetings
titleText: qsTr("settings_meetings_show_past_meetings_title")
//: Display past meetings in the meeting list
subTitleText: qsTr("settings_meetings_show_past_meetings_subtitle")
propertyName: "showPastMeetings"
propertyOwner: SettingsCpp
textRole: 'display_name'
}
}
}