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
a9970c33
Commit
a9970c33
authored
Dec 28, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/modules/Common): refactoring & coding style
parent
36a308b7
Changes
56
Hide whitespace changes
Inline
Side-by-side
Showing
56 changed files
with
159 additions
and
114 deletions
+159
-114
CaterpillarAnimation.qml
tests/ui/modules/Common/Animations/CaterpillarAnimation.qml
+1
-1
Borders.qml
tests/ui/modules/Common/Borders.qml
+2
-2
Collapse.qml
tests/ui/modules/Common/Collapse.qml
+4
-0
Colors.qml
tests/ui/modules/Common/Colors.qml
+3
-9
Constants.qml
tests/ui/modules/Common/Constants.qml
+1
-1
ConfirmDialog.qml
tests/ui/modules/Common/Dialog/ConfirmDialog.qml
+2
-2
ConfirmDialog.spec.qml
tests/ui/modules/Common/Dialog/ConfirmDialog.spec.qml
+4
-4
DialogDescription.qml
tests/ui/modules/Common/Dialog/DialogDescription.qml
+8
-5
DialogPlus.qml
tests/ui/modules/Common/Dialog/DialogPlus.qml
+6
-5
DroppableTextArea.qml
tests/ui/modules/Common/DroppableTextArea.qml
+9
-3
ForceScrollBar.qml
tests/ui/modules/Common/ForceScrollBar.qml
+2
-2
ActionBar.qml
tests/ui/modules/Common/Form/ActionBar.qml
+2
-2
ActionButton.qml
tests/ui/modules/Common/Form/ActionButton.qml
+8
-4
ActionSwitch.qml
tests/ui/modules/Common/Form/ActionSwitch.qml
+2
-0
CheckBoxText.qml
tests/ui/modules/Common/Form/CheckBoxText.qml
+2
-2
ExclusiveButtons.qml
tests/ui/modules/Common/Form/ExclusiveButtons.qml
+6
-1
ExclusiveButtons.spec.qml
tests/ui/modules/Common/Form/ExclusiveButtons.spec.qml
+2
-2
ListForm.qml
tests/ui/modules/Common/Form/ListForm.qml
+4
-0
SmallButton.qml
tests/ui/modules/Common/Form/SmallButton.qml
+1
-1
StaticListForm.qml
tests/ui/modules/Common/Form/StaticListForm.qml
+17
-17
TextField.qml
tests/ui/modules/Common/Form/TextField.qml
+2
-2
TransparentComboBox.qml
tests/ui/modules/Common/Form/TransparentComboBox.qml
+2
-2
TransparentTextInput.qml
tests/ui/modules/Common/Form/TransparentTextInput.qml
+2
-0
Icon.qml
tests/ui/modules/Common/Image/Icon.qml
+2
-2
InvertedMouseArea.qml
tests/ui/modules/Common/InvertedMouseArea.qml
+8
-4
ActionMenu.qml
tests/ui/modules/Common/Menu/ActionMenu.qml
+1
-3
ActionMenuEntry.qml
tests/ui/modules/Common/Menu/ActionMenuEntry.qml
+1
-1
Menu.qml
tests/ui/modules/Common/Menu/Menu.qml
+4
-0
Paned.qml
tests/ui/modules/Common/Paned.qml
+11
-9
AbstractDropDownMenu.qml
tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml
+4
-0
DesktopPopup.qml
tests/ui/modules/Common/Popup/DesktopPopup.qml
+4
-0
SearchBox.qml
tests/ui/modules/Common/SearchBox.qml
+4
-0
SmartConnect.qml
tests/ui/modules/Common/SmartConnect.qml
+1
-1
CaterpillarAnimationStyle.qml
...es/Common/Styles/Animations/CaterpillarAnimationStyle.qml
+1
-1
CollapseStyle.qml
tests/ui/modules/Common/Styles/CollapseStyle.qml
+1
-1
DialogStyle.qml
tests/ui/modules/Common/Styles/DialogStyle.qml
+1
-1
DroppableTextAreaStyle.qml
tests/ui/modules/Common/Styles/DroppableTextAreaStyle.qml
+1
-1
ForceScrollBarStyle.qml
tests/ui/modules/Common/Styles/ForceScrollBarStyle.qml
+1
-1
AbstractTextButtonStyle.qml
...ui/modules/Common/Styles/Form/AbstractTextButtonStyle.qml
+1
-1
ActionBarStyle.qml
tests/ui/modules/Common/Styles/Form/ActionBarStyle.qml
+1
-1
CheckBoxTextStyle.qml
tests/ui/modules/Common/Styles/Form/CheckBoxTextStyle.qml
+1
-1
ExclusiveButtonsStyle.qml
...s/ui/modules/Common/Styles/Form/ExclusiveButtonsStyle.qml
+1
-1
ListFormStyle.qml
tests/ui/modules/Common/Styles/Form/ListFormStyle.qml
+1
-1
SmallButtonStyle.qml
tests/ui/modules/Common/Styles/Form/SmallButtonStyle.qml
+1
-1
TextFieldStyle.qml
tests/ui/modules/Common/Styles/Form/TextFieldStyle.qml
+1
-1
TransparentComboBoxStyle.qml
...i/modules/Common/Styles/Form/TransparentComboBoxStyle.qml
+1
-1
TransparentTextInputStyle.qml
.../modules/Common/Styles/Form/TransparentTextInputStyle.qml
+1
-1
ActionMenuStyle.qml
tests/ui/modules/Common/Styles/Menu/ActionMenuStyle.qml
+1
-1
MenuStyle.qml
tests/ui/modules/Common/Styles/Menu/MenuStyle.qml
+1
-1
PanedStyle.qml
tests/ui/modules/Common/Styles/PanedStyle.qml
+1
-1
PopupStyle.qml
tests/ui/modules/Common/Styles/PopupStyle.qml
+1
-1
SearchBoxStyle.qml
tests/ui/modules/Common/Styles/SearchBoxStyle.qml
+1
-1
TooltipStyle.qml
tests/ui/modules/Common/Styles/TooltipStyle.qml
+3
-3
qmldir
tests/ui/modules/Common/Styles/qmldir
+1
-1
Tooltip.qml
tests/ui/modules/Common/Tooltip/Tooltip.qml
+3
-3
TooltipArea.qml
tests/ui/modules/Common/Tooltip/TooltipArea.qml
+1
-1
No files found.
tests/ui/modules/Common/Animations/CaterpillarAnimation.qml
View file @
a9970c33
...
...
@@ -2,7 +2,7 @@ import QtQuick 2.7
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
Row
{
id
:
container
...
...
tests/ui/modules/Common/Borders.qml
View file @
a9970c33
import
QtQuick
2.7
// ===================================================================
// ===================================================================
==========
// Alternative to rectangle border which is a limited feature.
// Allow the use of different borders (size, color...) for each
// rectangle side.
// ===================================================================
// ===================================================================
==========
Rectangle
{
property
var
borderColor
...
...
tests/ui/modules/Common/Collapse.qml
View file @
a9970c33
...
...
@@ -10,11 +10,15 @@ import Common.Styles 1.0
Item
{
id
:
collapse
// ---------------------------------------------------------------------------
property
alias
target
:
targetChanges
.
target
property
int
targetHeight
property
bool
_collapsed
:
false
// ---------------------------------------------------------------------------
signal
collapsed
(
bool
collapsed
)
// ---------------------------------------------------------------------------
...
...
tests/ui/modules/Common/Colors.qml
View file @
a9970c33
...
...
@@ -4,17 +4,10 @@ import QtQuick 2.7
// =============================================================================
QtObject
{
property
color
a
:
'
transparent
'
property
color
q
:
'
#E6E6E6
'
property
color
d
:
'
#5A585B
'
// -----------------------------------------------------------------
// OK.
// -----------------------------------------------------------------
property
color
a
:
'
transparent
'
property
color
b
:
'
#5E5E5F
'
property
color
c
:
'
#CBCBCB
'
property
color
d
:
'
#5A585B
'
property
color
e
:
'
#F3F3F3
'
property
color
f
:
'
#E8E8E8
'
property
color
g
:
'
#6B7A86
'
...
...
@@ -32,6 +25,7 @@ QtObject {
property
color
n
:
'
#C0C0C0
'
property
color
o
:
'
#232323
'
property
color
p
:
'
#E2E9EF
'
property
color
q
:
'
#E6E6E6
'
property
color
r
:
'
#595759
'
property
color
s
:
'
#D64D00
'
property
color
t
:
'
#FF8600
'
...
...
tests/ui/modules/Common/Constants.qml
View file @
a9970c33
pragma
Singleton
import
QtQuick
2.7
// ===================================================================
// ===================================================================
==========
QtObject
{
property
int
zPopup
:
999
...
...
tests/ui/modules/Common/Dialog/ConfirmDialog.qml
View file @
a9970c33
import
Common
1.0
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
// A dialog with OK/Cancel buttons.
// ===================================================================
// ===================================================================
==========
DialogPlus
{
buttons
:
[
...
...
tests/ui/modules/Common/Dialog/ConfirmDialog.spec.qml
View file @
a9970c33
import
QtQuick
2.7
import
QtTest
1.1
// ===================================================================
// ===================================================================
==========
TestCase
{
id
:
testCase
...
...
@@ -16,7 +16,7 @@ TestCase {
return
container
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
function
test_exitStatusViaButtons_data
()
{
return
[
...
...
@@ -35,7 +35,7 @@ TestCase {
compare
(
spy
.
signalArguments
[
0
][
0
],
data
.
expectedStatus
)
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
function
test_exitStatusViaClose
()
{
var
container
=
buildConfirmDialog
()
...
...
@@ -47,7 +47,7 @@ TestCase {
compare
(
spy
.
signalArguments
[
0
][
0
],
0
)
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
Component
{
id
:
builder
...
...
tests/ui/modules/Common/Dialog/DialogDescription.qml
View file @
a9970c33
...
...
@@ -2,9 +2,9 @@ import QtQuick 2.7
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
// Description content used by dialogs.
// ===================================================================
// ===================================================================
==========
Item
{
property
alias
text
:
description
.
text
...
...
@@ -17,9 +17,12 @@ Item {
Text
{
id
:
description
anchors.fill
:
parent
anchors.leftMargin
:
DialogStyle
.
leftMargin
anchors.rightMargin
:
DialogStyle
.
rightMargin
anchors
{
fill
:
parent
leftMargin
:
DialogStyle
.
leftMargin
rightMargin
:
DialogStyle
.
rightMargin
}
color
:
DialogStyle
.
description
.
color
font.pointSize
:
DialogStyle
.
description
.
fontSize
verticalAlignment
:
Text
.
AlignVCenter
...
...
tests/ui/modules/Common/Dialog/DialogPlus.qml
View file @
a9970c33
...
...
@@ -4,9 +4,9 @@ import QtQuick.Window 2.2
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
// Helper to build quickly dialogs.
// ===================================================================
// ===================================================================
==========
Window
{
property
alias
buttons
:
buttons
.
data
// Optionnal.
...
...
@@ -16,8 +16,12 @@ Window {
default
property
alias
_content
:
content
.
data
// Required.
property
bool
_disableExitStatus
// ---------------------------------------------------------------------------
signal
exitStatus
(
int
status
)
// ---------------------------------------------------------------------------
// Derived class must use this function instead of close.
// Destroy the component and send signal to caller.
function
exit
(
status
)
{
...
...
@@ -37,14 +41,12 @@ Window {
anchors.fill
:
parent
spacing
:
0
// Description.
DialogDescription
{
id
:
description
Layout.fillWidth
:
true
}
// Content.
Item
{
id
:
content
...
...
@@ -52,7 +54,6 @@ Window {
Layout.fillWidth
:
true
}
// Buttons.
Row
{
id
:
buttons
...
...
tests/ui/modules/Common/DroppableTextArea.qml
View file @
a9970c33
...
...
@@ -4,12 +4,16 @@ import QtQuick.Dialogs 1.2
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
Item
{
property
alias
placeholderText
:
textArea
.
placeholderText
// ---------------------------------------------------------------------------
signal
dropped
(
var
files
)
property
alias
placeholderText
:
textArea
.
placeholderText
// ---------------------------------------------------------------------------
function
_emitFiles
(
files
)
{
// Filtering files, other urls are forbidden.
...
...
@@ -28,6 +32,8 @@ Item {
}
}
// ---------------------------------------------------------------------------
// Text area.
Flickable
{
ScrollBar.vertical
:
ForceScrollBar
{
...
...
@@ -80,7 +86,7 @@ Item {
}
}
// Hover style.
// Hover
ed
style.
Rectangle
{
id
:
hoverContent
...
...
tests/ui/modules/Common/ForceScrollBar.qml
View file @
a9970c33
...
...
@@ -3,9 +3,9 @@ import QtQuick.Controls 2.0
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
// A simple custom vertical scrollbar.
// ===================================================================
// ===================================================================
==========
ScrollBar
{
id
:
scrollBar
...
...
tests/ui/modules/Common/Form/ActionBar.qml
View file @
a9970c33
...
...
@@ -2,9 +2,9 @@ import QtQuick 2.7
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
// Bar which can contains ActionButtons.
// ===================================================================
// ===================================================================
==========
Row
{
property
int
iconSize
...
...
tests/ui/modules/Common/Form/ActionButton.qml
View file @
a9970c33
...
...
@@ -3,13 +3,15 @@ import QtQuick.Controls 2.0
import
Common
1.0
// ===================================================================
// ===================================================================
==========
// An animated (or not) button with image(s).
// ===================================================================
// ===================================================================
==========
Item
{
id
:
wrappedButton
// ---------------------------------------------------------------------------
property
bool
enabled
:
true
property
bool
useStates
:
true
property
int
iconSize
// Optionnal.
...
...
@@ -19,9 +21,11 @@ Item {
// `icon`_pressed, `icon`_hovered and `icon`_normal.
property
string
icon
// ---------------------------------------------------------------------------
signal
clicked
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
function
_getIcon
()
{
if
(
!
useStates
)
{
...
...
@@ -39,7 +43,7 @@ Item {
)
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
height
:
iconSize
||
parent
.
iconSize
||
parent
.
height
width
:
iconSize
||
parent
.
iconSize
||
parent
.
height
...
...
tests/ui/modules/Common/Form/ActionSwitch.qml
View file @
a9970c33
...
...
@@ -8,6 +8,8 @@ Item {
property
int
iconSize
// Optionnal.
property
string
icon
// ---------------------------------------------------------------------------
signal
clicked
// ---------------------------------------------------------------------------
...
...
tests/ui/modules/Common/Form/CheckBoxText.qml
View file @
a9970c33
...
...
@@ -3,9 +3,9 @@ import QtQuick.Controls 2.0
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
// Checkbox with clickable text.
// ===================================================================
// ===================================================================
==========
CheckBox
{
id
:
checkBox
...
...
tests/ui/modules/Common/Form/ExclusiveButtons.qml
View file @
a9970c33
...
...
@@ -7,14 +7,19 @@ import Common.Styles 1.0
Row
{
id
:
item
property
var
texts
// ---------------------------------------------------------------------------
property
int
selectedButton
:
0
property
var
texts
// ---------------------------------------------------------------------------
// Emitted when the selected button is changed.
// Gives the selected button id.
signal
clicked
(
int
button
)
// ---------------------------------------------------------------------------
spacing
:
ExclusiveButtonsStyle
.
buttonsSpacing
Repeater
{
...
...
tests/ui/modules/Common/Form/ExclusiveButtons.spec.qml
View file @
a9970c33
import
QtQuick
2.7
import
QtTest
1.1
// ===================================================================
// ===================================================================
==========
Item
{
id
:
root
...
...
@@ -43,7 +43,7 @@ Item {
}
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
TestCase
{
id
:
testCase
...
...
tests/ui/modules/Common/Form/ListForm.qml
View file @
a9970c33
...
...
@@ -10,6 +10,8 @@ import Utils 1.0
RowLayout
{
id
:
listForm
// ---------------------------------------------------------------------------
property
alias
placeholder
:
placeholder
.
text
property
alias
title
:
text
.
text
property
bool
readOnly
:
false
...
...
@@ -18,6 +20,8 @@ RowLayout {
property
var
minValues
readonly
property
int
count
:
values
.
count
// ---------------------------------------------------------------------------
signal
changed
(
int
index
,
string
defaultValue
,
string
newValue
)
signal
removed
(
int
index
,
string
value
)
...
...
tests/ui/modules/Common/Form/SmallButton.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick.Controls 2.0
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
Button
{
id
:
button
...
...
tests/ui/modules/Common/Form/StaticListForm.qml
View file @
a9970c33
...
...
@@ -24,30 +24,30 @@ RowLayout {
// ---------------------------------------------------------------------------
spacing
:
0
spacing
:
0
Text
{
id
:
text
Text
{
id
:
text
Layout.leftMargin
:
ListFormStyle
.
titleArea
.
iconSize
+
ListFormStyle
.
titleArea
.
spacing
Layout.preferredHeight
:
ListFormStyle
.
lineHeight
Layout.preferredWidth
:
ListFormStyle
.
titleArea
.
text
.
width
Layout.alignment
:
Qt
.
AlignTop
Layout.leftMargin
:
ListFormStyle
.
titleArea
.
iconSize
+
ListFormStyle
.
titleArea
.
spacing
Layout.preferredHeight
:
ListFormStyle
.
lineHeight
Layout.preferredWidth
:
ListFormStyle
.
titleArea
.
text
.
width
color
:
ListFormStyle
.
titleArea
.
text
.
color
elide
:
Text
.
ElideRight
color
:
ListFormStyle
.
titleArea
.
text
.
color
elide
:
Text
.
ElideRight
font
{
bold
:
true
pointSize
:
ListFormStyle
.
titleArea
.
text
.
fontSize
}
font
{
bold
:
true
pointSize
:
ListFormStyle
.
titleArea
.
text
.
fontSize
}
verticalAlignment
:
Text
.
AlignVCenter
}
verticalAlignment
:
Text
.
AlignVCenter
}
ColumnLayout
{
Layout.fillWidth
:
true
spacing
:
0
ColumnLayout
{
Layout.fillWidth
:
true
spacing
:
0
Repeater
{
model
:
form
.
fields
...
...
tests/ui/modules/Common/Form/TextField.qml
View file @
a9970c33
...
...
@@ -4,9 +4,9 @@ import QtQuick.Controls 2.0 as Controls
import
Common
1.0
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
// A classic TextInput which supports an icon attribute.
// ===================================================================
// ===================================================================
==========
Controls.TextField
{
property
alias
icon
:
icon
.
icon
...
...
tests/ui/modules/Common/Form/TransparentComboBox.qml
View file @
a9970c33
...
...
@@ -3,9 +3,9 @@ import QtQuick.Controls 2.0
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
// Discrete ComboBox that can be integrated in text.
// ===================================================================
// ===================================================================
==========
ComboBox
{
id
:
comboBox
...
...
tests/ui/modules/Common/Form/TransparentTextInput.qml
View file @
a9970c33
...
...
@@ -18,6 +18,8 @@ Item {
property
bool
isInvalid
:
false
property
int
padding
:
TransparentTextInputStyle
.
padding
// ---------------------------------------------------------------------------
signal
editingFinished
// ---------------------------------------------------------------------------
...
...
tests/ui/modules/Common/Image/Icon.qml
View file @
a9970c33
...
...
@@ -3,9 +3,9 @@ import QtQuick 2.7
import
Common
1.0
import
Utils
1.0
// ===================================================================
// ===================================================================
==========
// An icon image properly resized.
// ===================================================================
// ===================================================================
==========
Item
{
property
var
iconSize
// Required.
...
...
tests/ui/modules/Common/InvertedMouseArea.qml
View file @
a9970c33
...
...
@@ -3,21 +3,25 @@ import QtQuick 2.7
import
Common
1.0
import
Utils
1.0
// ===================================================================
// ===================================================================
==========
// Helper to handle button click outside an item.
// ===================================================================
// ===================================================================
==========
Item
{
id
:
item
// ---------------------------------------------------------------------------
property
bool
_mouseAlwaysOutside
property
var
_mouseArea
:
null
// ---------------------------------------------------------------------------
// When emitted, returns a function to test if the click
// is on a specific item. It takes only a item parameter.
signal
pressed
(
var
pointIsInItem
)
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
function
_createMouseArea
()
{
var
parent
=
Utils
.
getTopParent
(
item
,
true
)
...
...
@@ -41,7 +45,7 @@ Item {
}
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
// It's necessary to use a `enabled` variable.
// See: http://doc.qt.io/qt-5/qml-qtqml-component.html#completed-signal
...
...
tests/ui/modules/Common/Menu/ActionMenu.qml
View file @
a9970c33
...
...
@@ -3,9 +3,7 @@ import QtQuick.Layouts 1.3
import
Common
.
Styles
1.0
// ===================================================================
// Basic actions menu.
// ===================================================================
// =============================================================================
ColumnLayout
{
id
:
menu
...
...
tests/ui/modules/Common/Menu/ActionMenuEntry.qml
View file @
a9970c33
...
...
@@ -2,7 +2,7 @@ import QtQuick 2.7
import
Common
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
Rectangle
{
id
:
entry
...
...
tests/ui/modules/Common/Menu/Menu.qml
View file @
a9970c33
...
...
@@ -11,12 +11,16 @@ import Common.Styles 1.0
Rectangle
{
id
:
menu
// ---------------------------------------------------------------------------
property
int
entryHeight
property
int
entryWidth
property
var
entries
property
int
_selectedEntry
:
0
// ---------------------------------------------------------------------------
signal
entrySelected
(
int
entry
)
// ---------------------------------------------------------------------------
...
...
tests/ui/modules/Common/Paned.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
.
Styles
1.0
import
Utils
1.0
// ===================================================================
// ===================================================================
==========
//
// Paned is one container divided in two areas.
// The division between the areas can be modified with a handle.
...
...
@@ -19,11 +19,13 @@ import Utils 1.0
// `minimumLeftLimit: '66%'`.
// The percentage is relative to the container width.
//
// ===================================================================
// ===================================================================
==========
Item
{
id
:
container
// ---------------------------------------------------------------------------
property
alias
childA
:
contentA
.
data
property
alias
childB
:
contentB
.
data
property
bool
defaultClosed
:
false
...
...
@@ -46,9 +48,9 @@ Item {
property
var
_minimumLeftLimit
property
var
_minimumRightLimit
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
// Public functions.
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
function
isClosed
()
{
return
_isClosed
...
...
@@ -66,9 +68,9 @@ Item {
}
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
// Private functions.
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
function
_getLimitValue
(
limit
)
{
if
(
limit
==
null
)
{
...
...
@@ -135,7 +137,7 @@ Item {
}
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
function
_applyLimitsOnUserMove
(
offset
)
{
var
minimumRightLimit
=
_getLimitValue
(
_minimumRightLimit
)
...
...
@@ -200,7 +202,7 @@ Item {
}
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
function
_open
()
{
_isClosed
=
false
...
...
@@ -230,7 +232,7 @@ Item {
)
||
closingEdge
!==
edge
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
onWidthChanged
:
_applyLimits
()
...
...
tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml
View file @
a9970c33
...
...
@@ -11,6 +11,8 @@ import Utils 1.0
Item
{
id
:
menu
// ---------------------------------------------------------------------------
// Optionnal parameter, if defined and if a click is detected
// on it, menu is not closed.
property
var
launcher
...
...
@@ -24,6 +26,8 @@ Item {
default
property
alias
_content
:
content
.
data
property
bool
_isOpen
:
false
// ---------------------------------------------------------------------------
signal
menuClosed
signal
menuOpened
...
...
tests/ui/modules/Common/Popup/DesktopPopup.qml
View file @
a9970c33
...
...
@@ -8,6 +8,8 @@ import Common.Styles 1.0
Item
{
id
:
wrapper
// ---------------------------------------------------------------------------
property
alias
popupX
:
popup
.
x
property
alias
popupY
:
popup
.
y
...
...
@@ -19,6 +21,8 @@ Item {
default
property
alias
_content
:
content
.
data
property
bool
_isOpen
:
false
// ---------------------------------------------------------------------------
function
show
()
{
_isOpen
=
true
}
...
...
tests/ui/modules/Common/SearchBox.qml
View file @
a9970c33
...
...
@@ -12,6 +12,8 @@ import Utils 1.0
Item
{
id
:
searchBox
// ---------------------------------------------------------------------------
readonly
property
alias
filter
:
searchField
.
text
property
alias
delegate
:
list
.
delegate
...
...
@@ -26,6 +28,8 @@ Item {
property
bool
_isOpen
:
false
// ---------------------------------------------------------------------------
signal
menuClosed
signal
menuOpened
...
...
tests/ui/modules/Common/SmartConnect.qml
View file @
a9970c33
...
...
@@ -2,7 +2,7 @@ import QtQuick 2.7
import
Utils
1.0
// ===================================================================
// ===================================================================
==========
Item
{
property
bool
_connected
:
false
...
...
tests/ui/modules/Common/Styles/Animations/CaterpillarAnimationStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
int
nSpheres
:
3
...
...
tests/ui/modules/Common/Styles/CollapseStyle.qml
View file @
a9970c33
pragma
Singleton
import
QtQuick
2.7
// ===================================================================
// ===================================================================
==========
QtObject
{
property
int
animationDuration
:
200
...
...
tests/ui/modules/Common/Styles/DialogStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
int
leftMargin
:
50
...
...
tests/ui/modules/Common/Styles/DroppableTextAreaStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
color
backgroundColor
:
Colors
.
k
...
...
tests/ui/modules/Common/Styles/ForceScrollBarStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
color
backgroundColor
:
Colors
.
g20
...
...
tests/ui/modules/Common/Styles/Form/AbstractTextButtonStyle.qml
View file @
a9970c33
pragma
Singleton
import
QtQuick
2.7
// ===================================================================
// ===================================================================
==========
QtObject
{
property
QtObject
background
:
QtObject
{
...
...
tests/ui/modules/Common/Styles/Form/ActionBarStyle.qml
View file @
a9970c33
pragma
Singleton
import
QtQuick
2.7
// ===================================================================
// ===================================================================
==========
QtObject
{
property
int
spacing
:
8
...
...
tests/ui/modules/Common/Styles/Form/CheckBoxTextStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
int
radius
:
3
...
...
tests/ui/modules/Common/Styles/Form/ExclusiveButtonsStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
int
buttonsSpacing
:
8
...
...
tests/ui/modules/Common/Styles/Form/ListFormStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
int
lineHeight
:
35
...
...
tests/ui/modules/Common/Styles/Form/SmallButtonStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
int
leftPadding
:
5
...
...
tests/ui/modules/Common/Styles/Form/TextFieldStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
QtObject
background
:
QtObject
{
...
...
tests/ui/modules/Common/Styles/Form/TransparentComboBoxStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
QtObject
item
:
QtObject
{
...
...
tests/ui/modules/Common/Styles/Form/TransparentTextInputStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
color
backgroundColor
:
Colors
.
q
...
...
tests/ui/modules/Common/Styles/Menu/ActionMenuStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
int
spacing
:
1
...
...
tests/ui/modules/Common/Styles/Menu/MenuStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
int
spacing
:
1
...
...
tests/ui/modules/Common/Styles/PanedStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
int
transitionDuration
:
200
...
...
tests/ui/modules/Common/Styles/PopupStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
color
backgroundColor
:
Colors
.
k
...
...
tests/ui/modules/Common/Styles/SearchBoxStyle.qml
View file @
a9970c33
...
...
@@ -3,7 +3,7 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
color
shadowColor
:
Colors
.
l
...
...
tests/ui/modules/Common/Styles/TooltipStyle.qml
View file @
a9970c33
...
...
@@ -3,11 +3,11 @@ import QtQuick 2.7
import
Common
1.0
// ===================================================================
// ===================================================================
==========
QtObject
{
property
color
backgroundColor
:
'
#6B7A86
'
property
color
color
:
'
#FFFFFF
'
property
color
backgroundColor
:
Colors
.
g
property
color
color
:
Colors
.
k
property
int
arrowSize
:
8
property
int
delay
:
500
property
int
fontSize
:
9
...
...
tests/ui/modules/Common/Styles/qmldir
View file @
a9970c33
...
...
@@ -2,7 +2,7 @@
module Common.Styles
# Components styles --------------------------------------------------
# Components styles --------------------------------------------------
----------
singleton CaterpillarAnimationStyle 1.0 Animations/CaterpillarAnimationStyle.qml
...
...
tests/ui/modules/Common/Tooltip/Tooltip.qml
View file @
a9970c33
...
...
@@ -5,14 +5,14 @@ import Common 1.0
import
Common
.
Styles
1.0
import
Utils
1.0
// ===================================================================
// ===================================================================
==========
ToolTip
{
id
:
tooltip
property
string
_edge
:
'
left
'
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
function
_getArrowHeightMargin
()
{
Utils
.
assert
(
...
...
@@ -75,7 +75,7 @@ ToolTip {
}
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
background
:
Item
{
id
:
container
...
...
tests/ui/modules/Common/Tooltip/TooltipArea.qml
View file @
a9970c33
import
QtQuick
2.7
// ===================================================================
// ===================================================================
==========
MouseArea
{
property
alias
text
:
tooltip
.
text
...
...
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