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
ef334013
Commit
ef334013
authored
Sep 09, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(manageAccounts): use reusable components (DialogDescription/DialogPlus)
parent
fd30f4d6
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
213 additions
and
163 deletions
+213
-163
linphone.pro
tests/linphone.pro
+1
-0
resources.qrc
tests/resources.qrc
+2
-0
DialogDescription.qml
tests/ui/components/dialog/DialogDescription.qml
+18
-0
DialogPlus.qml
tests/ui/components/dialog/DialogPlus.qml
+57
-0
DialogButton.qml
tests/ui/components/form/DialogButton.qml
+0
-1
main_window.qml
tests/ui/views/main_window.qml
+10
-3
manage_accounts.qml
tests/ui/views/manage_accounts.qml
+125
-159
No files found.
tests/linphone.pro
View file @
ef334013
...
...
@@ -21,6 +21,7 @@ TRANSLATIONS = \
lupdate_only
{
#
Each
component
folder
must
be
added
explicitly
.
SOURCES
=
\
ui
/
components
/
dialog
/*
.qml \
ui/components/form
/*
.qml \
ui/views
/*
.qml
}
...
...
tests/resources.qrc
View file @
ef334013
...
...
@@ -5,6 +5,8 @@
<file>
languages/fr.qm
</file>
<!-- UI. -->
<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/DialogComboBox.qml
</file>
...
...
tests/ui/components/dialog/DialogDescription.qml
0 → 100644
View file @
ef334013
import
QtQuick
2.7
Item
{
property
alias
text
:
description
.
text
property
alias
fontSize
:
description
.
font
.
pointSize
height
:
90
Text
{
anchors.fill
:
parent
anchors.leftMargin
:
50
anchors.rightMargin
:
50
font.pointSize
:
12
id
:
description
verticalAlignment
:
Text
.
AlignVCenter
wrapMode
:
Text
.
WordWrap
}
}
tests/ui/components/dialog/DialogPlus.qml
0 → 100644
View file @
ef334013
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
'
Window
{
default
property
alias
contents
:
content
.
data
// Optionnal description text.
property
alias
descriptionText
:
description
.
text
// Required buttons.
property
alias
buttons
:
buttons
.
data
id
:
window
modality
:
Qt
.
WindowModal
ColumnLayout
{
anchors.fill
:
parent
spacing
:
0
// Description.
DialogDescription
{
Layout.alignment
:
Qt
.
AlignTop
Layout.fillWidth
:
true
id
:
description
}
// Content.
Item
{
Layout.alignment
:
Qt
.
AlignTop
Layout.fillHeight
:
true
Layout.fillWidth
:
true
id
:
content
}
// Buttons.
Item
{
Layout.alignment
:
Qt
.
AlignTop
Layout.fillWidth
:
true
height
:
100
Row
{
anchors.left
:
parent
.
left
anchors.leftMargin
:
50
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
height
:
30
id
:
buttons
spacing
:
20
}
}
}
}
tests/ui/components/form/DialogButton.qml
View file @
ef334013
...
...
@@ -5,7 +5,6 @@ Button {
background
:
Rectangle
{
color
:
button
.
down
?
'
#FE5E00
'
:
'
#434343
'
implicitWidth
:
120
implicitHeight
:
30
radius
:
4
}
contentItem
:
Text
{
...
...
tests/ui/views/main_window.qml
View file @
ef334013
...
...
@@ -29,9 +29,16 @@ ApplicationWindow {
// User actions.
ToolBarButton
{
onClicked
:
{
var
component
=
Qt
.
createComponent
(
"
qrc:/ui/views/manage_accounts.qml
"
);
var
win
=
component
.
createObject
(
mainWindow
);
win
.
show
();
var
component
=
Qt
.
createComponent
(
'
qrc:/ui/views/manage_accounts.qml
'
);
if
(
component
.
status
!==
Component
.
Ready
)
{
console
.
debug
(
'
Window not ready.
'
)
if
(
component
.
status
===
Component
.
Error
)
{
console
.
debug
(
'
Error:
'
+
component
.
errorString
())
}
}
else
{
var
win
=
component
.
createObject
(
mainWindow
);
win
.
show
();
}
}
}
...
...
tests/ui/views/manage_accounts.qml
View file @
ef334013
This diff is collapsed.
Click to expand it.
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