blob: a1f90aba8b334cdfa291f8a75702cd20f7e54e0d [file] [log] [blame]
Edric Milaret029b95a2015-06-09 09:51:44 -04001/***************************************************************************
2 * Copyright (C) 2015 by Savoir-Faire Linux *
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
19#include "videooverlay.h"
20#include "ui_videooverlay.h"
21
22#include "callmodel.h"
23
24VideoOverlay::VideoOverlay(QWidget *parent) :
25 QWidget(parent),
26 ui(new Ui::VideoOverlay)
27{
28 ui->setupUi(this);
29
30 actionModel_ = CallModel::instance()->userActionModel();
31 setAttribute(Qt::WA_NoSystemBackground);
32}
33
34VideoOverlay::~VideoOverlay()
35{
36 delete ui;
37}
38
39void
40VideoOverlay::setName(const QString& name)
41{
42 ui->nameLabel->setText(name);
43}
44
45void
46VideoOverlay::setTime(const QString& time)
47{
48 ui->timerLabel->setText(time);
49}
50
51void
52VideoOverlay::on_holdButton_toggled(bool checked)
53{
54 Q_UNUSED(checked)
55 actionModel_->execute(UserActionModel::Action::HOLD);
56}
57
58void
59VideoOverlay::on_hangupButton_clicked()
60{
61 actionModel_->execute(UserActionModel::Action::HANGUP);
62}
63
64void
65VideoOverlay::on_chatButton_toggled(bool checked)
66{
67 //TODO : Link this to im class once it's merged
68}
69