mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-17 20:08:28 +00:00
add ui settings for showing/hiding past meetings
This commit is contained in:
parent
9b999bcc09
commit
5f8d0e0d79
5 changed files with 57 additions and 23 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ AbstractSettingsLayout {
|
|||
|
||||
Component {
|
||||
id: confDisplayParametersComponent
|
||||
ColumnLayout {
|
||||
spacing: Utils.getSizeWithScreenRatio(20)
|
||||
ColumnLayout {
|
||||
spacing: Utils.getSizeWithScreenRatio(5)
|
||||
Text {
|
||||
|
|
@ -55,5 +57,14 @@ AbstractSettingsLayout {
|
|||
textRole: 'display_name'
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue