blob: 6eb7825fd64d0638a5448b6b270945129cebf979 [file] [log] [blame]
Edric Milaret029b95a2015-06-09 09:51:44 -04001/***************************************************************************
Anthony Léonard2fde81d2017-04-17 10:06:55 -04002 * Copyright (C) 2015-2017 by Savoir-faire Linux *
Edric Milaret029b95a2015-06-09 09:51:44 -04003 * 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 Milaret5f316da2015-09-28 11:57:42 -040019#pragma once
Edric Milaret029b95a2015-06-09 09:51:44 -040020
21#include <QWidget>
Edric Milaret5927d042015-06-15 12:45:29 -040022#include <QMenu>
Isa Nanicca027ab2018-12-19 16:54:05 -050023#include <QTimer>
Edric Milaret029b95a2015-06-09 09:51:44 -040024
Edric Milaret029b95a2015-06-09 09:51:44 -040025namespace Ui {
26class VideoOverlay;
27}
28
29class VideoOverlay : public QWidget
30{
31 Q_OBJECT
32
33public:
Edric Milaret80e0b212015-10-16 10:07:43 -040034 explicit VideoOverlay(QWidget* parent = 0);
Edric Milaret029b95a2015-06-09 09:51:44 -040035 ~VideoOverlay();
36
37public:
Edric Milaret80e0b212015-10-16 10:07:43 -040038 void setName(const QString& name);
Nicolas Jager0a9fc602016-03-11 18:35:42 -050039 inline bool isDialogVisible(){ return dialogVisible_; };
Olivier SOLDANO223bcc82017-07-19 16:05:05 -040040 void toggleContextButtons(bool visible);
Andreas Traczykb8b13ba2018-08-21 16:30:16 -040041 void setVideoMuteVisibility(bool visible);
42 bool shouldShowOverlay();
Sébastien Blin93bd2062018-12-17 15:57:16 -050043 void simulateShowChatview(bool checked);
44 bool getShowChatView();
Edric Milaret029b95a2015-06-09 09:51:44 -040045
Isa Nanicca027ab2018-12-19 16:54:05 -050046public slots:
47 void setTime();
48
Edric Milaret029b95a2015-06-09 09:51:44 -040049//UI SLOTS
50private slots:
Edric Milaret029b95a2015-06-09 09:51:44 -040051 void on_hangupButton_clicked();
52 void on_chatButton_toggled(bool checked);
Edric Milaret80e0b212015-10-16 10:07:43 -040053 void on_holdButton_clicked();
Nicolas Jager97a21b42015-12-03 16:55:45 -050054 void on_noMicButton_clicked();
55 void on_noVideoButton_clicked();
Edric Milareta5fe70f2016-02-05 15:03:31 -050056 void on_recButton_clicked();
Olivier SOLDANO2bcdfd72017-05-02 14:37:19 -040057 void on_videoCfgBtn_clicked();
Edric Milaret029b95a2015-06-09 09:51:44 -040058
59private:
Edric Milaret80e0b212015-10-16 10:07:43 -040060 Ui::VideoOverlay* ui;
Nicolas Jager0a9fc602016-03-11 18:35:42 -050061 bool dialogVisible_ = false;
Isa Nanicca027ab2018-12-19 16:54:05 -050062 QTimer* oneSecondTimer_;
63 std::string callId;
Edric Milaret3aca8e32015-06-12 10:01:40 -040064
65signals:
66 void setChatVisibility(bool visible);
Olivier SOLDANO2bcdfd72017-05-02 14:37:19 -040067 void videoCfgBtnClicked();
Edric Milaret029b95a2015-06-09 09:51:44 -040068};
69