aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/compatibility/Extras/designer
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2023-01-26 13:35:18 +0100
committerThomas Hartmann <thomas.hartmann@qt.io>2023-01-26 12:41:31 +0000
commit5d7345c937e795806ce12884026eee56bfadf19b (patch)
tree395bbae8da9b96e32ea39e0b1802c2d35657e516 /src/imports/compatibility/Extras/designer
parent4acb5214409d4bba4b58ffee7d8cf71c28c2693a (diff)
Move QtQuickUltralite items directly to compatibility
This shortens the path and avoids building issues on Windows. Removing QtAndroidAutomotive for now. Change-Id: I76a4ba4269b626ec9ae31d735bc2eef244760d1f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/imports/compatibility/Extras/designer')
-rw-r--r--src/imports/compatibility/Extras/designer/CMakeLists.txt16
-rw-r--r--src/imports/compatibility/Extras/designer/ColorizedImageSpecifics.qml254
-rw-r--r--src/imports/compatibility/Extras/designer/QtQuickUltraliteExtras.metainfo28
-rw-r--r--src/imports/compatibility/Extras/designer/StaticTextSpecifics.qml60
-rw-r--r--src/imports/compatibility/Extras/designer/images/image-icon.pngbin0 -> 434 bytes
-rw-r--r--src/imports/compatibility/Extras/designer/images/image-icon@2x.pngbin0 -> 596 bytes
-rw-r--r--src/imports/compatibility/Extras/designer/images/text-icon.pngbin0 -> 126 bytes
-rw-r--r--src/imports/compatibility/Extras/designer/images/text-icon@2x.pngbin0 -> 156 bytes
8 files changed, 358 insertions, 0 deletions
diff --git a/src/imports/compatibility/Extras/designer/CMakeLists.txt b/src/imports/compatibility/Extras/designer/CMakeLists.txt
new file mode 100644
index 0000000..19ad43d
--- /dev/null
+++ b/src/imports/compatibility/Extras/designer/CMakeLists.txt
@@ -0,0 +1,16 @@
+qt_path_join(installdesignerdir "${INSTALL_QMLDIR}" "QtQuickUltralite/Extras")
+qt_path_join(targetdesignerdir "${CMAKE_BINARY_DIR}" "${installdesignerdir}/designer")
+
+file(
+ COPY .
+ DESTINATION ${targetdesignerdir}
+ FILES_MATCHING PATTERN "*qml"
+ PATTERN "*metainfo"
+ PATTERN "images/*png"
+ PATTERN "CMakeFiles" EXCLUDE
+)
+
+qt_install(
+ DIRECTORY ${targetdesignerdir}
+ DESTINATION ${installdesignerdir}
+)
diff --git a/src/imports/compatibility/Extras/designer/ColorizedImageSpecifics.qml b/src/imports/compatibility/Extras/designer/ColorizedImageSpecifics.qml
new file mode 100644
index 0000000..c0e9ce5
--- /dev/null
+++ b/src/imports/compatibility/Extras/designer/ColorizedImageSpecifics.qml
@@ -0,0 +1,254 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Quick Ultralite compatibility.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Layouts 1.15
+import HelperWidgets 2.0
+import StudioTheme 1.0 as StudioTheme
+
+//! [ColorizedImage compatibility]
+Section {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ caption: qsTr("Colorized Image")
+
+ SectionLayout {
+ PropertyLabel { text: qsTr("Image color") }
+
+ ColorEditor {
+ backendValue: backendValues.color
+ supportGradient: false
+ }
+
+ PropertyLabel { text: qsTr("Source") }
+
+ SecondColumnLayout {
+ UrlChooser {
+ backendValue: backendValues.source
+ }
+
+ ExpandingSpacer {}
+ }
+
+ PropertyLabel { text: qsTr("Fill mode") }
+
+ SecondColumnLayout {
+ ComboBox {
+ scope: "Image"
+ model: ["Stretch", "PreserveAspectFit", "PreserveAspectCrop", "Tile", "TileVertically", "TileHorizontally", "Pad"]
+ backendValue: backendValues.fillMode
+ implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ width: implicitWidth
+ }
+
+ ExpandingSpacer {}
+ }
+
+ PropertyLabel {
+ text: qsTr("Source size")
+ blockedByTemplate: !backendValues.sourceSize.isAvailable
+ }
+
+ SecondColumnLayout {
+ SpinBox {
+ backendValue: backendValues.sourceSize_width
+ minimumValue: 0
+ maximumValue: 8192
+ decimals: 0
+ enabled: backendValue.isAvailable
+ }
+
+ Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
+
+ ControlLabel {
+ //: The width of the object
+ text: qsTr("W", "width")
+ enabled: backendValues.sourceSize_width.isAvailable
+ }
+
+ SpinBox {
+ backendValue: backendValues.sourceSize_height
+ minimumValue: 0
+ maximumValue: 8192
+ decimals: 0
+ enabled: backendValue.isAvailable
+ }
+
+ Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
+
+ ControlLabel {
+ //: The height of the object
+ text: qsTr("H", "height")
+ enabled: backendValues.sourceSize_height.isAvailable
+ }
+
+ ExpandingSpacer {}
+ }
+
+ PropertyLabel { text: qsTr("Alignment H") }
+
+ SecondColumnLayout {
+ ComboBox {
+ scope: "Image"
+ model: ["AlignLeft", "AlignRight", "AlignHCenter"]
+ backendValue: backendValues.horizontalAlignment
+ implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ width: implicitWidth
+ }
+
+ ExpandingSpacer {}
+ }
+
+ PropertyLabel { text: qsTr("Alignment V") }
+
+ SecondColumnLayout {
+ ComboBox {
+ scope: "Image"
+ model: ["AlignTop", "AlignBottom", "AlignVCenter"]
+ backendValue: backendValues.verticalAlignment
+ implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ width: implicitWidth
+ }
+
+ ExpandingSpacer {}
+ }
+
+ PropertyLabel {
+ text: qsTr("Asynchronous")
+ tooltip: qsTr("Loads images on the local filesystem asynchronously in a separate thread.")
+ blockedByTemplate: !backendValues.asynchronous.isAvailable
+ }
+
+ SecondColumnLayout {
+ CheckBox {
+ enabled: backendValues.asynchronous.isAvailable
+ text: backendValues.asynchronous.valueToString
+ backendValue: backendValues.asynchronous
+ implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ }
+
+ ExpandingSpacer {}
+ }
+
+ PropertyLabel {
+ text: qsTr("Auto transform")
+ tooltip: qsTr("Automatically applies image transformation metadata such as EXIF orientation.")
+ blockedByTemplate: !backendValues.autoTransform.isAvailable
+ }
+
+ SecondColumnLayout {
+ CheckBox {
+ enabled: backendValues.autoTransform.isAvailable
+ text: backendValues.autoTransform.valueToString
+ backendValue: backendValues.autoTransform
+ implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ }
+
+ ExpandingSpacer {}
+ }
+
+ PropertyLabel {
+ text: qsTr("Cache")
+ tooltip: qsTr("Caches the image.")
+ blockedByTemplate: !backendValues.cache.isAvailable
+ }
+
+ SecondColumnLayout {
+ CheckBox {
+ enabled: backendValues.cache.isAvailable
+ text: backendValues.cache.valueToString
+ backendValue: backendValues.cache
+ implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ }
+
+ ExpandingSpacer {}
+ }
+
+ PropertyLabel {
+ text: qsTr("Mipmap")
+ tooltip: qsTr("Uses mipmap filtering when the image is scaled or transformed.")
+ blockedByTemplate: !backendValues.mipmap.isAvailable
+ }
+
+ SecondColumnLayout {
+ CheckBox {
+ enabled: backendValues.mipmap.isAvailable
+ text: backendValues.mipmap.valueToString
+ backendValue: backendValues.mipmap
+ implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ }
+
+ ExpandingSpacer {}
+ }
+
+ PropertyLabel {
+ text: qsTr("Mirror")
+ tooltip: qsTr("Inverts the image horizontally.")
+ blockedByTemplate: !backendValues.mirror.isAvailable
+ }
+
+ SecondColumnLayout {
+ CheckBox {
+ enabled: backendValues.mirror.isAvailable
+ text: backendValues.mirror.valueToString
+ backendValue: backendValues.mirror
+ implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ }
+
+ ExpandingSpacer {}
+ }
+
+ PropertyLabel {
+ text: qsTr("Smooth")
+ tooltip: qsTr("Smoothly filters the image when it is scaled or transformed.")
+ blockedByTemplate: !backendValues.smooth.isAvailable
+ }
+
+ SecondColumnLayout {
+ CheckBox {
+ enabled: backendValues.smooth.isAvailable
+ text: backendValues.smooth.valueToString
+ backendValue: backendValues.smooth
+ implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ }
+
+ ExpandingSpacer {}
+ }
+ }
+}
+//! [ColorizedImage compatibility]
diff --git a/src/imports/compatibility/Extras/designer/QtQuickUltraliteExtras.metainfo b/src/imports/compatibility/Extras/designer/QtQuickUltraliteExtras.metainfo
new file mode 100644
index 0000000..ab5716c
--- /dev/null
+++ b/src/imports/compatibility/Extras/designer/QtQuickUltraliteExtras.metainfo
@@ -0,0 +1,28 @@
+MetaInfo {
+ Type {
+ name: "QtQuickUltralite.Extras.ColorizedImage"
+ icon: "images/image-icon.png"
+
+ ItemLibraryEntry {
+ name: "Colorized Image"
+ category: "QtQuickUltralite - Extras"
+ libraryIcon: "images/image-icon@2x.png"
+ version: "1.9"
+ requiredImport: "QtQuickUltralite.Extras"
+ Property { name: "source"; type: "binding"; value: "\"source/text\""; }
+ }
+ }
+ Type {
+ name: "QtQuickUltralite.Extras.StaticText"
+ icon: "images/text-icon.png"
+
+ ItemLibraryEntry {
+ name: "Static Text"
+ category: "QtQuickUltralite - Extras"
+ libraryIcon: "images/text-icon@2x.png"
+ version: "1.9"
+ requiredImport: "QtQuickUltralite.Extras"
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Static Text\")"; }
+ }
+ }
+}
diff --git a/src/imports/compatibility/Extras/designer/StaticTextSpecifics.qml b/src/imports/compatibility/Extras/designer/StaticTextSpecifics.qml
new file mode 100644
index 0000000..e75bbfa
--- /dev/null
+++ b/src/imports/compatibility/Extras/designer/StaticTextSpecifics.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Quick Ultralite compatibility.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Layouts 1.15
+import HelperWidgets 2.0
+
+//! [StaticText compatibility]
+Column {
+ anchors.left: parent.left
+ anchors.right: parent.right
+
+ CharacterSection {
+ richTextEditorAvailable: true
+ showLineHeight: true
+ showVerticalAlignment: true
+ }
+
+ TextExtrasSection {
+ showElide: true
+ showWrapMode: true
+ showFormatProperty: true
+ showFontSizeMode: true
+ showLineHeight: true
+ }
+
+ FontExtrasSection {
+ showStyle: true
+ }
+
+ PaddingSection {}
+}
+
+//! [StaticText compatibility]
diff --git a/src/imports/compatibility/Extras/designer/images/image-icon.png b/src/imports/compatibility/Extras/designer/images/image-icon.png
new file mode 100644
index 0000000..318ce08
--- /dev/null
+++ b/src/imports/compatibility/Extras/designer/images/image-icon.png
Binary files differ
diff --git a/src/imports/compatibility/Extras/designer/images/image-icon@2x.png b/src/imports/compatibility/Extras/designer/images/image-icon@2x.png
new file mode 100644
index 0000000..cc84918
--- /dev/null
+++ b/src/imports/compatibility/Extras/designer/images/image-icon@2x.png
Binary files differ
diff --git a/src/imports/compatibility/Extras/designer/images/text-icon.png b/src/imports/compatibility/Extras/designer/images/text-icon.png
new file mode 100644
index 0000000..29a81f5
--- /dev/null
+++ b/src/imports/compatibility/Extras/designer/images/text-icon.png
Binary files differ
diff --git a/src/imports/compatibility/Extras/designer/images/text-icon@2x.png b/src/imports/compatibility/Extras/designer/images/text-icon@2x.png
new file mode 100644
index 0000000..1df8f76
--- /dev/null
+++ b/src/imports/compatibility/Extras/designer/images/text-icon@2x.png
Binary files differ