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
30e805b5
Commit
30e805b5
authored
Sep 13, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(mainWindow): searchContact view
parent
6a730dd6
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
401 additions
and
15 deletions
+401
-15
en.ts
tests/languages/en.ts
+19
-0
fr.ts
tests/languages/fr.ts
+19
-0
linphone.pro
tests/linphone.pro
+2
-0
resources.qrc
tests/resources.qrc
+8
-2
Collapse.qml
tests/ui/components/collapse/Collapse.qml
+0
-1
Avatar.qml
tests/ui/components/contact/Avatar.qml
+24
-0
DialogDescription.qml
tests/ui/components/dialog/DialogDescription.qml
+2
-0
DialogPlus.qml
tests/ui/components/dialog/DialogPlus.qml
+3
-0
DarkButton.qml
tests/ui/components/form/DarkButton.qml
+0
-0
ExclusiveButtons.qml
tests/ui/components/form/ExclusiveButtons.qml
+48
-0
LightButton.qml
tests/ui/components/form/LightButton.qml
+9
-0
SmallButton.qml
tests/ui/components/form/SmallButton.qml
+24
-0
ForceScrollBar.qml
tests/ui/components/scrollBar/ForceScrollBar.qml
+17
-0
home.qml
tests/ui/views/mainWindow/home.qml
+2
-8
mainWindow.qml
tests/ui/views/mainWindow/mainWindow.qml
+3
-2
searchContact.qml
tests/ui/views/mainWindow/searchContact.qml
+217
-0
manageAccounts.qml
tests/ui/views/manageAccounts.qml
+3
-1
newCall.qml
tests/ui/views/newCall.qml
+1
-1
No files found.
tests/languages/en.ts
View file @
30e805b5
...
...
@@ -112,4 +112,23 @@
<
translation
>
CANCEL
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
searchContact
<
/name
>
<
message
>
<
source
>
searchContactPlaceholder
<
/source
>
<
translation
>
Search
contact
<
/translation
>
<
/message
>
<
message
>
<
source
>
selectAllContacts
<
/source
>
<
translation
>
All
<
/translation
>
<
/message
>
<
message
>
<
source
>
selectConnectedContacts
<
/source
>
<
translation
>
Connected
<
/translation
>
<
/message
>
<
message
>
<
source
>
addContact
<
/source
>
<
translation
>
ADD
CONTACT
<
/translation
>
<
/message
>
<
/context
>
<
/TS
>
tests/languages/fr.ts
View file @
30e805b5
...
...
@@ -112,4 +112,23 @@
<
translation
>
ANNULER
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
searchContact
<
/name
>
<
message
>
<
source
>
searchContactPlaceholder
<
/source
>
<
translation
>
Rechercher
contact
<
/translation
>
<
/message
>
<
message
>
<
source
>
selectAllContacts
<
/source
>
<
translation
>
Tous
<
/translation
>
<
/message
>
<
message
>
<
source
>
selectConnectedContacts
<
/source
>
<
translation
>
Connect
é
s
<
/translation
>
<
/message
>
<
message
>
<
source
>
addContact
<
/source
>
<
translation
>
AJOUTER
CONTACT
<
/translation
>
<
/message
>
<
/context
>
<
/TS
>
tests/linphone.pro
View file @
30e805b5
...
...
@@ -21,6 +21,8 @@ TRANSLATIONS = \
lupdate_only
{
#
Each
component
folder
must
be
added
explicitly
.
SOURCES
=
\
ui
/
components
/
collapse
/*
.qml \
ui/components/contact
/*
.qml \
ui/components/dialog
/*
.qml \
ui/components/form
/*
.qml \
ui/components/misc
/*
.qml \
...
...
tests/resources.qrc
View file @
30e805b5
...
...
@@ -5,20 +5,26 @@
<file>
languages/fr.qm
</file>
<!-- UI: Components. -->
<file>
ui/components/collapse/Collapse.qml
</file>
<file>
ui/components/contact/Avatar.qml
</file>
<file>
ui/components/dialog/DialogDescription.qml
</file>
<file>
ui/components/dialog/DialogPlus.qml
</file>
<file>
ui/components/form/Collapse.qml
</file>
<file>
ui/components/form/DialogButton.qml
</file>
<file>
ui/components/form/DarkButton.qml
</file>
<file>
ui/components/form/DialogCheckBox.qml
</file>
<file>
ui/components/form/ExclusiveButtons.qml
</file>
<file>
ui/components/form/LightButton.qml
</file>
<file>
ui/components/form/SmallButton.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/misc/MenuEntry.qml
</file>
<file>
ui/components/scrollBar/ForceScrollBar.qml
</file>
<file>
ui/components/select/SelectContact.qml
</file>
<!-- UI: Views. -->
<file>
ui/views/mainWindow/home.qml
</file>
<file>
ui/views/mainWindow/mainWindow.qml
</file>
<file>
ui/views/mainWindow/searchContact.qml
</file>
<file>
ui/views/manageAccounts.qml
</file>
<file>
ui/views/newCall.qml
</file>
...
...
tests/ui/components/
form
/Collapse.qml
→
tests/ui/components/
collapse
/Collapse.qml
View file @
30e805b5
import
QtQuick
2.7
import
QtQuick
.
Controls
2.0
// ===================================================================
...
...
tests/ui/components/contact/Avatar.qml
0 → 100644
View file @
30e805b5
import
QtQuick
2.7
Rectangle
{
property
string
username
property
string
image
color
:
'
#8F8F8F
'
radius
:
20
Text
{
anchors.centerIn
:
parent
text
:
(
function
()
{
var
spaceIndex
=
username
.
indexOf
(
'
'
)
var
firstLetter
=
username
.
charAt
(
0
)
if
(
spaceIndex
===
-
1
)
{
return
firstLetter
}
return
firstLetter
+
username
.
charAt
(
spaceIndex
+
1
)
})()
color
:
'
#FFFFFF
'
}
}
tests/ui/components/dialog/DialogDescription.qml
View file @
30e805b5
import
QtQuick
2.7
// ===================================================================
// Description content used by dialogs.
// ===================================================================
Item
{
...
...
tests/ui/components/dialog/DialogPlus.qml
View file @
30e805b5
...
...
@@ -2,12 +2,15 @@ import QtQuick 2.7
import
QtQuick
.
Layouts
1.3
import
QtQuick
.
Window
2.2
// ===================================================================
// Helper to build quickly dialogs.
// ===================================================================
Window
{
default
property
alias
contents
:
content
.
data
// Required.
property
alias
buttons
:
buttons
.
data
// Required.
property
alias
descriptionText
:
description
.
text
// Optionnal.
property
bool
centeredButtons
// Optionnal.
modality
:
Qt
.
WindowModal
...
...
tests/ui/components/form/D
ialog
Button.qml
→
tests/ui/components/form/D
ark
Button.qml
View file @
30e805b5
File moved
tests/ui/components/form/ExclusiveButtons.qml
0 → 100644
View file @
30e805b5
import
QtQuick
2.7
// ===================================================================
Row
{
property
alias
text1
:
button1
.
text
property
alias
text2
:
button2
.
text
property
bool
button1IsSelected
:
true
signal
buttonChanged
(
int
button
)
spacing
:
8
SmallButton
{
anchors.verticalCenter
:
parent
.
verticalCenter
backgroundColor
:
button1IsSelected
?
'
#8E8E8E
'
:
(
button1
.
down
?
'
#FE5E00
'
:
'
#D1D1D1
'
)
id
:
button1
onClicked
:
{
if
(
!
button1IsSelected
)
{
button1IsSelected
=
true
buttonChanged
(
1
)
}
}
}
SmallButton
{
anchors.verticalCenter
:
parent
.
verticalCenter
backgroundColor
:
!
button1IsSelected
?
'
#8E8E8E
'
:
(
button2
.
down
?
'
#FE5E00
'
:
'
#D1D1D1
'
)
id
:
button2
onClicked
:
{
if
(
button1IsSelected
)
{
button1IsSelected
=
false
buttonChanged
(
2
)
}
}
}
}
tests/ui/components/form/LightButton.qml
0 → 100644
View file @
30e805b5
import
QtQuick
2.7
import
QtQuick
.
Controls
2.0
// ===================================================================
DarkButton
{
backgroundColor
:
'
#D1D1D1
'
textColor
:
'
#5A585B
'
}
tests/ui/components/form/SmallButton.qml
0 → 100644
View file @
30e805b5
import
QtQuick
2.7
import
QtQuick
.
Controls
2.0
// ===================================================================
Button
{
property
alias
backgroundColor
:
background
.
color
background
:
Rectangle
{
color
:
button
.
down
?
'
#FE5E00
'
:
'
#8E8E8E
'
id
:
background
implicitHeight
:
22
radius
:
10
}
contentItem
:
Text
{
color
:
'
#FFFFFF
'
font.pointSize
:
8
horizontalAlignment
:
Text
.
AlignHCenter
id
:
text
text
:
button
.
text
verticalAlignment
:
Text
.
AlignVCenter
}
id
:
button
}
tests/ui/components/scrollBar/ForceScrollBar.qml
0 → 100644
View file @
30e805b5
import
QtQuick
2.7
import
QtQuick
.
Controls
2.0
// ===================================================================
ScrollBar
{
background
:
Rectangle
{
color
:
'
#F4F4F4
'
}
contentItem
:
Rectangle
{
color
:
scrollBar
.
pressed
?
'
#5E5E5F
'
:
'
#C5C5C5
'
implicitHeight
:
100
implicitWidth
:
8
radius
:
10
}
id
:
scrollBar
}
tests/ui/views/mainWindow/home.qml
View file @
30e805b5
...
...
@@ -4,8 +4,6 @@ import QtQuick.Layouts 1.3
import
'
qrc:/ui/components/form
'
// ===================================================================
ColumnLayout
{
spacing
:
0
...
...
@@ -32,10 +30,8 @@ ColumnLayout {
font.pointSize
:
11
}
DialogButton
{
backgroundColor
:
'
#D1D1D1
'
LightButton
{
text
:
qsTr
(
'
invitContact
'
)
textColor
:
'
#5A585B
'
}
}
...
...
@@ -50,10 +46,8 @@ ColumnLayout {
font.pointSize
:
11
}
DialogButton
{
backgroundColor
:
'
#D1D1D1
'
LightButton
{
text
:
qsTr
(
'
addContact
'
)
textColor
:
'
#5A585B
'
}
}
}
...
...
tests/ui/views/mainWindow/mainWindow.qml
View file @
30e805b5
...
...
@@ -2,6 +2,7 @@ import QtQuick 2.7
import
QtQuick
.
Controls
2.0
import
QtQuick
.
Layouts
1.3
import
'
qrc:/ui/components/collapse
'
import
'
qrc:/ui/components/form
'
import
'
qrc:/ui/components/misc
'
...
...
@@ -59,7 +60,7 @@ ApplicationWindow {
// User actions.
ToolBarButton
{
onClicked
:
{
var
component
=
Qt
.
createComponent
(
'
qrc:/ui/views/
newCall
.qml
'
);
var
component
=
Qt
.
createComponent
(
'
qrc:/ui/views/
manageAccounts
.qml
'
);
if
(
component
.
status
!==
Component
.
Ready
)
{
console
.
debug
(
'
Window not ready.
'
)
if
(
component
.
status
===
Component
.
Error
)
{
...
...
@@ -141,7 +142,7 @@ ApplicationWindow {
Loader
{
Layout.fillHeight
:
true
Layout.fillWidth
:
true
source
:
'
qrc:/ui/views/mainWindow/
home
.qml
'
source
:
'
qrc:/ui/views/mainWindow/
searchContact
.qml
'
}
}
}
tests/ui/views/mainWindow/searchContact.qml
0 → 100644
View file @
30e805b5
import
QtQuick
2.7
import
QtQuick
.
Controls
2.0
import
QtQuick
.
Layouts
1.3
import
'
qrc:/ui/components/contact
'
import
'
qrc:/ui/components/form
'
import
'
qrc:/ui/components/scrollBar
'
ColumnLayout
{
spacing
:
2
// Search bar.
Item
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
50
anchors.left
:
parent
.
left
anchors.leftMargin
:
18
anchors.right
:
parent
.
right
anchors.rightMargin
:
18
RowLayout
{
anchors.verticalCenter
:
parent
.
verticalCenter
height
:
30
spacing
:
20
width
:
parent
.
width
TextField
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
parent
.
height
background
:
Rectangle
{
color
:
'
#EAEAEA
'
}
placeholderText
:
qsTr
(
'
searchContactPlaceholder
'
)
}
ExclusiveButtons
{
Layout.preferredHeight
:
parent
.
height
text1
:
qsTr
(
'
selectAllContacts
'
)
text2
:
qsTr
(
'
selectConnectedContacts
'
)
}
LightButton
{
Layout.preferredHeight
:
parent
.
height
text
:
qsTr
(
'
addContact
'
)
}
}
}
// Contacts list.
Rectangle
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
color
:
'
#F5F5F5
'
ListView
{
ScrollBar.vertical
:
ForceScrollBar
{
}
anchors.fill
:
parent
boundsBehavior
:
Flickable
.
StopAtBounds
clip
:
true
highlightRangeMode
:
ListView
.
ApplyRange
spacing
:
1
// TODO: Remove, use C++ model instead.
model
:
ListModel
{
ListElement
{
$image
:
''
$presence
:
'
connected
'
$username
:
'
Isabella Ahornton
'
}
ListElement
{
$image
:
''
$presence
:
'
connected
'
$username
:
'
Mary Boreno
'
}
ListElement
{
$image
:
''
$presence
:
'
disconnected
'
$username
:
'
Cecelia Cyler
'
}
ListElement
{
$image
:
''
$presence
:
'
absent
'
$username
:
'
Daniel Elliott
'
}
ListElement
{
$image
:
''
$presence
:
'
do_not_disturb
'
$username
:
'
Effie Forton
'
}
ListElement
{
$image
:
''
$presence
:
'
do_not_disturb
'
$username
:
'
Agnes Hurner
'
}
ListElement
{
$image
:
''
$presence
:
'
disconnected
'
$username
:
'
Luke Leming
'
}
ListElement
{
$image
:
''
$presence
:
'
connected
'
$username
:
'
Olga Manning
'
}
ListElement
{
$image
:
''
$presence
:
'
connected
'
$username
:
'
Isabella Ahornton
'
}
ListElement
{
$image
:
''
$presence
:
'
connected
'
$username
:
'
Mary Boreno
'
}
ListElement
{
$image
:
''
$presence
:
'
disconnected
'
$username
:
'
Cecelia Cyler
'
}
ListElement
{
$image
:
''
$presence
:
'
absent
'
$username
:
'
Daniel Elliott
'
}
ListElement
{
$image
:
''
$presence
:
'
do_not_disturb
'
$username
:
'
Effie Forton
'
}
ListElement
{
$image
:
''
$presence
:
'
do_not_disturb
'
$username
:
'
Agnes Hurner
'
}
ListElement
{
$image
:
''
$presence
:
'
disconnected
'
$username
:
'
Luke Leming
'
}
ListElement
{
$image
:
''
$presence
:
'
connected
'
$username
:
'
Olga Manning
'
}
}
delegate
:
Rectangle
{
color
:
'
#FFFFFF
'
height
:
50
id
:
contact
width
:
parent
.
width
Item
{
anchors.verticalCenter
:
parent
.
verticalCenter
height
:
30
width
:
parent
.
width
RowLayout
{
anchors.fill
:
parent
anchors.leftMargin
:
15
anchors.rightMargin
:
15
spacing
:
15
// Avatar.
Avatar
{
Layout.fillHeight
:
parent
.
height
Layout.preferredWidth
:
30
image
:
$image
username
:
$username
}
// Presence.
Item
{
Layout.fillHeight
:
parent
.
height
Layout.preferredWidth
:
20
Image
{
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectFit
source
:
'
qrc:/imgs/led_
'
+
$presence
+
'
.svg
'
}
}
// Username.
Item
{
Layout.fillHeight
:
parent
.
height
Layout.fillWidth
:
true
Text
{
anchors.fill
:
parent
clip
:
true
color
:
'
#5A585B
'
font.weight
:
Font
.
DemiBold
text
:
$username
verticalAlignment
:
Text
.
AlignVCenter
MouseArea
{
anchors.fill
:
parent
hoverEnabled
:
true
onEntered
:
contact
.
state
=
'
hover
'
onExited
:
contact
.
state
=
''
}
}
}
// Actions.
// TODO.
}
}
states
:
State
{
name
:
'
hover
'
PropertyChanges
{
target
:
contact
;
color
:
'
#D1D1D1
'
}
}
}
}
}
}
tests/ui/views/manageAccounts.qml
View file @
30e805b5
...
...
@@ -4,6 +4,7 @@ import QtQuick.Layouts 1.3
import
'
qrc:/ui/components/dialog
'
import
'
qrc:/ui/components/form
'
import
'
qrc:/ui/components/scrollBar
'
DialogPlus
{
descriptionText
:
qsTr
(
'
manageAccountsDescription
'
)
...
...
@@ -11,7 +12,7 @@ DialogPlus {
minimumWidth
:
480
title
:
qsTr
(
'
manageAccountsTitle
'
)
buttons
:
D
ialog
Button
{
buttons
:
D
ark
Button
{
text
:
qsTr
(
'
validate
'
)
}
...
...
@@ -20,6 +21,7 @@ DialogPlus {
anchors.fill
:
parent
ListView
{
ScrollBar.vertical
:
ForceScrollBar
{
}
anchors.fill
:
parent
boundsBehavior
:
Flickable
.
StopAtBounds
clip
:
true
...
...
tests/ui/views/newCall.qml
View file @
30e805b5
...
...
@@ -11,7 +11,7 @@ DialogPlus {
minimumWidth
:
420
title
:
qsTr
(
'
newCallTitle
'
)
buttons
:
D
ialog
Button
{
buttons
:
D
ark
Button
{
text
:
qsTr
(
'
cancel
'
)
}
...
...
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