Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
ac0f224e
Commit
ac0f224e
authored
Dec 05, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/MainWindow/ContactEdit): view in progress
parent
05b6b43e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
342 additions
and
24 deletions
+342
-24
history_hovered.svg
tests/assets/images/history_hovered.svg
+13
-0
history_normal.svg
tests/assets/images/history_normal.svg
+13
-0
history_pressed.svg
tests/assets/images/history_pressed.svg
+13
-0
en.ts
tests/assets/languages/en.ts
+53
-10
fr.ts
tests/assets/languages/fr.ts
+53
-10
resources.qrc
tests/resources.qrc
+5
-1
ContactEdit.qml
tests/ui/views/App/MainWindow/ContactEdit.qml
+157
-0
Contacts.qml
tests/ui/views/App/MainWindow/Contacts.qml
+4
-2
Conversation.qml
tests/ui/views/App/MainWindow/Conversation.qml
+3
-1
ContactEditStyle.qml
tests/ui/views/App/Styles/MainWindow/ContactEditStyle.qml
+27
-0
qmldir
tests/ui/views/App/Styles/qmldir
+1
-0
No files found.
tests/assets/images/history_hovered.svg
0 → 100644
View file @
ac0f224e
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>
history_over
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"history_over"
>
<path
d=
"M20,40 C31.045695,40 40,31.045695 40,20 C40,8.954305 31.045695,0 20,0 C8.954305,0 0,8.954305 0,20 C0,31.045695 8.954305,40 20,40 Z"
fill=
"#4B5964"
></path>
<path
d=
"M29,20 C29,24.97025 24.97115,29 20,29 C15.02975,29 11,24.97025 11,20 C11,15.029525 15.02975,11 20,11 C24.97115,11 29,15.029525 29,20 L29,20 Z M19.99775,15.135925 L19.99775,20.069975 L25.161275,20.069975"
id=
"history"
stroke=
"#FFFFFF"
stroke-width=
"1.5"
stroke-linecap=
"round"
stroke-linejoin=
"round"
></path>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/history_normal.svg
0 → 100644
View file @
ac0f224e
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>
history_default
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"history_default"
>
<path
d=
"M20,40 C31.045695,40 40,31.045695 40,20 C40,8.954305 31.045695,0 20,0 C8.954305,0 0,8.954305 0,20 C0,31.045695 8.954305,40 20,40 Z"
fill=
"#96A6B1"
></path>
<path
d=
"M29,20 C29,24.97025 24.97115,29 20,29 C15.02975,29 11,24.97025 11,20 C11,15.029525 15.02975,11 20,11 C24.97115,11 29,15.029525 29,20 L29,20 Z M19.99775,15.135925 L19.99775,20.069975 L25.161275,20.069975"
id=
"history"
stroke=
"#FFFFFF"
stroke-width=
"1.5"
stroke-linecap=
"round"
stroke-linejoin=
"round"
></path>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/history_pressed.svg
0 → 100644
View file @
ac0f224e
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>
history_clic
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"history_clic"
>
<path
d=
"M20,40 C31.045695,40 40,31.045695 40,20 C40,8.954305 31.045695,0 20,0 C8.954305,0 0,8.954305 0,20 C0,31.045695 8.954305,40 20,40 Z"
fill=
"#FF5E00"
></path>
<path
d=
"M29,20 C29,24.97025 24.97115,29 20,29 C15.02975,29 11,24.97025 11,20 C11,15.029525 15.02975,11 20,11 C24.97115,11 29,15.029525 29,20 L29,20 Z M19.99775,15.135925 L19.99775,20.069975 L25.161275,20.069975"
id=
"history"
stroke=
"#FFFFFF"
stroke-width=
"1.5"
stroke-linecap=
"round"
stroke-linejoin=
"round"
></path>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/languages/en.ts
View file @
ac0f224e
...
...
@@ -57,43 +57,86 @@
<
name
>
Contact
<
/name
>
<
message
>
<
source
>
sipAccounts
<
/source
>
<
translation
>
SIP
ACCOUNT
(
S
)
<
/translation
>
<
translation
type
=
"
vanished
"
>
SIP
ACCOUNT
(
S
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
address
<
/source
>
<
translation
>
ADDRESS
<
/translation
>
<
translation
type
=
"
vanished
"
>
ADDRESS
<
/translation
>
<
/message
>
<
message
>
<
source
>
emails
<
/source
>
<
translation
>
E
-
MAIL
(
S
)
<
/translation
>
<
translation
type
=
"
vanished
"
>
E
-
MAIL
(
S
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
webSites
<
/source
>
<
translation
>
WEB
SITE
(
S
)
<
/translation
>
<
translation
type
=
"
vanished
"
>
WEB
SITE
(
S
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
sipAccountsInput
<
/source
>
<
translation
>
SIP
Address
<
/translation
>
<
translation
type
=
"
vanished
"
>
SIP
Address
<
/translation
>
<
/message
>
<
message
>
<
source
>
emailsInput
<
/source
>
<
translation
>
E
-
mail
address
<
/translation
>
<
translation
type
=
"
vanished
"
>
E
-
mail
address
<
/translation
>
<
/message
>
<
message
>
<
source
>
addressInput
<
/source
>
<
translation
>
Address
<
/translation
>
<
translation
type
=
"
vanished
"
>
Address
<
/translation
>
<
/message
>
<
message
>
<
source
>
webSitesInput
<
/source
>
<
translation
>
URL
<
/translation
>
<
translation
type
=
"
vanished
"
>
URL
<
/translation
>
<
/message
>
<
message
>
<
source
>
removeContactDescription
<
/source
>
<
translation
>
Do
you
really
want
remove
this
contact
from
your
book
?
<
/translation
>
<
translation
type
=
"
vanished
"
>
Do
you
really
want
remove
this
contact
from
your
book
?
<
/translation
>
<
/message
>
<
message
>
<
source
>
removeContactTitle
<
/source
>
<
translation
>
Delete
confirmation
<
/translation
>
<
translation
type
=
"
vanished
"
>
Delete
confirmation
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ContactEdit
<
/name
>
<
message
>
<
source
>
removeContactDescription
<
/source
>
<
translation
type
=
"
unfinished
"
>
Do
you
really
want
remove
this
contact
from
your
book
?
<
/translation
>
<
/message
>
<
message
>
<
source
>
removeContactTitle
<
/source
>
<
translation
type
=
"
unfinished
"
>
Delete
confirmation
<
/translation
>
<
/message
>
<
message
>
<
source
>
sipAccounts
<
/source
>
<
translation
type
=
"
unfinished
"
>
SIP
ACCOUNT
(
S
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
sipAccountsInput
<
/source
>
<
translation
type
=
"
unfinished
"
>
SIP
Address
<
/translation
>
<
/message
>
<
message
>
<
source
>
address
<
/source
>
<
translation
type
=
"
unfinished
"
>
ADDRESS
<
/translation
>
<
/message
>
<
message
>
<
source
>
addressInput
<
/source
>
<
translation
type
=
"
unfinished
"
>
Address
<
/translation
>
<
/message
>
<
message
>
<
source
>
emails
<
/source
>
<
translation
type
=
"
unfinished
"
>
E
-
MAIL
(
S
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
emailsInput
<
/source
>
<
translation
type
=
"
unfinished
"
>
E
-
mail
address
<
/translation
>
<
/message
>
<
message
>
<
source
>
webSites
<
/source
>
<
translation
type
=
"
unfinished
"
>
WEB
SITE
(
S
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
webSitesInput
<
/source
>
<
translation
type
=
"
unfinished
"
>
URL
<
/translation
>
<
/message
>
<
/context
>
<
context
>
...
...
tests/assets/languages/fr.ts
View file @
ac0f224e
...
...
@@ -49,43 +49,86 @@
<
name
>
Contact
<
/name
>
<
message
>
<
source
>
sipAccounts
<
/source
>
<
translation
>
COMPTE
(
S
)
SIP
<
/translation
>
<
translation
type
=
"
vanished
"
>
COMPTE
(
S
)
SIP
<
/translation
>
<
/message
>
<
message
>
<
source
>
address
<
/source
>
<
translation
>
ADRESSE
(
S
)
<
/translation
>
<
translation
type
=
"
vanished
"
>
ADRESSE
(
S
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
emails
<
/source
>
<
translation
>
EMAIL
(
S
)
<
/translation
>
<
translation
type
=
"
vanished
"
>
EMAIL
(
S
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
webSites
<
/source
>
<
translation
>
SITE
(
S
)
WEB
<
/translation
>
<
translation
type
=
"
vanished
"
>
SITE
(
S
)
WEB
<
/translation
>
<
/message
>
<
message
>
<
source
>
sipAccountsInput
<
/source
>
<
translation
>
Adresse
SIP
<
/translation
>
<
translation
type
=
"
vanished
"
>
Adresse
SIP
<
/translation
>
<
/message
>
<
message
>
<
source
>
emailsInput
<
/source
>
<
translation
>
Adresse
e
-
mail
<
/translation
>
<
translation
type
=
"
vanished
"
>
Adresse
e
-
mail
<
/translation
>
<
/message
>
<
message
>
<
source
>
addressInput
<
/source
>
<
translation
>
Adresse
<
/translation
>
<
translation
type
=
"
vanished
"
>
Adresse
<
/translation
>
<
/message
>
<
message
>
<
source
>
webSitesInput
<
/source
>
<
translation
>
URL
<
/translation
>
<
translation
type
=
"
vanished
"
>
URL
<
/translation
>
<
/message
>
<
message
>
<
source
>
removeContactDescription
<
/source
>
<
translation
>
Voulez
-
vous
vraiment
supprimer
ce
contact
de
votre
carnet
?
<
/translation
>
<
translation
type
=
"
vanished
"
>
Voulez
-
vous
vraiment
supprimer
ce
contact
de
votre
carnet
?
<
/translation
>
<
/message
>
<
message
>
<
source
>
removeContactTitle
<
/source
>
<
translation
>
Confirmation
de
la
suppression
<
/translation
>
<
translation
type
=
"
vanished
"
>
Confirmation
de
la
suppression
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ContactEdit
<
/name
>
<
message
>
<
source
>
removeContactDescription
<
/source
>
<
translation
type
=
"
unfinished
"
>
Voulez
-
vous
vraiment
supprimer
ce
contact
de
votre
carnet
?
<
/translation
>
<
/message
>
<
message
>
<
source
>
removeContactTitle
<
/source
>
<
translation
type
=
"
unfinished
"
>
Confirmation
de
la
suppression
<
/translation
>
<
/message
>
<
message
>
<
source
>
sipAccounts
<
/source
>
<
translation
type
=
"
unfinished
"
>
COMPTE
(
S
)
SIP
<
/translation
>
<
/message
>
<
message
>
<
source
>
sipAccountsInput
<
/source
>
<
translation
type
=
"
unfinished
"
>
Adresse
SIP
<
/translation
>
<
/message
>
<
message
>
<
source
>
address
<
/source
>
<
translation
type
=
"
unfinished
"
>
ADRESSE
(
S
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
addressInput
<
/source
>
<
translation
type
=
"
unfinished
"
>
Adresse
<
/translation
>
<
/message
>
<
message
>
<
source
>
emails
<
/source
>
<
translation
type
=
"
unfinished
"
>
EMAIL
(
S
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
emailsInput
<
/source
>
<
translation
type
=
"
unfinished
"
>
Adresse
e
-
mail
<
/translation
>
<
/message
>
<
message
>
<
source
>
webSites
<
/source
>
<
translation
type
=
"
unfinished
"
>
SITE
(
S
)
WEB
<
/translation
>
<
/message
>
<
message
>
<
source
>
webSitesInput
<
/source
>
<
translation
type
=
"
unfinished
"
>
URL
<
/translation
>
<
/message
>
<
/context
>
<
context
>
...
...
tests/resources.qrc
View file @
ac0f224e
...
...
@@ -54,6 +54,9 @@
<file>
assets/images/hangup_hovered.svg
</file>
<file>
assets/images/hangup_normal.svg
</file>
<file>
assets/images/hangup_pressed.svg
</file>
<file>
assets/images/history_hovered.svg
</file>
<file>
assets/images/history_normal.svg
</file>
<file>
assets/images/history_pressed.svg
</file>
<file>
assets/images/history.svg
</file>
<file>
assets/images/home_normal.svg
</file>
<file>
assets/images/home_selected.svg
</file>
...
...
@@ -206,7 +209,7 @@
<file>
ui/views/App/Calls/Incall.qml
</file>
<file>
ui/views/App/Calls/IncomingCall.qml
</file>
<file>
ui/views/App/Calls/OutgoingCall.qml
</file>
<file>
ui/views/App/MainWindow/Contact.qml
</file>
<file>
ui/views/App/MainWindow/Contact
Edit
.qml
</file>
<file>
ui/views/App/MainWindow/Contacts.qml
</file>
<file>
ui/views/App/MainWindow/Conversation.qml
</file>
<file>
ui/views/App/MainWindow/Home.qml
</file>
...
...
@@ -215,6 +218,7 @@
<file>
ui/views/App/NewCall.qml
</file>
<file>
ui/views/App/qmldir
</file>
<file>
ui/views/App/Styles/Calls/StartingCallStyle.qml
</file>
<file>
ui/views/App/Styles/MainWindow/ContactEditStyle.qml
</file>
<file>
ui/views/App/Styles/MainWindow/ContactsStyle.qml
</file>
<file>
ui/views/App/Styles/MainWindow/ConversationStyle.qml
</file>
<file>
ui/views/App/Styles/MainWindow/MainWindowStyle.qml
</file>
...
...
tests/ui/views/App/MainWindow/Contact.qml
→
tests/ui/views/App/MainWindow/Contact
Edit
.qml
View file @
ac0f224e
...
...
@@ -4,67 +4,105 @@ import QtQuick.Layouts 1.3
import
Common
1.0
import
Linphone
1.0
import
LinphoneUtils
1.0
import
Utils
1.0
import
App
.
Styles
1.0
// ===================================================================
ColumnLayout
{
id
:
contactEdit
property
string
sipAddress
:
''
property
var
_contact
:
ContactsListModel
.
mapSipAddressToContact
(
sipAddress
)
||
sipAddress
// -----------------------------------------------------------------
function
_removeContact
()
{
Utils
.
openConfirmDialog
(
this
,
{
descriptionText
:
qsTr
(
'
removeContactDescription
'
),
exitHandler
:
function
(
status
)
{
if
(
status
)
{
ContactsListModel
.
removeContact
(
_contact
)
window
.
setView
(
'
Home
'
)
}
},
title
:
qsTr
(
'
removeContactTitle
'
)
})
}
// -----------------------------------------------------------------
spacing
:
0
// -----------------------------------------------------------------
// Info bar.
// -----------------------------------------------------------------
Rectangle
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
102
color
:
'
#D1D1D1
'
Layout.preferredHeight
:
ContactEditStyle
.
infoBar
.
height
color
:
ContactEditStyle
.
infoBar
.
color
RowLayout
{
anchors.left
:
parent
.
left
anchors.leftMargin
:
40
anchors.right
:
parent
.
right
anchors.rightMargin
:
10
anchors.verticalCenter
:
parent
.
verticalCenter
height
:
80
spacing
:
0
width
:
parent
.
width
anchors
{
fill
:
parent
leftMargin
:
ContactEditStyle
.
infoBar
.
leftMargin
rightMargin
:
ContactEditStyle
.
infoBar
.
rightMargin
}
spacing
:
ContactEditStyle
.
infoBar
.
spacing
Avatar
{
Layout.fillHeight
:
true
Layout.preferredWidth
:
80
Layout.rightMargin
:
30
presenceLevel
:
Presence
.
Online
// TODO: Use C++.
username
:
'
Cameron Andrews
'
// TODO: Use C++.
id
:
avatar
height
:
ContactEditStyle
.
infoBar
.
avatarSize
width
:
ContactEditStyle
.
infoBar
.
avatarSize
username
:
LinphoneUtils
.
getContactUsername
(
_contact
)
}
// TODO: Replace by text edit.
// Component: EditableContactDescription.
ContactDescription
{
Layout.fillHeight
:
true
Text
{
Layout.fillWidth
:
true
username
:
'
Cameron Andrews
'
// TODO: Use C++.
color
:
ContactEditStyle
.
infoBar
.
username
.
color
elide
:
Text
.
ElideRight
font
{
bold
:
true
pointSize
:
ContactEditStyle
.
infoBar
.
username
.
fontSize
}
text
:
avatar
.
username
}
ActionBar
{
iconSize
:
32
Layout.alignment
:
Qt
.
AlignBottom
|
Qt
.
AlignRight
Layout.alignment
:
Qt
.
AlignRight
iconSize
:
ContactEditStyle
.
infoBar
.
buttons
.
size
spacing
:
ContactEditStyle
.
infoBar
.
buttons
.
spacing
ActionButton
{
icon
:
'
history
'
onClicked
:
window
.
setView
(
'
Conversation
'
)
onClicked
:
window
.
setView
(
'
Conversation
'
,
{
sipAddress
:
contactEdit
.
sipAddress
})
}
ActionButton
{
icon
:
'
delete
'
onClicked
:
Utils
.
openConfirmDialog
(
this
,
{
descriptionText
:
qsTr
(
'
removeContactDescription
'
),
exitHandler
:
function
(
status
)
{
if
(
status
)
{
window
.
setView
(
'
Home
'
)
}
},
title
:
qsTr
(
'
removeContactTitle
'
)
})
onClicked
:
_removeContact
()
}
}
}
}
// -----------------------------------------------------------------
// Info list.
// -----------------------------------------------------------------
Flickable
{
Layout.fillHeight
:
true
Layout.fillWidth
:
true
...
...
tests/ui/views/App/MainWindow/Contacts.qml
View file @
ac0f224e
...
...
@@ -61,7 +61,7 @@ ColumnLayout {
TextButtonB
{
text
:
qsTr
(
'
addContact
'
)
onClicked
:
window
.
setView
(
'
Contact
'
)
onClicked
:
window
.
setView
(
'
Contact
Edit
'
)
}
}
}
...
...
@@ -208,7 +208,9 @@ ColumnLayout {
:
Qt
.
ArrowCursor
hoverEnabled
:
true
onClicked
:
window
.
setView
(
'
Contact
'
)
onClicked
:
window
.
setView
(
'
ContactEdit
'
,
{
sipAddress
:
$contact
.
sipAddress
})
}
}
...
...
tests/ui/views/App/MainWindow/Conversation.qml
View file @
ac0f224e
...
...
@@ -96,7 +96,9 @@ ColumnLayout {
icon
:
'
contact_edit
'
iconSize
:
ConversationStyle
.
bar
.
actions
.
edit
.
iconSize
onClicked
:
window
.
setView
(
'
Contact
'
)
onClicked
:
window
.
setView
(
'
ContactEdit
'
,
{
sipAddress
:
conversation
.
sipAddress
})
}
ActionButton
{
...
...
tests/ui/views/App/Styles/MainWindow/ContactEditStyle.qml
0 → 100644
View file @
ac0f224e
pragma
Singleton
import
QtQuick
2.7
import
Common
1.0
// ===================================================================
QtObject
{
property
QtObject
infoBar
:
QtObject
{
property
color
color
:
'
#F4F4F4
'
property
int
avatarSize
:
60
property
int
height
:
80
property
int
leftMargin
:
40
property
int
rightMargin
:
20
property
int
spacing
:
20
property
QtObject
buttons
:
QtObject
{
property
int
size
:
40
property
int
spacing
:
20
}
property
QtObject
username
:
QtObject
{
property
color
color
:
'
#4B5964
'
property
int
fontSize
:
13
}
}
}
tests/ui/views/App/Styles/qmldir
View file @
ac0f224e
...
...
@@ -6,6 +6,7 @@ module App.Styles
singleton StartingCallStyle 1.0 Calls/StartingCallStyle.qml
singleton ContactEditStyle 1.0 MainWindow/ContactEditStyle.qml
singleton ContactsStyle 1.0 MainWindow/ContactsStyle.qml
singleton ConversationStyle 1.0 MainWindow/ConversationStyle.qml
singleton MainWindowStyle 1.0 MainWindow/MainWindowStyle.qml
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment