Commit 4968dcf8 authored by Andreas Traczyk's avatar Andreas Traczyk

call: add conference feature

Change-Id: I84382a10725b53913c28d2fd66d7ddead12da1a0
parent 3b71cdad
This diff is collapsed.
......@@ -164,5 +164,6 @@ private:
QMetaObject::Connection interactionRemovedConnection_;
QMetaObject::Connection contactAddedConnection_;
QMetaObject::Connection callStatusChangedConnection_;
QMetaObject::Connection addedToConferenceConnection_;
};
......@@ -27,7 +27,7 @@
ContactPicker::ContactPicker(QWidget *parent) :
QDialog(parent),
ui(new Ui::ContactPicker),
type_(Type::CONFERENCE)
listModeltype_(SmartListModel::Type::CONFERENCE)
{
ui->setupUi(this);
......@@ -58,24 +58,34 @@ ContactPicker::on_smartList_clicked(const QModelIndex &index)
void
ContactPicker::accept()
{
auto idx = ui->smartList->currentIndex();
if (idx.isValid()) {
// get current call id and peer uri
auto conversation = LRCInstance::getCurrentConversation();
if (conversation.uid.empty()) {
return;
}
auto thisCallId = conversation.callId;
auto contactUri = idx.data(static_cast<int>(SmartListModel::Role::URI)).value<QString>().toStdString();
auto index = ui->smartList->currentIndex();
if (index.isValid()) {
// let parent deal with this as this dialog will be destroyed
switch (type_) {
case Type::CONFERENCE:
emit contactWillJoinConference(thisCallId, contactUri);
switch (listModeltype_) {
case SmartListModel::Type::CONFERENCE:
{
auto sectionName = index.data(SmartListModel::Role::SectionName).value<QString>();
if (!sectionName.isEmpty()) {
smartListModel_->toggleSection(sectionName);
return;
}
auto convUid = index.data(SmartListModel::Role::UID).value<QString>().toStdString();
auto accId = index.data(SmartListModel::Role::AccountId).value<QString>().toStdString();
auto callId = LRCInstance::getCallIdForConversationUid(convUid, accId);
if (!callId.empty()) {
emit callWillJoinConference(callId);
} else {
auto contactUri = index.data(SmartListModel::Role::URI).value<QString>().toStdString();
emit contactWillJoinConference(contactUri);
}
}
break;
case Type::TRANSFER:
emit contactWillDoTransfer(thisCallId, contactUri);
case SmartListModel::Type::TRANSFER:
{
auto contactUri = index.data(SmartListModel::Role::URI).value<QString>().toStdString();
emit contactWillDoTransfer(contactUri);
}
break;
default:
break;
......@@ -88,6 +98,9 @@ ContactPicker::accept()
void
ContactPicker::on_ringContactLineEdit_textChanged(const QString &arg1)
{
if (listModeltype_ == SmartListModel::Type::CONFERENCE) {
smartListModel_->setConferenceableFilter(arg1.toStdString());
}
selectableProxyModel_->setFilterRegExp(QRegExp(arg1, Qt::CaseInsensitive, QRegExp::FixedString));
}
......@@ -107,29 +120,20 @@ ContactPicker::setTitle(const QString& title)
}
void
ContactPicker::setType(const Type& type)
ContactPicker::setType(const SmartListModel::Type& type)
{
type_ = type;
smartListModel_.reset(new SmartListModel(LRCInstance::getCurrAccId(), this, true));
listModeltype_ = type;
smartListModel_.reset(new SmartListModel(LRCInstance::getCurrAccId(), this, type, LRCInstance::getCurrentConvUid()));
selectableProxyModel_->setSourceModel(smartListModel_.get());
// adjust filter
switch (type_) {
case Type::CONFERENCE:
switch (listModeltype_) {
case SmartListModel::Type::CONFERENCE:
selectableProxyModel_->setPredicate(
[this](const QModelIndex& index, const QRegExp& regexp) {
bool match = regexp.indexIn(index.data(Qt::DisplayRole).toString()) != -1;
auto convUid = index.data(static_cast<int>(SmartListModel::Role::UID)).value<QString>().toStdString();
auto conversation = LRCInstance::getConversationFromConvUid(convUid);
if (conversation.uid.empty()) {
return false;
}
auto callModel = LRCInstance::getCurrentCallModel();
return match &&
!(callModel->hasCall(conversation.callId) || callModel->hasCall(conversation.confId)) &&
!index.parent().isValid();
[this](const QModelIndex&, const QRegExp&) {
return true;
});
break;
case Type::TRANSFER:
case SmartListModel::Type::TRANSFER:
selectableProxyModel_->setPredicate(
[this](const QModelIndex& index, const QRegExp& regexp) {
// Regex to remove current callee
......
......@@ -19,13 +19,13 @@
#pragma once
#include <QDialog>
#include <QSortFilterProxyModel>
#include "smartlistmodel.h"
#include "utils.h"
#include "lrcinstance.h"
#include <QDialog>
#include <QSortFilterProxyModel>
namespace Ui {
class ContactPicker;
}
......@@ -61,24 +61,19 @@ class ContactPicker : public QDialog
Q_OBJECT;
public:
enum class Type {
CONFERENCE,
TRANSFER,
COUNT__
};
explicit ContactPicker(QWidget *parent = 0);
~ContactPicker();
void setTitle(const QString& title);
void setType(const Type& type);
void setType(const SmartListModel::Type& type);
void setCurrentCalleeDisplayName(const QString& CalleeDisplayName);
protected:
void mousePressEvent(QMouseEvent *event);
signals:
void contactWillJoinConference(const std::string& callId, const std::string& contactUri);
void contactWillDoTransfer(const std::string& callId, const std::string& contactUri);
void contactWillJoinConference(const std::string& contactUri);
void callWillJoinConference(const std::string& callId);
void contactWillDoTransfer(const std::string& contactUri);
void willClose(QMouseEvent *event);
protected slots:
......@@ -93,7 +88,7 @@ private:
std::unique_ptr<SmartListModel> smartListModel_;
SelectableProxyModel* selectableProxyModel_;
Type type_;
QString CalleeDisplayName_;
SmartListModel::Type listModeltype_;
};
......@@ -57,6 +57,29 @@ ContactPickerItemDelegate::paint(QPainter* painter
highlightMap_[index.row()] = option.state & QStyle::State_MouseOver;
}
QRect &rect = opt.rect;
QString sectionName = index.data(static_cast<int>(SmartListModel::Role::SectionName)).value<QString>();
if (!sectionName.isEmpty()) {
painter->fillRect(option.rect, RingTheme::lightGrey_);
QFont font(painter->font());
QPen pen(painter->pen());
auto scalingRatio = MainWindow::instance().getCurrentScalingRatio();
if (scalingRatio > 1.0) {
font.setPointSize(fontSize_ - 2);
} else {
font.setPointSize(fontSize_);
}
font.setItalic(false);
font.setBold(false);
pen.setColor(RingTheme::lightBlack_);
painter->setPen(pen);
painter->setFont(font);
QMargins padding(4, 0, 0, 0);
painter->drawText(rect - padding, Qt::AlignVCenter | Qt::AlignLeft, sectionName);
return;
}
QColor presenceBorderColor = Qt::white;
auto rowHighlight = highlightMap_.find(index.row());
if (selected) {
......@@ -67,8 +90,6 @@ ContactPickerItemDelegate::paint(QPainter* painter
presenceBorderColor = RingTheme::smartlistHighlight_;
}
QRect &rect = opt.rect;
// Avatar drawing
opt.decorationSize = QSize(sizeImage_, sizeImage_);
opt.decorationPosition = QStyleOptionViewItem::Left;
......@@ -117,7 +138,11 @@ ContactPickerItemDelegate::sizeHint(const QStyleOptionViewItem& option,
const QModelIndex& index) const
{
Q_UNUSED(option);
Q_UNUSED(index);
if (!index.data(static_cast<int>(SmartListModel::Role::SectionName))
.value<QString>()
.isEmpty()) {
return QSize(0, sectionCellHeight_);
}
return QSize(0, cellHeight_);
}
......@@ -130,7 +155,6 @@ ContactPickerItemDelegate::paintRingContactItem(QPainter* painter,
Q_UNUSED(option);
QFont font(painter->font());
QPen pen(painter->pen());
painter->setPen(pen);
auto scalingRatio = MainWindow::instance().getCurrentScalingRatio();
if (scalingRatio > 1.0) {
......
......@@ -39,6 +39,7 @@ private:
constexpr static int sizeImage_ = 48;
constexpr static int cellHeight_ = 60;
constexpr static int sectionCellHeight_ = 24;
constexpr static int dy_ = 6;
constexpr static int dx_ = 12;
constexpr static int fontSize_ = 11;
......
......@@ -122,15 +122,37 @@ public:
}
return result;
};
static std::string
getCallIdForConversationUid(const std::string& convUid, const std::string& accountId)
{
auto convInfo = LRCInstance::getConversationFromConvUid(convUid, accountId);
if (convInfo.uid.empty()) {
return {};
}
return convInfo.confId.empty() ? convInfo.callId : convInfo.confId;
}
static const call::Info*
getCallInfo(const std::string& callId, const std::string& accountId) {
try {
auto& accInfo = LRCInstance::accountModel().getAccountInfo(accountId);
if (!accInfo.callModel->hasCall(callId)) {
return nullptr;
}
return &accInfo.callModel->getCall(callId);
} catch (...) {
return nullptr;
}
}
static const call::Info*
getCallInfoForConversation(const conversation::Info& convInfo) {
try {
auto accountId = convInfo.accountId;
auto& accInfo = LRCInstance::accountModel().getAccountInfo(accountId);
if (!accInfo.callModel->hasCall(convInfo.callId)) {
auto callId = convInfo.confId.empty() ? convInfo.callId : convInfo.confId;
if (!accInfo.callModel->hasCall(callId)) {
return nullptr;
}
return &accInfo.callModel->getCall(convInfo.callId);
return &accInfo.callModel->getCall(callId);
} catch(...) {
return nullptr;
}
......@@ -194,7 +216,7 @@ public:
}
static const conversation::Info&
getCurrentConversation() {
return getConversationFromConvUid(getSelectedConvUid());
return getConversationFromConvUid(getCurrentConvUid());
}
static ConversationModel*
......@@ -221,7 +243,7 @@ public:
settings.setValue(SettingsKey::selectedAccount, QString::fromStdString(accountId));
};
static const std::string& getSelectedConvUid() {
static const std::string& getCurrentConvUid() {
return instance().selectedConvUid_;
};
......
......@@ -418,7 +418,7 @@ PrivateBridging::deleteInteraction(const QString& arg)
uint64_t interactionUid = arg.toULongLong(&ok);
if (ok) {
LRCInstance::getCurrentConversationModel()->clearInteractionFromConversation(
LRCInstance::getSelectedConvUid(),
LRCInstance::getCurrentConvUid(),
interactionUid
);
} else {
......@@ -434,7 +434,7 @@ PrivateBridging::retryInteraction(const QString& arg)
uint64_t interactionUid = arg.toULongLong(&ok);
if (ok) {
LRCInstance::getCurrentConversationModel()->retryInteraction(
LRCInstance::getSelectedConvUid(),
LRCInstance::getCurrentConvUid(),
interactionUid
);
} else {
......@@ -461,7 +461,7 @@ PrivateBridging::acceptFile(const QString& arg)
auto interactionUid = std::stoull(arg.toStdString());
lrc::api::datatransfer::Info info = {};
auto convUid = LRCInstance::getSelectedConvUid();
auto convUid = LRCInstance::getCurrentConvUid();
LRCInstance::getCurrentConversationModel()->getTransferInfo(interactionUid, info);
// get full path
......@@ -490,7 +490,7 @@ PrivateBridging::refuseFile(const QString& arg)
{
try {
auto interactionUid = std::stoull(arg.toStdString());
auto convUid = LRCInstance::getSelectedConvUid();
auto convUid = LRCInstance::getCurrentConvUid();
LRCInstance::getCurrentConversationModel()->cancelTransfer(convUid, interactionUid);
} catch (...) {
qDebug() << "JS bridging - exception during refuseFile:" << arg;
......@@ -502,7 +502,7 @@ Q_INVOKABLE int
PrivateBridging::sendMessage(const QString& arg)
{
try {
auto convUid = LRCInstance::getSelectedConvUid();
auto convUid = LRCInstance::getCurrentConvUid();
LRCInstance::getCurrentConversationModel()->sendMessage(convUid, arg.toStdString());
} catch (...) {
qDebug() << "JS bridging - exception during sendMessage:" << arg;
......@@ -533,7 +533,7 @@ PrivateBridging::sendImage(const QString& arg)
}
try {
auto convUid = LRCInstance::getSelectedConvUid();
auto convUid = LRCInstance::getCurrentConvUid();
LRCInstance::getCurrentConversationModel()->sendFile(convUid, path.toStdString(), fileName.toStdString());
} catch (...) {
qDebug().noquote() << "JS bridging - exception during sendFile - base64 img" << "\n";
......@@ -545,7 +545,7 @@ PrivateBridging::sendImage(const QString& arg)
QFileInfo fi(arg);
QString fileName = fi.fileName();
try {
auto convUid = LRCInstance::getSelectedConvUid();
auto convUid = LRCInstance::getCurrentConvUid();
LRCInstance::getCurrentConversationModel()->sendFile(convUid, arg.toStdString(), fileName.toStdString());
} catch (...) {
qDebug().noquote() << "JS bridging - exception during sendFile - image from path" << "\n";
......@@ -562,7 +562,7 @@ PrivateBridging::sendFile(const QString&path)
QFileInfo fi(path);
QString fileName = fi.fileName();
try {
auto convUid = LRCInstance::getSelectedConvUid();
auto convUid = LRCInstance::getCurrentConvUid();
LRCInstance::getCurrentConversationModel()->sendFile(convUid, path.toStdString(), fileName.toStdString());
} catch (...) {
qDebug() << "JS bridging - exception during sendFile";
......@@ -604,7 +604,7 @@ Q_INVOKABLE int
PrivateBridging::refuseInvitation()
{
try {
auto convUid = LRCInstance::getSelectedConvUid();
auto convUid = LRCInstance::getCurrentConvUid();
LRCInstance::getCurrentConversationModel()->removeConversation(convUid, false);
if (auto messageView = qobject_cast<MessageWebView*>(this->parent())) {
messageView->setInvitation(false);
......@@ -620,7 +620,7 @@ Q_INVOKABLE int
PrivateBridging::blockConversation()
{
try {
auto convUid = LRCInstance::getSelectedConvUid();
auto convUid = LRCInstance::getCurrentConvUid();
LRCInstance::getCurrentConversationModel()->removeConversation(convUid, true);
if (auto messageView = qobject_cast<MessageWebView*>(this->parent())) {
messageView->setInvitation(false);
......
......@@ -48,10 +48,15 @@ FrameWrapper::connectStartRendering()
&FrameWrapper::slotRenderingStarted);
}
void
bool
FrameWrapper::startRendering()
{
renderer_ = const_cast<video::Renderer*>(&avModel_.getRenderer(id_));
try {
renderer_ = const_cast<video::Renderer*>(&avModel_.getRenderer(id_));
} catch (std::out_of_range& e) {
qWarning() << e.what();
return false;
}
QObject::disconnect(renderConnections_.updated);
QObject::disconnect(renderConnections_.stopped);
......@@ -67,6 +72,8 @@ FrameWrapper::startRendering()
&AVModel::rendererStopped,
this,
&FrameWrapper::slotRenderingStopped);
return true;
}
QImage*
......@@ -88,7 +95,10 @@ FrameWrapper::slotRenderingStarted(const std::string& id)
return;
}
startRendering();
if (!startRendering()) {
qWarning() << "Couldn't start rendering for id: " << id_.c_str();
return;
}
isRendering_ = true;
......@@ -256,7 +266,9 @@ RenderManager::addDistantRenderer(const std::string& id)
// check if a FrameWrapper with this id exists
auto dfwIt = distantFrameWrapperMap_.find(id);
if ( dfwIt != distantFrameWrapperMap_.end()) {
dfwIt->second->startRendering();
if (!dfwIt->second->startRendering()) {
qWarning() << "Couldn't start rendering for id: " << id.c_str();
}
} else {
auto dfw = std::make_unique<FrameWrapper>(avModel_, id);
......
......@@ -56,8 +56,9 @@ public:
/**
* Get a pointer to the renderer and reconnect the update/stopped
* rendering connections for this object.
* @return whether the start succeeded or not
*/
void startRendering();
bool startRendering();
/**
* Get the most recently rendered frame as a QImage.
......
This diff is collapsed.
/***************************************************************************
* Copyright (C) 2017-2019 by Savoir-faire Linux *
* Author: Anthony L�onard <anthony.leonard@savoirfairelinux.com> *
/**************************************************************************
* Copyright (C) 2017-2019 by Savoir-faire Linux *
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com> *
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
......@@ -17,15 +18,14 @@
**************************************************************************/
#pragma once
// Qt include
#include <QAbstractItemModel>
// LRC
#include "api/account.h"
#include "api/conversation.h"
#include "api/conversationmodel.h"
#include "api/contact.h"
namespace lrc { namespace api { class ConversationModel; } }
#include <QAbstractItemModel>
using namespace lrc::api;
class SmartListModel : public QAbstractItemModel
{
......@@ -35,6 +35,13 @@ public:
using ConversationInfo = lrc::api::conversation::Info;
using ContactInfo = lrc::api::contact::Info;
enum class Type {
CONVERSATION,
CONFERENCE,
TRANSFER,
COUNT__
};
enum Role {
DisplayName = Qt::UserRole + 1,
DisplayID,
......@@ -49,10 +56,15 @@ public:
UID,
ContextMenuOpen,
InCall,
CallStateStr
CallStateStr,
SectionName,
AccountId
};
explicit SmartListModel(const std::string& accId, QObject *parent = 0, bool contactList = false);
explicit SmartListModel(const std::string& accId,
QObject *parent = 0,
SmartListModel::Type listModelType = Type::CONVERSATION,
const std::string& convUid = {});
// QAbstractItemModel
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
......@@ -63,11 +75,22 @@ public:
Qt::ItemFlags flags(const QModelIndex &index) const;
void setAccount(const std::string& accId);
void setConferenceableFilter(const std::string& filter = {});
void toggleSection(const QString& section);
// hack for context menu highlight retention
bool isContextMenuOpen{ false };
private:
std::string accId_;
bool contactList_;
};
std::string accountId_;
QVariant getConversationItemData(const ConversationInfo& item,
const AccountInfo& accountInfo,
int role) const;
// list sectioning
std::string convUid_;
Type listModelType_;
QMap<QString, bool> sectionState_;
std::map<ConferenceableItem, ConferenceableValue> conferenceables_;
};
\ No newline at end of file
......@@ -188,39 +188,39 @@ QWidget#messageViewLayoutWidget, QWidget#welcomePage {
QPushButton#holdButton, QPushButton#chatButton, QPushButton#noMicButton, QPushButton#noVideoButton, QPushButton#hangupButton,
QPushButton#transferButton, QPushButton#addPersonButton, QPushButton#joinButton,
QPushButton#qualityButton, QPushButton#recButton, QPushButton#transferCallButton,
QPushButton#sipInputPanelButton {
QPushButton#sipInputPanelButton, QPushButton#addToConferenceButton {
background-color: transparent;
border-radius: 18px;
border: solid 1px;
}
QPushButton#holdButton:hover, QPushButton#chatButton:hover, QPushButton#noMicButton:hover, QPushButton#hangupButton:hover,
QPushButton#noVideoButton:hover, QPushButton#transferButton:hover, QPushButton#addPersonButton:hover,
QPushButton#joinButton:hover, QPushButton#qualityButton:hover, QPushButton#addToContactButton:hover,
QPushButton#recButton:hover, QPushButton#transferCallButton:hover,
QPushButton#sipInputPanelButton:hover {
background-color: transparent;
border-radius: 18px;
border: solid 1px;
}
QPushButton#holdButton:hover, QPushButton#chatButton:hover, QPushButton#noMicButton:hover, QPushButton#hangupButton:hover,
QPushButton#noVideoButton:hover, QPushButton#transferButton:hover, QPushButton#addPersonButton:hover,
QPushButton#joinButton:hover, QPushButton#qualityButton:hover, QPushButton#addToContactButton:hover,
QPushButton#recButton:hover, QPushButton#transferCallButton:hover,
QPushButton#sipInputPanelButton:hover, QPushButton#addToConferenceButton:hover {
background-color: transparent;
border-radius: 18px;
border: solid 1px;
}
QPushButton#holdButton:pressed, QPushButton#chatButton:pressed, QPushButton#noMicButton:pressed, QPushButton#hangupButton:pressed,
QPushButton#noVideoButton:pressed, QPushButton#transferButton:pressed, QPushButton#addPersonButton:pressed,
QPushButton#joinButton:pressed, QPushButton#qualityButton:pressed, QPushButton#addToContactButton:pressed,
QPushButton#recButton:pressed {
background-color: transparent;
border-radius: 18px;
border: solid 1px;
}
QPushButton#holdButton:pressed, QPushButton#chatButton:pressed, QPushButton#noMicButton:pressed, QPushButton#hangupButton:pressed,
QPushButton#noVideoButton:pressed, QPushButton#transferButton:pressed, QPushButton#addPersonButton:pressed,
QPushButton#joinButton:pressed, QPushButton#qualityButton:pressed, QPushButton#addToContactButton:pressed,
QPushButton#recButton:pressed, QPushButton#addToConferenceButton:pressed {
background-color: transparent;
border-radius: 18px;
border: solid 1px;
}
QPushButton#holdButton:checked, QPushButton#noMicButton:checked, QPushButton#hangupButton:checked,
QPushButton#noVideoButton:checked, QPushButton#recButton:checked,
QPushButton#chatButton:checked, QPushButton#transferCallButton:checked,
QPushButton#sipInputPanelButton:checked {
background-color: transparent;
border-radius: 18px;
border: solid 1px;
}
QPushButton#holdButton:checked, QPushButton#noMicButton:checked, QPushButton#hangupButton:checked,
QPushButton#noVideoButton:checked, QPushButton#recButton:checked,
QPushButton#chatButton:checked, QPushButton#transferCallButton:checked,
QPushButton#sipInputPanelButton:checked, QPushButton#addToConferenceButton:checked {
background-color: transparent;
border-radius: 18px;
border: solid 1px;
}
QPushButton#updateCancelButton {
padding: 4px;
......@@ -851,3 +851,7 @@ QLabel#nameLabel {
qproperty-alignment: AlignCenter;
color: white;
}
QWidget#videoPage {
background: black;
}
This diff is collapsed.
......@@ -18,6 +18,8 @@
#pragma once
#include "api/conversationmodel.h"
#include <QWidget>
#include <QMenu>
#include <QTimer>
......@@ -31,6 +33,8 @@ namespace Ui {
class VideoOverlay;
}
using namespace lrc::api;
class VideoOverlay : public QWidget
{
Q_OBJECT
......@@ -39,19 +43,16 @@ public:
explicit VideoOverlay(QWidget* parent = 0);
~VideoOverlay();
public:
void setName(const QString& name);
void setPauseState(bool state);
void callStarted(const std::string & callId);
void setVideoMuteVisibility(bool visible);
void updateCall(const conversation::Info& convInfo);
void simulateShowChatview(bool checked);
bool getShowChatView();
void setTransferCallAndSIPPanelAvailability(bool visible);
void setCurrentSelectedCalleeDisplayName(const QString& CalleeDisplayName);
void resetOverlay(bool isAudioMuted, bool isVideoMuted, bool isRecording, bool isHolding, bool isAudioOnly);
//UI SLOTS
signals:
void setChatVisibility(bool visible);
void holdStateChanged(bool state);
void videoMuteStateChanged(bool state);
private slots:
void fadeOverlayOut();
void setTime();
void on_hangupButton_clicked();
void on_chatButton_toggled(bool checked);
......@@ -60,27 +61,28 @@ private slots:
void on_noVideoButton_toggled(bool checked);
void on_recButton_clicked();
void on_transferCallButton_toggled(bool checked);
void on_addToConferenceButton_toggled(bool checked);
void on_sipInputPanelButton_toggled(bool checked);
void slotWillDoTransfer(const std::string& callId, const std::string& contactUri);
void slotWillDoTransfer(const std::string& contactUri);
void slotContactWillJoinConference(const std::string& contactUri);
void slotCallWillJoinConference(const std::string& callId);
void slotSIPInputPanelClicked(const int& id);
void fadeOverlayOut();
protected:
void enterEvent(QEvent* event);
void leaveEvent(QEvent* event);
void mouseMoveEvent(QMouseEvent* event);
private:
bool shouldShowOverlay();
void showOverlay();
private:
Ui::VideoOverlay* ui;
// for current conf/call info
std::string accountId_;
std::string convUid_;
ContactPicker* contactPicker_;
SipInputPanel* sipInputPanel_;
QTimer* oneSecondTimer_;
std::string callId_;
QTimer fadeTimer_;
QPropertyAnimation* fadeAnim_;
......@@ -97,9 +99,6 @@ private:
// https://bugreports.qt.io/browse/QTBUG-66803
constexpr static qreal maxOverlayOpacity_ = 0.9999999999980000442;
signals:
void setChatVisibility(bool visible);
void holdStateChanged(bool state);
void videoMuteStateChanged(bool state);
bool shouldShowOverlay();
void showOverlay();
};
......@@ -124,6 +124,47 @@
</property>
</widget>
</item>
<item>
<widget class="OverlayButton" name="addToConferenceButton">
<property name="minimumSize">
<size>
<width>36</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>36</width>
<height>36</height>
</size>
</property>
<property name="toolTip">
<string>Add a contact to this call</string>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="originPix" stdset="0">
<pixmap resource="ressources.qrc">:/images/icons/ic_group_add_white_24dp.png</pixmap>
</property>
<property name="checkedPix" stdset="0">
<pixmap resource="ressources.qrc">:/images/icons/ic_group_add_white_24dp.png</pixmap>
</property>
<property name="tintColor" stdset="0">
<color>
<red>0</red>