diff --git a/images/ic_voicemail_white.svg b/images/ic_voicemail_white.svg new file mode 100644 index 0000000000000000000000000000000000000000..41f4ff6ada591d25c11e56e44d9016c2af8bdaab --- /dev/null +++ b/images/ic_voicemail_white.svg @@ -0,0 +1,4 @@ +<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 diff --git a/ressources.qrc b/ressources.qrc index 83ba733bd3f875d0ad1f0e4e0c5e150cb92488fc..1a9ac2e6a20d5ecfc8ac139a008003ddf9f1e3ed 100644 --- a/ressources.qrc +++ b/ressources.qrc @@ -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> diff --git a/stylesheet.css b/stylesheet.css index 6880400caafb25140c89e905ffe770f521d25628..c9a2ef9c806e2b5d2de999abef491589e40348f9 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -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); } diff --git a/videooverlay.cpp b/videooverlay.cpp index c239fd4fa1673707349930c2c311b59660b8d464..5052d49874a0291a18f4f1a1d783d0bc811dfdc9 100644 --- a/videooverlay.cpp +++ b/videooverlay.cpp @@ -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); +} diff --git a/videooverlay.h b/videooverlay.h index 18f9bf6a41cb84edfdedfdf857ccdea6de9b85df..d390f6a89367a29ca1805478fb0e811ab6d49f09 100644 --- a/videooverlay.h +++ b/videooverlay.h @@ -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; diff --git a/videooverlay.ui b/videooverlay.ui index 7a1b0426c9e667e8269665b252452ce480c738f4..0b852de147077be23e4db9a8eb7b857781aee7ea 100644 --- a/videooverlay.ui +++ b/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">