mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-25 15:58:16 +00:00
Add record and snapshot to video conference.
Deactivate snapshots from grid layout (not available). Toggle button for recording.
This commit is contained in:
parent
f7757dd8a3
commit
cc8057a0d2
9 changed files with 65 additions and 62 deletions
|
|
@ -769,6 +769,10 @@ bool CallModel::getRecording () const {
|
|||
return mRecording;
|
||||
}
|
||||
|
||||
bool CallModel::getSnapshotEnabled() const{
|
||||
return getVideoEnabled() && getConferenceVideoLayout() != LinphoneEnums::ConferenceLayout::ConferenceLayoutGrid;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void CallModel::sendDtmf (const QString &dtmf) {
|
||||
|
|
@ -891,6 +895,7 @@ void CallModel::setConferenceVideoLayout(LinphoneEnums::ConferenceLayout layout)
|
|||
if( mConferenceVideoLayout != layout){
|
||||
mConferenceVideoLayout = layout;
|
||||
emit conferenceVideoLayoutChanged();
|
||||
emit snapshotEnabledChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ class CallModel : public QObject {
|
|||
Q_PROPERTY(bool updating READ getUpdating NOTIFY statusChanged)
|
||||
|
||||
Q_PROPERTY(bool recording READ getRecording NOTIFY recordingChanged)
|
||||
|
||||
Q_PROPERTY(bool snapshotEnabled READ getSnapshotEnabled NOTIFY snapshotEnabledChanged) // Grid doesn't enable snapshot
|
||||
|
||||
Q_PROPERTY(QVariantList audioStats READ getAudioStats NOTIFY statsUpdated)
|
||||
Q_PROPERTY(QVariantList videoStats READ getVideoStats NOTIFY statsUpdated)
|
||||
|
|
@ -191,6 +193,7 @@ signals:
|
|||
void microMutedChanged (bool status);
|
||||
void cameraEnabledChanged();
|
||||
void recordingChanged (bool status);
|
||||
void snapshotEnabledChanged();
|
||||
void statsUpdated ();
|
||||
void statusChanged (CallStatus status);
|
||||
void videoRequested ();
|
||||
|
|
@ -204,6 +207,7 @@ signals:
|
|||
void transferAddressChanged (const QString &transferAddress);
|
||||
|
||||
void conferenceVideoLayoutChanged();
|
||||
|
||||
|
||||
public:
|
||||
void handleCallEncryptionChanged (const std::shared_ptr<linphone::Call> &call);
|
||||
|
|
@ -249,6 +253,7 @@ public:
|
|||
bool getUpdating () const;
|
||||
|
||||
bool getRecording () const;
|
||||
bool getSnapshotEnabled() const;
|
||||
|
||||
CallEncryption getEncryption () const;
|
||||
bool isSecured () const;
|
||||
|
|
|
|||
|
|
@ -193,23 +193,17 @@ Rectangle {
|
|||
|
||||
isCustom: true
|
||||
backgroundRadius: 90
|
||||
colorSet: incall.call.recording ? CallStyle.buttons.recordOn : CallStyle.buttons.recordOff
|
||||
colorSet: CallStyle.buttons.record
|
||||
visible: SettingsModel.callRecorderEnabled
|
||||
toggled: incall.call.recording
|
||||
|
||||
onClicked: {
|
||||
var call = incall.call
|
||||
return !incall.call.recording
|
||||
return !toggled
|
||||
? call.startRecording()
|
||||
: call.stopRecording()
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (!visible) {
|
||||
call.stopRecording()
|
||||
}
|
||||
}
|
||||
|
||||
tooltipText: !incall.call.recording
|
||||
tooltipText: !toggled
|
||||
? qsTr('startRecordingLabel')
|
||||
: qsTr('stopRecordingLabel')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -261,17 +261,17 @@ Window {
|
|||
|
||||
ActionButton {
|
||||
id: recordingSwitch
|
||||
property bool recording : call && call.recording
|
||||
toggled: call && call.recording
|
||||
isCustom: true
|
||||
backgroundRadius: 90
|
||||
colorSet: recording ? CallFullscreenStyle.buttons.recordOn : CallFullscreenStyle.buttons.recordOff
|
||||
colorSet: CallFullscreenStyle.buttons.record
|
||||
visible: SettingsModel.callRecorderEnabled
|
||||
|
||||
onClicked: !recording
|
||||
|
||||
onClicked: !toggled
|
||||
? call.startRecording()
|
||||
: call.stopRecording()
|
||||
|
||||
tooltipText: !recordingSwitch.recording
|
||||
tooltipText: !toggled
|
||||
? qsTr('startRecordingLabel')
|
||||
: qsTr('stopRecordingLabel')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,17 +142,30 @@ Rectangle {
|
|||
colorSet: VideoConferenceStyle.buttons.screenSharing
|
||||
visible: false //TODO
|
||||
}
|
||||
ActionButton{
|
||||
ActionButton {
|
||||
id: recordingSwitch
|
||||
isCustom: true
|
||||
backgroundRadius: width/2
|
||||
colorSet: VideoConferenceStyle.buttons.recordOff
|
||||
visible: false //TODO
|
||||
colorSet: VideoConferenceStyle.buttons.record
|
||||
property CallModel callModel: conference.callModel
|
||||
onCallModelChanged: if(!callModel) callModel.stopRecording()
|
||||
visible: SettingsModel.callRecorderEnabled && callModel
|
||||
toggled: callModel.recording
|
||||
|
||||
onClicked: {
|
||||
return !toggled
|
||||
? callModel.startRecording()
|
||||
: callModel.stopRecording()
|
||||
}
|
||||
tooltipText: !toggled ? 'Start Recording' : 'Stop Recording'
|
||||
}
|
||||
ActionButton{
|
||||
isCustom: true
|
||||
backgroundRadius: width/2
|
||||
colorSet: VideoConferenceStyle.buttons.screenshot
|
||||
visible: false //TODO
|
||||
visible: conference.callModel.snapshotEnabled
|
||||
onClicked: conference.callModel.takeSnapshot()
|
||||
tooltipText:'take Snapshot'
|
||||
}
|
||||
ActionButton{
|
||||
isCustom: true
|
||||
|
|
|
|||
|
|
@ -182,17 +182,30 @@ Window {
|
|||
colorSet: VideoConferenceStyle.buttons.screenSharing
|
||||
visible: false //TODO
|
||||
}
|
||||
ActionButton{
|
||||
ActionButton {
|
||||
id: recordingSwitch
|
||||
isCustom: true
|
||||
backgroundRadius: width/2
|
||||
colorSet: VideoConferenceStyle.buttons.recordOff
|
||||
visible: false //TODO
|
||||
colorSet: VideoConferenceStyle.buttons.record
|
||||
property CallModel callModel: conference.callModel
|
||||
onCallModelChanged: if(!callModel) callModel.stopRecording()
|
||||
visible: SettingsModel.callRecorderEnabled && callModel
|
||||
toggled: callModel.recording
|
||||
|
||||
onClicked: {
|
||||
return !toggled
|
||||
? callModel.startRecording()
|
||||
: callModel.stopRecording()
|
||||
}
|
||||
tooltipText: !toggled? 'Start Recording' : 'Stop Recording'
|
||||
}
|
||||
ActionButton{
|
||||
isCustom: true
|
||||
backgroundRadius: width/2
|
||||
colorSet: VideoConferenceStyle.buttons.screenshot
|
||||
visible: false //TODO
|
||||
visible: conference.callModel.snapshotEnabled
|
||||
onClicked: conference.callModel.takeSnapshot()
|
||||
tooltipText:'take Snapshot'
|
||||
}
|
||||
ActionButton{
|
||||
isCustom: true
|
||||
|
|
|
|||
|
|
@ -167,27 +167,18 @@ QtObject {
|
|||
property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'sc_h_b_fg').color
|
||||
property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'sc_p_b_fg').color
|
||||
}
|
||||
property QtObject recordOn: QtObject {
|
||||
property QtObject record: QtObject {
|
||||
property int iconSize: 40
|
||||
property string icon : 'record_custom'
|
||||
property string name : 'recordOn'
|
||||
property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'sc_p_b_bg').color
|
||||
property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'sc_h_b_bg').color
|
||||
property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'sc_p_b_bg').color
|
||||
property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'sc_p_b_fg').color
|
||||
property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'sc_h_b_fg').color
|
||||
property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'sc_p_b_fg').color
|
||||
}
|
||||
property QtObject recordOff: QtObject {
|
||||
property int iconSize: 40
|
||||
property string icon : 'record_custom'
|
||||
property string name : 'recordOff'
|
||||
property string name : 'record'
|
||||
property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'sc_n_b_bg').color
|
||||
property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'sc_h_b_bg').color
|
||||
property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'sc_p_b_bg').color
|
||||
property color backgroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_c', icon, 'sc_p_b_bg').color
|
||||
property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'sc_n_b_fg').color
|
||||
property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'sc_h_b_fg').color
|
||||
property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'sc_p_b_fg').color
|
||||
property color foregroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_c', icon, 'sc_p_b_fg').color
|
||||
}
|
||||
property QtObject fullscreen: QtObject {
|
||||
property int iconSize: 40
|
||||
|
|
|
|||
|
|
@ -167,27 +167,18 @@ QtObject {
|
|||
property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'me_h_b_fg').color
|
||||
property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'me_p_b_fg').color
|
||||
}
|
||||
property QtObject recordOn: QtObject {
|
||||
property QtObject record: QtObject {
|
||||
property int iconSize: 40
|
||||
property string icon : 'record_custom'
|
||||
property string name : 'recordOn'
|
||||
property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'me_p_b_bg').color
|
||||
property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'me_h_b_bg').color
|
||||
property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'me_p_b_bg').color
|
||||
property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'me_p_b_fg').color
|
||||
property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'me_h_b_fg').color
|
||||
property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'me_p_b_fg').color
|
||||
}
|
||||
property QtObject recordOff: QtObject {
|
||||
property int iconSize: 40
|
||||
property string icon : 'record_custom'
|
||||
property string name : 'recordOff'
|
||||
property string name : 'record'
|
||||
property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'me_n_b_bg').color
|
||||
property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'me_h_b_bg').color
|
||||
property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'me_p_b_bg').color
|
||||
property color backgroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_c', icon, 'me_p_b_bg').color
|
||||
property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'me_n_b_fg').color
|
||||
property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'me_h_b_fg').color
|
||||
property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'me_p_b_fg').color
|
||||
property color foregroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_c', icon, 'me_p_b_fg').color
|
||||
}
|
||||
property QtObject fullscreen: QtObject {
|
||||
property int iconSize: 40
|
||||
|
|
|
|||
|
|
@ -182,27 +182,18 @@ QtObject {
|
|||
property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'sc_h_b_fg').color
|
||||
property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'sc_p_b_fg').color
|
||||
}
|
||||
property QtObject recordOn: QtObject {
|
||||
property QtObject record: QtObject {
|
||||
property int iconSize: 40
|
||||
property string icon : 'record_custom'
|
||||
property string name : 'recordOn'
|
||||
property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'sc_n_b_bg').color
|
||||
property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'sc_h_b_bg').color
|
||||
property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'sc_p_b_bg').color
|
||||
property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'sc_n_b_fg').color
|
||||
property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'sc_h_b_fg').color
|
||||
property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'sc_p_b_fg').color
|
||||
}
|
||||
property QtObject recordOff: QtObject {
|
||||
property int iconSize: 40
|
||||
property string icon : 'record_custom'
|
||||
property string name : 'recordOff'
|
||||
property string name : 'record'
|
||||
property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'sc_n_b_bg').color
|
||||
property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'sc_h_b_bg').color
|
||||
property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'sc_p_b_bg').color
|
||||
property color backgroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_c', icon, 'sc_p_b_bg').color
|
||||
property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'sc_n_b_fg').color
|
||||
property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'sc_h_b_fg').color
|
||||
property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'sc_p_b_fg').color
|
||||
property color foregroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_c', icon, 'sc_p_b_fg').color
|
||||
}
|
||||
property QtObject screenshot: QtObject {
|
||||
property int iconSize: 40
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue