Edric Milaret | 029b95a | 2015-06-09 09:51:44 -0400 | [diff] [blame] | 1 | /*************************************************************************** |
Anthony Léonard | 2fde81d | 2017-04-17 10:06:55 -0400 | [diff] [blame] | 2 | * Copyright (C) 2015-2017 by Savoir-faire Linux * |
Edric Milaret | 029b95a | 2015-06-09 09:51:44 -0400 | [diff] [blame] | 3 | * Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>* |
| 4 | * * |
| 5 | * This program is free software; you can redistribute it and/or modify * |
| 6 | * it under the terms of the GNU General Public License as published by * |
| 7 | * the Free Software Foundation; either version 3 of the License, or * |
| 8 | * (at your option) any later version. * |
| 9 | * * |
| 10 | * This program is distributed in the hope that it will be useful, * |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 13 | * GNU General Public License for more details. * |
| 14 | * * |
| 15 | * You should have received a copy of the GNU General Public License * |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. * |
| 17 | **************************************************************************/ |
| 18 | |
Edric Milaret | 5f316da | 2015-09-28 11:57:42 -0400 | [diff] [blame] | 19 | #pragma once |
Edric Milaret | 029b95a | 2015-06-09 09:51:44 -0400 | [diff] [blame] | 20 | |
| 21 | #include <QWidget> |
Edric Milaret | 5927d04 | 2015-06-15 12:45:29 -0400 | [diff] [blame] | 22 | #include <QMenu> |
Isa Nanic | ca027ab | 2018-12-19 16:54:05 -0500 | [diff] [blame] | 23 | #include <QTimer> |
Edric Milaret | 029b95a | 2015-06-09 09:51:44 -0400 | [diff] [blame] | 24 | |
Edric Milaret | 029b95a | 2015-06-09 09:51:44 -0400 | [diff] [blame] | 25 | namespace Ui { |
| 26 | class VideoOverlay; |
| 27 | } |
| 28 | |
| 29 | class VideoOverlay : public QWidget |
| 30 | { |
| 31 | Q_OBJECT |
| 32 | |
| 33 | public: |
Edric Milaret | 80e0b21 | 2015-10-16 10:07:43 -0400 | [diff] [blame] | 34 | explicit VideoOverlay(QWidget* parent = 0); |
Edric Milaret | 029b95a | 2015-06-09 09:51:44 -0400 | [diff] [blame] | 35 | ~VideoOverlay(); |
| 36 | |
| 37 | public: |
Edric Milaret | 80e0b21 | 2015-10-16 10:07:43 -0400 | [diff] [blame] | 38 | void setName(const QString& name); |
Nicolas Jager | 0a9fc60 | 2016-03-11 18:35:42 -0500 | [diff] [blame] | 39 | inline bool isDialogVisible(){ return dialogVisible_; }; |
Olivier SOLDANO | 223bcc8 | 2017-07-19 16:05:05 -0400 | [diff] [blame] | 40 | void toggleContextButtons(bool visible); |
Andreas Traczyk | b8b13ba | 2018-08-21 16:30:16 -0400 | [diff] [blame] | 41 | void setVideoMuteVisibility(bool visible); |
| 42 | bool shouldShowOverlay(); |
Sébastien Blin | 93bd206 | 2018-12-17 15:57:16 -0500 | [diff] [blame] | 43 | void simulateShowChatview(bool checked); |
| 44 | bool getShowChatView(); |
Edric Milaret | 029b95a | 2015-06-09 09:51:44 -0400 | [diff] [blame] | 45 | |
Isa Nanic | ca027ab | 2018-12-19 16:54:05 -0500 | [diff] [blame] | 46 | public slots: |
| 47 | void setTime(); |
| 48 | |
Edric Milaret | 029b95a | 2015-06-09 09:51:44 -0400 | [diff] [blame] | 49 | //UI SLOTS |
| 50 | private slots: |
Edric Milaret | 029b95a | 2015-06-09 09:51:44 -0400 | [diff] [blame] | 51 | void on_hangupButton_clicked(); |
| 52 | void on_chatButton_toggled(bool checked); |
Edric Milaret | 80e0b21 | 2015-10-16 10:07:43 -0400 | [diff] [blame] | 53 | void on_holdButton_clicked(); |
Nicolas Jager | 97a21b4 | 2015-12-03 16:55:45 -0500 | [diff] [blame] | 54 | void on_noMicButton_clicked(); |
| 55 | void on_noVideoButton_clicked(); |
Edric Milaret | a5fe70f | 2016-02-05 15:03:31 -0500 | [diff] [blame] | 56 | void on_recButton_clicked(); |
Olivier SOLDANO | 2bcdfd7 | 2017-05-02 14:37:19 -0400 | [diff] [blame] | 57 | void on_videoCfgBtn_clicked(); |
Edric Milaret | 029b95a | 2015-06-09 09:51:44 -0400 | [diff] [blame] | 58 | |
| 59 | private: |
Edric Milaret | 80e0b21 | 2015-10-16 10:07:43 -0400 | [diff] [blame] | 60 | Ui::VideoOverlay* ui; |
Nicolas Jager | 0a9fc60 | 2016-03-11 18:35:42 -0500 | [diff] [blame] | 61 | bool dialogVisible_ = false; |
Isa Nanic | ca027ab | 2018-12-19 16:54:05 -0500 | [diff] [blame] | 62 | QTimer* oneSecondTimer_; |
| 63 | std::string callId; |
Edric Milaret | 3aca8e3 | 2015-06-12 10:01:40 -0400 | [diff] [blame] | 64 | |
| 65 | signals: |
| 66 | void setChatVisibility(bool visible); |
Olivier SOLDANO | 2bcdfd7 | 2017-05-02 14:37:19 -0400 | [diff] [blame] | 67 | void videoCfgBtnClicked(); |
Edric Milaret | 029b95a | 2015-06-09 09:51:44 -0400 | [diff] [blame] | 68 | }; |
| 69 | |