Commit 435cdfc4 authored by Edric Milaret's avatar Edric Milaret

video: add fullscreen feature

Refs #74532

Change-Id: I9b436fb9d91ebb9690dd6798a0dad3b43bb1a53e
parent 1b197eb0
......@@ -158,8 +158,10 @@ CallWidget::findRingAccount()
void
CallWidget::callIncoming(Call *call)
{
if (!call->account()->isAutoAnswer())
if (!call->account()->isAutoAnswer()) {
ui->callInvite->setVisible(true);
ui->callInvite->raise();
}
setActualCall(call);
}
......
......@@ -127,3 +127,19 @@ VideoWidget::renderingStopped() {
disconnect(renderer_, SIGNAL(stopped()),this, SLOT(renderingStopped()));
renderer_ = nullptr;
}
void
VideoWidget::mouseDoubleClickEvent(QMouseEvent *e) {
QWidget::mouseDoubleClickEvent(e);
if(isFullScreen()) {
this->setParent(oldParent_);
this->showNormal();
this->resize(oldSize_.width(), oldSize_.height());
} else {
oldSize_ = this->size();
oldParent_ = static_cast<QWidget*>(this->parent());
this->setParent(0);
this->showFullScreen();
this->show();
}
}
......@@ -44,6 +44,8 @@ public slots:
void frameFromDistant();
void renderingStopped();
protected slots:
void mouseDoubleClickEvent(QMouseEvent *e);
private:
Video::Renderer* previewRenderer_;
Video::Renderer* renderer_;
......@@ -51,6 +53,8 @@ private:
QImage *distantFrame_;
QMutex lock_;
QPixmap *previewPix_;
QWidget *oldParent_;
QSize oldSize_;
};
#endif // VIDEOWIDGET_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment