aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/material')
-rw-r--r--src/imports/controls/material/SplitView.qml74
-rw-r--r--src/imports/controls/material/dependencies.json7
-rw-r--r--src/imports/controls/material/material.pri1
-rw-r--r--src/imports/controls/material/material.pro4
-rw-r--r--src/imports/controls/material/plugins.qmltypes192
5 files changed, 275 insertions, 3 deletions
diff --git a/src/imports/controls/material/SplitView.qml b/src/imports/controls/material/SplitView.qml
new file mode 100644
index 00000000..5544e833
--- /dev/null
+++ b/src/imports/controls/material/SplitView.qml
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.13
+import QtQuick.Templates 2.13 as T
+import QtQuick.Controls 2.13
+import QtQuick.Controls.impl 2.13
+import QtQuick.Controls.Material 2.13
+
+T.SplitView {
+ id: control
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ handle: Rectangle {
+ implicitWidth: control.orientation === Qt.Horizontal ? 6 : control.width
+ implicitHeight: control.orientation === Qt.Horizontal ? control.height : 6
+ color: T.SplitHandle.pressed ? control.Material.background
+ : Qt.lighter(control.Material.background, T.SplitHandle.hovered ? 1.2 : 1.1)
+
+ Rectangle {
+ color: control.Material.secondaryTextColor
+ width: control.orientation === Qt.Horizontal ? thickness : length
+ height: control.orientation === Qt.Horizontal ? length : thickness
+ radius: thickness
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+
+ property int length: parent.T.SplitHandle.pressed ? 3 : 8
+ readonly property int thickness: parent.T.SplitHandle.pressed ? 3 : 1
+
+ Behavior on length {
+ NumberAnimation {
+ duration: 100
+ }
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/material/dependencies.json b/src/imports/controls/material/dependencies.json
new file mode 100644
index 00000000..21ded052
--- /dev/null
+++ b/src/imports/controls/material/dependencies.json
@@ -0,0 +1,7 @@
+[
+ {
+ "name": "QtQuick.Controls",
+ "type": "module",
+ "version": "2.0"
+ }
+]
diff --git a/src/imports/controls/material/material.pri b/src/imports/controls/material/material.pri
index ab925aa2..bda1fb21 100644
--- a/src/imports/controls/material/material.pri
+++ b/src/imports/controls/material/material.pri
@@ -53,6 +53,7 @@ QML_FILES += \
$$PWD/Slider.qml \
$$PWD/SliderHandle.qml \
$$PWD/SpinBox.qml \
+ $$PWD/SplitView.qml \
$$PWD/StackView.qml \
$$PWD/SwipeDelegate.qml \
$$PWD/SwipeView.qml \
diff --git a/src/imports/controls/material/material.pro b/src/imports/controls/material/material.pro
index c3cbb355..cf08b925 100644
--- a/src/imports/controls/material/material.pro
+++ b/src/imports/controls/material/material.pro
@@ -1,6 +1,8 @@
TARGET = qtquickcontrols2materialstyleplugin
TARGETPATH = QtQuick/Controls.2/Material
-IMPORT_VERSION = 2.5
+
+IMPORT_NAME = QtQuick.Controls.Material
+IMPORT_VERSION = 2.$$QT_MINOR_VERSION
QT += qml quick
QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
diff --git a/src/imports/controls/material/plugins.qmltypes b/src/imports/controls/material/plugins.qmltypes
index 2ddf99a7..3e95fa44 100644
--- a/src/imports/controls/material/plugins.qmltypes
+++ b/src/imports/controls/material/plugins.qmltypes
@@ -4,12 +4,51 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtQuick.Controls.Material 2.3'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls.Material 2.13'
Module {
- dependencies: []
+ dependencies: ["QtQuick.Controls 2.0"]
Component { name: "QQuickAttachedObject"; prototype: "QObject" }
Component {
+ name: "QQuickMaterialBusyIndicator"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ exports: ["QtQuick.Controls.Material.impl/BusyIndicatorImpl 2.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "color"; type: "QColor" }
+ Property { name: "running"; type: "bool" }
+ }
+ Component {
+ name: "QQuickMaterialProgressBar"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ exports: ["QtQuick.Controls.Material.impl/ProgressBarImpl 2.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "color"; type: "QColor" }
+ Property { name: "progress"; type: "double" }
+ Property { name: "indeterminate"; type: "bool" }
+ }
+ Component {
+ name: "QQuickMaterialRipple"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ exports: ["QtQuick.Controls.Material.impl/Ripple 2.0"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "Trigger"
+ values: {
+ "Press": 0,
+ "Release": 1
+ }
+ }
+ Property { name: "color"; type: "QColor" }
+ Property { name: "clipRadius"; type: "double" }
+ Property { name: "pressed"; type: "bool" }
+ Property { name: "active"; type: "bool" }
+ Property { name: "anchor"; type: "QQuickItem"; isPointer: true }
+ Property { name: "trigger"; type: "Trigger" }
+ }
+ Component {
name: "QQuickMaterialStyle"
prototype: "QQuickAttachedObject"
exports: ["QtQuick.Controls.Material/Material 2.0"]
@@ -24,6 +63,13 @@ Module {
}
}
Enum {
+ name: "Variant"
+ values: {
+ "Normal": 0,
+ "Dense": 1
+ }
+ }
+ Enum {
name: "Color"
values: {
"Red": 0,
@@ -72,6 +118,49 @@ Module {
Property { name: "foreground"; type: "QVariant" }
Property { name: "background"; type: "QVariant" }
Property { name: "elevation"; type: "int" }
+ Property { name: "primaryColor"; type: "QColor"; isReadonly: true }
+ Property { name: "accentColor"; type: "QColor"; isReadonly: true }
+ Property { name: "backgroundColor"; type: "QColor"; isReadonly: true }
+ Property { name: "primaryTextColor"; type: "QColor"; isReadonly: true }
+ Property { name: "primaryHighlightedTextColor"; type: "QColor"; isReadonly: true }
+ Property { name: "secondaryTextColor"; type: "QColor"; isReadonly: true }
+ Property { name: "hintTextColor"; type: "QColor"; isReadonly: true }
+ Property { name: "textSelectionColor"; type: "QColor"; isReadonly: true }
+ Property { name: "dropShadowColor"; type: "QColor"; isReadonly: true }
+ Property { name: "dividerColor"; type: "QColor"; isReadonly: true }
+ Property { name: "iconColor"; type: "QColor"; isReadonly: true }
+ Property { name: "iconDisabledColor"; type: "QColor"; isReadonly: true }
+ Property { name: "buttonColor"; type: "QColor"; isReadonly: true }
+ Property { name: "buttonDisabledColor"; type: "QColor"; isReadonly: true }
+ Property { name: "highlightedButtonColor"; type: "QColor"; isReadonly: true }
+ Property { name: "frameColor"; type: "QColor"; isReadonly: true }
+ Property { name: "rippleColor"; type: "QColor"; isReadonly: true }
+ Property { name: "highlightedRippleColor"; type: "QColor"; isReadonly: true }
+ Property { name: "switchUncheckedTrackColor"; type: "QColor"; isReadonly: true }
+ Property { name: "switchCheckedTrackColor"; type: "QColor"; isReadonly: true }
+ Property { name: "switchUncheckedHandleColor"; type: "QColor"; isReadonly: true }
+ Property { name: "switchCheckedHandleColor"; type: "QColor"; isReadonly: true }
+ Property { name: "switchDisabledTrackColor"; type: "QColor"; isReadonly: true }
+ Property { name: "switchDisabledHandleColor"; type: "QColor"; isReadonly: true }
+ Property { name: "scrollBarColor"; type: "QColor"; isReadonly: true }
+ Property { name: "scrollBarHoveredColor"; type: "QColor"; isReadonly: true }
+ Property { name: "scrollBarPressedColor"; type: "QColor"; isReadonly: true }
+ Property { name: "dialogColor"; type: "QColor"; isReadonly: true }
+ Property { name: "backgroundDimColor"; type: "QColor"; isReadonly: true }
+ Property { name: "listHighlightColor"; type: "QColor"; isReadonly: true }
+ Property { name: "tooltipColor"; type: "QColor"; isReadonly: true }
+ Property { name: "toolBarColor"; type: "QColor"; isReadonly: true }
+ Property { name: "toolTextColor"; type: "QColor"; isReadonly: true }
+ Property { name: "spinBoxDisabledIconColor"; type: "QColor"; isReadonly: true }
+ Property { name: "touchTarget"; type: "int"; isReadonly: true }
+ Property { name: "buttonHeight"; type: "int"; isReadonly: true }
+ Property { name: "delegateHeight"; type: "int"; isReadonly: true }
+ Property { name: "dialogButtonBoxHeight"; type: "int"; isReadonly: true }
+ Property { name: "frameVerticalPadding"; type: "int"; isReadonly: true }
+ Property { name: "menuItemHeight"; type: "int"; isReadonly: true }
+ Property { name: "menuItemVerticalPadding"; type: "int"; isReadonly: true }
+ Property { name: "switchDelegateVerticalPadding"; type: "int"; isReadonly: true }
+ Property { name: "tooltipHeight"; type: "int"; isReadonly: true }
Signal { name: "paletteChanged" }
Method {
name: "color"
@@ -91,4 +180,103 @@ Module {
Parameter { name: "shade"; type: "Shade" }
}
}
+ Component {
+ prototype: "QQuickItem"
+ name: "QtQuick.Controls.Material.impl/BoxShadow 2.0"
+ exports: ["QtQuick.Controls.Material.impl/BoxShadow 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "offsetX"; type: "int" }
+ Property { name: "offsetY"; type: "int" }
+ Property { name: "blurRadius"; type: "int" }
+ Property { name: "spreadRadius"; type: "int" }
+ Property { name: "source"; type: "QQuickItem"; isPointer: true }
+ Property { name: "fullWidth"; type: "bool" }
+ Property { name: "fullHeight"; type: "bool" }
+ Property { name: "glowRadius"; type: "double" }
+ Property { name: "spread"; type: "double" }
+ Property { name: "color"; type: "QColor" }
+ Property { name: "cornerRadius"; type: "double" }
+ Property { name: "cached"; type: "bool" }
+ }
+ Component {
+ prototype: "QQuickRectangle"
+ name: "QtQuick.Controls.Material.impl/CheckIndicator 2.0"
+ exports: ["QtQuick.Controls.Material.impl/CheckIndicator 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "control"; type: "QQuickItem"; isPointer: true }
+ Property { name: "checkState"; type: "int" }
+ }
+ Component {
+ prototype: "QQuickRectangle"
+ name: "QtQuick.Controls.Material.impl/CursorDelegate 2.0"
+ exports: ["QtQuick.Controls.Material.impl/CursorDelegate 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickItem"
+ name: "QtQuick.Controls.Material.impl/ElevationEffect 2.0"
+ exports: ["QtQuick.Controls.Material.impl/ElevationEffect 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "source"; type: "QVariant" }
+ Property { name: "elevation"; type: "int" }
+ Property { name: "fullWidth"; type: "bool" }
+ Property { name: "fullHeight"; type: "bool" }
+ Property { name: "sourceItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "_shadows"; type: "QVariant"; isReadonly: true }
+ Property { name: "_shadow"; type: "QVariant"; isReadonly: true }
+ }
+ Component {
+ prototype: "QQuickRectangle"
+ name: "QtQuick.Controls.Material.impl/RadioIndicator 2.0"
+ exports: ["QtQuick.Controls.Material.impl/RadioIndicator 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "control"; type: "QQuickItem"; isPointer: true }
+ }
+ Component {
+ prototype: "QQuickItem"
+ name: "QtQuick.Controls.Material.impl/RectangularGlow 2.0"
+ exports: ["QtQuick.Controls.Material.impl/RectangularGlow 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "glowRadius"; type: "double" }
+ Property { name: "spread"; type: "double" }
+ Property { name: "color"; type: "QColor" }
+ Property { name: "cornerRadius"; type: "double" }
+ Property { name: "cached"; type: "bool" }
+ }
+ Component {
+ prototype: "QQuickItem"
+ name: "QtQuick.Controls.Material.impl/SliderHandle 2.0"
+ exports: ["QtQuick.Controls.Material.impl/SliderHandle 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "value"; type: "double" }
+ Property { name: "handleHasFocus"; type: "bool" }
+ Property { name: "handlePressed"; type: "bool" }
+ Property { name: "handleHovered"; type: "bool" }
+ Property { name: "initialSize"; type: "int"; isReadonly: true }
+ Property { name: "control"; type: "QVariant"; isReadonly: true }
+ }
+ Component {
+ prototype: "QQuickItem"
+ name: "QtQuick.Controls.Material.impl/SwitchIndicator 2.0"
+ exports: ["QtQuick.Controls.Material.impl/SwitchIndicator 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "control"; type: "QQuickItem"; isPointer: true }
+ Property { name: "handle"; type: "QQuickRectangle"; isReadonly: true; isPointer: true }
+ }
}