diff options
Diffstat (limited to 'src/imports/controls/material')
77 files changed, 821 insertions, 893 deletions
diff --git a/src/imports/controls/material/.prev_CMakeLists.txt b/src/imports/controls/material/.prev_CMakeLists.txt index 15fe3519..123c89dc 100644 --- a/src/imports/controls/material/.prev_CMakeLists.txt +++ b/src/imports/controls/material/.prev_CMakeLists.txt @@ -4,18 +4,14 @@ ## qtquickcontrols2materialstyleplugin Plugin: ##################################################################### -add_qml_module(qtquickcontrols2materialstyleplugin - TARGET_PATH "QtQuick/Controls.2/Material" +qt_add_qml_module(qtquickcontrols2materialstyleplugin URI "QtQuick.Controls.Material" - VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}" + VERSION "${CMAKE_PROJECT_VERSION}" CLASSNAME QtQuickControls2MaterialStylePlugin - DEPENDENCIES - QtQuick.Controls/2.5 - SKIP_TYPE_REGISTRATION + IMPORTS + QtQuick.Controls.Default/auto + GENERATE_QMLTYPES SOURCES - qquickmaterialbusyindicator.cpp qquickmaterialbusyindicator_p.h - qquickmaterialprogressbar.cpp qquickmaterialprogressbar_p.h - qquickmaterialripple.cpp qquickmaterialripple_p.h qquickmaterialstyle.cpp qquickmaterialstyle_p.h qquickmaterialtheme.cpp qquickmaterialtheme_p.h qtquickcontrols2materialstyleplugin.cpp @@ -26,6 +22,7 @@ add_qml_module(qtquickcontrols2materialstyleplugin Qt::CorePrivate Qt::GuiPrivate Qt::QmlPrivate + Qt::QuickControls2ImplPrivate Qt::QuickControls2Private Qt::QuickPrivate Qt::QuickTemplates2Private @@ -56,39 +53,36 @@ set(qtquickcontrols2materialstyleplugin_resource_files "shaders/RectangularGlow.frag" ) -add_qt_resource(qtquickcontrols2materialstyleplugin "qtquickcontrols2materialstyleplugin" +qt_add_resource(qtquickcontrols2materialstyleplugin "qtquickcontrols2materialstyleplugin" PREFIX - "/qt-project.org/imports/QtQuick/Controls.2/Material" + "/qt-project.org/imports/QtQuick/Controls/Material" FILES ${qtquickcontrols2materialstyleplugin_resource_files} ) #### Keys ignored in scope 1:.:.:material.pro:<TRUE>: -# IMPORT_NAME = "QtQuick.Controls.Material" -# IMPORT_VERSION = "2.$$QT_MINOR_VERSION" # OTHER_FILES = "qmldir" "$$QML_FILES" -# TARGETPATH = "QtQuick/Controls.2/Material" +# QML_IMPORT_NAME = "QtQuick.Controls.Material" +# QML_IMPORT_VERSION = "$$QT_VERSION" +# TARGETPATH = "QtQuick/Controls/Material" # _REQUIREMENTS = "qtConfig(quickcontrols2-material)" set(qml_files "ApplicationWindow.qml" - "BoxShadow.qml" "BusyIndicator.qml" "Button.qml" "CheckBox.qml" "CheckDelegate.qml" - "CheckIndicator.qml" "ComboBox.qml" - "CursorDelegate.qml" "DelayButton.qml" "Dial.qml" "Dialog.qml" "DialogButtonBox.qml" "Drawer.qml" - "ElevationEffect.qml" "Frame.qml" "GroupBox.qml" + "HorizontalHeaderView.qml" "ItemDelegate.qml" "Label.qml" "Menu.qml" @@ -103,14 +97,11 @@ set(qml_files "ProgressBar.qml" "RadioButton.qml" "RadioDelegate.qml" - "RadioIndicator.qml" "RangeSlider.qml" "RoundButton.qml" - "RectangularGlow.qml" "ScrollBar.qml" "ScrollIndicator.qml" "Slider.qml" - "SliderHandle.qml" "SpinBox.qml" "SplitView.qml" "StackView.qml" @@ -118,7 +109,6 @@ set(qml_files "SwipeView.qml" "Switch.qml" "SwitchDelegate.qml" - "SwitchIndicator.qml" "TabBar.qml" "TabButton.qml" "TextArea.qml" @@ -128,6 +118,157 @@ set(qml_files "ToolSeparator.qml" "ToolTip.qml" "Tumbler.qml" + "VerticalHeaderView.qml" +) +set_source_files_properties(ApplicationWindow.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(BusyIndicator.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(Button.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(CheckBox.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(CheckDelegate.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(ComboBox.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(DelayButton.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.2;6.0" +) +set_source_files_properties(Dial.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(Dialog.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.1;6.0" +) +set_source_files_properties(DialogButtonBox.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.1;6.0" +) +set_source_files_properties(Drawer.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(Frame.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(GroupBox.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(HorizontalHeaderView.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.15;6.0" +) +set_source_files_properties(ItemDelegate.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(Label.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(Menu.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(MenuBar.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.3;6.0" +) +set_source_files_properties(MenuBarItem.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.3;6.0" +) +set_source_files_properties(MenuItem.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(MenuSeparator.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.1;6.0" +) +set_source_files_properties(Page.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(PageIndicator.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(Pane.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(Popup.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(ProgressBar.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(RadioButton.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(RadioDelegate.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(RangeSlider.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(RoundButton.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.1;6.0" +) +set_source_files_properties(ScrollBar.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(ScrollIndicator.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(Slider.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(SpinBox.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(SplitView.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.13;6.0" +) +set_source_files_properties(StackView.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(SwipeDelegate.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(SwipeView.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(Switch.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(SwitchDelegate.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(TabBar.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(TabButton.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(TextArea.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(TextField.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(ToolBar.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(ToolButton.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(ToolSeparator.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.1;6.0" +) +set_source_files_properties(ToolTip.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(Tumbler.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0;6.0" +) +set_source_files_properties(VerticalHeaderView.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.15;6.0" ) qt6_target_qml_files(qtquickcontrols2materialstyleplugin diff --git a/src/imports/controls/material/ApplicationWindow.qml b/src/imports/controls/material/ApplicationWindow.qml index 5b8cefac..82a0da8b 100644 --- a/src/imports/controls/material/ApplicationWindow.qml +++ b/src/imports/controls/material/ApplicationWindow.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Window 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Window +import QtQuick.Templates as T +import QtQuick.Controls.Material T.ApplicationWindow { id: window diff --git a/src/imports/controls/material/BusyIndicator.qml b/src/imports/controls/material/BusyIndicator.qml index 8173248c..621b2b43 100644 --- a/src/imports/controls/material/BusyIndicator.qml +++ b/src/imports/controls/material/BusyIndicator.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.BusyIndicator { id: control diff --git a/src/imports/controls/material/Button.qml b/src/imports/controls/material/Button.qml index 04c6664c..9bda0128 100644 --- a/src/imports/controls/material/Button.qml +++ b/src/imports/controls/material/Button.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.Button { id: control diff --git a/src/imports/controls/material/CMakeLists.txt b/src/imports/controls/material/CMakeLists.txt index 1270bfc6..71030fe6 100644 --- a/src/imports/controls/material/CMakeLists.txt +++ b/src/imports/controls/material/CMakeLists.txt @@ -5,17 +5,14 @@ ##################################################################### qt_add_qml_module(qtquickcontrols2materialstyleplugin - TARGET_PATH "QtQuick/Controls.2/Material" + TARGET_PATH "QtQuick/Controls/Material" URI "QtQuick.Controls.Material" - VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}" + VERSION "6.0" # special case CLASSNAME QtQuickControls2MaterialStylePlugin - DEPENDENCIES - QtQuick.Controls/2.5 - SKIP_TYPE_REGISTRATION + IMPORTS + QtQuick.Controls.Default/auto + GENERATE_QMLTYPES SOURCES - qquickmaterialbusyindicator.cpp qquickmaterialbusyindicator_p.h - qquickmaterialprogressbar.cpp qquickmaterialprogressbar_p.h - qquickmaterialripple.cpp qquickmaterialripple_p.h qquickmaterialstyle.cpp qquickmaterialstyle_p.h qquickmaterialtheme.cpp qquickmaterialtheme_p.h qtquickcontrols2materialstyleplugin.cpp @@ -26,6 +23,7 @@ qt_add_qml_module(qtquickcontrols2materialstyleplugin Qt::CorePrivate Qt::GuiPrivate Qt::QmlPrivate + Qt::QuickControls2ImplPrivate Qt::QuickControls2Private Qt::QuickPrivate Qt::QuickTemplates2Private @@ -58,35 +56,31 @@ set(qtquickcontrols2materialstyleplugin_resource_files qt_add_resource(qtquickcontrols2materialstyleplugin "qtquickcontrols2materialstyleplugin" PREFIX - "/qt-project.org/imports/QtQuick/Controls.2/Material" + "/qt-project.org/imports/QtQuick/Controls/Material" FILES ${qtquickcontrols2materialstyleplugin_resource_files} ) #### Keys ignored in scope 1:.:.:material.pro:<TRUE>: -# IMPORT_NAME = "QtQuick.Controls.Material" -# IMPORT_VERSION = "2.$$QT_MINOR_VERSION" # OTHER_FILES = "qmldir" "$$QML_FILES" -# TARGETPATH = "QtQuick/Controls.2/Material" +# QML_IMPORT_NAME = "QtQuick.Controls.Material" +# QML_IMPORT_VERSION = "$$QT_VERSION" +# TARGETPATH = "QtQuick/Controls/Material" # _REQUIREMENTS = "qtConfig(quickcontrols2-material)" set(qml_files "ApplicationWindow.qml" - "BoxShadow.qml" "BusyIndicator.qml" "Button.qml" "CheckBox.qml" "CheckDelegate.qml" - "CheckIndicator.qml" "ComboBox.qml" - "CursorDelegate.qml" "DelayButton.qml" "Dial.qml" "Dialog.qml" "DialogButtonBox.qml" "Drawer.qml" - "ElevationEffect.qml" "Frame.qml" "GroupBox.qml" "HorizontalHeaderView.qml" @@ -104,14 +98,11 @@ set(qml_files "ProgressBar.qml" "RadioButton.qml" "RadioDelegate.qml" - "RadioIndicator.qml" "RangeSlider.qml" "RoundButton.qml" - "RectangularGlow.qml" "ScrollBar.qml" "ScrollIndicator.qml" "Slider.qml" - "SliderHandle.qml" "SpinBox.qml" "SplitView.qml" "StackView.qml" @@ -119,7 +110,6 @@ set(qml_files "SwipeView.qml" "Switch.qml" "SwitchDelegate.qml" - "SwitchIndicator.qml" "TabBar.qml" "TabButton.qml" "TextArea.qml" @@ -132,178 +122,154 @@ set(qml_files "VerticalHeaderView.qml" ) set_source_files_properties(ApplicationWindow.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE -) -set_source_files_properties(BoxShadow.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(BusyIndicator.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Button.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(CheckBox.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(CheckDelegate.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE -) -set_source_files_properties(CheckIndicator.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ComboBox.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE -) -set_source_files_properties(CursorDelegate.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(DelayButton.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.2;6.0" ) set_source_files_properties(Dial.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Dialog.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.1;6.0" ) set_source_files_properties(DialogButtonBox.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.1;6.0" ) set_source_files_properties(Drawer.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE -) -set_source_files_properties(ElevationEffect.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Frame.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(GroupBox.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(HorizontalHeaderView.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.15;6.0" ) set_source_files_properties(ItemDelegate.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Label.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Menu.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(MenuBar.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.3;6.0" ) set_source_files_properties(MenuBarItem.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.3;6.0" ) set_source_files_properties(MenuItem.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(MenuSeparator.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.1;6.0" ) set_source_files_properties(Page.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(PageIndicator.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Pane.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Popup.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ProgressBar.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(RadioButton.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(RadioDelegate.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE -) -set_source_files_properties(RadioIndicator.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(RangeSlider.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(RoundButton.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE -) -set_source_files_properties(RectangularGlow.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.1;6.0" ) set_source_files_properties(ScrollBar.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ScrollIndicator.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Slider.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE -) -set_source_files_properties(SliderHandle.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(SpinBox.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(SplitView.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.13;6.0" ) set_source_files_properties(StackView.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(SwipeDelegate.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(SwipeView.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Switch.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(SwitchDelegate.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE -) -set_source_files_properties(SwitchIndicator.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(TabBar.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(TabButton.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(TextArea.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(TextField.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ToolBar.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ToolButton.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ToolSeparator.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.1;6.0" ) set_source_files_properties(ToolTip.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Tumbler.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(VerticalHeaderView.qml PROPERTIES - QT_QML_SKIP_QMLDIR_ENTRY TRUE + QT_QML_SOURCE_VERSION "2.15;6.0" ) qt6_target_qml_files(qtquickcontrols2materialstyleplugin diff --git a/src/imports/controls/material/CheckBox.qml b/src/imports/controls/material/CheckBox.qml index 159e2f12..a3f717be 100644 --- a/src/imports/controls/material/CheckBox.qml +++ b/src/imports/controls/material/CheckBox.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.CheckBox { id: control diff --git a/src/imports/controls/material/CheckDelegate.qml b/src/imports/controls/material/CheckDelegate.qml index c7d7575e..e5ea5716 100644 --- a/src/imports/controls/material/CheckDelegate.qml +++ b/src/imports/controls/material/CheckDelegate.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.CheckDelegate { id: control diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml index a9bdd934..7abb8ddd 100644 --- a/src/imports/controls/material/ComboBox.qml +++ b/src/imports/controls/material/ComboBox.qml @@ -34,13 +34,13 @@ ** ****************************************************************************/ -import QtQuick 2.15 -import QtQuick.Window 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Controls.impl 2.15 -import QtQuick.Templates 2.15 as T -import QtQuick.Controls.Material 2.15 -import QtQuick.Controls.Material.impl 2.15 +import QtQuick +import QtQuick.Window +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.ComboBox { id: control @@ -74,7 +74,7 @@ T.ComboBox { x: control.mirrored ? control.padding : control.width - width - control.padding y: control.topPadding + (control.availableHeight - height) / 2 color: control.enabled ? control.Material.foreground : control.Material.hintTextColor - source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/images/drop-indicator.png" + source: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/images/drop-indicator.png" } contentItem: T.TextField { diff --git a/src/imports/controls/material/DelayButton.qml b/src/imports/controls/material/DelayButton.qml index 6b5ef3ad..68773b04 100644 --- a/src/imports/controls/material/DelayButton.qml +++ b/src/imports/controls/material/DelayButton.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.DelayButton { id: control diff --git a/src/imports/controls/material/Dial.qml b/src/imports/controls/material/Dial.qml index 1ad9a0ce..2731436f 100644 --- a/src/imports/controls/material/Dial.qml +++ b/src/imports/controls/material/Dial.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.Dial { id: control diff --git a/src/imports/controls/material/Dialog.qml b/src/imports/controls/material/Dialog.qml index 364c0e57..0a711eec 100644 --- a/src/imports/controls/material/Dialog.qml +++ b/src/imports/controls/material/Dialog.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.Dialog { id: control diff --git a/src/imports/controls/material/DialogButtonBox.qml b/src/imports/controls/material/DialogButtonBox.qml index c53b8210..fda957b1 100644 --- a/src/imports/controls/material/DialogButtonBox.qml +++ b/src/imports/controls/material/DialogButtonBox.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.DialogButtonBox { id: control diff --git a/src/imports/controls/material/Drawer.qml b/src/imports/controls/material/Drawer.qml index 3d64cdef..93c4bf56 100644 --- a/src/imports/controls/material/Drawer.qml +++ b/src/imports/controls/material/Drawer.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.Drawer { id: control diff --git a/src/imports/controls/material/Frame.qml b/src/imports/controls/material/Frame.qml index 0001825e..8626f766 100644 --- a/src/imports/controls/material/Frame.qml +++ b/src/imports/controls/material/Frame.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.Frame { id: control diff --git a/src/imports/controls/material/GroupBox.qml b/src/imports/controls/material/GroupBox.qml index e18a5949..4a27b832 100644 --- a/src/imports/controls/material/GroupBox.qml +++ b/src/imports/controls/material/GroupBox.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.GroupBox { id: control diff --git a/src/imports/controls/material/HorizontalHeaderView.qml b/src/imports/controls/material/HorizontalHeaderView.qml index fd672f34..f6c76c4a 100644 --- a/src/imports/controls/material/HorizontalHeaderView.qml +++ b/src/imports/controls/material/HorizontalHeaderView.qml @@ -34,11 +34,11 @@ ** ****************************************************************************/ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Templates 2.15 as T -import QtQuick.Controls.Material 2.15 -import QtQuick.Controls.Material.impl 2.15 +import QtQuick +import QtQuick.Controls +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.HorizontalHeaderView { id: control diff --git a/src/imports/controls/material/ItemDelegate.qml b/src/imports/controls/material/ItemDelegate.qml index 2078ce6c..f8cf41df 100644 --- a/src/imports/controls/material/ItemDelegate.qml +++ b/src/imports/controls/material/ItemDelegate.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.ItemDelegate { id: control diff --git a/src/imports/controls/material/Label.qml b/src/imports/controls/material/Label.qml index ad923a24..77e85f42 100644 --- a/src/imports/controls/material/Label.qml +++ b/src/imports/controls/material/Label.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material T.Label { id: control diff --git a/src/imports/controls/material/Menu.qml b/src/imports/controls/material/Menu.qml index 94bcc15e..8e362964 100644 --- a/src/imports/controls/material/Menu.qml +++ b/src/imports/controls/material/Menu.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 -import QtQuick.Window 2.12 +import QtQuick +import QtQuick.Controls +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl +import QtQuick.Window T.Menu { id: control diff --git a/src/imports/controls/material/MenuBar.qml b/src/imports/controls/material/MenuBar.qml index 66252d6e..621cfbd5 100644 --- a/src/imports/controls/material/MenuBar.qml +++ b/src/imports/controls/material/MenuBar.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.MenuBar { id: control diff --git a/src/imports/controls/material/MenuBarItem.qml b/src/imports/controls/material/MenuBarItem.qml index 588d6fbb..957ee867 100644 --- a/src/imports/controls/material/MenuBarItem.qml +++ b/src/imports/controls/material/MenuBarItem.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.MenuBarItem { id: control diff --git a/src/imports/controls/material/MenuItem.qml b/src/imports/controls/material/MenuItem.qml index a5d2f8a1..522efd4d 100644 --- a/src/imports/controls/material/MenuItem.qml +++ b/src/imports/controls/material/MenuItem.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.MenuItem { id: control @@ -73,7 +73,7 @@ T.MenuItem { visible: control.subMenu mirror: control.mirrored color: control.enabled ? control.Material.foreground : control.Material.hintTextColor - source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/images/arrow-indicator.png" + source: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/images/arrow-indicator.png" } contentItem: IconLabel { diff --git a/src/imports/controls/material/MenuSeparator.qml b/src/imports/controls/material/MenuSeparator.qml index 6d80c049..08a33ffe 100644 --- a/src/imports/controls/material/MenuSeparator.qml +++ b/src/imports/controls/material/MenuSeparator.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material T.MenuSeparator { id: control diff --git a/src/imports/controls/material/Page.qml b/src/imports/controls/material/Page.qml index 4da0ecc6..711fac2d 100644 --- a/src/imports/controls/material/Page.qml +++ b/src/imports/controls/material/Page.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material T.Page { id: control diff --git a/src/imports/controls/material/PageIndicator.qml b/src/imports/controls/material/PageIndicator.qml index 5e6ca245..8ccd7de3 100644 --- a/src/imports/controls/material/PageIndicator.qml +++ b/src/imports/controls/material/PageIndicator.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material T.PageIndicator { id: control diff --git a/src/imports/controls/material/Pane.qml b/src/imports/controls/material/Pane.qml index 988e225a..055a8d23 100644 --- a/src/imports/controls/material/Pane.qml +++ b/src/imports/controls/material/Pane.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.Pane { id: control diff --git a/src/imports/controls/material/Popup.qml b/src/imports/controls/material/Popup.qml index 1b576385..cb5b62ec 100644 --- a/src/imports/controls/material/Popup.qml +++ b/src/imports/controls/material/Popup.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.Popup { id: control diff --git a/src/imports/controls/material/ProgressBar.qml b/src/imports/controls/material/ProgressBar.qml index 2848f037..dd4fae0e 100644 --- a/src/imports/controls/material/ProgressBar.qml +++ b/src/imports/controls/material/ProgressBar.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.ProgressBar { id: control diff --git a/src/imports/controls/material/RadioButton.qml b/src/imports/controls/material/RadioButton.qml index dadcc84f..664cb19e 100644 --- a/src/imports/controls/material/RadioButton.qml +++ b/src/imports/controls/material/RadioButton.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.RadioButton { id: control diff --git a/src/imports/controls/material/RadioDelegate.qml b/src/imports/controls/material/RadioDelegate.qml index c977d332..f9737fa5 100644 --- a/src/imports/controls/material/RadioDelegate.qml +++ b/src/imports/controls/material/RadioDelegate.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.RadioDelegate { id: control diff --git a/src/imports/controls/material/RangeSlider.qml b/src/imports/controls/material/RangeSlider.qml index f05601a7..d1d22115 100644 --- a/src/imports/controls/material/RangeSlider.qml +++ b/src/imports/controls/material/RangeSlider.qml @@ -34,11 +34,11 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.RangeSlider { id: control diff --git a/src/imports/controls/material/RoundButton.qml b/src/imports/controls/material/RoundButton.qml index 13d0f9db..79f4a249 100644 --- a/src/imports/controls/material/RoundButton.qml +++ b/src/imports/controls/material/RoundButton.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.RoundButton { id: control diff --git a/src/imports/controls/material/ScrollBar.qml b/src/imports/controls/material/ScrollBar.qml index fda64346..55de0d13 100644 --- a/src/imports/controls/material/ScrollBar.qml +++ b/src/imports/controls/material/ScrollBar.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material T.ScrollBar { id: control diff --git a/src/imports/controls/material/ScrollIndicator.qml b/src/imports/controls/material/ScrollIndicator.qml index 19f23ad2..bc81c630 100644 --- a/src/imports/controls/material/ScrollIndicator.qml +++ b/src/imports/controls/material/ScrollIndicator.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material T.ScrollIndicator { id: control diff --git a/src/imports/controls/material/Slider.qml b/src/imports/controls/material/Slider.qml index ac7a0c42..2a366734 100644 --- a/src/imports/controls/material/Slider.qml +++ b/src/imports/controls/material/Slider.qml @@ -34,11 +34,11 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.Slider { id: control diff --git a/src/imports/controls/material/SpinBox.qml b/src/imports/controls/material/SpinBox.qml index 23c86bc3..4f69dd25 100644 --- a/src/imports/controls/material/SpinBox.qml +++ b/src/imports/controls/material/SpinBox.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.SpinBox { id: control diff --git a/src/imports/controls/material/SplitView.qml b/src/imports/controls/material/SplitView.qml index 5544e833..e6e3ed3b 100644 --- a/src/imports/controls/material/SplitView.qml +++ b/src/imports/controls/material/SplitView.qml @@ -34,11 +34,11 @@ ** ****************************************************************************/ -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 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material T.SplitView { id: control diff --git a/src/imports/controls/material/StackView.qml b/src/imports/controls/material/StackView.qml index dd5d6ce6..4c3e6749 100644 --- a/src/imports/controls/material/StackView.qml +++ b/src/imports/controls/material/StackView.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material T.StackView { id: control diff --git a/src/imports/controls/material/SwipeDelegate.qml b/src/imports/controls/material/SwipeDelegate.qml index d06799be..16ef8ea2 100644 --- a/src/imports/controls/material/SwipeDelegate.qml +++ b/src/imports/controls/material/SwipeDelegate.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.SwipeDelegate { id: control diff --git a/src/imports/controls/material/SwipeView.qml b/src/imports/controls/material/SwipeView.qml index a84f16c5..cd4da229 100644 --- a/src/imports/controls/material/SwipeView.qml +++ b/src/imports/controls/material/SwipeView.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material T.SwipeView { id: control diff --git a/src/imports/controls/material/Switch.qml b/src/imports/controls/material/Switch.qml index fd0db925..a43e8730 100644 --- a/src/imports/controls/material/Switch.qml +++ b/src/imports/controls/material/Switch.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 -import QtQuick.Templates 2.12 as T +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl +import QtQuick.Templates as T T.Switch { id: control diff --git a/src/imports/controls/material/SwitchDelegate.qml b/src/imports/controls/material/SwitchDelegate.qml index 834a3dfa..dd1c4e8d 100644 --- a/src/imports/controls/material/SwitchDelegate.qml +++ b/src/imports/controls/material/SwitchDelegate.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.SwitchDelegate { id: control diff --git a/src/imports/controls/material/TabBar.qml b/src/imports/controls/material/TabBar.qml index 98c9132a..9e9585f3 100644 --- a/src/imports/controls/material/TabBar.qml +++ b/src/imports/controls/material/TabBar.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.TabBar { id: control diff --git a/src/imports/controls/material/TabButton.qml b/src/imports/controls/material/TabButton.qml index 5245652c..eacc95b8 100644 --- a/src/imports/controls/material/TabButton.qml +++ b/src/imports/controls/material/TabButton.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.TabButton { id: control diff --git a/src/imports/controls/material/TextArea.qml b/src/imports/controls/material/TextArea.qml index 249b6401..b1529437 100644 --- a/src/imports/controls/material/TextArea.qml +++ b/src/imports/controls/material/TextArea.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.TextArea { id: control diff --git a/src/imports/controls/material/TextField.qml b/src/imports/controls/material/TextField.qml index ed42b295..2c123c91 100644 --- a/src/imports/controls/material/TextField.qml +++ b/src/imports/controls/material/TextField.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.TextField { id: control diff --git a/src/imports/controls/material/ToolBar.qml b/src/imports/controls/material/ToolBar.qml index 5b887598..a1aa82bd 100644 --- a/src/imports/controls/material/ToolBar.qml +++ b/src/imports/controls/material/ToolBar.qml @@ -34,10 +34,10 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.ToolBar { id: control diff --git a/src/imports/controls/material/ToolButton.qml b/src/imports/controls/material/ToolButton.qml index 69c42441..dc27157f 100644 --- a/src/imports/controls/material/ToolButton.qml +++ b/src/imports/controls/material/ToolButton.qml @@ -34,12 +34,12 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.ToolButton { id: control diff --git a/src/imports/controls/material/ToolSeparator.qml b/src/imports/controls/material/ToolSeparator.qml index 94367657..4bce553d 100644 --- a/src/imports/controls/material/ToolSeparator.qml +++ b/src/imports/controls/material/ToolSeparator.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material T.ToolSeparator { id: control diff --git a/src/imports/controls/material/ToolTip.qml b/src/imports/controls/material/ToolTip.qml index 83afe4b1..033e48a3 100644 --- a/src/imports/controls/material/ToolTip.qml +++ b/src/imports/controls/material/ToolTip.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Templates as T +import QtQuick.Controls.Material T.ToolTip { id: control diff --git a/src/imports/controls/material/Tumbler.qml b/src/imports/controls/material/Tumbler.qml index 973b4a68..81e35044 100644 --- a/src/imports/controls/material/Tumbler.qml +++ b/src/imports/controls/material/Tumbler.qml @@ -34,11 +34,11 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import QtQuick.Controls.impl 2.12 -import QtQuick.Templates 2.12 as T -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Controls +import QtQuick.Controls.impl +import QtQuick.Templates as T +import QtQuick.Controls.Material T.Tumbler { id: control diff --git a/src/imports/controls/material/VerticalHeaderView.qml b/src/imports/controls/material/VerticalHeaderView.qml index 5fc5aebe..1a38b30a 100644 --- a/src/imports/controls/material/VerticalHeaderView.qml +++ b/src/imports/controls/material/VerticalHeaderView.qml @@ -34,11 +34,11 @@ ** ****************************************************************************/ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Templates 2.15 as T -import QtQuick.Controls.Material 2.15 -import QtQuick.Controls.Material.impl 2.15 +import QtQuick +import QtQuick.Controls +import QtQuick.Templates as T +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl T.VerticalHeaderView { id: control diff --git a/src/imports/controls/material/BoxShadow.qml b/src/imports/controls/material/impl/BoxShadow.qml index 5a746c0f..ea09570e 100644 --- a/src/imports/controls/material/BoxShadow.qml +++ b/src/imports/controls/material/impl/BoxShadow.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl /* A implementation of CSS's box-shadow, used by ElevationEffect for a Material Design diff --git a/src/imports/controls/material/impl/CMakeLists.txt b/src/imports/controls/material/impl/CMakeLists.txt new file mode 100644 index 00000000..bcb4f998 --- /dev/null +++ b/src/imports/controls/material/impl/CMakeLists.txt @@ -0,0 +1,81 @@ +# Generated from material-impl.pro. + +##################################################################### +## qtquickcontrols2materialstyleimplplugin Plugin: +##################################################################### + +qt_add_qml_module(qtquickcontrols2materialstyleimplplugin + URI "QtQuick.Controls.Material.impl" + VERSION "${CMAKE_PROJECT_VERSION}" + CLASSNAME QtQuickControls2MaterialStyleImplPlugin + GENERATE_QMLTYPES + SOURCES + qquickmaterialbusyindicator.cpp qquickmaterialbusyindicator_p.h + qquickmaterialprogressbar.cpp qquickmaterialprogressbar_p.h + qquickmaterialripple.cpp qquickmaterialripple_p.h + qtquickcontrols2materialstyleimplplugin.cpp + DEFINES + QT_NO_CAST_FROM_ASCII + QT_NO_CAST_TO_ASCII + LIBRARIES + Qt::CorePrivate + Qt::Gui + Qt::QmlPrivate + Qt::QuickControls2ImplPrivate + Qt::QuickPrivate + Qt::QuickTemplates2Private + PUBLIC_LIBRARIES + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick +) + +#### Keys ignored in scope 1:.:.:material-impl.pro:<TRUE>: +# OTHER_FILES = "qmldir" "$$QML_FILES" +# QML_FILES = "$$PWD/BoxShadow.qml" "$$PWD/CheckIndicator.qml" "$$PWD/CursorDelegate.qml" "$$PWD/ElevationEffect.qml" "$$PWD/RadioIndicator.qml" "$$PWD/RectangularGlow.qml" "$$PWD/SliderHandle.qml" "$$PWD/SwitchIndicator.qml" +# QML_IMPORT_NAME = "QtQuick.Controls.Material.impl" +# QML_IMPORT_VERSION = "$$QT_VERSION" +# QT_FOR_CONFIG = "quickcontrols2-private" +# TARGETPATH = "QtQuick/Controls/Material/impl" +# _REQUIREMENTS = "qtConfig(quickcontrols2-material)" + +set(qml_files + "BoxShadow.qml" + "CheckIndicator.qml" + "CursorDelegate.qml" + "ElevationEffect.qml" + "RadioIndicator.qml" + "RectangularGlow.qml" + "SliderHandle.qml" + "SwitchIndicator.qml" +) +set_source_files_properties(BoxShadow.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0" +) +set_source_files_properties(CheckIndicator.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0" +) +set_source_files_properties(CursorDelegate.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0" +) +set_source_files_properties(ElevationEffect.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0" +) +set_source_files_properties(RadioIndicator.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0" +) +set_source_files_properties(RectangularGlow.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0" +) +set_source_files_properties(SliderHandle.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0" +) +set_source_files_properties(SwitchIndicator.qml PROPERTIES + QT_QML_SOURCE_VERSION "2.0" +) + +qt6_target_qml_files(qtquickcontrols2materialstyleimplplugin + FILES + ${qml_files} +) diff --git a/src/imports/controls/material/CheckIndicator.qml b/src/imports/controls/material/impl/CheckIndicator.qml index 7caf8553..b6593fab 100644 --- a/src/imports/controls/material/CheckIndicator.qml +++ b/src/imports/controls/material/impl/CheckIndicator.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl Rectangle { id: indicatorItem @@ -72,7 +72,7 @@ Rectangle { y: (parent.height - height) / 2 width: 14 height: 14 - source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/images/check.png" + source: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/images/check.png" fillMode: Image.PreserveAspectFit scale: indicatorItem.checkState === Qt.Checked ? 1 : 0 diff --git a/src/imports/controls/material/CursorDelegate.qml b/src/imports/controls/material/impl/CursorDelegate.qml index fe2d25c6..a913ab84 100644 --- a/src/imports/controls/material/CursorDelegate.qml +++ b/src/imports/controls/material/impl/CursorDelegate.qml @@ -34,8 +34,8 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Controls.Material 2.12 +import QtQuick +import QtQuick.Controls.Material Rectangle { id: cursor diff --git a/src/imports/controls/material/ElevationEffect.qml b/src/imports/controls/material/impl/ElevationEffect.qml index 73a2a238..8a4e98e3 100644 --- a/src/imports/controls/material/ElevationEffect.qml +++ b/src/imports/controls/material/impl/ElevationEffect.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl /* An effect for standard Material Design elevation shadows. Useful for using as \c layer.effect. diff --git a/src/imports/controls/material/RadioIndicator.qml b/src/imports/controls/material/impl/RadioIndicator.qml index e2c55184..68681c44 100644 --- a/src/imports/controls/material/RadioIndicator.qml +++ b/src/imports/controls/material/impl/RadioIndicator.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl Rectangle { id: indicator diff --git a/src/imports/controls/material/RectangularGlow.qml b/src/imports/controls/material/impl/RectangularGlow.qml index c01e536d..b2337afc 100644 --- a/src/imports/controls/material/RectangularGlow.qml +++ b/src/imports/controls/material/impl/RectangularGlow.qml @@ -34,7 +34,7 @@ ** ****************************************************************************/ -import QtQuick 2.12 +import QtQuick /* A cross-graphics API implementation of QtGraphicalEffects' RectangularGlow. @@ -235,6 +235,6 @@ Item { property real spread: rootItem.spread / 2.0 property real cornerRadius: clampedCornerRadius() - fragmentShader: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/shaders/RectangularGlow.frag" + fragmentShader: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/shaders/RectangularGlow.frag" } } diff --git a/src/imports/controls/material/SliderHandle.qml b/src/imports/controls/material/impl/SliderHandle.qml index c9078bc8..60fd7aed 100644 --- a/src/imports/controls/material/SliderHandle.qml +++ b/src/imports/controls/material/impl/SliderHandle.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl Item { id: root diff --git a/src/imports/controls/material/SwitchIndicator.qml b/src/imports/controls/material/impl/SwitchIndicator.qml index 3034e771..ae1709b6 100644 --- a/src/imports/controls/material/SwitchIndicator.qml +++ b/src/imports/controls/material/impl/SwitchIndicator.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.12 -import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Material.impl 2.12 +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Controls.Material.impl Item { id: indicator diff --git a/src/imports/controls/material/impl/material-impl.pro b/src/imports/controls/material/impl/material-impl.pro new file mode 100644 index 00000000..b35ab58a --- /dev/null +++ b/src/imports/controls/material/impl/material-impl.pro @@ -0,0 +1,41 @@ +TARGET = qtquickcontrols2materialstyleimplplugin +TARGETPATH = QtQuick/Controls/Material/impl + +QML_IMPORT_NAME = QtQuick.Controls.Material.impl +QML_IMPORT_VERSION = $$QT_VERSION + +QT += qml quick +QT_PRIVATE += core-private gui qml-private quick-private quicktemplates2-private quickcontrols2impl-private +QT_FOR_CONFIG = quickcontrols2-private + +DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII + +QML_FILES += \ + $$PWD/BoxShadow.qml \ + $$PWD/CheckIndicator.qml \ + $$PWD/CursorDelegate.qml \ + $$PWD/ElevationEffect.qml \ + $$PWD/RadioIndicator.qml \ + $$PWD/RectangularGlow.qml \ + $$PWD/SliderHandle.qml \ + $$PWD/SwitchIndicator.qml + +OTHER_FILES += \ + qmldir \ + $$QML_FILES + +HEADERS += \ + qquickmaterialbusyindicator_p.h \ + qquickmaterialprogressbar_p.h \ + qquickmaterialripple_p.h + +SOURCES += \ + $$PWD/qquickmaterialbusyindicator.cpp \ + $$PWD/qquickmaterialprogressbar.cpp \ + $$PWD/qquickmaterialripple.cpp \ + $$PWD/qtquickcontrols2materialstyleimplplugin.cpp + +CONFIG += qmltypes install_qmltypes no_cxx_module install_qml_files builtin_resources qtquickcompiler +load(qml_plugin) + +requires(qtConfig(quickcontrols2-material)) diff --git a/src/imports/controls/material/impl/qmldir b/src/imports/controls/material/impl/qmldir new file mode 100644 index 00000000..09c6f01a --- /dev/null +++ b/src/imports/controls/material/impl/qmldir @@ -0,0 +1,12 @@ +module QtQuick.Controls.Material.impl +plugin qtquickcontrols2materialstyleimplplugin +classname QtQuickControls2MaterialStyleImplPlugin + +BoxShadow 2.0 BoxShadow.qml +CheckIndicator 2.0 CheckIndicator.qml +CursorDelegate 2.0 CursorDelegate.qml +ElevationEffect 2.0 ElevationEffect.qml +RadioIndicator 2.0 RadioIndicator.qml +RectangularGlow 2.0 RectangularGlow.qml +SliderHandle 2.0 SliderHandle.qml +SwitchIndicator 2.0 SwitchIndicator.qml diff --git a/src/imports/controls/material/qquickmaterialbusyindicator.cpp b/src/imports/controls/material/impl/qquickmaterialbusyindicator.cpp index 58c1fd8c..10bcc035 100644 --- a/src/imports/controls/material/qquickmaterialbusyindicator.cpp +++ b/src/imports/controls/material/impl/qquickmaterialbusyindicator.cpp @@ -41,7 +41,7 @@ #include <QtGui/qpainter.h> #include <QtQuick/qsgimagenode.h> #include <QtQuick/qquickwindow.h> -#include <QtQuickControls2/private/qquickanimatednode_p.h> +#include <QtQuickControls2Impl/private/qquickanimatednode_p.h> QT_BEGIN_NAMESPACE diff --git a/src/imports/controls/material/qquickmaterialbusyindicator_p.h b/src/imports/controls/material/impl/qquickmaterialbusyindicator_p.h index ad7bc002..72aeaf66 100644 --- a/src/imports/controls/material/qquickmaterialbusyindicator_p.h +++ b/src/imports/controls/material/impl/qquickmaterialbusyindicator_p.h @@ -58,6 +58,8 @@ class QQuickMaterialBusyIndicator : public QQuickItem Q_OBJECT Q_PROPERTY(QColor color READ color WRITE setColor FINAL) Q_PROPERTY(bool running READ isRunning WRITE setRunning FINAL) + QML_NAMED_ELEMENT(BusyIndicatorImpl) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickMaterialBusyIndicator(QQuickItem *parent = nullptr); diff --git a/src/imports/controls/material/qquickmaterialprogressbar.cpp b/src/imports/controls/material/impl/qquickmaterialprogressbar.cpp index 4635c57b..8b3dde23 100644 --- a/src/imports/controls/material/qquickmaterialprogressbar.cpp +++ b/src/imports/controls/material/impl/qquickmaterialprogressbar.cpp @@ -43,7 +43,7 @@ #include <QtQuick/qsgrectanglenode.h> #include <QtQuick/qsgimagenode.h> #include <QtQuick/qquickwindow.h> -#include <QtQuickControls2/private/qquickanimatednode_p.h> +#include <QtQuickControls2Impl/private/qquickanimatednode_p.h> QT_BEGIN_NAMESPACE diff --git a/src/imports/controls/material/qquickmaterialprogressbar_p.h b/src/imports/controls/material/impl/qquickmaterialprogressbar_p.h index 680f36a4..bf93812d 100644 --- a/src/imports/controls/material/qquickmaterialprogressbar_p.h +++ b/src/imports/controls/material/impl/qquickmaterialprogressbar_p.h @@ -59,6 +59,8 @@ class QQuickMaterialProgressBar : public QQuickItem Q_PROPERTY(QColor color READ color WRITE setColor FINAL) Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL) Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate FINAL) + QML_NAMED_ELEMENT(ProgressBarImpl) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickMaterialProgressBar(QQuickItem *parent = nullptr); diff --git a/src/imports/controls/material/qquickmaterialripple.cpp b/src/imports/controls/material/impl/qquickmaterialripple.cpp index e6287ff9..a39a115b 100644 --- a/src/imports/controls/material/qquickmaterialripple.cpp +++ b/src/imports/controls/material/impl/qquickmaterialripple.cpp @@ -39,7 +39,7 @@ #include <QtCore/qmath.h> #include <QtQuick/private/qquickitem_p.h> #include <QtQuick/private/qsgadaptationlayer_p.h> -#include <QtQuickControls2/private/qquickanimatednode_p.h> +#include <QtQuickControls2Impl/private/qquickanimatednode_p.h> #include <QtQuickTemplates2/private/qquickabstractbutton_p.h> #include <QtQuickTemplates2/private/qquickabstractbutton_p_p.h> diff --git a/src/imports/controls/material/qquickmaterialripple_p.h b/src/imports/controls/material/impl/qquickmaterialripple_p.h index 8a80113b..51728389 100644 --- a/src/imports/controls/material/qquickmaterialripple_p.h +++ b/src/imports/controls/material/impl/qquickmaterialripple_p.h @@ -62,6 +62,8 @@ class QQuickMaterialRipple : public QQuickItem Q_PROPERTY(bool active READ isActive WRITE setActive FINAL) Q_PROPERTY(QQuickItem *anchor READ anchor WRITE setAnchor FINAL) Q_PROPERTY(Trigger trigger READ trigger WRITE setTrigger FINAL) + QML_NAMED_ELEMENT(Ripple) + QML_ADDED_IN_VERSION(2, 0) public: QQuickMaterialRipple(QQuickItem *parent = nullptr); diff --git a/src/imports/controls/material/impl/qtquickcontrols2materialstyleimplplugin.cpp b/src/imports/controls/material/impl/qtquickcontrols2materialstyleimplplugin.cpp new file mode 100644 index 00000000..258ea2b6 --- /dev/null +++ b/src/imports/controls/material/impl/qtquickcontrols2materialstyleimplplugin.cpp @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2020 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$ +** +****************************************************************************/ + +#include <QtQml/qqmlextensionplugin.h> + +QT_BEGIN_NAMESPACE + +class QtQuickControls2MaterialStyleImplPlugin : public QQmlEngineExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) + +public: + QtQuickControls2MaterialStyleImplPlugin(QObject *parent = nullptr); +}; + +QtQuickControls2MaterialStyleImplPlugin::QtQuickControls2MaterialStyleImplPlugin(QObject *parent) + : QQmlEngineExtensionPlugin(parent) +{ +} + +QT_END_NAMESPACE + +#include "qtquickcontrols2materialstyleimplplugin.moc" diff --git a/src/imports/controls/material/material.pri b/src/imports/controls/material/material.pri index 457a8df1..8cffdabb 100644 --- a/src/imports/controls/material/material.pri +++ b/src/imports/controls/material/material.pri @@ -1,33 +1,23 @@ HEADERS += \ - $$PWD/qquickmaterialbusyindicator_p.h \ - $$PWD/qquickmaterialprogressbar_p.h \ - $$PWD/qquickmaterialripple_p.h \ $$PWD/qquickmaterialstyle_p.h \ $$PWD/qquickmaterialtheme_p.h SOURCES += \ - $$PWD/qquickmaterialbusyindicator.cpp \ - $$PWD/qquickmaterialprogressbar.cpp \ - $$PWD/qquickmaterialripple.cpp \ $$PWD/qquickmaterialstyle.cpp \ $$PWD/qquickmaterialtheme.cpp QML_FILES += \ $$PWD/ApplicationWindow.qml \ - $$PWD/BoxShadow.qml \ $$PWD/BusyIndicator.qml \ $$PWD/Button.qml \ $$PWD/CheckBox.qml \ $$PWD/CheckDelegate.qml \ - $$PWD/CheckIndicator.qml \ $$PWD/ComboBox.qml \ - $$PWD/CursorDelegate.qml \ $$PWD/DelayButton.qml \ $$PWD/Dial.qml \ $$PWD/Dialog.qml \ $$PWD/DialogButtonBox.qml \ $$PWD/Drawer.qml \ - $$PWD/ElevationEffect.qml \ $$PWD/Frame.qml \ $$PWD/GroupBox.qml \ $$PWD/HorizontalHeaderView.qml \ @@ -45,14 +35,11 @@ QML_FILES += \ $$PWD/ProgressBar.qml \ $$PWD/RadioButton.qml \ $$PWD/RadioDelegate.qml \ - $$PWD/RadioIndicator.qml \ $$PWD/RangeSlider.qml \ $$PWD/RoundButton.qml \ - $$PWD/RectangularGlow.qml \ $$PWD/ScrollBar.qml \ $$PWD/ScrollIndicator.qml \ $$PWD/Slider.qml \ - $$PWD/SliderHandle.qml \ $$PWD/SpinBox.qml \ $$PWD/SplitView.qml \ $$PWD/StackView.qml \ @@ -60,7 +47,6 @@ QML_FILES += \ $$PWD/SwipeView.qml \ $$PWD/Switch.qml \ $$PWD/SwitchDelegate.qml \ - $$PWD/SwitchIndicator.qml \ $$PWD/TabBar.qml \ $$PWD/TabButton.qml \ $$PWD/TextArea.qml \ diff --git a/src/imports/controls/material/material.pro b/src/imports/controls/material/material.pro index cf08b925..e8d9db52 100644 --- a/src/imports/controls/material/material.pro +++ b/src/imports/controls/material/material.pro @@ -1,11 +1,11 @@ TARGET = qtquickcontrols2materialstyleplugin -TARGETPATH = QtQuick/Controls.2/Material +TARGETPATH = QtQuick/Controls/Material -IMPORT_NAME = QtQuick.Controls.Material -IMPORT_VERSION = 2.$$QT_MINOR_VERSION +QML_IMPORT_NAME = QtQuick.Controls.Material +QML_IMPORT_VERSION = $$QT_VERSION QT += qml quick -QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private +QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private quickcontrols2impl-private DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII @@ -21,7 +21,7 @@ SOURCES += \ RESOURCES += \ $$PWD/qtquickcontrols2materialstyleplugin.qrc -CONFIG += no_cxx_module install_qml_files builtin_resources qtquickcompiler +CONFIG += qmltypes no_cxx_module install_qml_files builtin_resources qtquickcompiler load(qml_plugin) requires(qtConfig(quickcontrols2-material)) diff --git a/src/imports/controls/material/plugins.qmltypes b/src/imports/controls/material/plugins.qmltypes deleted file mode 100644 index e290e0ea..00000000 --- a/src/imports/controls/material/plugins.qmltypes +++ /dev/null @@ -1,459 +0,0 @@ -import QtQuick.tooling 1.2 - -// This file describes the plugin-supplied types contained in the library. -// It is used for QML tooling purposes only. -// -// This file was auto-generated by: -// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls.Material 2.15' - -Module { - dependencies: ["QtQuick.Controls 2.0"] - Component { name: "QQuickAttachedObject"; prototype: "QObject" } - Component { - name: "QQuickItem" - defaultProperty: "data" - prototype: "QObject" - Enum { - name: "Flags" - values: { - "ItemClipsChildrenToShape": 1, - "ItemAcceptsInputMethod": 2, - "ItemIsFocusScope": 4, - "ItemHasContents": 8, - "ItemAcceptsDrops": 16 - } - } - Enum { - name: "TransformOrigin" - values: { - "TopLeft": 0, - "Top": 1, - "TopRight": 2, - "Left": 3, - "Center": 4, - "Right": 5, - "BottomLeft": 6, - "Bottom": 7, - "BottomRight": 8 - } - } - Property { name: "parent"; type: "QQuickItem"; isPointer: true } - Property { name: "data"; type: "QObject"; isList: true; isReadonly: true } - Property { name: "resources"; type: "QObject"; isList: true; isReadonly: true } - Property { name: "children"; type: "QQuickItem"; isList: true; isReadonly: true } - Property { name: "x"; type: "double" } - Property { name: "y"; type: "double" } - Property { name: "z"; type: "double" } - Property { name: "width"; type: "double" } - Property { name: "height"; type: "double" } - Property { name: "opacity"; type: "double" } - Property { name: "enabled"; type: "bool" } - Property { name: "visible"; type: "bool" } - Property { name: "visibleChildren"; type: "QQuickItem"; isList: true; isReadonly: true } - Property { name: "states"; type: "QQuickState"; isList: true; isReadonly: true } - Property { name: "transitions"; type: "QQuickTransition"; isList: true; isReadonly: true } - Property { name: "state"; type: "string" } - Property { name: "childrenRect"; type: "QRectF"; isReadonly: true } - Property { name: "anchors"; type: "QQuickAnchors"; isReadonly: true; isPointer: true } - Property { name: "left"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "right"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "horizontalCenter"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "top"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "bottom"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "verticalCenter"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "baseline"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "baselineOffset"; type: "double" } - Property { name: "clip"; type: "bool" } - Property { name: "focus"; type: "bool" } - Property { name: "activeFocus"; type: "bool"; isReadonly: true } - Property { name: "activeFocusOnTab"; revision: 1; type: "bool" } - Property { name: "rotation"; type: "double" } - Property { name: "scale"; type: "double" } - Property { name: "transformOrigin"; type: "TransformOrigin" } - Property { name: "transformOriginPoint"; type: "QPointF"; isReadonly: true } - Property { name: "transform"; type: "QQuickTransform"; isList: true; isReadonly: true } - Property { name: "smooth"; type: "bool" } - Property { name: "antialiasing"; type: "bool" } - Property { name: "implicitWidth"; type: "double" } - Property { name: "implicitHeight"; type: "double" } - Property { name: "containmentMask"; revision: 11; type: "QObject"; isPointer: true } - Property { name: "layer"; type: "QQuickItemLayer"; isReadonly: true; isPointer: true } - Signal { - name: "childrenRectChanged" - Parameter { type: "QRectF" } - } - Signal { - name: "baselineOffsetChanged" - Parameter { type: "double" } - } - Signal { - name: "stateChanged" - Parameter { type: "string" } - } - Signal { - name: "focusChanged" - Parameter { type: "bool" } - } - Signal { - name: "activeFocusChanged" - Parameter { type: "bool" } - } - Signal { - name: "activeFocusOnTabChanged" - revision: 1 - Parameter { type: "bool" } - } - Signal { - name: "parentChanged" - Parameter { type: "QQuickItem"; isPointer: true } - } - Signal { - name: "transformOriginChanged" - Parameter { type: "TransformOrigin" } - } - Signal { - name: "smoothChanged" - Parameter { type: "bool" } - } - Signal { - name: "antialiasingChanged" - Parameter { type: "bool" } - } - Signal { - name: "clipChanged" - Parameter { type: "bool" } - } - Signal { - name: "windowChanged" - revision: 1 - Parameter { name: "window"; type: "QQuickWindow"; isPointer: true } - } - Signal { name: "containmentMaskChanged"; revision: 11 } - Method { name: "update" } - Method { - name: "grabToImage" - revision: 4 - type: "bool" - Parameter { name: "callback"; type: "QJSValue" } - Parameter { name: "targetSize"; type: "QSize" } - } - Method { - name: "grabToImage" - revision: 4 - type: "bool" - Parameter { name: "callback"; type: "QJSValue" } - } - Method { - name: "contains" - type: "bool" - Parameter { name: "point"; type: "QPointF" } - } - Method { - name: "mapFromItem" - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "mapToItem" - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "mapFromGlobal" - revision: 7 - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "mapToGlobal" - revision: 7 - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { name: "forceActiveFocus" } - Method { - name: "forceActiveFocus" - Parameter { name: "reason"; type: "Qt::FocusReason" } - } - Method { - name: "nextItemInFocusChain" - revision: 1 - type: "QQuickItem*" - Parameter { name: "forward"; type: "bool" } - } - Method { name: "nextItemInFocusChain"; revision: 1; type: "QQuickItem*" } - Method { - name: "childAt" - type: "QQuickItem*" - Parameter { name: "x"; type: "double" } - Parameter { name: "y"; type: "double" } - } - } - 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"] - isCreatable: false - exportMetaObjectRevisions: [0] - Enum { - name: "Theme" - values: { - "Light": 0, - "Dark": 1, - "System": 2 - } - } - Enum { - name: "Variant" - values: { - "Normal": 0, - "Dense": 1 - } - } - Enum { - name: "Color" - values: { - "Red": 0, - "Pink": 1, - "Purple": 2, - "DeepPurple": 3, - "Indigo": 4, - "Blue": 5, - "LightBlue": 6, - "Cyan": 7, - "Teal": 8, - "Green": 9, - "LightGreen": 10, - "Lime": 11, - "Yellow": 12, - "Amber": 13, - "Orange": 14, - "DeepOrange": 15, - "Brown": 16, - "Grey": 17, - "BlueGrey": 18 - } - } - Enum { - name: "Shade" - values: { - "Shade50": 0, - "Shade100": 1, - "Shade200": 2, - "Shade300": 3, - "Shade400": 4, - "Shade500": 5, - "Shade600": 6, - "Shade700": 7, - "Shade800": 8, - "Shade900": 9, - "ShadeA100": 10, - "ShadeA200": 11, - "ShadeA400": 12, - "ShadeA700": 13 - } - } - Property { name: "theme"; type: "Theme" } - Property { name: "primary"; type: "QVariant" } - Property { name: "accent"; type: "QVariant" } - 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: "sliderDisabledColor"; revision: 15; 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" - type: "QColor" - Parameter { name: "color"; type: "Color" } - Parameter { name: "shade"; type: "Shade" } - } - Method { - name: "color" - type: "QColor" - Parameter { name: "color"; type: "Color" } - } - Method { - name: "shade" - type: "QColor" - Parameter { name: "color"; type: "QColor" } - 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 } - } -} diff --git a/src/imports/controls/material/qmldir b/src/imports/controls/material/qmldir index 870a0382..ae8a26fb 100644 --- a/src/imports/controls/material/qmldir +++ b/src/imports/controls/material/qmldir @@ -1,4 +1,118 @@ module QtQuick.Controls.Material plugin qtquickcontrols2materialstyleplugin classname QtQuickControls2MaterialStylePlugin -depends QtQuick.Controls 2.5 +import QtQuick.Controls.Default auto + +# QtQuick.Controls 2.0 (originally introduced in Qt 5.7) +ApplicationWindow 2.0 ApplicationWindow.qml +BusyIndicator 2.0 BusyIndicator.qml +Button 2.0 Button.qml +CheckBox 2.0 CheckBox.qml +CheckDelegate 2.0 CheckDelegate.qml +ComboBox 2.0 ComboBox.qml +Dial 2.0 Dial.qml +Drawer 2.0 Drawer.qml +Frame 2.0 Frame.qml +GroupBox 2.0 GroupBox.qml +ItemDelegate 2.0 ItemDelegate.qml +Label 2.0 Label.qml +Menu 2.0 Menu.qml +MenuItem 2.0 MenuItem.qml +Page 2.0 Page.qml +PageIndicator 2.0 PageIndicator.qml +Pane 2.0 Pane.qml +Popup 2.0 Popup.qml +ProgressBar 2.0 ProgressBar.qml +RadioButton 2.0 RadioButton.qml +RadioDelegate 2.0 RadioDelegate.qml +RangeSlider 2.0 RangeSlider.qml +ScrollBar 2.0 ScrollBar.qml +ScrollIndicator 2.0 ScrollIndicator.qml +Slider 2.0 Slider.qml +SpinBox 2.0 SpinBox.qml +StackView 2.0 StackView.qml +SwipeDelegate 2.0 SwipeDelegate.qml +SwipeView 2.0 SwipeView.qml +Switch 2.0 Switch.qml +SwitchDelegate 2.0 SwitchDelegate.qml +TabBar 2.0 TabBar.qml +TabButton 2.0 TabButton.qml +TextArea 2.0 TextArea.qml +TextField 2.0 TextField.qml +ToolBar 2.0 ToolBar.qml +ToolButton 2.0 ToolButton.qml +ToolTip 2.0 ToolTip.qml +Tumbler 2.0 Tumbler.qml + +# QtQuick.Controls 2.1 (new types in Qt 5.8) +Dialog 2.1 Dialog.qml +DialogButtonBox 2.1 DialogButtonBox.qml +MenuSeparator 2.1 MenuSeparator.qml +RoundButton 2.1 RoundButton.qml +ToolSeparator 2.1 ToolSeparator.qml + +# QtQuick.Controls 2.2 (new types in Qt 5.9) +DelayButton 2.2 DelayButton.qml + +# QtQuick.Controls 2.3 (new types in Qt 5.10) +MenuBar 2.3 MenuBar.qml +MenuBarItem 2.3 MenuBarItem.qml + +# QtQuick.Controls 2.13 (new types in Qt 5.13) +SplitView 2.13 SplitView.qml + +# QtQuick.Controls 2.15 (new types in Qt 5.15) +HorizontalHeaderView 2.15 HorizontalHeaderView.qml +VerticalHeaderView 2.15 VerticalHeaderView.qml + +# Make sure we have types registered for Qt 6: QTBUG-85774, QTBUG-85685 +ApplicationWindow 6.0 ApplicationWindow.qml +BusyIndicator 6.0 BusyIndicator.qml +Button 6.0 Button.qml +CheckBox 6.0 CheckBox.qml +CheckDelegate 6.0 CheckDelegate.qml +ComboBox 6.0 ComboBox.qml +DelayButton 6.0 DelayButton.qml +Dial 6.0 Dial.qml +Dialog 6.0 Dialog.qml +DialogButtonBox 6.0 DialogButtonBox.qml +Drawer 6.0 Drawer.qml +Frame 6.0 Frame.qml +GroupBox 6.0 GroupBox.qml +HorizontalHeaderView 6.0 HorizontalHeaderView.qml +ItemDelegate 6.0 ItemDelegate.qml +Label 6.0 Label.qml +Menu 6.0 Menu.qml +MenuBar 6.0 MenuBar.qml +MenuBarItem 6.0 MenuBarItem.qml +MenuItem 6.0 MenuItem.qml +MenuSeparator 6.0 MenuSeparator.qml +Page 6.0 Page.qml +PageIndicator 6.0 PageIndicator.qml +Pane 6.0 Pane.qml +Popup 6.0 Popup.qml +ProgressBar 6.0 ProgressBar.qml +RadioButton 6.0 RadioButton.qml +RadioDelegate 6.0 RadioDelegate.qml +RangeSlider 6.0 RangeSlider.qml +RoundButton 6.0 RoundButton.qml +ScrollBar 6.0 ScrollBar.qml +ScrollIndicator 6.0 ScrollIndicator.qml +Slider 6.0 Slider.qml +SpinBox 6.0 SpinBox.qml +SplitView 6.0 SplitView.qml +StackView 6.0 StackView.qml +SwipeDelegate 6.0 SwipeDelegate.qml +SwipeView 6.0 SwipeView.qml +Switch 6.0 Switch.qml +SwitchDelegate 6.0 SwitchDelegate.qml +TabBar 6.0 TabBar.qml +TabButton 6.0 TabButton.qml +TextArea 6.0 TextArea.qml +TextField 6.0 TextField.qml +ToolBar 6.0 ToolBar.qml +ToolButton 6.0 ToolButton.qml +ToolSeparator 6.0 ToolSeparator.qml +ToolTip 6.0 ToolTip.qml +Tumbler 6.0 Tumbler.qml +VerticalHeaderView 6.0 VerticalHeaderView.qml diff --git a/src/imports/controls/material/qquickmaterialstyle_p.h b/src/imports/controls/material/qquickmaterialstyle_p.h index fa980efc..557a4434 100644 --- a/src/imports/controls/material/qquickmaterialstyle_p.h +++ b/src/imports/controls/material/qquickmaterialstyle_p.h @@ -49,7 +49,7 @@ // #include <QtGui/qcolor.h> -#include <QtQuickControls2/private/qquickattachedobject_p.h> +#include <QtQuickControls2Impl/private/qquickattachedobject_p.h> QT_BEGIN_NAMESPACE @@ -109,6 +109,11 @@ class QQuickMaterialStyle : public QQuickAttachedObject Q_PROPERTY(int switchDelegateVerticalPadding READ switchDelegateVerticalPadding CONSTANT FINAL) Q_PROPERTY(int tooltipHeight READ tooltipHeight CONSTANT FINAL) + QML_NAMED_ELEMENT(Material) + QML_ATTACHED(QQuickMaterialStyle) + QML_UNCREATABLE("") + QML_ADDED_IN_VERSION(2, 0) + public: enum Theme { Light, diff --git a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp index d8cc04dd..6066d3f5 100644 --- a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp +++ b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp @@ -34,16 +34,12 @@ ** ****************************************************************************/ -#include <QtQuickControls2/private/qquickstyleplugin_p.h> - #include "qquickmaterialstyle_p.h" #include "qquickmaterialtheme_p.h" -#include "qquickmaterialbusyindicator_p.h" -#include "qquickmaterialprogressbar_p.h" -#include "qquickmaterialripple_p.h" -#include <QtQuickControls2/private/qquickstyleselector_p.h> -#include <QtQuickControls2/private/qquickpaddedrectangle_p.h> +#include <QtQuickControls2/private/qquickstyleplugin_p.h> +#include <QtQuickControls2Impl/private/qquickpaddedrectangle_p.h> +#include <QtQuickTemplates2/private/qquicktheme_p.h> QT_BEGIN_NAMESPACE @@ -55,36 +51,15 @@ class QtQuickControls2MaterialStylePlugin : public QQuickStylePlugin public: QtQuickControls2MaterialStylePlugin(QObject *parent = nullptr); + QString name() const override; + void registerTypes(const char *uri) override; - QString name() const override; - void initializeTheme(QQuickTheme *theme) override; + QQuickMaterialTheme theme; }; QtQuickControls2MaterialStylePlugin::QtQuickControls2MaterialStylePlugin(QObject *parent) : QQuickStylePlugin(parent) { - QQuickMaterialStyle::initGlobals(); -} - -void QtQuickControls2MaterialStylePlugin::registerTypes(const char *uri) -{ - qmlRegisterModule(uri, 2, 15); // Qt 5.12->2.12, 5.13->2.13... - qmlRegisterUncreatableType<QQuickMaterialStyle>(uri, 2, 0, "Material", tr("Material is an attached property")); - - QByteArray import = QByteArray(uri) + ".impl"; - qmlRegisterModule(import, 2, 15); // Qt 5.12->2.12, 5.13->2.13... - - qmlRegisterType<QQuickMaterialBusyIndicator>(import, 2, 0, "BusyIndicatorImpl"); - qmlRegisterType<QQuickMaterialProgressBar>(import, 2, 0, "ProgressBarImpl"); - qmlRegisterType<QQuickMaterialRipple>(import, 2, 0, "Ripple"); - qmlRegisterType(resolvedUrl(QStringLiteral("BoxShadow.qml")), import, 2, 0, "BoxShadow"); - qmlRegisterType(resolvedUrl(QStringLiteral("CheckIndicator.qml")), import, 2, 0, "CheckIndicator"); - qmlRegisterType(resolvedUrl(QStringLiteral("CursorDelegate.qml")), import, 2, 0, "CursorDelegate"); - qmlRegisterType(resolvedUrl(QStringLiteral("ElevationEffect.qml")), import, 2, 0, "ElevationEffect"); - qmlRegisterType(resolvedUrl(QStringLiteral("RadioIndicator.qml")), import, 2, 0, "RadioIndicator"); - qmlRegisterType(resolvedUrl(QStringLiteral("RectangularGlow.qml")), import, 2, 0, "RectangularGlow"); - qmlRegisterType(resolvedUrl(QStringLiteral("SliderHandle.qml")), import, 2, 0, "SliderHandle"); - qmlRegisterType(resolvedUrl(QStringLiteral("SwitchIndicator.qml")), import, 2, 0, "SwitchIndicator"); } QString QtQuickControls2MaterialStylePlugin::name() const @@ -92,9 +67,12 @@ QString QtQuickControls2MaterialStylePlugin::name() const return QStringLiteral("Material"); } -void QtQuickControls2MaterialStylePlugin::initializeTheme(QQuickTheme *theme) +void QtQuickControls2MaterialStylePlugin::registerTypes(const char *uri) { - QQuickMaterialTheme::initialize(theme); + QQuickStylePlugin::registerTypes(uri); + + QQuickMaterialStyle::initGlobals(); + theme.initialize(QQuickTheme::instance()); } QT_END_NAMESPACE diff --git a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc index 71f9563b..981960c4 100644 --- a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc +++ b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc @@ -1,5 +1,5 @@ <RCC> - <qresource prefix="/qt-project.org/imports/QtQuick/Controls.2/Material"> + <qresource prefix="/qt-project.org/imports/QtQuick/Controls/Material"> <file>images/arrow-indicator.png</file> <file>images/arrow-indicator@2x.png</file> <file>images/arrow-indicator@3x.png</file> |