Edric Milaret | 029b95a | 2015-06-09 09:51:44 -0400 | [diff] [blame^] | 1 | /*************************************************************************** |
| 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 | |
| 24 | VideoOverlay::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 | |
| 34 | VideoOverlay::~VideoOverlay() |
| 35 | { |
| 36 | delete ui; |
| 37 | } |
| 38 | |
| 39 | void |
| 40 | VideoOverlay::setName(const QString& name) |
| 41 | { |
| 42 | ui->nameLabel->setText(name); |
| 43 | } |
| 44 | |
| 45 | void |
| 46 | VideoOverlay::setTime(const QString& time) |
| 47 | { |
| 48 | ui->timerLabel->setText(time); |
| 49 | } |
| 50 | |
| 51 | void |
| 52 | VideoOverlay::on_holdButton_toggled(bool checked) |
| 53 | { |
| 54 | Q_UNUSED(checked) |
| 55 | actionModel_->execute(UserActionModel::Action::HOLD); |
| 56 | } |
| 57 | |
| 58 | void |
| 59 | VideoOverlay::on_hangupButton_clicked() |
| 60 | { |
| 61 | actionModel_->execute(UserActionModel::Action::HANGUP); |
| 62 | } |
| 63 | |
| 64 | void |
| 65 | VideoOverlay::on_chatButton_toggled(bool checked) |
| 66 | { |
| 67 | //TODO : Link this to im class once it's merged |
| 68 | } |
| 69 | |