Commit 45bf7c02 authored by Nicolas Jager's avatar Nicolas Jager

ui: fix outbound call page.

- outbound call page created, moving widget from callinvite page to
outbound page.

- some useless style code removed.

Change-Id: I00e355cff9ffbb6f27817865d7266a09fe45cea4
Tuleap: #148
parent 00593d1d
/***************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......@@ -65,28 +65,6 @@ CallWidget::CallWidget(QWidget* parent) :
welcomePageAnim_ = new QPropertyAnimation(ui->welcomePage, "pos", this);
messagingPageAnim_ = new QPropertyAnimation(ui->messagingPage, "pos", this);
// TODO : add this in style sheet forms
QPalette palette;
palette.setColor(QPalette::WindowText, QColor(255,255,255));
ui->callerIdLabel->setPalette(palette);
QPalette palette2;
palette2.setColor(QPalette::WindowText, QColor(141,141,141));
ui->wantToTalkLabel->setPalette(palette2);
ui->outboundCallLabel->setPalette(palette2);
ui->cancelCallLabel->setPalette(palette2);
ui->acceptLabel->setPalette(palette2);
ui->refuseLabel->setPalette(palette2);
QFont font = ui->callerIdLabel->font();
font.setPointSize(20);
ui->callerIdLabel->setFont(font);
// end of TODO : add this in style sheet forms
ui->callInvite->setVisible(false);
setActualCall(nullptr);
videoRenderer_ = nullptr;
......@@ -339,8 +317,6 @@ CallWidget::findRingAccount()
void
CallWidget::callIncoming(Call* call)
{
ui->outboundCall->hide();
if (!QApplication::focusWidget()) {
GlobalSystemTray::instance()
.showMessage("Ring",
......@@ -352,8 +328,6 @@ CallWidget::callIncoming(Call* call)
ui->callerIdLabel->setText(QString(tr("%1", "%1 is the name of the caller"))
.arg(call->formattedName()));
ui->stackedWidget->setCurrentWidget(ui->callInvitePage);
ui->callInvite->setVisible(true);
ui->callInvite->raise();
}
setActualCall(call);
}
......@@ -363,7 +337,6 @@ CallWidget::on_acceptButton_clicked()
{
if (actualCall_ != nullptr)
actualCall_->performAction(Call::Action::ACCEPT);
ui->callInvite->setVisible(false);
ui->stackedWidget->setCurrentWidget(ui->videoPage);
}
......@@ -374,7 +347,6 @@ CallWidget::on_refuseButton_clicked()
return;
actualCall_->performAction(Call::Action::REFUSE);
setActualCall(nullptr);
ui->callInvite->setVisible(false);
ui->stackedWidget->setCurrentWidget(ui->welcomePage);
}
......@@ -384,7 +356,7 @@ CallWidget::addedCall(Call* call, Call* parent)
Q_UNUSED(parent);
if (call->direction() == Call::Direction::OUTGOING) {
setActualCall(call);
ui->stackedWidget->setCurrentWidget(ui->callInvitePage);
ui->stackedWidget->setCurrentWidget(ui->outboundCallPage);
}
}
......
/***************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
......@@ -871,94 +871,6 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
<widget class="QWidget" name="outboundCall" native="true">
<layout class="QVBoxLayout" name="spinnerLayout">
<item>
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>130</width>
<height>130</height>
</size>
</property>
<property name="baseSize">
<size>
<width>130</width>
<height>130</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="ressources.qrc">:/images/user/btn-default-userpic.svg</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="outboundCallLabel">
<property name="styleSheet">
<string notr="true">color: rgb(174, 174, 174);</string>
</property>
<property name="text">
<string>Calling</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="QPushButton" name="cancelButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>63</width>
<height>63</height>
</size>
</property>
<property name="baseSize">
<size>
<width>63</width>
<height>63</height>
</size>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="cancelCallLabel">
<property name="styleSheet">
<string notr="true">color: rgb(174, 174, 174);</string>
</property>
<property name="text">
<string>Cancel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
<widget class="QWidget" name="callInvite" native="true">
<property name="sizePolicy">
......@@ -1174,6 +1086,113 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="outboundCallPage">
<layout class="QVBoxLayout" name="verticalLayout_11">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
<widget class="QWidget" name="outboundCall" native="true">
<layout class="QVBoxLayout" name="spinnerLayout">
<item>
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>130</width>
<height>130</height>
</size>
</property>
<property name="baseSize">
<size>
<width>130</width>
<height>130</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="ressources.qrc">:/images/user/btn-default-userpic.svg</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="outboundCallLabel">
<property name="styleSheet">
<string notr="true">color: rgb(174, 174, 174);</string>
</property>
<property name="text">
<string>Calling</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="QPushButton" name="cancelButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>63</width>
<height>63</height>
</size>
</property>
<property name="baseSize">
<size>
<width>63</width>
<height>63</height>
</size>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="cancelCallLabel">
<property name="styleSheet">
<string notr="true">color: rgb(174, 174, 174);</string>
</property>
<property name="text">
<string>Cancel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="videoPage">
<layout class="QVBoxLayout" name="verticalLayout_10">
<property name="spacing">
......
......@@ -18,6 +18,10 @@ QWidget#callInvitePage{
background-color : rgb( 77, 77, 77 );
}
QWidget#outboundCallPage{
background-color : rgb( 77, 77, 77 );
}
QPushButton#btnvideo{
border-image: url(:/images/hover-contact/btn-video.svg);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment