Commit 4d095a33 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(newCall): new newCall view

parent 7c3ae4a6
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="751px" height="751px" viewBox="0 0 751 751" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title>avatar</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="OUTILS" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="linphone_v2.0_icones_buttons" sketch:type="MSArtboardGroup" transform="translate(-1872.000000, -13712.000000)" fill="#444444">
<path d="M2247.17514,13712.0693 C2040.06889,13712.0693 1872.17514,13879.9568 1872.17514,14087.0693 C1872.17514,14294.1693 2040.06889,14462.0693 2247.17514,14462.0693 C2454.27514,14462.0693 2622.17514,14294.1693 2622.17514,14087.0693 C2622.17514,13879.9568 2454.27514,13712.0693 2247.17514,13712.0693 L2247.17514,13712.0693 Z M2466.91889,14251.4755 C2352.10014,14288.2443 2248.48764,14282.588 2248.48764,14282.588 L2245.85639,14282.588 C2245.85639,14282.588 2142.23764,14288.2443 2027.43139,14251.4755 C2027.43139,14251.4755 1981.71264,14119.7255 2159.98764,14041.363 L2164.90639,14038.0255 C2161.84389,14035.338 2162.93139,14035.8568 2160.17514,14032.8755 C2140.47514,14011.6255 2128.41889,13983.0755 2128.41889,13951.6818 C2128.41889,13886.0755 2181.08139,13832.8943 2246.03764,13832.8943 L2248.30014,13832.8943 C2313.27514,13832.8943 2365.93139,13886.0755 2365.93139,13951.6818 C2365.93139,13983.0755 2353.88139,14011.6255 2334.18139,14032.8755 C2331.40639,14035.8568 2332.49389,14035.338 2329.45014,14038.0255 L2334.35014,14041.363 C2512.63764,14119.7255 2466.91889,14251.4755 2466.91889,14251.4755 L2466.91889,14251.4755 Z" id="avatar" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="96px" height="56px" viewBox="0 0 96 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title>camera_default</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="OUTILS" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="linphone_v2.0_icones_buttons" sketch:type="MSArtboardGroup" transform="translate(-1679.000000, -19208.000000)">
<g id="camera_default" sketch:type="MSLayerGroup" transform="translate(1650.000000, 19159.000000)">
<path d="M97.9067632,102 L97.9067632,82.4760205 L122,100.652099 L122,53.3465287 L97.9067632,71.5253521 L97.9067632,52 L32,52 L32,101.389189 L32.7238373,102 L97.9067632,102 Z" id="camera_on" stroke="#444444" stroke-width="5" stroke-linecap="round" stroke-linejoin="round" sketch:type="MSShapeGroup"></path>
<rect id="Rectangle-250-Copy-3" fill-opacity="0" fill="#FFFFFF" sketch:type="MSShapeGroup" x="0" y="0" width="154" height="154"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="69px" height="71px" viewBox="0 0 69 71" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title>route_earpiece</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="OUTILS" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="linphone_v2.0_icones_buttons" sketch:type="MSArtboardGroup" transform="translate(-2003.000000, -23472.000000)">
<g id="route_earpiece" sketch:type="MSLayerGroup" transform="translate(1983.000000, 23453.000000)">
<rect id="Rectangle-250-Copy-24" fill-opacity="0" fill="#FFFFFF" sketch:type="MSShapeGroup" x="0" y="0" width="109.14064" height="109.14064"></rect>
<g id="Stroke-1-+-Stroke-3-+-Stroke-4-Copy" transform="translate(22.000000, 22.000000)" stroke="#444444" stroke-width="5" sketch:type="MSShapeGroup" stroke-linecap="round" stroke-linejoin="round">
<path d="M2.28604651,9.82857143 C-2.15116279,22.6835714 4.0672093,41.0521429 14.1325581,51.3528571 L14.3418605,51.5692857 C24.4051163,61.87 42.3506977,68.2364286 54.9004651,63.6935714 L64.4195349,50.9157143 L51.4553488,37.6428571 L39.592093,47.9135714 L28.7502326,36.8157143 L28.5409302,36.6014286 L17.7032558,25.5035714 L27.7330233,13.3535714 L14.7688372,0.0828571429 L2.28604651,9.82857143 L2.28604651,9.82857143 Z" id="Stroke-1"></path>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>SelectContact</name>
<message>
<source>contactSearch</source>
<translation>Search contact or enter SIP address</translation>
</message>
</context>
<context>
<name>mainWindow</name>
<message>
......@@ -63,4 +70,15 @@
<translation>VALIDATE</translation>
</message>
</context>
<context>
<name>newCall</name>
<message>
<source>newCallTitle</source>
<translation>New call</translation>
</message>
<message>
<source>cancel</source>
<translation>CANCEL</translation>
</message>
</context>
</TS>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>SelectContact</name>
<message>
<source>contactSearch</source>
<translation>Rechercher un contact ou entrer une adresse SIP</translation>
</message>
</context>
<context>
<name>mainWindow</name>
<message>
......@@ -63,4 +70,15 @@
<translation>VALIDER</translation>
</message>
</context>
<context>
<name>newCall</name>
<message>
<source>newCallTitle</source>
<translation>Nouvel appel</translation>
</message>
<message>
<source>cancel</source>
<translation>ANNULER</translation>
</message>
</context>
</TS>
QT = core gui quick widgets
QT = core gui quick widgets quickcontrols2
TARGET = linphone
TEMPLATE = app
......@@ -23,6 +23,8 @@ lupdate_only{
SOURCES = \
ui/components/dialog/*.qml \
ui/components/form/*.qml \
ui/components/misc/*.qml \
ui/components/select/*.qml \
ui/views/*.qml
}
......
......@@ -4,7 +4,7 @@
<file>languages/en.qm</file>
<file>languages/fr.qm</file>
<!-- UI. -->
<!-- UI: Components. -->
<file>ui/components/dialog/DialogDescription.qml</file>
<file>ui/components/dialog/DialogPlus.qml</file>
<file>ui/components/form/Collapse.qml</file>
......@@ -12,10 +12,18 @@
<file>ui/components/form/RoundButton.qml</file>
<file>ui/components/form/ToolBarButton.qml</file>
<file>ui/components/form/TransparentComboBox.qml</file>
<file>ui/components/misc/Contact.qml</file>
<file>ui/components/select/SelectContact.qml</file>
<!-- UI: Views. -->
<file>ui/views/mainWindow.qml</file>
<file>ui/views/manageAccounts.qml</file>
<file>ui/views/newCall.qml</file>
<!-- Images. -->
<file>imgs/avatar.svg</file>
<file>imgs/camera.svg</file>
<file>imgs/phone.svg</file>
<file>imgs/collapse.svg</file>
<file>imgs/led_absent.svg</file>
<file>imgs/led_connected.svg</file>
......
import QtQuick 2.7
// ===================================================================
Item {
property alias text: description.text
property alias fontSize: description.font.pointSize
height: 90
height: text ? 90 : 25
Text {
anchors.fill: parent
......
......@@ -2,14 +2,13 @@ import QtQuick 2.7
import QtQuick.Layouts 1.3
import QtQuick.Window 2.2
Window {
default property alias contents: content.data
// Optionnal description text.
property alias descriptionText: description.text
// ===================================================================
// Required buttons.
property alias buttons: buttons.data
Window {
default property alias contents: content.data // Required.
property alias descriptionText: description.text // Optionnal.
property alias buttons: buttons.data // Required.
property bool centeredButtons // Optionnal.
modality: Qt.WindowModal
......@@ -33,10 +32,11 @@ Window {
// Buttons.
Item {
Layout.fillWidth: true
height: 100
height: 60
Row {
anchors.left: parent.left
anchors.left: (!centeredButtons && parent.left) || undefined
anchors.horizontalCenter: parent.horizontalCenter
anchors.leftMargin: 50
anchors.verticalCenter: parent.verticalCenter
height: 30
......
import QtQuick 2.7
import QtQuick.Controls 2.0
// ===================================================================
ComboBox {
background: Rectangle {
color: 'transparent'
......
import QtQuick 2.7
import QtQuick.Layouts 1.3
Item {
property alias sipAddress: sipAddressText.text
property alias username: usernameText.text
property string avatar: 'qrc:/imgs/avatar.svg' // Default.
id: contact
height: 50
RowLayout {
anchors.fill: parent
// Avatar.
Image {
Layout.fillHeight: parent.height
Layout.margins: 5
Layout.preferredWidth: 50
fillMode: Image.PreserveAspectFit
id: avatarImage
source: contact.avatar
}
// Sip address & username.
Column {
Layout.fillHeight: parent.height
Layout.fillWidth: true
// Sip address.
Text {
clip: true
color: '#5A585B'
font.weight: Font.DemiBold
height: parent.height / 2
id: sipAddressText
verticalAlignment: Text.AlignBottom
width: parent.width
}
// Username.
Text {
clip: true
color: '#5A585B'
height: parent.height / 2
id: usernameText
verticalAlignment: Text.AlignTop
width: parent.width
}
}
// Actions.
Row {
Layout.fillHeight: parent.height
Layout.preferredWidth: 90
Layout.margins: 10
// Call.
Image {
fillMode: Image.PreserveAspectFit
height: parent.height
source: 'qrc:/imgs/phone.svg'
width: parent.width / 2
}
// Camera.
Image {
fillMode: Image.PreserveAspectFit
height: parent.height
source: 'qrc:/imgs/camera.svg'
width: parent.width / 2
}
}
}
}
import QtGraphicalEffects 1.0
import QtQuick 2.7
import QtQuick.Controls 2.0
import 'qrc:/ui/components/misc'
// TODO: Contacts list.
Item {
function setPopupVisibility (visibility) {
popup.visible = popupShadow.visible = visibility
}
function filterContacts (text) {
console.log(text)
}
TextField {
placeholderText: qsTr('contactSearch')
background: Rectangle {
implicitHeight: 40
border.color: '#CBCBCB'
border.width: 2
color: '#FFFFFF'
}
id: textField
width: parent.width
onFocusChanged: setPopupVisibility(focus)
onTextChanged: filterContacts(text)
}
Rectangle {
anchors.top: textField.bottom
anchors.topMargin: 2
border.color: '#9B9B9B'
color: '#EAEAEA'
height: parent.height - textField.height // Avoid overflow.
id: popup
visible: false
width: parent.width
ListView {
anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
id: contactsList
spacing: 0
// TODO: Remove, use C++ model instead.
model: ListModel {
ListElement {
_presence: 'connected'
_sipAddress: 'jim.williams.zzzz.yyyy.kkkk.sip.linphone.org'
_username: 'Toto'
}
ListElement {
_presence: 'connected'
_sipAddress: 'toto.lala.sip.linphone.org'
_username: 'Toto'
}
ListElement {
_presence: 'disconnected'
_sipAddress: 'machin.truc.sip.linphone.org'
_username: 'Toto'
}
ListElement {
_presence: 'absent'
_sipAddress: 'hey.listen.sip.linphone.org'
_username: 'Toto'
}
ListElement {
_presence: 'do_not_disturb'
_sipAddress: 'valentin.cognito.sip.linphone.org'
_username: 'Toto'
}
ListElement {
_presence: 'do_not_disturb'
_sipAddress: 'charles.henri.sip.linphone.org'
_username: 'Toto'
}
ListElement {
_presence: 'disconnected'
_sipAddress: 'yesyes.nono.sip.linphone.org'
_username: 'Toto'
}
ListElement {
_presence: 'connected'
_sipAddress: 'nsa.sip.linphone.org'
_username: 'Toto'
}
}
delegate: Contact {
sipAddress: _sipAddress
username: _username
width: parent.width
}
}
}
DropShadow {
anchors.fill: popup
color: "#80000000"
horizontalOffset: 0
id: popupShadow
radius: 8.0
samples: 15
source: popup
verticalOffset: 2
visible: false
}
}
......@@ -29,7 +29,7 @@ ApplicationWindow {
// User actions.
ToolBarButton {
onClicked: {
var component = Qt.createComponent('qrc:/ui/views/manageAccounts.qml');
var component = Qt.createComponent('qrc:/ui/views/newCall.qml');
if (component.status !== Component.Ready) {
console.debug('Window not ready.')
if(component.status === Component.Error) {
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import QtQuick.Window 2.2
import 'qrc:/ui/components/dialog'
import 'qrc:/ui/components/form'
DialogPlus {
descriptionText: qsTr('manageAccountsDescription')
id: window
minimumHeight: 328
minimumWidth: 480
title: qsTr('manageAccountsTitle')
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import 'qrc:/ui/components/dialog'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/select'
DialogPlus {
centeredButtons: true
minimumHeight: 300
minimumWidth: 420
title: qsTr('newCallTitle')
buttons: DialogButton {
text: qsTr('cancel')
}
Item {
anchors.fill: parent
anchors.leftMargin: 25
anchors.rightMargin: 25
SelectContact {
anchors.fill: parent
}
}
}
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