Commit a5fe70f1 authored by Edric Milaret's avatar Edric Milaret

video: add rec button

Change-Id: I84ce6bb441630928d779d3b78c41605130387720
Tuleap: #355
parent 978cc65a
<svg fill="#FFFFFF" height="48" viewBox="0 0 24 24" width="48" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M18.5 6C15.46 6 13 8.46 13 11.5c0 1.33.47 2.55 1.26 3.5H9.74c.79-.95 1.26-2.17 1.26-3.5C11 8.46 8.54 6 5.5 6S0 8.46 0 11.5 2.46 17 5.5 17h13c3.04 0 5.5-2.46 5.5-5.5S21.54 6 18.5 6zm-13 9C3.57 15 2 13.43 2 11.5S3.57 8 5.5 8 9 9.57 9 11.5 7.43 15 5.5 15zm13 0c-1.93 0-3.5-1.57-3.5-3.5S16.57 8 18.5 8 22 9.57 22 11.5 20.43 15 18.5 15z"/>
</svg>
\ No newline at end of file
......@@ -46,5 +46,6 @@
<file>images/ic_send_white.svg</file>
<file>images/ic_pause_white.svg</file>
<file>images/ic_content_copy_white.svg</file>
<file>images/ic_voicemail_white.svg</file>
</qresource>
</RCC>
......@@ -90,7 +90,8 @@ QLineEdit#messageEdit{
}
QPushButton#holdButton, QPushButton#chatButton, QPushButton#noMicButton, QPushButton#noVideoButton,
QPushButton#transferButton, QPushButton#addPersonButton, QPushButton#joinButton, QPushButton#qualityButton{
QPushButton#transferButton, QPushButton#addPersonButton, QPushButton#joinButton,
QPushButton#qualityButton, QPushButton#recButton{
background-color: rgba(0, 0, 0, 140);
border-radius: 18px;
border:solid 1px;
......@@ -98,17 +99,19 @@ QPushButton#transferButton, QPushButton#addPersonButton, QPushButton#joinButton,
QPushButton#holdButton:hover, QPushButton#chatButton:hover, QPushButton#noMicButton:hover, QPushButton#noVideoButton:hover,
QPushButton#transferButton:hover, QPushButton#addPersonButton:hover, QPushButton#joinButton:hover, QPushButton#qualityButton:hover,
QPushButton#addToContactButton:hover{
QPushButton#addToContactButton:hover, QPushButton#recButton:hover{
background-color: rgba(0, 192, 213, 0.6);
}
QPushButton#holdButton:pressed, QPushButton#chatButton:pressed, QPushButton#noMicButton:pressed, QPushButton#noVideoButton:pressed,
QPushButton#transferButton:pressed, QPushButton#addPersonButton:pressed, QPushButton#joinButton:pressed, QPushButton#qualityButton:pressed,
QPushButton#addToContactButton:pressed{
QPushButton#addToContactButton:pressed, QPushButton#recButton:pressed{
background-color: rgba(0, 192, 213, 0.8);
}
QPushButton#holdButton:checked, QPushButton#noMicButton:checked, QPushButton#noVideoButton:checked, QPushButton#chatButton:checked{
QPushButton#holdButton:checked, QPushButton#noMicButton:checked,
QPushButton#noVideoButton:checked, QPushButton#recButton:checked,
QPushButton#chatButton:checked{
background-color: rgba(0, 192, 213, 0.8);
}
......
......@@ -63,6 +63,9 @@ VideoOverlay::VideoOverlay(QWidget* parent) :
ui->holdButton->setEnabled(idx.flags() & Qt::ItemIsEnabled);
ui->onHoldLabel->setVisible(idx.data(Qt::CheckStateRole).value<bool>());
break;
case UserActionModel::Action::RECORD:
ui->recButton->setChecked(idx.data(Qt::CheckStateRole).value<bool>());
ui->recButton->setEnabled(idx.flags() & Qt::ItemIsEnabled);
default:
break;
}
......@@ -197,3 +200,9 @@ VideoOverlay::on_addToContactButton_clicked()
contactPicker.exec();
}
}
void
VideoOverlay::on_recButton_clicked()
{
actionModel_->execute(UserActionModel::Action::RECORD);
}
......@@ -54,6 +54,7 @@ private slots:
void on_noVideoButton_clicked();
void on_qualityButton_clicked();
void on_addToContactButton_clicked();
void on_recButton_clicked();
private:
Ui::VideoOverlay* ui;
......
......@@ -22,7 +22,7 @@
<property name="windowTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout" rowstretch="0,1,0,0" columnstretch="0,0,2,0,0,0,0,0,0,0,0,0">
<layout class="QGridLayout" name="gridLayout" rowstretch="0,1,0" columnstretch="0,0,2,0,0">
<item row="1" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
......@@ -323,6 +323,41 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="recButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<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="text">
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<normaloff>:/images/ic_voicemail_white.svg</normaloff>:/images/ic_voicemail_white.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>36</width>
<height>36</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="qualityButton">
<property name="minimumSize">
......
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