Commit e085451b authored by Nicolas Jager's avatar Nicolas Jager Committed by Edric Milaret

ui : add splitter video/im

- adds a splitter between the video and instant message widgets.

Tuleap: #429
Change-Id: If2d8fe8b7ffe35dfe216354131e06ee56f6aa5db
parent bd738382
......@@ -35,6 +35,25 @@
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout_13">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</item>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
......@@ -1411,55 +1430,32 @@
<number>0</number>
</property>
<item>
<widget class="QFrame" name="videoFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>0</number>
<widget class="QSplitter" name="splitter_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
<widget class="VideoView" name="videoWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="rightMargin">
<number>0</number>
</widget>
<widget class="InstantMessagingWidget" name="instantMessagingWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="bottomMargin">
<number>0</number>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<item>
<widget class="VideoView" name="videoWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
......@@ -1475,41 +1471,6 @@
</item>
</layout>
</item>
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout_13">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="InstantMessagingWidget" name="instantMessagingWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
......
......@@ -30,6 +30,7 @@
#include <QMenu>
#include <QFileDialog>
#include <QMimeData>
#include <QSplitter>
#include <memory>
......@@ -150,8 +151,7 @@ void
VideoView::toggleFullScreen()
{
if(isFullScreen()) {
this->setParent(oldParent_);
oldParent_->layout()->addWidget(this);
dynamic_cast<QSplitter*>(oldParent_)->insertWidget(0,this);
this->resize(oldSize_.width(), oldSize_.height());
this->showNormal();
} else {
......
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