mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
feat(ui/modules/Common): refactoring & coding style
This commit is contained in:
parent
36a308b7f5
commit
a9970c33f9
56 changed files with 159 additions and 114 deletions
|
|
@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common.Styles 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
Row {
|
||||
id: container
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int zPopup: 999
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import Common 1.0
|
||||
import Common.Styles 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
// A dialog with OK/Cancel buttons.
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
DialogPlus {
|
||||
buttons: [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
// Hovered style.
|
||||
Rectangle {
|
||||
id: hoverContent
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import QtQuick.Controls 2.0
|
|||
|
||||
import Common.Styles 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
// A simple custom vertical scrollbar.
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
ScrollBar {
|
||||
id: scrollBar
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import QtQuick 2.7
|
|||
|
||||
import Common.Styles 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
// Bar which can contains ActionButtons.
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
Row {
|
||||
property int iconSize
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ Item {
|
|||
property int iconSize // Optionnal.
|
||||
property string icon
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
signal clicked
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import QtQuick.Controls 2.0
|
|||
|
||||
import Common.Styles 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
// Checkbox with clickable text.
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
CheckBox {
|
||||
id: checkBox
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import QtQuick 2.7
|
||||
import QtTest 1.1
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
@ -43,7 +43,7 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
TestCase {
|
||||
id: testCase
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick.Controls 2.0
|
|||
|
||||
import Common.Styles 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
Button {
|
||||
id: button
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ Item {
|
|||
property bool isInvalid: false
|
||||
property int padding: TransparentTextInputStyle.padding
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
signal editingFinished
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ import QtQuick.Layouts 1.3
|
|||
|
||||
import Common.Styles 1.0
|
||||
|
||||
// ===================================================================
|
||||
// Basic actions menu.
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
ColumnLayout {
|
||||
id: menu
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common.Styles 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
Rectangle {
|
||||
id: entry
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||
|
||||
import Utils 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
Item {
|
||||
property bool _connected: false
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int nSpheres: 3
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int animationDuration: 200
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int leftMargin: 50
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property color backgroundColor: Colors.k
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property color backgroundColor: Colors.g20
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property QtObject background: QtObject {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int spacing: 8
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int radius: 3
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int buttonsSpacing: 8
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int lineHeight: 35
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int leftPadding: 5
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property QtObject background: QtObject {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property QtObject item: QtObject {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property color backgroundColor: Colors.q
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int spacing: 1
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int spacing: 1
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int transitionDuration: 200
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property color backgroundColor: Colors.k
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property color shadowColor: Colors.l
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
module Common.Styles
|
||||
|
||||
# Components styles --------------------------------------------------
|
||||
# Components styles ------------------------------------------------------------
|
||||
|
||||
singleton CaterpillarAnimationStyle 1.0 Animations/CaterpillarAnimationStyle.qml
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import QtQuick 2.7
|
||||
|
||||
// ===================================================================
|
||||
// =============================================================================
|
||||
|
||||
MouseArea {
|
||||
property alias text: tooltip.text
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue