diff options
Diffstat (limited to 'share/qtcreator/qmldesigner')
355 files changed, 3453 insertions, 4397 deletions
diff --git a/share/qtcreator/qmldesigner/assetsLibraryQmlSources/Assets.qml b/share/qtcreator/qmldesigner/assetsLibraryQmlSources/Assets.qml index cfa4020995..26bef6f8e9 100644 --- a/share/qtcreator/qmldesigner/assetsLibraryQmlSources/Assets.qml +++ b/share/qtcreator/qmldesigner/assetsLibraryQmlSources/Assets.qml @@ -94,7 +94,7 @@ Item { anchors.fill: parent acceptedButtons: Qt.RightButton onClicked: { - if (assetsModel.haveFiles) { + if (assetsModel.hasFiles) { function onFolderCreated(path) { assetsView.addCreatedFolder(path) } @@ -182,13 +182,13 @@ Item { leftPadding: 10 color: StudioTheme.Values.themeTextColor font.pixelSize: StudioTheme.Values.baseFont - visible: !assetsModel.haveFiles && !root.__searchBoxEmpty + visible: !assetsModel.hasFiles && !root.__searchBoxEmpty } Item { // placeholder when the assets library is empty width: parent.width height: parent.height - toolbar.height - column.spacing - visible: !assetsModel.haveFiles && root.__searchBoxEmpty + visible: !assetsModel.hasFiles && root.__searchBoxEmpty clip: true MouseArea { // right clicking the empty area of the view diff --git a/share/qtcreator/qmldesigner/assetsLibraryQmlSources/AssetsContextMenu.qml b/share/qtcreator/qmldesigner/assetsLibraryQmlSources/AssetsContextMenu.qml index 391c622048..fe22d7ce51 100644 --- a/share/qtcreator/qmldesigner/assetsLibraryQmlSources/AssetsContextMenu.qml +++ b/share/qtcreator/qmldesigner/assetsLibraryQmlSources/AssetsContextMenu.qml @@ -83,7 +83,7 @@ StudioControls.Menu { root.__selectedAssetPathsList = selectedAssetPathsList root.__fileIndex = fileIndex root.__dirIndex = dirModelIndex - root.__dirPath = AssetsLibraryBackend.assetsModel.filePath(dirModelIndex) + root.__dirPath = root.assetsModel.filePath(dirModelIndex) root.__isDirectory = false root.popup() } @@ -124,9 +124,9 @@ StudioControls.Menu { id: addTexturesItem text: qsTr("Add Texture") enabled: rootView.hasMaterialLibrary - visible: root.__fileIndex && AssetsLibraryBackend.assetsModel.allFilePathsAreTextures(root.__selectedAssetPathsList) + visible: root.__fileIndex && root.assetsModel.allFilePathsAreTextures(root.__selectedAssetPathsList) height: addTexturesItem.visible ? addTexturesItem.implicitHeight : 0 - onTriggered: AssetsLibraryBackend.rootView.addTextures(root.__selectedAssetPathsList) + onTriggered: root.rootView.addTextures(root.__selectedAssetPathsList) } StudioControls.MenuItem { @@ -134,7 +134,7 @@ StudioControls.Menu { text: qsTr("Add Light Probe") enabled: rootView.hasMaterialLibrary && rootView.hasSceneEnv visible: root.__fileIndex && root.__selectedAssetPathsList.length === 1 - && AssetsLibraryBackend.assetsModel.allFilePathsAreTextures(root.__selectedAssetPathsList) + && root.assetsModel.allFilePathsAreTextures(root.__selectedAssetPathsList) height: addLightProbes.visible ? addLightProbes.implicitHeight : 0 onTriggered: rootView.addLightProbe(root.__selectedAssetPathsList[0]) } @@ -145,7 +145,7 @@ StudioControls.Menu { visible: root.__fileIndex height: deleteFileItem.visible ? deleteFileItem.implicitHeight : 0 onTriggered: { - let deleted = AssetsLibraryBackend.assetsModel.requestDeleteFiles(root.__selectedAssetPathsList) + let deleted = root.assetsModel.requestDeleteFiles(root.__selectedAssetPathsList) if (!deleted) confirmDeleteFiles.open() } @@ -182,7 +182,7 @@ StudioControls.Menu { StudioControls.MenuItem { text: qsTr("New Folder") - visible: AssetsLibraryBackend.assetsModel.haveFiles + visible: root.assetsModel.hasFiles height: visible ? implicitHeight : 0 NewFolderDialog { @@ -209,11 +209,11 @@ StudioControls.Menu { } onTriggered: { - if (!AssetsLibraryBackend.assetsModel.hasChildren(root.__dirIndex)) { + if (!root.assetsModel.hasChildren(root.__dirIndex)) { // NOTE: the folder may still not be empty -- it doesn't have files visible to the // user, but that doesn't mean that there are no other files (e.g. files of unknown // types) on disk in this directory. - AssetsLibraryBackend.assetsModel.deleteFolderRecursively(root.__dirIndex) + root.assetsModel.deleteFolderRecursively(root.__dirIndex) } else { confirmDeleteFolderDialog.open() } @@ -222,7 +222,7 @@ StudioControls.Menu { StudioControls.MenuItem { text: qsTr("New Effect") - visible: rootView.canCreateEffects() + visible: root.rootView.canCreateEffects() height: visible ? implicitHeight : 0 NewEffectDialog { @@ -235,15 +235,22 @@ StudioControls.Menu { } StudioControls.MenuItem { - text: rootView.showInGraphicalShellMsg() + text: root.rootView.showInGraphicalShellMsg() enabled: root.__showInGraphicalShellEnabled onTriggered: { if (!root.__fileIndex || root.__selectedAssetPathsList.length > 1) - rootView.showInGraphicalShell(root.__dirPath) + root.rootView.showInGraphicalShell(root.__dirPath) else - rootView.showInGraphicalShell(root.__selectedAssetPathsList[0]) + root.rootView.showInGraphicalShell(root.__selectedAssetPathsList[0]) } } + + StudioControls.MenuItem { + text: qsTr("Add to Content Library") + visible: root.__fileIndex && root.assetsModel.allFilePathsAreTextures(root.__selectedAssetPathsList) + height: visible ? implicitHeight : 0 + onTriggered: root.rootView.addAssetsToContentLibrary(root.__selectedAssetPathsList) + } } diff --git a/share/qtcreator/qmldesigner/assetsLibraryQmlSources/AssetsView.qml b/share/qtcreator/qmldesigner/assetsLibraryQmlSources/AssetsView.qml index 9326e6a5e3..aeabc92c6d 100644 --- a/share/qtcreator/qmldesigner/assetsLibraryQmlSources/AssetsView.qml +++ b/share/qtcreator/qmldesigner/assetsLibraryQmlSources/AssetsView.qml @@ -70,9 +70,9 @@ TreeView { model: assetsModel onRowsChanged: { - if (root.rows > root.rootPathRow + 1 && !assetsModel.haveFiles || - root.rows <= root.rootPathRow + 1 && assetsModel.haveFiles) { - assetsModel.syncHaveFiles() + if (root.rows > root.rootPathRow + 1 && !assetsModel.hasFiles || + root.rows <= root.rootPathRow + 1 && assetsModel.hasFiles) { + assetsModel.syncHasFiles() } root.updateRows() @@ -366,7 +366,7 @@ TreeView { function moveSelection(amount) { - if (!assetsModel.haveFiles || !amount) + if (!assetsModel.hasFiles || !amount) return let index = root.currentFilePath ? assetsModel.indexForPath(root.currentFilePath) diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsEditDelegate.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsEditDelegate.qml deleted file mode 100644 index 90b3021c96..0000000000 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsEditDelegate.qml +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (C) 2023 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick -import CollectionDetails 1.0 as CollectionDetails -import StudioControls 1.0 as StudioControls -import StudioHelpers as StudioHelpers -import StudioTheme 1.0 as StudioTheme -import QtQuick.Templates as T - -Item { - id: root - - required property var columnType - - TableView.onCommit: { - if (editorLoader.changesAccepted && edit !== editorLoader.acceptedValue) - edit = editorLoader.acceptedValue - } - - onActiveFocusChanged: { - if (root.activeFocus && !editorLoader.triggered && editorLoader.item) { - editorLoader.triggered = true - editorLoader.item.open() - } - - // active focus should be checked again, because it might be affected by editorLoader.item - if (root.activeFocus && editorLoader.editor) - editorLoader.editor.forceActiveFocus() - } - - Loader { - id: editorLoader - - active: true - - property var editor: editorLoader.item ? editorLoader.item.editor : null - property var editValue: editorLoader.editor ? editorLoader.editor.editValue : null - property var acceptedValue: null - property bool changesAccepted: true - property bool triggered: false - - Connections { - id: modifierFocusConnection - - target: editorLoader.editor - enabled: editorLoader.item !== undefined - - function onActiveFocusChanged() { - if (!modifierFocusConnection.target.activeFocus) { - editorLoader.acceptedValue = editorLoader.editValue - root.TableView.commit() - } - } - } - - Component { - id: textEditor - - EditorPopup { - editor: textField - - StudioControls.TextField { - id: textField - - property alias editValue: textField.text - - actionIndicator.visible: false - translationIndicatorVisible: false - - onRejected: editorLoader.changesAccepted = false - } - } - } - - Component { - id: realEditor - - EditorPopup { - - editor: realField - - StudioControls.RealSpinBox { - id: realField - - property alias editValue: realField.realValue - - actionIndicator.visible: false - realFrom: -9e9 - realTo: 9e9 - realStepSize: 1.0 - decimals: 6 - trailingZeroes: false - - onActiveFocusChanged: { - if (realField.activeFocus) - realField.contentItem.focus = true - } - } - } - } - - Component { - id: integerEditor - - EditorPopup { - - editor: integerField - - StudioControls.SpinBox { - id: integerField - - property alias editValue: integerField.value - - actionIndicatorVisible: false - spinBoxIndicatorVisible: true - from: -2147483647 - to: 2147483647 - decimals: 0 - - onActiveFocusChanged: { - if (integerField.activeFocus) - integerField.contentItem.focus = true - } - } - } - } - - Component { - id: boolEditor - - EditorPopup { - - editor: boolField - - StudioControls.CheckBox { - id: boolField - - property alias editValue: boolField.checked - - actionIndicatorVisible: false - } - } - } - } - - component EditorPopup: T.Popup { - id: editorPopup - - required property Item editor - - implicitHeight: contentHeight - implicitWidth: contentWidth - - focus: true - visible: false - - Connections { - target: editorPopup.editor - - function onActiveFocusChanged() { - if (!editorPopup.editor.activeFocus) - editorPopup.close() - else if (edit) - editorPopup.editor.editValue = edit - } - } - - Connections { - target: editorPopup.editor.Keys - - function onEscapePressed() { - editorLoader.changesAccepted = false - editorPopup.close() - } - - function onReturnPressed() { - editorPopup.close() - } - - function onEnterPressed() { - editorPopup.close() - } - } - } - - states: [ - State { - name: "default" - when: columnType !== CollectionDetails.DataType.Boolean - && columnType !== CollectionDetails.DataType.Color - && columnType !== CollectionDetails.DataType.Integer - && columnType !== CollectionDetails.DataType.Real - - PropertyChanges { - target: editorLoader - sourceComponent: textEditor - } - }, - State { - name: "integer" - when: columnType === CollectionDetails.DataType.Integer - - PropertyChanges { - target: editorLoader - sourceComponent: integerEditor - } - }, - State { - name: "real" - when: columnType === CollectionDetails.DataType.Real - - PropertyChanges { - target: editorLoader - sourceComponent: realEditor - } - }, - State { - name: "bool" - when: columnType === CollectionDetails.DataType.Boolean - - PropertyChanges { - target: editorLoader - sourceComponent: boolEditor - } - }, - State { - name: "color" - when: columnType === CollectionDetails.DataType.Color - - PropertyChanges { - target: editorLoader - sourceComponent: null - } - } - ] -} diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsToolbar.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsToolbar.qml deleted file mode 100644 index 8b4c08f845..0000000000 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsToolbar.qml +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright (C) 2023 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import Qt.labs.platform as PlatformWidgets -import HelperWidgets 2.0 as HelperWidgets -import StudioControls 1.0 as StudioControls -import StudioTheme 1.0 as StudioTheme -import CollectionDetails -import CollectionEditorBackend - -Rectangle { - id: root - - required property var model - required property var backend - property int selectedRow: -1 - - implicitHeight: StudioTheme.Values.toolbarHeight - color: StudioTheme.Values.themeToolbarBackground - - function addNewColumn() { - addColumnDialog.popUp(root.model.columnCount()) - } - - function addNewRow() { - root.model.insertRow(root.model.rowCount()) - } - - RowLayout { - id: container - - anchors.fill: parent - anchors.topMargin: StudioTheme.Values.toolbarVerticalMargin - anchors.bottomMargin: StudioTheme.Values.toolbarVerticalMargin - - spacing: StudioTheme.Values.sectionRowSpacing - - RowLayout { - id: leftSideToolbar - - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - Layout.leftMargin: StudioTheme.Values.toolbarHorizontalMargin - spacing: StudioTheme.Values.sectionRowSpacing - - IconButton { - id: addColumnLeftButton - - buttonIcon: StudioTheme.Constants.addcolumnleft_medium - tooltip: qsTr("Add property left") - enabled: root.model.selectedColumn > -1 - onClicked: addColumnDialog.popUp(root.model.selectedColumn) - } - - IconButton { - id: addColumnRightButton - - buttonIcon: StudioTheme.Constants.addcolumnright_medium - tooltip: qsTr("Add property right") - enabled: root.model.selectedColumn > -1 - onClicked: addColumnDialog.popUp(root.model.selectedColumn + 1) - } - - IconButton { - id: deleteColumnButton - - buttonIcon: StudioTheme.Constants.deletecolumn_medium - tooltip: qsTr("Delete selected property") - enabled: root.model.selectedColumn > -1 - onClicked: root.model.removeColumn(root.model.selectedColumn) - } - - Item { // spacer - implicitWidth: StudioTheme.Values.toolbarSpacing - implicitHeight: 1 - } - - IconButton { - id: addRowBelowButton - - buttonIcon: StudioTheme.Constants.addrowbelow_medium - tooltip: qsTr("Insert row below") - enabled: root.model.selectedRow > -1 - onClicked: root.model.insertRow(root.model.selectedRow + 1) - } - - IconButton { - id: addRowAboveButton - - buttonIcon: StudioTheme.Constants.addrowabove_medium - tooltip: qsTr("Insert row above") - enabled: root.model.selectedRow > -1 - onClicked: root.model.insertRow(root.model.selectedRow) - } - - IconButton { - id: deleteSelectedRowButton - - buttonIcon: StudioTheme.Constants.deleterow_medium - tooltip: qsTr("Delete selected row") - enabled: root.model.selectedRow > -1 - onClicked: root.model.removeRow(root.model.selectedRow) - } - } - - RowLayout { - id: rightSideToolbar - - spacing: StudioTheme.Values.sectionRowSpacing - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - Layout.rightMargin: StudioTheme.Values.toolbarHorizontalMargin - - IconButton { - id: saveCollectionButton - - buttonIcon: StudioTheme.Constants.save_medium - tooltip: qsTr("Save changes") - enabled: root.model.collectionName !== "" - onClicked: root.model.saveDataStoreCollections() - } - - IconButton { - id: exportCollectionButton - - buttonIcon: StudioTheme.Constants.export_medium - tooltip: qsTr("Export model") - enabled: root.model.collectionName !== "" - onClicked: fileDialog.open() - } - } - } - - PlatformWidgets.FileDialog { - id: fileDialog - - fileMode: PlatformWidgets.FileDialog.SaveFile - - nameFilters: ["JSON Files (*.json)", - "Comma-Separated Values (*.csv)" - ] - - selectedNameFilter.index: 0 - - onAccepted: { - let filePath = fileDialog.file.toString() - root.model.exportCollection(filePath) - } - } - - component IconButton: HelperWidgets.AbstractButton { - style: StudioTheme.Values.viewBarButtonStyle - } - - component Spacer: Item { - implicitWidth: 1 - implicitHeight: StudioTheme.Values.columnGap - } - - RegularExpressionValidator { - id: nameValidator - regularExpression: /^\w+$/ - } - - StudioControls.Dialog { - id: addColumnDialog - - property int clickedIndex: -1 - property bool nameIsValid - - title: qsTr("Add Column") - - function popUp(index) - { - addColumnDialog.clickedIndex = index - columnName.text = "" - columnName.forceActiveFocus() - addedPropertyType.currentIndex = addedPropertyType.find("String") - - addColumnDialog.open() - } - - function addColumnName() { - if (addColumnDialog.nameIsValid) { - root.model.addColumn(addColumnDialog.clickedIndex, columnName.text, addedPropertyType.currentText) - addColumnDialog.accept() - } else { - addColumnDialog.reject() - } - } - - contentItem: ColumnLayout { - spacing: 2 - - Text { - text: qsTr("Column name:") - color: StudioTheme.Values.themeTextColor - } - - StudioControls.TextField { - id: columnName - - Layout.fillWidth: true - - actionIndicator.visible: false - translationIndicator.visible: false - validator: nameValidator - - Keys.onEnterPressed: addColumnDialog.addColumnName() - Keys.onReturnPressed: addColumnDialog.addColumnName() - Keys.onEscapePressed: addColumnDialog.reject() - - onTextChanged: { - addColumnDialog.nameIsValid = (columnName.text !== "" - && !root.model.isPropertyAvailable(columnName.text)) - } - } - - Spacer { implicitHeight: StudioTheme.Values.controlLabelGap } - - Label { - Layout.fillWidth: true - - text: qsTr("The model already contains \"%1\"!").arg(columnName.text) - visible: columnName.text !== "" && !addColumnDialog.nameIsValid - - color: StudioTheme.Values.themeTextColor - wrapMode: Label.WordWrap - padding: 5 - - background: Rectangle { - color: "transparent" - border.width: StudioTheme.Values.border - border.color: StudioTheme.Values.themeWarning - } - } - - Spacer {} - - Text { - text: qsTr("Type:") - color: StudioTheme.Values.themeTextColor - } - - StudioControls.ComboBox { - id: addedPropertyType - - Layout.fillWidth: true - - model: CollectionDataTypeModel{} - textRole: "display" - tooltipRole: "toolTip" - actionIndicatorVisible: false - } - - Spacer {} - - RowLayout { - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - spacing: StudioTheme.Values.sectionRowSpacing - - HelperWidgets.Button { - enabled: addColumnDialog.nameIsValid - text: qsTr("Add") - onClicked: addColumnDialog.addColumnName() - } - - HelperWidgets.Button { - text: qsTr("Cancel") - onClicked: addColumnDialog.reject() - } - } - } - } -} diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsView.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsView.qml deleted file mode 100644 index c9a6d2dbcb..0000000000 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsView.qml +++ /dev/null @@ -1,570 +0,0 @@ -// Copyright (C) 2023 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import CollectionDetails 1.0 as CollectionDetails -import HelperWidgets 2.0 as HelperWidgets -import StudioControls 1.0 as StudioControls -import StudioTheme 1.0 as StudioTheme - -Rectangle { - id: root - - required property var model - required property var backend - required property var sortedModel - - implicitWidth: 300 - implicitHeight: 400 - color: StudioTheme.Values.themeControlBackground - - function closeDialogs() { - editPropertyDialog.close() - } - - Column { - id: topRow - - visible: root.model.collectionName !== "" - width: parent.width - spacing: 10 - - CollectionDetailsToolbar { - id: toolbar - model: root.model - backend: root.backend - width: parent.width - } - - GridLayout { - columns: 3 - rowSpacing: 1 - columnSpacing: 1 - width: parent.width - - anchors { - left: parent.left - leftMargin: StudioTheme.Values.collectionTableHorizontalMargin - } - - Rectangle { - id: tableTopLeftCorner - - clip: true - visible: !tableView.model.isEmpty - color: StudioTheme.Values.themeControlBackgroundInteraction - border.color: StudioTheme.Values.themeControlBackgroundInteraction - border.width: 2 - - Layout.preferredWidth: rowIdView.width - Layout.preferredHeight: headerView.height - Layout.minimumWidth: rowIdView.width - Layout.minimumHeight: headerView.height - - Text { - anchors.fill: parent - font: headerTextMetrics.font - text: "#" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - color: StudioTheme.Values.themeTextColor - } - } - - HorizontalHeaderView { - id: headerView - - property real topPadding: 5 - property real bottomPadding: 5 - - Layout.preferredHeight: headerTextMetrics.height + topPadding + bottomPadding - Layout.columnSpan: 2 - syncView: tableView - clip: true - - delegate: HeaderDelegate { - selectedItem: tableView.model.selectedColumn - color: StudioTheme.Values.themeControlBackgroundInteraction - - MouseArea { - id: topHeaderMouseArea - - anchors.fill: parent - anchors.margins: 5 - acceptedButtons: Qt.LeftButton | Qt.RightButton - hoverEnabled: true - onClicked: (mouse) => { - tableView.model.selectColumn(index) - - if (mouse.button === Qt.RightButton) { - let posX = index === root.model.columnCount() - 1 ? parent.width - editPropertyDialog.width : 0 - - headerMenu.clickedHeaderIndex = index - headerMenu.dialogPos = parent.mapToGlobal(posX, parent.height) - headerMenu.popup() - } else { - headerMenu.close() - } - } - } - - ToolTip { - id: topHeaderToolTip - - property bool expectedToBeShown: topHeaderMouseArea.containsMouse - visible: expectedToBeShown && text !== "" - delay: 1000 - - onExpectedToBeShownChanged: { - if (expectedToBeShown) - text = root.model.propertyType(index) - } - } - } - - StudioControls.Menu { - id: headerMenu - - property int clickedHeaderIndex: -1 - property point dialogPos - - onClosed: { - headerMenu.clickedHeaderIndex = -1 - } - - StudioControls.MenuItem { - text: qsTr("Edit") - onTriggered: editPropertyDialog.openDialog(headerMenu.clickedHeaderIndex, - headerMenu.dialogPos) - } - - StudioControls.MenuItem { - text: qsTr("Delete") - onTriggered: deleteColumnDialog.popUp(headerMenu.clickedHeaderIndex) - } - - StudioControls.MenuItem { - text: qsTr("Sort Ascending") - onTriggered: sortedModel.sort(headerMenu.clickedHeaderIndex, Qt.AscendingOrder) - } - - StudioControls.MenuItem { - text: qsTr("Sort Descending") - onTriggered: sortedModel.sort(headerMenu.clickedHeaderIndex, Qt.DescendingOrder) - } - } - } - - VerticalHeaderView { - id: rowIdView - - syncView: tableView - clip: true - - Layout.preferredHeight: tableView.height - Layout.rowSpan: 2 - Layout.alignment: Qt.AlignTop + Qt.AlignLeft - width: implicitWidth // suppresses GridLayout warnings when resizing - - delegate: HeaderDelegate { - selectedItem: tableView.model.selectedRow - color: StudioTheme.Values.themeControlBackgroundHover - - MouseArea { - anchors.fill: parent - anchors.margins: 5 - acceptedButtons: Qt.LeftButton - onClicked: tableView.model.selectRow(index) - } - } - } - - TableView { - id: tableView - - model: root.sortedModel - clip: true - - property point tableStart: tableTopLeftCorner.mapToItem(root, Qt.point(x, y)); - - Layout.alignment: Qt.AlignTop + Qt.AlignLeft - Layout.preferredWidth: tableView.contentWidth - Layout.preferredHeight: tableView.contentHeight - Layout.minimumWidth: 100 - Layout.minimumHeight: 20 - Layout.maximumWidth: root.width - (tableStart.x + addColumnContainer.width) - Layout.maximumHeight: root.height - (tableStart.y + addRowContainer.height) - - columnWidthProvider: function(column) { - if (!isColumnLoaded(column)) - return -1 - let w = explicitColumnWidth(column) - if (w < 0) - w = implicitColumnWidth(column) - return Math.max(w, StudioTheme.Values.collectionCellMinimumWidth) - } - - rowHeightProvider: function(row) { - if (!isRowLoaded(row)) - return -1 - let h = explicitRowHeight(row) - if (h < 0) - h = implicitRowHeight(row) - return Math.max(h, StudioTheme.Values.collectionCellMinimumHeight) - } - - delegate: Rectangle { - id: itemCell - - clip: true - implicitWidth: 100 - implicitHeight: StudioTheme.Values.baseHeight - color: itemSelected ? StudioTheme.Values.themeControlBackgroundInteraction - : StudioTheme.Values.themeControlBackground - border.width: 1 - border.color: { - if (dataTypeWarning !== CollectionDetails.Warning.None) - return StudioTheme.Values.themeWarning - - if (itemSelected) - return StudioTheme.Values.themeControlOutlineInteraction - - return StudioTheme.Values.themeControlBackgroundInteraction - } - - HelperWidgets.ToolTipArea { - anchors.fill: parent - text: root.model.warningToString(dataTypeWarning) - enabled: dataTypeWarning !== CollectionDetails.Warning.None && text !== "" - hoverEnabled: true - acceptedButtons: Qt.NoButton - } - - MouseArea { - anchors.fill: parent - acceptedButtons: Qt.RightButton - onClicked: (mouse) => { - let row = index % tableView.model.rowCount() - - tableView.model.selectRow(row) - cellContextMenu.showMenu(row) - } - } - - Loader { - id: cellContentLoader - - property int cellColumnType: columnType ? columnType : 0 - - Component { - id: cellText - - Text { - text: display ?? "" - color: itemSelected ? StudioTheme.Values.themeInteraction - : StudioTheme.Values.themePlaceholderTextColorInteraction - leftPadding: 5 - topPadding: 3 - bottomPadding: 3 - font.pixelSize: StudioTheme.Values.baseFontSize - horizontalAlignment: Text.AlignLeft - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - } - - Component { - id: colorEditorComponent - - ColorViewDelegate {} - } - - function resetSource() { - if (columnType === CollectionDetails.DataType.Color) - cellContentLoader.sourceComponent = colorEditorComponent - else - cellContentLoader.sourceComponent = cellText - } - - Component.onCompleted: resetSource() - onCellColumnTypeChanged: resetSource() - } - - TableView.editDelegate: CollectionDetailsEditDelegate { - anchors { - top: itemCell.top - left: itemCell.left - } - } - - Connections { - target: tableView.model - - function onModelReset() { - tableView.clearColumnWidths() - tableView.clearRowHeights() - } - } - } - - HoverHandler { id: hoverHandler } - - ScrollBar.horizontal: StudioControls.TransientScrollBar { - id: horizontalScrollBar - style: StudioTheme.Values.viewStyle - orientation: Qt.Horizontal - - show: (hoverHandler.hovered || tableView.focus || horizontalScrollBar.inUse) - && horizontalScrollBar.isNeeded - } - - ScrollBar.vertical: StudioControls.TransientScrollBar { - id: verticalScrollBar - style: StudioTheme.Values.viewStyle - orientation: Qt.Vertical - - show: (hoverHandler.hovered || tableView.focus || verticalScrollBar.inUse) - && verticalScrollBar.isNeeded - } - } - - HelperWidgets.IconButton { - id: addColumnContainer - - iconSize:16 - Layout.preferredWidth: 24 - Layout.preferredHeight: tableView.height - Layout.minimumHeight: 24 - Layout.alignment: Qt.AlignLeft + Qt.AlignVCenter - - icon: StudioTheme.Constants.create_medium - tooltip: "Add Column" - - onClicked: toolbar.addNewColumn() - } - - HelperWidgets.IconButton { - id: addRowContainer - - iconSize:16 - Layout.preferredWidth: tableView.width - Layout.preferredHeight: 24 - Layout.minimumWidth: 24 - Layout.alignment: Qt.AlignTop + Qt.AlignHCenter - - icon: StudioTheme.Constants.create_medium - tooltip: "Add Row" - - onClicked: toolbar.addNewRow() - } - - Item { - Layout.fillWidth: true - Layout.fillHeight: true - } - } - } - - Text { - anchors.centerIn: parent - text: qsTr("Select a model to continue") - visible: !topRow.visible - color: StudioTheme.Values.themeTextColor - font.pixelSize: StudioTheme.Values.mediumFontSize - } - - TextMetrics { - id: headerTextMetrics - - font.pixelSize: StudioTheme.Values.baseFontSize - text: "Xq" - } - - StudioControls.Menu { - id: cellContextMenu - - property int rowIndex: -1 - - closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside - - function showMenu(rowIndex) { - cellContextMenu.rowIndex = rowIndex - cellContextMenu.popup() - } - - CellContextMenuItem { - id: addRowAboveCellMenuItem - - itemText: qsTr("Add row above") - itemIcon: StudioTheme.Constants.addrowabove_medium - onTriggered: root.model.insertRow(cellContextMenu.rowIndex) - } - CellContextMenuItem { - id: addRowBelowCellMenuItem - - itemText: qsTr("Add row below") - itemIcon: StudioTheme.Constants.addrowbelow_medium - onTriggered: root.model.insertRow(cellContextMenu.rowIndex + 1) - } - CellContextMenuItem { - id: deleteRowCellMenuItem - - itemText: qsTr("Delete row") - itemIcon: StudioTheme.Constants.deleterow_medium - onTriggered: root.model.removeRows(cellContextMenu.rowIndex, 1) - } - } - - component HeaderDelegate: Rectangle { - id: headerItem - - required property int selectedItem - property alias horizontalAlignment: headerText.horizontalAlignment - property alias verticalAlignment: headerText.verticalAlignment - - implicitWidth: headerText.implicitWidth - implicitHeight: headerText.implicitHeight - border.width: 1 - clip: true - - Text { - id: headerText - - topPadding: headerView.topPadding - bottomPadding: headerView.bottomPadding - leftPadding: 5 - rightPadding: 5 - text: display - font: headerTextMetrics.font - color: StudioTheme.Values.themeTextColor - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - - states: [ - State { - name: "default" - when: index !== selectedItem - PropertyChanges { - target: headerItem - border.color: StudioTheme.Values.themeControlBackgroundInteraction - } - - PropertyChanges { - target: headerText - font.bold: false - } - }, - State { - name: "selected" - when: index === selectedItem - - PropertyChanges { - target: headerItem - border.color: StudioTheme.Values.themeControlBackground - } - - PropertyChanges { - target: headerText - font.bold: true - } - } - ] - } - - component CellContextMenuItem: StudioControls.MenuItem { - id: cellContextMenuItemComponent - - property alias itemText: cellContextMenuText.text - property alias itemIcon: cellContextMenuIcon.text - text: "" - - implicitWidth: cellContextMenuRow.width - implicitHeight: cellContextMenuRow.height - - Row { - id: cellContextMenuRow - - property color textColor : cellContextMenuItemComponent.enabled - ? cellContextMenuItemComponent.highlighted - ? cellContextMenuItemComponent.style.text.selectedText - : cellContextMenuItemComponent.style.text.idle - : cellContextMenuItemComponent.style.text.disabled - - spacing: 2 * StudioTheme.Values.contextMenuHorizontalPadding - height: StudioTheme.Values.defaultControlHeight - leftPadding: StudioTheme.Values.contextMenuHorizontalPadding - rightPadding: StudioTheme.Values.contextMenuHorizontalPadding - - Text { - id: cellContextMenuIcon - - color: cellContextMenuRow.textColor - text: StudioTheme.Constants.addrowabove_medium - font.family: StudioTheme.Constants.iconFont.family - font.pixelSize: StudioTheme.Values.myIconFontSize - anchors.verticalCenter: parent.verticalCenter - } - - Text { - id: cellContextMenuText - - color: cellContextMenuRow.textColor - anchors.verticalCenter: parent.verticalCenter - } - } - } - - EditPropertyDialog { - id: editPropertyDialog - model: root.model - } - - StudioControls.Dialog { - id: deleteColumnDialog - - property int clickedIndex: -1 - - title: qsTr("Delete Column") - width: 400 - - onAccepted: { - root.model.removeColumn(clickedIndex) - } - - function popUp(index) - { - deleteColumnDialog.clickedIndex = index - deleteColumnDialog.open() - } - - contentItem: ColumnLayout { - spacing: StudioTheme.Values.sectionColumnSpacing - - Text { - text: qsTr("Are you sure that you want to delete column \"%1\"?").arg( - root.model.headerData( - deleteColumnDialog.clickedIndex, Qt.Horizontal)) - color: StudioTheme.Values.themeTextColor - } - - RowLayout { - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - spacing: StudioTheme.Values.sectionRowSpacing - - HelperWidgets.Button { - text: qsTr("Delete") - onClicked: deleteColumnDialog.accept() - } - - HelperWidgets.Button { - text: qsTr("Cancel") - onClicked: deleteColumnDialog.reject() - } - } - } - } -} diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionItem.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionItem.qml deleted file mode 100644 index 31ced43c1d..0000000000 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionItem.qml +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (C) 2023 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import HelperWidgets 2.0 as HelperWidgets -import StudioControls 1.0 as StudioControls -import StudioTheme as StudioTheme -import CollectionEditorBackend - -Item { - id: root - - implicitWidth: 300 - implicitHeight: boundingRect.height + 3 - - property color textColor - - signal selectItem(int itemIndex) - signal deleteItem() - - Item { - id: boundingRect - - width: parent.width - height: itemLayout.height - clip: true - - MouseArea { - id: itemMouse - - anchors.fill: parent - acceptedButtons: Qt.LeftButton - propagateComposedEvents: true - hoverEnabled: true - onClicked: (event) => { - if (!collectionIsSelected) { - collectionIsSelected = true - event.accepted = true - } - } - } - - Rectangle { - id: innerRect - anchors.fill: parent - } - - RowLayout { - id: itemLayout - - width: parent.width - - Text { - id: nameHolder - - Layout.fillWidth: true - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - Layout.leftMargin: StudioTheme.Values.collectionItemTextSideMargin - Layout.topMargin: StudioTheme.Values.collectionItemTextMargin - Layout.bottomMargin: StudioTheme.Values.collectionItemTextMargin - - text: collectionName - font.pixelSize: StudioTheme.Values.baseFontSize - color: root.textColor - topPadding: StudioTheme.Values.collectionItemTextPadding - bottomPadding: StudioTheme.Values.collectionItemTextPadding - elide: Text.ElideMiddle - verticalAlignment: Text.AlignVCenter - } - - Text { - id: threeDots - - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - Layout.topMargin: StudioTheme.Values.collectionItemTextMargin - Layout.bottomMargin: StudioTheme.Values.collectionItemTextMargin - Layout.rightMargin: StudioTheme.Values.collectionItemTextSideMargin - - text: StudioTheme.Constants.more_medium - font.family: StudioTheme.Constants.iconFont.family - font.pixelSize: StudioTheme.Values.baseIconFontSize - color: root.textColor - padding: StudioTheme.Values.collectionItemTextPadding - - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - - MouseArea { - anchors.fill: parent - acceptedButtons: Qt.RightButton | Qt.LeftButton - onClicked: collectionMenu.popup() - } - } - } - } - - StudioControls.Menu { - id: collectionMenu - - closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside - - StudioControls.MenuItem { - text: qsTr("Delete") - shortcut: StandardKey.Delete - onTriggered: deleteDialog.open() - } - - StudioControls.MenuItem { - text: qsTr("Rename") - shortcut: StandardKey.Replace - onTriggered: renameDialog.open() - } - - StudioControls.MenuItem { - text: qsTr("Assign to the selected node") - enabled: CollectionEditorBackend.rootView.targetNodeSelected - onTriggered: rootView.assignCollectionToSelectedNode(collectionName) - } - } - - component Spacer: Item { - implicitWidth: 1 - implicitHeight: StudioTheme.Values.columnGap - } - - StudioControls.Dialog { - id: deleteDialog - - title: qsTr("Deleting the model") - clip: true - implicitWidth: 300 - - contentItem: ColumnLayout { - spacing: 2 - - Text { - Layout.fillWidth: true - - wrapMode: Text.WordWrap - color: StudioTheme.Values.themeTextColor - text: qsTr("Are you sure that you want to delete model \"%1\"?" - + "\nThe model will be deleted permanently.").arg(collectionName) - - } - - Spacer {} - - RowLayout { - spacing: StudioTheme.Values.sectionRowSpacing - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - - HelperWidgets.Button { - text: qsTr("Delete") - onClicked: root.deleteItem() - } - - HelperWidgets.Button { - text: qsTr("Cancel") - onClicked: deleteDialog.reject() - } - } - } - } - - StudioControls.Dialog { - id: renameDialog - - title: qsTr("Rename model") - - onAccepted: { - if (newNameField.text !== "") - collectionName = newNameField.text - } - - onOpened: { - newNameField.text = collectionName - } - - contentItem: ColumnLayout { - spacing: 2 - - Text { - text: qsTr("Previous name: " + collectionName) - color: StudioTheme.Values.themeTextColor - } - - Spacer {} - - Text { - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - text: qsTr("New name:") - color: StudioTheme.Values.themeTextColor - } - - StudioControls.TextField { - id: newNameField - - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - Layout.fillWidth: true - - actionIndicator.visible: false - translationIndicator.visible: false - validator: newNameValidator - - Keys.onEnterPressed: renameDialog.accept() - Keys.onReturnPressed: renameDialog.accept() - Keys.onEscapePressed: renameDialog.reject() - - onTextChanged: { - btnRename.enabled = newNameField.text !== "" - } - } - - Spacer {} - - RowLayout { - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - spacing: StudioTheme.Values.sectionRowSpacing - - HelperWidgets.Button { - id: btnRename - - text: qsTr("Rename") - onClicked: renameDialog.accept() - } - - HelperWidgets.Button { - text: qsTr("Cancel") - onClicked: renameDialog.reject() - } - } - } - } - - RegularExpressionValidator { - id: newNameValidator - regularExpression: /^\w+$/ - } - - states: [ - State { - name: "default" - when: !collectionIsSelected && !itemMouse.containsMouse - - PropertyChanges { - target: innerRect - opacity: 0.6 - color: StudioTheme.Values.themeControlBackground - } - - PropertyChanges { - target: root - textColor: StudioTheme.Values.themeTextColor - } - }, - State { - name: "hovered" - when: !collectionIsSelected && itemMouse.containsMouse - - PropertyChanges { - target: innerRect - opacity: 0.8 - color: StudioTheme.Values.themeControlBackgroundHover - } - - PropertyChanges { - target: root - textColor: StudioTheme.Values.themeTextColor - } - }, - State { - name: "selected" - when: collectionIsSelected - - PropertyChanges { - target: innerRect - opacity: 1 - color: StudioTheme.Values.themeIconColorSelected - } - - PropertyChanges { - target: root - textColor: StudioTheme.Values.themeTextSelectedTextColor - } - } - ] -} diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionListView.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionListView.qml deleted file mode 100644 index ef06a2e7a0..0000000000 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionListView.qml +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2024 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick -import CollectionEditorBackend - -ListView { - id: root - - model: CollectionEditorBackend.model - clip: true - - delegate: CollectionItem { - implicitWidth: root.width - onDeleteItem: root.model.removeRow(index) - } -} diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionView.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionView.qml deleted file mode 100644 index acf82fe452..0000000000 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionView.qml +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (C) 2023 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import HelperWidgets as HelperWidgets -import StudioTheme as StudioTheme -import CollectionEditorBackend - -Item { - id: root - focus: true - - property var rootView: CollectionEditorBackend.rootView - property var model: CollectionEditorBackend.model - property var collectionDetailsModel: CollectionEditorBackend.collectionDetailsModel - property var collectionDetailsSortFilterModel: CollectionEditorBackend.collectionDetailsSortFilterModel - - function showWarning(title, message) { - warningDialog.title = title - warningDialog.message = message - warningDialog.open() - } - - // called from C++ when using the delete key - function deleteSelectedCollection() { - print("TODO: deleteSelectedCollection") - } - - ImportDialog { - id: importDialog - - backendValue: root.rootView - anchors.centerIn: parent - } - - NewCollectionDialog { - id: newCollection - - anchors.centerIn: parent - } - - Message { - id: warningDialog - - title: "" - message: "" - } - - Rectangle { - // Covers the toolbar color on top to prevent the background - // color for the margin of splitter - - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - height: topToolbar.height - color: topToolbar.color - } - - SplitView { - id: splitView - - readonly property bool isHorizontal: splitView.orientation === Qt.Horizontal - - orientation: width >= 500 ? Qt.Horizontal : Qt.Vertical - anchors.fill: parent - - onOrientationChanged: detailsView.closeDialogs() - - handle: Item { - id: handleDelegate - - property color color: SplitHandle.pressed ? StudioTheme.Values.themeControlOutlineInteraction - : SplitHandle.hovered ? StudioTheme.Values.themeControlOutlineHover - : StudioTheme.Values.themeControlOutline - - implicitWidth: 1 - implicitHeight: 1 - - Rectangle { - id: handleRect - - property real verticalMargin: splitView.isHorizontal ? StudioTheme.Values.splitterMargin : 0 - property real horizontalMargin: splitView.isHorizontal ? 0 : StudioTheme.Values.splitterMargin - - anchors.fill: parent - anchors.topMargin: handleRect.verticalMargin - anchors.bottomMargin: handleRect.verticalMargin - anchors.leftMargin: handleRect.horizontalMargin - anchors.rightMargin: handleRect.horizontalMargin - - color: handleDelegate.color - } - - containmentMask: Item { - x: splitView.isHorizontal ? ((handleDelegate.width - width) / 2) : 0 - y: splitView.isHorizontal ? 0 : ((handleDelegate.height - height) / 2) - height: splitView.isHorizontal ? handleDelegate.height : StudioTheme.Values.borderHover - width: splitView.isHorizontal ? StudioTheme.Values.borderHover : handleDelegate.width - } - } - - ColumnLayout { - id: collectionsSideBar - spacing: 0 - - SplitView.minimumWidth: 200 - SplitView.maximumWidth: 450 - SplitView.minimumHeight: 200 - SplitView.maximumHeight: 400 - SplitView.fillWidth: !splitView.isHorizontal - SplitView.fillHeight: splitView.isHorizontal - - Rectangle { - id: topToolbar - color: StudioTheme.Values.themeToolbarBackground - - Layout.preferredHeight: StudioTheme.Values.toolbarHeight - Layout.fillWidth: true - Layout.alignment: Qt.AlignTop | Qt.AlignHCenter - - Text { - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: StudioTheme.Values.toolbarHorizontalMargin - - text: qsTr("Data Models") - font.pixelSize: StudioTheme.Values.baseFontSize - color: StudioTheme.Values.themeTextColor - } - - HelperWidgets.AbstractButton { - id: importCollectionButton - - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: StudioTheme.Values.toolbarHorizontalMargin - - style: StudioTheme.Values.viewBarButtonStyle - buttonIcon: StudioTheme.Constants.import_medium - tooltip: qsTr("Import a model") - - onClicked: importDialog.open() - } - } - - CollectionListView { // Model Groups - Layout.fillWidth: true - Layout.minimumHeight: bottomSpacer.isExpanded ? 150 : 0 - Layout.fillHeight: !bottomSpacer.isExpanded - Layout.preferredHeight: contentHeight - Layout.maximumHeight: contentHeight - Layout.alignment: Qt.AlignTop | Qt.AlignHCenter - } - - HelperWidgets.IconButton { - id: addCollectionButton - - iconSize: 16 - Layout.fillWidth: true - Layout.minimumWidth: 24 - Layout.alignment: Qt.AlignTop | Qt.AlignHCenter - - tooltip: qsTr("Add a new model") - icon: StudioTheme.Constants.create_medium - onClicked: newCollection.open() - } - - Item { - id: bottomSpacer - - readonly property bool isExpanded: height > 0 - Layout.minimumWidth: 1 - Layout.fillHeight: true - } - } - - CollectionDetailsView { - id: detailsView - - model: root.collectionDetailsModel - backend: root.model - sortedModel: root.collectionDetailsSortFilterModel - SplitView.fillHeight: true - SplitView.fillWidth: true - } - } -} diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/ColorViewDelegate.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/ColorViewDelegate.qml deleted file mode 100644 index 6bb1b60159..0000000000 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/ColorViewDelegate.qml +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (C) 2024 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick -import QtQuick.Layouts -import QtQuick.Shapes -import QtQuick.Templates as T -import HelperWidgets 2.0 as HelperWidgets -import StudioTheme as StudioTheme -import StudioControls as StudioControls -import QtQuickDesignerTheme -import QtQuickDesignerColorPalette - -Row { - id: colorEditor - - property color color - property bool supportGradient: false - readonly property color __editColor: edit - - property variant value: { - if (!edit) - return "white" // default color for Rectangle - - if (colorEditor.isVector3D) { - return Qt.rgba(__editColor.x, - __editColor.y, - __editColor.z, 1) - } - - return __editColor - } - - property alias gradientPropertyName: popupDialog.gradientPropertyName - - property alias gradientThumbnail: gradientThumbnail - property alias shapeGradientThumbnail: shapeGradientThumbnail - - property bool shapeGradients: false - property bool isVector3D: false - property color originalColor - - property bool __block: false - - function getColorFromEditValue() { - if (!edit) - return "white" // default color for Rectangle - - if (colorEditor.isVector3D) { - return Qt.rgba(__editColor.x, - __editColor.y, - __editColor.z, 1) - } - - return __editColor - } - - function resetShapeColor() { - if (edit) - edit = "" - } - - function writeColor() { - if (colorEditor.isVector3D) { - edit = Qt.vector3d(colorEditor.color.r, - colorEditor.color.g, - colorEditor.color.b) - } else { - edit = colorEditor.color - } - } - - function initEditor() { - colorEditor.syncColor() - } - - // Syncing color from backend to frontend and block reflection - function syncColor() { - colorEditor.__block = true - colorEditor.color = colorEditor.getColorFromEditValue() - hexTextField.syncColor() - colorEditor.__block = false - } - - Connections { - id: backendConnection - - target: colorEditor - - function onValueChanged() { - if (popupDialog.isSolid()) - colorEditor.syncColor() - } - - function on__EditColorChanged() { - if (popupDialog.isSolid()) - colorEditor.syncColor() - } - } - - Timer { - id: colorEditorTimer - - repeat: false - interval: 100 - running: false - onTriggered: { - backendConnection.enabled = false - colorEditor.writeColor() - hexTextField.syncColor() - backendConnection.enabled = true - } - } - - onColorChanged: { - if (colorEditor.__block) - return - - if (!popupDialog.isInValidState) - return - - popupDialog.commitToGradient() - - // Delay setting the color to keep ui responsive - if (popupDialog.isSolid()) - colorEditorTimer.restart() - } - - Rectangle { - id: preview - - implicitWidth: StudioTheme.Values.twoControlColumnWidth - implicitHeight: StudioTheme.Values.height - color: colorEditor.color - border.color: StudioTheme.Values.themeControlOutline - border.width: StudioTheme.Values.border - - Rectangle { - id: gradientThumbnail - - anchors.fill: parent - anchors.margins: StudioTheme.Values.border - visible: !popupDialog.isSolid() - && !colorEditor.shapeGradients - && popupDialog.isLinearGradient() - } - - Shape { - id: shape - - anchors.fill: parent - anchors.margins: StudioTheme.Values.border - visible: !popupDialog.isSolid() && colorEditor.shapeGradients - - ShapePath { - id: shapeGradientThumbnail - - startX: shape.x - 1 - startY: shape.y - 1 - strokeWidth: -1 - strokeColor: "green" - - PathLine { - x: shape.x - 1 - y: shape.height - } - PathLine { - x: shape.width - y: shape.height - } - PathLine { - x: shape.width - y: shape.y - 1 - } - } - } - - Image { - anchors.fill: parent - source: "qrc:/navigator/icon/checkers.png" - fillMode: Image.Tile - z: -1 - } - - MouseArea { - anchors.fill: parent - onClicked: { - popupDialog.visibility ? popupDialog.close() : popupDialog.open() - forceActiveFocus() - } - } - - StudioControls.PopupDialog { - id: popupDialog - - property bool isInValidState: loader.active ? popupDialog.loaderItem.isInValidState : true - property QtObject loaderItem: loader.item - property string gradientPropertyName - - keepOpen: loader.item?.eyeDropperActive ?? false - - width: 260 - - function commitToGradient() { - if (!loader.active) - return - - if (colorEditor.supportGradient && popupDialog.loaderItem.gradientModel.hasGradient) { - var hexColor = convertColorToString(colorEditor.color) - hexTextField.text = hexColor - edit = hexColor - popupDialog.loaderItem.commitGradientColor() - } - } - - function isSolid() { - if (!loader.active) - return true - - return popupDialog.loaderItem.isSolid() - } - - function isLinearGradient(){ - if (!loader.active) - return false - - return popupDialog.loaderItem.isLinearGradient() - } - - function ensureLoader() { - if (!loader.active) - loader.active = true - } - - function open() { - popupDialog.ensureLoader() - popupDialog.loaderItem.initEditor() - popupDialog.show(preview) - } - - function determineActiveColorMode() { - if (loader.active && popupDialog.loaderItem) - popupDialog.loaderItem.determineActiveColorMode() - else - colorEditor.syncColor() - } - - Loader { - id: loader - - active: colorEditor.supportGradient - - sourceComponent: HelperWidgets.ColorEditorPopup { - shapeGradients: colorEditor.shapeGradients - supportGradient: colorEditor.supportGradient - width: popupDialog.contentWidth - } - - onLoaded: { - popupDialog.loaderItem.initEditor() - popupDialog.titleBar = loader.item.titleBarContent - } - } - } - } - - HelperWidgets.LineEdit { - id: hexTextField - implicitWidth: StudioTheme.Values.twoControlColumnWidth - + StudioTheme.Values.actionIndicatorWidth - width: hexTextField.implicitWidth - enabled: popupDialog.isSolid() - writeValueManually: true - validator: RegularExpressionValidator { - regularExpression: /#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?/g - } - showTranslateCheckBox: false - showExtendedFunctionButton: false - indicatorVisible: false - - onAccepted: colorEditor.color = hexTextField.text - onCommitData: { - colorEditor.color = hexTextField.text - if (popupDialog.isSolid()) - colorEditor.writeColor() - } - - function syncColor() { - hexTextField.text = colorEditor.color - } - } - - Component.onCompleted: popupDialog.determineActiveColorMode() - - on__EditColorChanged: popupDialog.determineActiveColorMode() -} diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/EditPropertyDialog.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/EditPropertyDialog.qml deleted file mode 100644 index 546dc5d770..0000000000 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/EditPropertyDialog.qml +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (C) 2023 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick -import QtQuick.Layouts -import StudioTheme 1.0 as StudioTheme -import StudioControls 1.0 as StudioControls -import HelperWidgets 2.0 as HelperWidgets -import CollectionDetails - -StudioControls.Dialog { - id: root - - required property var model - property int __propertyIndex: -1 - property string __currentName - - title: qsTr("Edit Column") - - function openDialog(index, initialPosition) { - root.__propertyIndex = index - - if (root.__propertyIndex < 0) - return - - root.__currentName = root.model.propertyName(root.__propertyIndex) - nameTextField.text = root.__currentName - nameTextField.selectAll() - nameTextField.forceActiveFocus() - - typeComboBox.initialType = root.model.propertyType(root.__propertyIndex) - typeComboBox.currentIndex = typeComboBox.find(typeComboBox.initialType) - - let newPoint = mapFromGlobal(initialPosition.x, initialPosition.y) - x = newPoint.x - y = newPoint.y - - root.open() - } - - onWidthChanged: { - if (visible && x > parent.width) - root.close() - } - - onAccepted: { - if (nameTextField.text !== "" && nameTextField.text !== root.__currentName) - root.model.renameColumn(root.__propertyIndex, nameTextField.text) - - if (typeComboBox.initialType !== typeComboBox.currentText) - root.model.setPropertyType(root.__propertyIndex, typeComboBox.currentText) - } - - contentItem: Column { - spacing: 5 - - Grid { - columns: 2 - rows: 2 - rowSpacing: 2 - columnSpacing: 25 - verticalItemAlignment: Grid.AlignVCenter - - Text { - text: qsTr("Name") - color: StudioTheme.Values.themeTextColor - verticalAlignment: Text.AlignVCenter - } - - StudioControls.TextField { - id: nameTextField - - actionIndicator.visible: false - translationIndicator.visible: false - - Keys.onEnterPressed: root.accept() - Keys.onReturnPressed: root.accept() - Keys.onEscapePressed: root.reject() - - validator: RegularExpressionValidator { - regularExpression: /^\w+$/ - } - } - - Text { - text: qsTr("Type") - color: StudioTheme.Values.themeTextColor - } - - StudioControls.ComboBox { - id: typeComboBox - - property string initialType - - model: CollectionDataTypeModel{} - textRole: "display" - tooltipRole: "toolTip" - actionIndicatorVisible: false - } - } - - Rectangle { - id: warningBox - - visible: typeComboBox.initialType !== typeComboBox.currentText - color: "transparent" - clip: true - border.color: StudioTheme.Values.themeWarning - width: parent.width - height: warning.height - - Row { - id: warning - - padding: 5 - spacing: 5 - - HelperWidgets.IconLabel { - icon: StudioTheme.Constants.warning_medium - anchors.verticalCenter: parent.verticalCenter - } - - Text { - text: qsTr("Conversion from %1 to %2 may lead to data loss") - .arg(typeComboBox.initialType) - .arg(typeComboBox.currentText) - - width: warningBox.width - 20 - - color: StudioTheme.Values.themeTextColor - wrapMode: Text.WordWrap - } - } - } - - Row { - height: 40 - spacing: 5 - - HelperWidgets.Button { - id: editButton - - text: qsTr("Apply") - enabled: nameTextField.text !== "" - anchors.bottom: parent.bottom - - onClicked: root.accept() - } - - HelperWidgets.Button { - text: qsTr("Cancel") - anchors.bottom: parent.bottom - - onClicked: root.reject() - } - } - } -} diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/IconTextButton.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/IconTextButton.qml deleted file mode 100644 index fe9d094349..0000000000 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/IconTextButton.qml +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (C) 2023 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import StudioTheme as StudioTheme - -Rectangle { - id: root - - required property string text - required property string icon - - property alias tooltip: toolTip.text - property StudioTheme.ControlStyle style: StudioTheme.Values.viewBarButtonStyle - property int fontSize: StudioTheme.Values.baseFontSize - - implicitHeight: style.squareControlSize.height - implicitWidth: rowAlign.width - - signal clicked() - - RowLayout { - id: rowAlign - - anchors.verticalCenter: parent.verticalCenter - spacing: StudioTheme.Values.inputHorizontalPadding - - Text { - id: iconItem - - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - text: root.icon - color: StudioTheme.Values.themeTextColor - font.family: StudioTheme.Constants.iconFont.family - font.pixelSize: StudioTheme.Values.bigFont - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - leftPadding: StudioTheme.Values.inputHorizontalPadding - } - - Text { - id: textItem - - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - text: root.text - color: StudioTheme.Values.themeTextColor - font.family: StudioTheme.Constants.font.family - font.pixelSize: StudioTheme.Values.baseFontSize - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - rightPadding: StudioTheme.Values.inputHorizontalPadding - } - } - - MouseArea { - id: mouseArea - anchors.fill: parent - hoverEnabled: true - onClicked: root.clicked() - } - - ToolTip { - id: toolTip - - visible: mouseArea.containsMouse && text !== "" - delay: 1000 - } - - states: [ - State { - name: "default" - when: !mouseArea.pressed && !mouseArea.containsMouse - PropertyChanges { - target: root - color: StudioTheme.Values.themeControlBackground - } - }, - State { - name: "Pressed" - when: mouseArea.pressed - PropertyChanges { - target: root - color: StudioTheme.Values.themeControlBackgroundInteraction - } - }, - State { - name: "Hovered" - when: !mouseArea.pressed && mouseArea.containsMouse - PropertyChanges { - target: root - color: StudioTheme.Values.themeControlBackgroundHover - } - } - ] -} diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/ImportDialog.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/ImportDialog.qml deleted file mode 100644 index 21a5e4e8e0..0000000000 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/ImportDialog.qml +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (C) 2023 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import Qt.labs.platform as PlatformWidgets -import HelperWidgets as HelperWidgets -import StudioControls as StudioControls -import StudioTheme as StudioTheme - -StudioControls.Dialog { - id: root - - title: qsTr("Import a model") - anchors.centerIn: parent - closePolicy: Popup.CloseOnEscape - modal: true - - required property var backendValue - - property bool fileExists: false - - onOpened: { - collectionName.text = "Model" - fileName.text = qsTr("Model path") - fileName.selectAll() - fileName.forceActiveFocus() - } - - onRejected: { - fileName.text = "" - } - - function acceptIfIsValid() { - if (btnImport.enabled) - btnImport.onClicked() - } - - RegularExpressionValidator { - id: fileNameValidator - regularExpression: /^(\w[^*><?|]*)[^/\\:*><?|]$/ - } - - PlatformWidgets.FileDialog { - id: fileDialog - nameFilters : ["All Model Files (*.json *.csv)", - "JSON Files (*.json)", - "Comma-Separated Values (*.csv)"] - - title: qsTr("Select a model file") - fileMode: PlatformWidgets.FileDialog.OpenFile - acceptLabel: qsTr("Open") - - onAccepted: fileName.text = fileDialog.file - } - - Message { - id: creationFailedDialog - - title: qsTr("Could not load the file") - message: qsTr("An error occurred while trying to load the file.") - - onClosed: root.reject() - } - - component Spacer: Item { - implicitWidth: 1 - implicitHeight: StudioTheme.Values.columnGap - } - - contentItem: ColumnLayout { - spacing: 2 - - Keys.onEnterPressed: root.acceptIfIsValid() - Keys.onReturnPressed: root.acceptIfIsValid() - Keys.onEscapePressed: root.reject() - - Text { - text: qsTr("File name") - color: StudioTheme.Values.themeTextColor - } - - RowLayout { - spacing: StudioTheme.Values.sectionRowSpacing - - Layout.fillWidth: true - - StudioControls.TextField { - id: fileName - - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - Layout.fillWidth: true - - actionIndicator.visible: false - translationIndicator.visible: false - validator: fileNameValidator - - onTextChanged: root.fileExists = root.backendValue.isValidUrlToImport(fileName.text) - } - - HelperWidgets.Button { - id: fileDialogButton - - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - - text: qsTr("Open") - onClicked: fileDialog.open() - } - } - - Spacer {} - - Text { - text: qsTr("The model name") - color: StudioTheme.Values.themeTextColor - } - - StudioControls.TextField { - id: collectionName - - Layout.fillWidth: true - - actionIndicator.visible: false - translationIndicator.visible: false - validator: RegularExpressionValidator { - regularExpression: /^[\w ]+$/ - } - } - - Spacer { implicitHeight: StudioTheme.Values.controlLabelGap } - - Label { - id: fieldErrorText - - Layout.fillWidth: true - - color: StudioTheme.Values.themeTextColor - wrapMode: Label.WordWrap - padding: 5 - - background: Rectangle { - color: "transparent" - border.width: StudioTheme.Values.border - border.color: StudioTheme.Values.themeWarning - } - - states: [ - State { - name: "default" - when: fileName.text !== "" && collectionName.text !== "" - - PropertyChanges { - target: fieldErrorText - text: "" - visible: false - } - }, - State { - name: "fileError" - when: fileName.text === "" - - PropertyChanges { - target: fieldErrorText - text: qsTr("File name can not be empty") - visible: true - } - }, - State { - name: "collectionNameError" - when: collectionName.text === "" - - PropertyChanges { - target: fieldErrorText - text: qsTr("The model name can not be empty") - visible: true - } - } - ] - } - - Spacer {} - - StudioControls.CheckBox { - id: csvFirstRowIsHeader - - visible: root.fileExists && fileName.text.endsWith(".csv") - text: qsTr("Consider first row as headers") - checked: true - actionIndicatorVisible: false - } - - Spacer {} - - RowLayout { - spacing: StudioTheme.Values.sectionRowSpacing - - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - - HelperWidgets.Button { - id: btnImport - - text: qsTr("Import") - enabled: root.fileExists && collectionName.text !== "" - - onClicked: { - let collectionImported = root.backendValue.importFile( - collectionName.text, - fileName.text, - csvFirstRowIsHeader.checked) - - if (collectionImported) - root.accept() - else - creationFailedDialog.open() - } - } - - HelperWidgets.Button { - text: qsTr("Cancel") - onClicked: root.reject() - } - } - } -} diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/Message.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/Message.qml deleted file mode 100644 index f6e7af4560..0000000000 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/Message.qml +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2023 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import HelperWidgets 2.0 as HelperWidgets -import StudioControls 1.0 as StudioControls -import StudioTheme as StudioTheme - -StudioControls.Dialog { - id: root - - required property string message - - anchors.centerIn: parent - closePolicy: Popup.CloseOnEscape - implicitWidth: 300 - modal: true - - contentItem: ColumnLayout { - spacing: StudioTheme.Values.sectionColumnSpacing - - Text { - Layout.fillWidth: true - text: root.message - color: StudioTheme.Values.themeTextColor - wrapMode: Text.WordWrap - leftPadding: 10 - rightPadding: 10 - } - - HelperWidgets.Button { - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - - text: qsTr("Close") - onClicked: root.reject() - } - } - - onOpened: root.forceActiveFocus() -} diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/NewCollectionDialog.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/NewCollectionDialog.qml deleted file mode 100644 index 6f567a775c..0000000000 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/NewCollectionDialog.qml +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (C) 2023 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import HelperWidgets as HelperWidgets -import StudioControls as StudioControls -import StudioTheme as StudioTheme -import CollectionEditorBackend - -StudioControls.Dialog { - id: root - - property bool nameExists: false - readonly property bool isValid: collectionName.text !== "" && !root.nameExists - - title: qsTr("Add a new model") - - closePolicy: Popup.CloseOnEscape - modal: true - - onOpened: { - collectionName.text = CollectionEditorBackend.model.getUniqueCollectionName() - } - - onRejected: { - collectionName.text = "" - } - - onAccepted: { - if (root.isValid) - root.CollectionEditorBackend.rootView.addCollectionToDataStore(collectionName.text); - } - - ColumnLayout { - spacing: 5 - - NameField { - text: qsTr("Name") - } - - StudioControls.TextField { - id: collectionName - - Layout.fillWidth: true - - actionIndicator.visible: false - translationIndicator.visible: false - validator: RegularExpressionValidator { - regularExpression: /^[\w ]+$/ - } - - Keys.onEnterPressed: btnCreate.onClicked() - Keys.onReturnPressed: btnCreate.onClicked() - Keys.onEscapePressed: root.reject() - - onTextChanged: { - root.nameExists = CollectionEditorBackend.model.collectionExists(collectionName.text) - } - } - - ErrorField { - id: errorField - text: { - if (collectionName.text === "") - return qsTr("Name can not be empty") - else if (root.nameExists) - return qsTr("Name '%1' already exists").arg(collectionName.text) - else - return "" - } - } - - Spacer {} - - Row { - spacing: StudioTheme.Values.sectionRowSpacing - - HelperWidgets.Button { - id: btnCreate - - text: qsTr("Create") - enabled: root.isValid - onClicked: root.accept() - } - - HelperWidgets.Button { - text: qsTr("Cancel") - onClicked: root.reject() - } - } - } - - component NameField: Text { - color: StudioTheme.Values.themeTextColor - font.family: StudioTheme.Constants.font.family - font.pixelSize: StudioTheme.Values.baseIconFontSize - } - - component ErrorField: Text { - color: StudioTheme.Values.themeError - font.family: StudioTheme.Constants.font.family - font.pixelSize: StudioTheme.Values.baseIconFontSize - } - - component Spacer: Item { - width: 1 - height: StudioTheme.Values.columnGap - } -} diff --git a/share/qtcreator/qmldesigner/connectionseditor/ConnectionsDialog.qml b/share/qtcreator/qmldesigner/connectionseditor/ConnectionsDialog.qml index 965f31d21a..299234127a 100644 --- a/share/qtcreator/qmldesigner/connectionseditor/ConnectionsDialog.qml +++ b/share/qtcreator/qmldesigner/connectionseditor/ConnectionsDialog.qml @@ -11,6 +11,8 @@ StudioControls.PopupDialog { property alias backend: form.backend + keepOpen: form.keepOpen + titleBar: Row { spacing: 30 // TODO anchors.fill: parent @@ -43,6 +45,8 @@ StudioControls.PopupDialog { ConnectionsDialogForm { id: form + parentWindow: root.window + Connections { target: root.backend function onPopupShouldClose() { diff --git a/share/qtcreator/qmldesigner/connectionseditor/ConnectionsDialogForm.qml b/share/qtcreator/qmldesigner/connectionseditor/ConnectionsDialogForm.qml index 603903dbdd..a799165375 100644 --- a/share/qtcreator/qmldesigner/connectionseditor/ConnectionsDialogForm.qml +++ b/share/qtcreator/qmldesigner/connectionseditor/ConnectionsDialogForm.qml @@ -16,6 +16,9 @@ Column { property var backend + property bool keepOpen: expressionDialogLoader.visible + property Window parentWindow: null + width: parent.width spacing: root.verticalSpacing @@ -267,10 +270,8 @@ Column { horizontalAlignment: code.lineCount === 1 ? Text.AlignHCenter : Text.AlignLeft verticalAlignment: Text.AlignVCenter elide: Text.ElideRight - } - Loader { id: expressionDialogLoader parent: editor @@ -297,19 +298,19 @@ Column { id: bindingEditor onRejected: { - hideWidget() + bindingEditor.hideWidget() expressionDialogLoader.visible = false } onAccepted: { backend.setNewSource(bindingEditor.text) - hideWidget() + bindingEditor.hideWidget() expressionDialogLoader.visible = false } } } - } // loader - } // rect - } //col 2 -}//col1 + } + } + } +} diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml index c6db8425ff..d3eb29563d 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml @@ -23,6 +23,7 @@ Item { texturesView.closeContextMenu() environmentsView.closeContextMenu() effectsView.closeContextMenu() + userView.closeContextMenu() HelperWidgets.Controller.closeContextMenu() } @@ -113,18 +114,26 @@ Item { id: tabBar width: parent.width height: StudioTheme.Values.toolbarHeight - tabsModel: [{name: qsTr("Materials"), icon: StudioTheme.Constants.material_medium}, - {name: qsTr("Textures"), icon: StudioTheme.Constants.textures_medium}, - {name: qsTr("Environments"), icon: StudioTheme.Constants.languageList_medium}, - {name: qsTr("Effects"), icon: StudioTheme.Constants.effects}] + + tabsModel: [ + { name: qsTr("Materials"), icon: StudioTheme.Constants.material_medium }, + { name: qsTr("Textures"), icon: StudioTheme.Constants.textures_medium }, + { name: qsTr("Environments"), icon: StudioTheme.Constants.languageList_medium }, + { name: qsTr("Effects"), icon: StudioTheme.Constants.effects }, + { name: qsTr("User Assets"), icon: StudioTheme.Constants.effects } // TODO: update icon + ] } } } - UnimportBundleMaterialDialog { + UnimportBundleItemDialog { id: confirmUnimportDialog } + DeleteBundleItemDialog { + id: confirmDeleteDialog + } + StackLayout { id: stackLayout width: root.width @@ -148,7 +157,8 @@ Item { onUnimport: (bundleMat) => { confirmUnimportDialog.targetBundleItem = bundleMat - confirmUnimportDialog.targetBundleType = "material" + confirmUnimportDialog.targetBundleLabel = "material" + confirmUnimportDialog.targetBundleModel = ContentLibraryBackend.materialsModel confirmUnimportDialog.open() } @@ -208,10 +218,40 @@ Item { onUnimport: (bundleItem) => { confirmUnimportDialog.targetBundleItem = bundleItem - confirmUnimportDialog.targetBundleType = "effect" + confirmUnimportDialog.targetBundleLabel = "effect" + confirmUnimportDialog.targetBundleModel = ContentLibraryBackend.effectsModel + confirmUnimportDialog.open() + } + + onCountChanged: root.responsiveResize(stackLayout.width, stackLayout.height) + } + + ContentLibraryUserView { + id: userView + + adsFocus: root.adsFocus + width: root.width + + cellWidth: root.thumbnailSize + cellHeight: root.thumbnailSize + 20 + numColumns: root.numColumns + hideHorizontalScrollBar: true + + searchBox: searchBox + + onUnimport: (bundleItem) => { + confirmUnimportDialog.targetBundleItem = bundleItem + confirmUnimportDialog.targetBundleLabel = "material" + confirmUnimportDialog.targetBundleModel = ContentLibraryBackend.userModel confirmUnimportDialog.open() } + onRemoveFromContentLib: (bundleItem) => { + confirmDeleteDialog.targetBundleItem = bundleItem + confirmDeleteDialog.targetBundleLabel = "material" + confirmDeleteDialog.open() + } + onCountChanged: root.responsiveResize(stackLayout.width, stackLayout.height) } } diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffectContextMenu.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffectContextMenu.qml index 1e0bcf1eb4..008f99d4fa 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffectContextMenu.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffectContextMenu.qml @@ -12,7 +12,7 @@ StudioControls.Menu { property var targetItem: null - readonly property bool targetAvailable: targetItem && !ContentLibraryBackend.effectsModel.importerRunning + readonly property bool targetAvailable: targetItem && !ContentLibraryBackend.rootView.importerRunning signal unimport(var bundleEff); diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffectsView.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffectsView.qml index f6df99156b..199f784db1 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffectsView.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffectsView.qml @@ -91,7 +91,7 @@ HelperWidgets.ScrollView { id: repeater model: bundleCategoryItems - delegate: ContentLibraryEffect { + delegate: ContentLibraryItem { width: root.cellWidth height: root.cellHeight diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffect.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryItem.qml index b20cc71e15..e6e5cd05c3 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryEffect.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryItem.qml @@ -23,8 +23,8 @@ Item { acceptedButtons: Qt.LeftButton | Qt.RightButton onPressed: (mouse) => { - if (mouse.button === Qt.LeftButton && !ContentLibraryBackend.effectsModel.importerRunning) - ContentLibraryBackend.rootView.startDragEffect(modelData, mapToGlobal(mouse.x, mouse.y)) + if (mouse.button === Qt.LeftButton && !ContentLibraryBackend.rootView.importerRunning) + ContentLibraryBackend.rootView.startDragItem(modelData, mapToGlobal(mouse.x, mouse.y)) else if (mouse.button === Qt.RightButton) root.showContextMenu() } @@ -43,7 +43,7 @@ Item { source: modelData.bundleItemIcon cache: false - Rectangle { // circular indicator for imported bundle effect + Rectangle { // circular indicator for imported bundle item width: 10 height: 10 radius: 5 @@ -57,7 +57,7 @@ Item { ToolTip { visible: indicatorMouseArea.containsMouse - text: qsTr("Effect is imported to project") + text: qsTr("Item is imported to the project") delay: 1000 } diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryItemContextMenu.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryItemContextMenu.qml new file mode 100644 index 0000000000..6f50512430 --- /dev/null +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryItemContextMenu.qml @@ -0,0 +1,71 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import QtQuick +import StudioControls as StudioControls +import StudioTheme as StudioTheme +import ContentLibraryBackend + +StudioControls.Menu { + id: root + + property var targetItem: null + property bool enableRemove: false // true: adds an option to remove targetItem + + readonly property bool targetAvailable: targetItem && !ContentLibraryBackend.rootView.importerRunning + + signal unimport(); + signal addToProject() + signal applyToSelected(bool add) + signal removeFromContentLib() + + function popupMenu(item = null) + { + root.targetItem = item + + let isMaterial = root.targetItem.itemType === "material" + applyToSelectedReplace.visible = isMaterial + applyToSelectedAdd.visible = isMaterial + + popup() + } + + closePolicy: StudioControls.Menu.CloseOnEscape | StudioControls.Menu.CloseOnPressOutside + + StudioControls.MenuItem { + id: applyToSelectedReplace + text: qsTr("Apply to selected (replace)") + height: visible ? implicitHeight : 0 + enabled: root.targetAvailable && ContentLibraryBackend.rootView.hasModelSelection + onTriggered: root.applyToSelected(false) + } + + StudioControls.MenuItem { + id: applyToSelectedAdd + text: qsTr("Apply to selected (add)") + height: visible ? implicitHeight : 0 + enabled: root.targetAvailable && ContentLibraryBackend.rootView.hasModelSelection + onTriggered: root.applyToSelected(true) + } + + StudioControls.MenuSeparator {} + + StudioControls.MenuItem { + enabled: root.targetAvailable + text: qsTr("Add an instance to project") + onTriggered: root.addToProject() + } + + StudioControls.MenuItem { + enabled: root.targetAvailable && root.targetItem.bundleItemImported + text: qsTr("Remove from project") + onTriggered: root.unimport() + } + + StudioControls.MenuItem { + text: qsTr("Remove from Content Library") + visible: root.enableRemove && root.targetAvailable + height: visible ? implicitHeight : 0 + onTriggered: root.removeFromContentLib() + } +} diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterial.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterial.qml index 93b226d6ca..20ba17d804 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterial.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterial.qml @@ -12,12 +12,13 @@ import WebFetcher Item { id: root - signal showContextMenu() - // Download states: "" (ie default, not downloaded), "unavailable", "downloading", "downloaded", // "failed" property string downloadState: modelData.isDownloaded() ? "downloaded" : "" + signal showContextMenu() + signal addToProject() + visible: modelData.bundleMaterialVisible MouseArea { @@ -29,7 +30,7 @@ Item { acceptedButtons: Qt.LeftButton | Qt.RightButton onPressed: (mouse) => { - if (mouse.button === Qt.LeftButton && !materialsModel.importerRunning) { + if (mouse.button === Qt.LeftButton && !ContentLibraryBackend.rootView.importerRunning) { if (root.downloadState === "downloaded") ContentLibraryBackend.rootView.startDragMaterial(modelData, mapToGlobal(mouse.x, mouse.y)) } else if (mouse.button === Qt.RightButton && root.downloadState === "downloaded") { @@ -71,7 +72,7 @@ Item { color: "#00ff00" border.color: "#555555" border.width: 1 - visible: modelData.bundleMaterialImported + visible: modelData.bundleItemImported ToolTip { visible: indicatorMouseArea.containsMouse @@ -96,12 +97,12 @@ Item { pressColor: Qt.hsla(c.hslHue, c.hslSaturation, c.hslLightness, .4) anchors.right: img.right anchors.bottom: img.bottom - enabled: !ContentLibraryBackend.materialsModel.importerRunning + enabled: !ContentLibraryBackend.rootView.importerRunning visible: root.downloadState === "downloaded" && (containsMouse || mouseArea.containsMouse) onClicked: { - ContentLibraryBackend.materialsModel.addToProject(modelData) + root.addToProject() } } @@ -183,7 +184,7 @@ Item { baseUrl: modelData.bundleMaterialBaseWebUrl files: modelData.bundleMaterialFiles - targetDirPath: modelData.bundleMaterialParentPath + targetDirPath: modelData.bundleMaterialDirPath onDownloadStarting: { root.downloadState = "downloading" diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialContextMenu.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialContextMenu.qml deleted file mode 100644 index ca3a05bdd1..0000000000 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialContextMenu.qml +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2022 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.15 -import HelperWidgets 2.0 -import StudioControls 1.0 as StudioControls -import StudioTheme 1.0 as StudioTheme - -StudioControls.Menu { - id: root - - property var targetMaterial: null - property bool hasModelSelection: false - property bool importerRunning: false - - readonly property bool targetAvailable: targetMaterial && !importerRunning - - signal unimport(var bundleMat); - signal addToProject(var bundleMat) - - function popupMenu(targetMaterial = null) - { - this.targetMaterial = targetMaterial - popup() - } - - closePolicy: StudioControls.Menu.CloseOnEscape | StudioControls.Menu.CloseOnPressOutside - - StudioControls.MenuItem { - text: qsTr("Apply to selected (replace)") - enabled: root.targetAvailable && root.hasModelSelection - onTriggered: materialsModel.applyToSelected(root.targetMaterial, false) - } - - StudioControls.MenuItem { - text: qsTr("Apply to selected (add)") - enabled: root.targetAvailable && root.hasModelSelection - onTriggered: materialsModel.applyToSelected(root.targetMaterial, true) - } - - StudioControls.MenuSeparator {} - - StudioControls.MenuItem { - enabled: root.targetAvailable - text: qsTr("Add an instance to project") - - onTriggered: { - root.addToProject(root.targetMaterial) - } - } - - StudioControls.MenuItem { - enabled: root.targetAvailable && root.targetMaterial.bundleMaterialImported - text: qsTr("Remove from project") - - onTriggered: root.unimport(root.targetMaterial) - } -} diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml index c21baf4c58..e9fca31973 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml @@ -27,8 +27,6 @@ HelperWidgets.ScrollView { root.count = c } - property var currMaterialItem: null - property var rootItem: null property var materialsModel: ContentLibraryBackend.materialsModel required property var searchBox @@ -48,20 +46,19 @@ HelperWidgets.ScrollView { } Column { - ContentLibraryMaterialContextMenu { + ContentLibraryItemContextMenu { id: ctxMenu - hasModelSelection: materialsModel.hasModelSelection - importerRunning: materialsModel.importerRunning + onApplyToSelected: (add) => root.materialsModel.applyToSelected(ctxMenu.targetItem, add) - onUnimport: (bundleMat) => root.unimport(bundleMat) - onAddToProject: (bundleMat) => materialsModel.addToProject(bundleMat) + onUnimport: root.unimport(ctxMenu.targetItem) + onAddToProject: root.materialsModel.addToProject(ctxMenu.targetItem) } Repeater { id: categoryRepeater - model: materialsModel + model: root.materialsModel delegate: HelperWidgets.Section { id: section @@ -73,7 +70,7 @@ HelperWidgets.ScrollView { bottomPadding: StudioTheme.Values.sectionPadding caption: bundleCategoryName - visible: bundleCategoryVisible && !materialsModel.isEmpty + visible: bundleCategoryVisible && !root.materialsModel.isEmpty expanded: bundleCategoryExpanded expandOnClick: false category: "ContentLib_Mat" @@ -104,6 +101,7 @@ HelperWidgets.ScrollView { height: root.cellHeight onShowContextMenu: ctxMenu.popupMenu(modelData) + onAddToProject: root.materialsModel.addToProject(modelData) } onCountChanged: root.assignMaxCount() @@ -115,13 +113,13 @@ HelperWidgets.ScrollView { Text { id: infoText text: { - if (!materialsModel.matBundleExists) + if (!root.materialsModel.matBundleExists) qsTr("No materials available. Make sure you have internet connection.") else if (!ContentLibraryBackend.rootView.isQt6Project) qsTr("<b>Content Library</b> materials are not supported in Qt5 projects.") else if (!ContentLibraryBackend.rootView.hasQuick3DImport) qsTr("To use <b>Content Library</b>, first add the QtQuick3D module in the <b>Components</b> view.") - else if (!materialsModel.hasRequiredQuick3DImport) + else if (!root.materialsModel.hasRequiredQuick3DImport) qsTr("To use <b>Content Library</b>, version 6.3 or later of the QtQuick3D module is required.") else if (!ContentLibraryBackend.rootView.hasMaterialLibrary) qsTr("<b>Content Library</b> is disabled inside a non-visual component.") @@ -134,7 +132,7 @@ HelperWidgets.ScrollView { font.pixelSize: StudioTheme.Values.baseFontSize topPadding: 10 leftPadding: 10 - visible: materialsModel.isEmpty + visible: root.materialsModel.isEmpty } } } diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexture.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexture.qml index f74f190040..4fbeb1b8b5 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexture.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexture.qml @@ -148,7 +148,7 @@ Item { visible: root.delegateVisible && root.downloadState != "downloading" cache: false - property string webUrl: modelData.textureWebUrl + property string textureUrl: modelData.textureUrl IconButton { id: downloadIcon @@ -279,7 +279,7 @@ Item { FileDownloader { id: textureDownloader - url: image.webUrl + url: image.textureUrl probeUrl: false downloadEnabled: true onDownloadStarting: { @@ -333,7 +333,7 @@ Item { FileDownloader { id: iconDownloader - url: modelData.textureWebIconUrl + url: modelData.textureIconUrl probeUrl: false downloadEnabled: true targetFilePath: modelData.textureIconPath diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTextureContextMenu.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTextureContextMenu.qml index f804f16d89..b1f690f10c 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTextureContextMenu.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTextureContextMenu.qml @@ -12,6 +12,7 @@ StudioControls.Menu { property var targetTexture: null property bool hasSceneEnv: false + property bool enableRemove: false // true: adds an option to remove targetTexture property bool canUse3D: targetTexture && ContentLibraryBackend.rootView.hasQuick3DImport && ContentLibraryBackend.rootView.hasMaterialLibrary @@ -32,13 +33,20 @@ StudioControls.Menu { StudioControls.MenuItem { text: qsTr("Add texture") - enabled: canUse3D + enabled: root.canUse3D onTriggered: ContentLibraryBackend.rootView.addTexture(root.targetTexture) } StudioControls.MenuItem { text: qsTr("Add light probe") - enabled: root.hasSceneEnv && canUse3D + enabled: root.hasSceneEnv && root.canUse3D onTriggered: ContentLibraryBackend.rootView.addLightProbe(root.targetTexture) } + + StudioControls.MenuItem { + text: qsTr("Remove from Content Library") + visible: root.targetTexture && root.enableRemove + height: visible ? implicitHeight : 0 + onTriggered: ContentLibraryBackend.userModel.removeTexture(root.targetTexture) + } } diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexturesView.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexturesView.qml index 1fac9f2234..617b724e66 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexturesView.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexturesView.qml @@ -27,9 +27,6 @@ HelperWidgets.ScrollView { root.count = c } - property var currMaterialItem: null - property var rootItem: null - required property var searchBox required property var model required property string sectionCategory diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml new file mode 100644 index 0000000000..cced9e5f09 --- /dev/null +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml @@ -0,0 +1,170 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import QtQuick +import Qt.labs.qmlmodels +import HelperWidgets as HelperWidgets +import StudioControls as StudioControls +import StudioTheme as StudioTheme +import ContentLibraryBackend + +HelperWidgets.ScrollView { + id: root + + clip: true + interactive: !ctxMenuItem.opened && !ctxMenuTexture.opened + && !ContentLibraryBackend.rootView.isDragging && !HelperWidgets.Controller.contextMenuOpened + + property real cellWidth: 100 + property real cellHeight: 120 + property int numColumns: 4 + + property int count: 0 + function assignMaxCount() { + let c = 0 + for (let i = 0; i < categoryRepeater.count; ++i) + c = Math.max(c, categoryRepeater.itemAt(i)?.count ?? 0) + + root.count = c + } + + required property var searchBox + + signal unimport(var bundleItem); + signal removeFromContentLib(var bundleItem); + + function closeContextMenu() { + ctxMenuItem.close() + ctxMenuTexture.close() + } + + function expandVisibleSections() { + for (let i = 0; i < categoryRepeater.count; ++i) { + let cat = categoryRepeater.itemAt(i) + if (cat.visible && !cat.expanded) + cat.expandSection() + } + } + + Column { + ContentLibraryItemContextMenu { + id: ctxMenuItem + + enableRemove: true + + onApplyToSelected: (add) => ContentLibraryBackend.userModel.applyToSelected(ctxMenuItem.targetItem, add) + + onUnimport: root.unimport(ctxMenuItem.targetItem) + onAddToProject: ContentLibraryBackend.userModel.addToProject(ctxMenuItem.targetItem) + onRemoveFromContentLib: root.removeFromContentLib(ctxMenuItem.targetItem) + } + + ContentLibraryTextureContextMenu { + id: ctxMenuTexture + + enableRemove: true + hasSceneEnv: ContentLibraryBackend.texturesModel.hasSceneEnv + } + + Repeater { + id: categoryRepeater + + model: ContentLibraryBackend.userModel + + delegate: HelperWidgets.Section { + id: section + + width: root.width + leftPadding: StudioTheme.Values.sectionPadding + rightPadding: StudioTheme.Values.sectionPadding + topPadding: StudioTheme.Values.sectionPadding + bottomPadding: StudioTheme.Values.sectionPadding + + caption: categoryName + visible: categoryVisible && infoText.text === "" + category: "ContentLib_User" + + function expandSection() { + section.expanded = true + } + + property alias count: repeater.count + + onCountChanged: root.assignMaxCount() + + Grid { + width: section.width - section.leftPadding - section.rightPadding + spacing: StudioTheme.Values.sectionGridSpacing + columns: root.numColumns + + Repeater { + id: repeater + model: categoryItems + + delegate: DelegateChooser { + role: "itemType" + + DelegateChoice { + roleValue: "material" + ContentLibraryMaterial { + width: root.cellWidth + height: root.cellHeight + + onShowContextMenu: ctxMenuItem.popupMenu(modelData) + onAddToProject: ContentLibraryBackend.userModel.addToProject(modelData) + } + } + DelegateChoice { + roleValue: "texture" + delegate: ContentLibraryTexture { + width: root.cellWidth + height: root.cellWidth // for textures use a square size since there is no name row + + onShowContextMenu: ctxMenuTexture.popupMenu(modelData) + } + } + DelegateChoice { + roleValue: "item" + delegate: ContentLibraryItem { + width: root.cellWidth + height: root.cellHeight + + onShowContextMenu: ctxMenuItem.popupMenu(modelData) + } + } + } + + onCountChanged: root.assignMaxCount() + } + } + + Text { + text: qsTr("No match found."); + color: StudioTheme.Values.themeTextColor + font.pixelSize: StudioTheme.Values.baseFontSize + leftPadding: 10 + visible: infoText.text === "" && !searchBox.isEmpty() && categoryNoMatch + } + } + } + + Text { + id: infoText + text: { + if (!ContentLibraryBackend.rootView.isQt6Project) + qsTr("<b>Content Library</b> is not supported in Qt5 projects.") + else if (!ContentLibraryBackend.rootView.hasQuick3DImport) + qsTr("To use <b>Content Library</b>, first add the QtQuick3D module in the <b>Components</b> view.") + else if (!ContentLibraryBackend.rootView.hasMaterialLibrary) + qsTr("<b>Content Library</b> is disabled inside a non-visual component.") + else + "" + } + color: StudioTheme.Values.themeTextColor + font.pixelSize: StudioTheme.Values.baseFontSize + topPadding: 10 + leftPadding: 10 + visible: infoText.text !== "" + } + } +} diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/DeleteBundleItemDialog.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/DeleteBundleItemDialog.qml new file mode 100644 index 0000000000..d8f6551ae5 --- /dev/null +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/DeleteBundleItemDialog.qml @@ -0,0 +1,65 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import HelperWidgets +import StudioControls as StudioControls +import StudioTheme as StudioTheme +import ContentLibraryBackend + +StudioControls.Dialog { + id: root + + property var targetBundleItem + property var targetBundleModel + property string targetBundleLabel // "effect" or "material" + + title: qsTr("Remove bundle %1").arg(root.targetBundleLabel) + anchors.centerIn: parent + closePolicy: Popup.CloseOnEscape + implicitWidth: 300 + modal: true + + onOpened: warningText.forceActiveFocus() + + contentItem: Column { + spacing: 20 + width: parent.width + + Text { + id: warningText + + text: qsTr("Are you sure you? The action cannot be undone") + color: StudioTheme.Values.themeTextColor + wrapMode: Text.WordWrap + anchors.right: parent.right + anchors.left: parent.left + leftPadding: 10 + rightPadding: 10 + + Keys.onEnterPressed: btnRemove.onClicked() + Keys.onReturnPressed: btnRemove.onClicked() + } + + Row { + anchors.right: parent.right + Button { + id: btnRemove + + text: qsTr("Remove") + + onClicked: { + ContentLibraryBackend.userModel.removeFromContentLib(root.targetBundleItem) + root.accept() + } + } + + Button { + text: qsTr("Cancel") + onClicked: root.reject() + } + } + } +} diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/UnimportBundleMaterialDialog.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/UnimportBundleItemDialog.qml index 48be045d8b..305e1018e3 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/UnimportBundleMaterialDialog.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/UnimportBundleItemDialog.qml @@ -12,24 +12,27 @@ import ContentLibraryBackend StudioControls.Dialog { id: root - title: qsTr("Bundle material might be in use") + property var targetBundleItem + property var targetBundleModel + property string targetBundleLabel // "effect" or "material" + + title: qsTr("Bundle %1 might be in use").arg(root.targetBundleLabel) anchors.centerIn: parent closePolicy: Popup.CloseOnEscape implicitWidth: 300 modal: true - property var targetBundleType // "effect" or "material" - property var targetBundleItem + onOpened: warningText.forceActiveFocus() contentItem: Column { spacing: 20 width: parent.width Text { - id: folderNotEmpty + id: warningText - text: qsTr("If the %1 you are removing is in use, it might cause the project to malfunction.\n\nAre you sure you want to remove the %1?") - .arg(root.targetBundleType) + text: qsTr("If the %1 you are removing is in use, it might cause the project to malfunction.\n\nAre you sure you want to remove it?") + .arg(root.targetBundleLabel) color: StudioTheme.Values.themeTextColor wrapMode: Text.WordWrap anchors.right: parent.right @@ -49,11 +52,7 @@ StudioControls.Dialog { text: qsTr("Remove") onClicked: { - if (root.targetBundleType === "material") - ContentLibraryBackend.materialsModel.removeFromProject(root.targetBundleItem) - else if (root.targetBundleType === "effect") - ContentLibraryBackend.effectsModel.removeFromProject(root.targetBundleItem) - + root.targetBundleModel.removeFromProject(root.targetBundleItem) root.accept() } } @@ -64,6 +63,4 @@ StudioControls.Dialog { } } } - - onOpened: folderNotEmpty.forceActiveFocus() } diff --git a/share/qtcreator/qmldesigner/designericons.json b/share/qtcreator/qmldesigner/designericons.json index 157012b312..005494b471 100644 --- a/share/qtcreator/qmldesigner/designericons.json +++ b/share/qtcreator/qmldesigner/designericons.json @@ -219,7 +219,7 @@ } }, "CameraSpeedConfigIcon": { - "iconName": "camera_medium" + "iconName": "cameraSpeed_medium" }, "EditColorIcon": { "iconName": "colorSelection_medium" diff --git a/share/qtcreator/qmldesigner/edit3dQmlSource/CameraSpeedConfigurationDialog.qml b/share/qtcreator/qmldesigner/edit3dQmlSource/CameraSpeedConfigurationDialog.qml index 2e2ff54700..b51369ffa3 100644 --- a/share/qtcreator/qmldesigner/edit3dQmlSource/CameraSpeedConfigurationDialog.qml +++ b/share/qtcreator/qmldesigner/edit3dQmlSource/CameraSpeedConfigurationDialog.qml @@ -57,7 +57,7 @@ Rectangle { HelperWidgets.IconIndicator { anchors.fill: parent - icon: StudioTheme.Constants.camera_medium + icon: StudioTheme.Constants.cameraSpeed_medium pixelSize: StudioTheme.Values.myIconFontSize * 1.4 iconColor: StudioTheme.Values.themeLinkIndicatorColorHover enabled: false diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectComposer.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectComposer.qml index dda1d93ff9..305bbc7925 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectComposer.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectComposer.qml @@ -365,7 +365,7 @@ ColumnLayout { Connections { id: dragConnection target: root.draggedSec - onYChanged: root.handleDragMove() + function onYChanged() { root.handleDragMove() } } Timer { diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectComposerPreview.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectComposerPreview.qml index c832b2f370..c0c47f7366 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectComposerPreview.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectComposerPreview.qml @@ -21,6 +21,7 @@ Column { readonly property int updateDelay: 100 readonly property int previewMargin: 5 + readonly property int extraMargin: 200 property real previewScale: 1 @@ -246,6 +247,8 @@ Column { layer.enabled: true layer.mipmap: true layer.smooth: true + layer.sourceRect: Qt.rect(-root.extraMargin, -root.extraMargin, + width + root.extraMargin * 2, height + root.extraMargin * 2) visible: false Image { @@ -347,10 +350,6 @@ Column { width: source.width height: source.height anchors.centerIn: parent - // Cache the layer. This way heavy shaders rendering doesn't - // slow down code editing & rest of the UI. - layer.enabled: true - layer.smooth: true } } @@ -383,7 +382,6 @@ Column { Connections { target: effectComposerModel function onShadersBaked() { - console.log("Shaders Baked!") updateTimer.restart() } } diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectComposerTopBar.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectComposerTopBar.qml index d5ac4461c4..799dbeeddc 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectComposerTopBar.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectComposerTopBar.qml @@ -48,7 +48,7 @@ Rectangle { style: StudioTheme.Values.viewBarButtonStyle buttonIcon: StudioTheme.Constants.saveAs_medium tooltip: qsTr("Save current composition with a new name") - enabled: root.backendModel ? root.backendModel.isEnabled && !root.backendModel.isEmpty + enabled: root.backendModel ? root.backendModel.isEnabled && root.backendModel.currentComposition !== "" : false onClicked: root.saveAsClicked() @@ -58,7 +58,8 @@ Rectangle { style: StudioTheme.Values.viewBarButtonStyle buttonIcon: StudioTheme.Constants.assignTo_medium tooltip: qsTr("Assign current composition to selected item") - enabled: root.backendModel ? root.backendModel.isEnabled + enabled: root.backendModel ? root.backendModel.hasValidTarget + && root.backendModel.isEnabled && root.backendModel.currentComposition !== "" : false @@ -88,8 +89,8 @@ Rectangle { 2. Adjust the effect nodes properties 3. Change the order of the effects, if you like 4. See the preview -5. Save in the library, if you wish to reuse the effect later") // TODO: revise with doc engineer +5. Save in the assets library, if you wish to reuse the effect later") - onClicked: Qt.openUrlExternally("https://doc.qt.io/qtdesignstudio/qt-using-effect-maker-effects.html") + onClicked: Qt.openUrlExternally("https://doc.qt.io/qtdesignstudio/qtquick-effect-composer-view.html") } } diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectCompositionNode.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectCompositionNode.qml index 6defa3b092..a606461b5c 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectCompositionNode.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectCompositionNode.qml @@ -43,6 +43,8 @@ HelperWidgets.Section { EffectCompositionNodeUniform { width: root.width + + onReset: nodeUniformsModel.resetData(index) } } } diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectCompositionNodeUniform.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectCompositionNodeUniform.qml index 71cbf94f8b..7c3214c5fa 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectCompositionNodeUniform.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/EffectCompositionNodeUniform.qml @@ -13,9 +13,10 @@ Item { id: root height: layout.implicitHeight - visible: !uniformUseCustomValue + signal reset() + Component.onCompleted: { if (uniformType === "int") { if (uniformControlType === "channel") @@ -49,10 +50,11 @@ Item { RowLayout { id: layout - spacing: 20 anchors.fill: parent Text { + id: textName + text: uniformDisplayName color: StudioTheme.Values.themeTextColor font.pixelSize: StudioTheme.Values.baseFontSize @@ -63,11 +65,38 @@ Item { elide: Text.ElideRight HelperWidgets.ToolTipArea { + id: tooltipArea + anchors.fill: parent tooltip: uniformDescription } } + Item { + Layout.preferredHeight: 30 + Layout.preferredWidth: 30 + + MouseArea { + id: mouseArea + + anchors.fill: parent + hoverEnabled: true + } + + HelperWidgets.IconButton { + id: iconButton + + buttonSize: 24 + icon: StudioTheme.Constants.reload_medium + iconSize: 16 + anchors.centerIn: parent + visible: mouseArea.containsMouse || iconButton.containsMouse + tooltip: qsTr("Reset value") + onClicked: root.reset() + } + + } + Loader { id: valueLoader Layout.fillWidth: true diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/SaveAsDialog.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/SaveAsDialog.qml index d139ba9205..65b01be457 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/SaveAsDialog.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/SaveAsDialog.qml @@ -50,11 +50,13 @@ StudioControls.Dialog { if (/[^A-Za-z0-9_]+/.test(text)) errMsg = qsTr("Name contains invalid characters.") else if (!/^[A-Z]/.test(text)) - errMsg = qsTr("Name must start with a capital letter") + errMsg = qsTr("Name must start with a capital letter.") else if (text.length < 3) - errMsg = qsTr("Name must have at least 3 characters") + errMsg = qsTr("Name must have at least 3 characters.") else if (/\s/.test(text)) - errMsg = qsTr("Name cannot contain white space") + errMsg = qsTr("Name cannot contain white space.") + else if (EffectComposerBackend.effectComposerModel.nameExists(text)) + errMsg = qsTr("Name is already taken.") emptyText.text = errMsg btnSave.enabled = errMsg.length === 0 diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueColor.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueColor.qml index 4b00bd7613..f7482260b5 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueColor.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueColor.qml @@ -15,8 +15,14 @@ Row { StudioControls.ColorEditor { actionIndicatorVisible: false - Component.onCompleted: color = uniformValue + // color: uniformValue binding can get overwritten by normal operation of the control + property color resetValue: uniformValue - onColorChanged: uniformValue = color + onResetValueChanged: color = uniformValue + Component.onCompleted: color = uniformValue + onColorChanged: { + if (uniformValue !== color) + uniformValue = color + } } } diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueFloat.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueFloat.qml index 7348d6668b..6b723a9bc5 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueFloat.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueFloat.qml @@ -14,6 +14,10 @@ Row { HelperWidgets.DoubleSpinBox { id: spinBox + // value: uniformValue binding can get overwritten by normal operation of the control + property double resetValue: uniformValue + onResetValueChanged: value = resetValue + width: 60 spinBoxIndicatorVisible: false inputHAlignment: Qt.AlignHCenter @@ -22,7 +26,7 @@ Row { value: uniformValue stepSize: .01 decimals: 2 - onValueChanged: uniformValue = value + onValueModified: uniformValue = value } StudioControls.Slider { @@ -38,8 +42,9 @@ Row { to: uniformMaxValue value: uniformValue onMoved: { - uniformValue = value - spinBox.value = value // binding isn't working for this property so update it + let fixedValue = Number.parseFloat(value).toFixed(slider.decimals) + uniformValue = fixedValue + spinBox.value = fixedValue // binding isn't working for this property so update it } } } diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueInt.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueInt.qml index 89f571c8cb..d67929168a 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueInt.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueInt.qml @@ -14,6 +14,10 @@ Row { HelperWidgets.DoubleSpinBox { id: spinBox + // value: uniformValue binding can get overwritten by normal operation of the control + property double resetValue: uniformValue + onResetValueChanged: value = resetValue + width: 60 spinBoxIndicatorVisible: false inputHAlignment: Qt.AlignHCenter @@ -22,7 +26,7 @@ Row { value: uniformValue stepSize: 1 decimals: 0 - onValueChanged: uniformValue = Math.round(value) + onValueModified: uniformValue = Math.round(value) } StudioControls.Slider { diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec2.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec2.qml index b703d5f184..adb4fe9905 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec2.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec2.qml @@ -15,6 +15,10 @@ RowLayout { HelperWidgets.DoubleSpinBox { id: vX + // value: uniformValue binding can get overwritten by normal operation of the control + property double resetValue: uniformValue.x + onResetValueChanged: value = resetValue + Layout.fillWidth: true Layout.minimumWidth: 30 Layout.maximumWidth: 60 @@ -26,7 +30,7 @@ RowLayout { value: uniformValue.x stepSize: .01 decimals: 2 - onValueChanged: uniformValue.x = value + onValueModified: uniformValue.x = value } Item { // spacer @@ -51,6 +55,10 @@ RowLayout { HelperWidgets.DoubleSpinBox { id: vY + // value: uniformValue binding can get overwritten by normal operation of the control + property double resetValue: uniformValue.y + onResetValueChanged: value = resetValue + Layout.fillWidth: true Layout.minimumWidth: 30 Layout.maximumWidth: 60 @@ -62,7 +70,7 @@ RowLayout { value: uniformValue.y stepSize: .01 decimals: 2 - onValueChanged: uniformValue.y = value + onValueModified: uniformValue.y = value } Item { // spacer diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec3.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec3.qml index d59b63a514..78573c48f6 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec3.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec3.qml @@ -15,6 +15,10 @@ RowLayout { HelperWidgets.DoubleSpinBox { id: vX + // value: uniformValue binding can get overwritten by normal operation of the control + property double resetValue: uniformValue.x + onResetValueChanged: value = resetValue + Layout.fillWidth: true Layout.minimumWidth: 30 Layout.maximumWidth: 60 @@ -26,7 +30,7 @@ RowLayout { value: uniformValue.x stepSize: .01 decimals: 2 - onValueChanged: uniformValue.x = value + onValueModified: uniformValue.x = value } Item { // spacer @@ -51,6 +55,10 @@ RowLayout { HelperWidgets.DoubleSpinBox { id: vY + // value: uniformValue binding can get overwritten by normal operation of the control + property double resetValue: uniformValue.y + onResetValueChanged: value = resetValue + Layout.fillWidth: true Layout.minimumWidth: 30 Layout.maximumWidth: 60 @@ -62,7 +70,7 @@ RowLayout { value: uniformValue.y stepSize: .01 decimals: 2 - onValueChanged: uniformValue.y = value + onValueModified: uniformValue.y = value } Item { // spacer @@ -87,6 +95,10 @@ RowLayout { HelperWidgets.DoubleSpinBox { id: vZ + // value: uniformValue binding can get overwritten by normal operation of the control + property double resetValue: uniformValue.z + onResetValueChanged: value = resetValue + Layout.fillWidth: true Layout.minimumWidth: 30 Layout.maximumWidth: 60 @@ -98,7 +110,7 @@ RowLayout { value: uniformValue.z stepSize: .01 decimals: 2 - onValueChanged: uniformValue.z = value + onValueModified: uniformValue.z = value } Item { // spacer diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec4.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec4.qml index 7e930abf81..61ce8e6389 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec4.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec4.qml @@ -15,6 +15,10 @@ RowLayout { HelperWidgets.DoubleSpinBox { id: vX + // value: uniformValue binding can get overwritten by normal operation of the control + property double resetValue: uniformValue.x + onResetValueChanged: value = resetValue + Layout.fillWidth: true Layout.minimumWidth: 30 Layout.maximumWidth: 60 @@ -26,7 +30,7 @@ RowLayout { value: uniformValue.x stepSize: .01 decimals: 2 - onValueChanged: uniformValue.x = value + onValueModified: uniformValue.x = value } Item { // spacer @@ -51,6 +55,10 @@ RowLayout { HelperWidgets.DoubleSpinBox { id: vY + // value: uniformValue binding can get overwritten by normal operation of the control + property double resetValue: uniformValue.y + onResetValueChanged: value = resetValue + Layout.fillWidth: true Layout.minimumWidth: 30 Layout.maximumWidth: 60 @@ -62,7 +70,7 @@ RowLayout { value: uniformValue.y stepSize: .01 decimals: 2 - onValueChanged: uniformValue.y = value + onValueModified: uniformValue.y = value } Item { // spacer @@ -87,6 +95,10 @@ RowLayout { HelperWidgets.DoubleSpinBox { id: vZ + // value: uniformValue binding can get overwritten by normal operation of the control + property double resetValue: uniformValue.z + onResetValueChanged: value = resetValue + Layout.fillWidth: true Layout.minimumWidth: 30 Layout.maximumWidth: 60 @@ -98,7 +110,7 @@ RowLayout { value: uniformValue.z stepSize: .01 decimals: 2 - onValueChanged: uniformValue.z = value + onValueModified: uniformValue.z = value } Item { // spacer @@ -123,6 +135,10 @@ RowLayout { HelperWidgets.DoubleSpinBox { id: vW + // value: uniformValue binding can get overwritten by normal operation of the control + property double resetValue: uniformValue.w + onResetValueChanged: value = resetValue + Layout.fillWidth: true Layout.minimumWidth: 30 Layout.maximumWidth: 60 @@ -134,7 +150,7 @@ RowLayout { value: uniformValue.w stepSize: .01 decimals: 2 - onValueChanged: uniformValue.w = value + onValueModified: uniformValue.w = value } Item { // spacer diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-16.png b/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-16.png Binary files differnew file mode 100644 index 0000000000..6b16d81397 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-24.png b/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-24.png Binary files differnew file mode 100644 index 0000000000..0549a84758 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-24.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-24@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-24@2x.png Binary files differnew file mode 100644 index 0000000000..8876f95ae6 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-24@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon.png Binary files differnew file mode 100644 index 0000000000..71371f97a3 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon16.png Binary files differnew file mode 100644 index 0000000000..86b80e95ab --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon@2x.png Binary files differnew file mode 100644 index 0000000000..4ad2a9011b --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/animatedsprite-loading.png b/share/qtcreator/qmldesigner/itemLibrary/images/animatedsprite-loading.png Binary files differnew file mode 100644 index 0000000000..ff2bbbd140 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/animatedsprite-loading.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-16.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-16.png Binary files differnew file mode 100644 index 0000000000..da40bc69a2 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-24.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-24.png Binary files differnew file mode 100644 index 0000000000..b3ebdf745b --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-24.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-24@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-24@2x.png Binary files differnew file mode 100644 index 0000000000..476df8640f --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-24@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-16.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-16.png Binary files differnew file mode 100644 index 0000000000..ecc583b859 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-24.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-24.png Binary files differnew file mode 100644 index 0000000000..ee181f57cc --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-24.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-24@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-24@2x.png Binary files differnew file mode 100644 index 0000000000..2588277e53 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-24@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-16px.png Binary files differnew file mode 100644 index 0000000000..6ae703de64 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-24px.png Binary files differnew file mode 100644 index 0000000000..f2133ca716 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-24px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-24px@2x.png Binary files differnew file mode 100644 index 0000000000..9336b81b6e --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-24px@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-16.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-16.png Binary files differnew file mode 100644 index 0000000000..98f245d624 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-24.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-24.png Binary files differnew file mode 100644 index 0000000000..294d1574ae --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-24.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-24@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-24@2x.png Binary files differnew file mode 100644 index 0000000000..bef7f80e3e --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-24@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon.png Binary files differnew file mode 100644 index 0000000000..5418a0f55a --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon16.png Binary files differnew file mode 100644 index 0000000000..17f7ed0688 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon@2x.png Binary files differnew file mode 100644 index 0000000000..fb4fb33910 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon.png Binary files differnew file mode 100644 index 0000000000..666d1ed93f --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon16.png Binary files differnew file mode 100644 index 0000000000..5aa57d7f48 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon@2x.png Binary files differnew file mode 100644 index 0000000000..bb2278ff89 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/button-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/button-icon.png Binary files differnew file mode 100644 index 0000000000..c44909f6dd --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/button-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/button-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/button-icon16.png Binary files differnew file mode 100644 index 0000000000..5c921deb13 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/button-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/button-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/button-icon@2x.png Binary files differnew file mode 100644 index 0000000000..f90a1ba7dc --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/button-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon.png Binary files differnew file mode 100644 index 0000000000..ee669b3a88 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon16.png Binary files differnew file mode 100644 index 0000000000..8d89eab841 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon@2x.png Binary files differnew file mode 100644 index 0000000000..51c5601de0 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon-16px.png Binary files differnew file mode 100644 index 0000000000..8d963e2bab --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon.png Binary files differnew file mode 100644 index 0000000000..0cd116d13c --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon@2x.png Binary files differnew file mode 100644 index 0000000000..3247384285 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon.png Binary files differnew file mode 100644 index 0000000000..2d31b17c65 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon16.png Binary files differnew file mode 100644 index 0000000000..15fc3505ba --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon@2x.png Binary files differnew file mode 100644 index 0000000000..5f82390596 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/component-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/component-icon.png Binary files differnew file mode 100644 index 0000000000..9c7df42bc7 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/component-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/component-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/component-icon16.png Binary files differnew file mode 100644 index 0000000000..99941541c6 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/component-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/component-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/component-icon@2x.png Binary files differnew file mode 100644 index 0000000000..f66349a63b --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/component-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/control-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/control-icon.png Binary files differnew file mode 100644 index 0000000000..fd9e4e8ff3 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/control-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/control-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/control-icon16.png Binary files differnew file mode 100644 index 0000000000..31c765483e --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/control-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/control-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/control-icon@2x.png Binary files differnew file mode 100644 index 0000000000..22604d2492 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/control-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/default-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/default-icon.png Binary files differnew file mode 100644 index 0000000000..564226e949 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/default-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/default3d.png b/share/qtcreator/qmldesigner/itemLibrary/images/default3d.png Binary files differnew file mode 100644 index 0000000000..a3b6c7f6f2 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/default3d.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/default3d16.png b/share/qtcreator/qmldesigner/itemLibrary/images/default3d16.png Binary files differnew file mode 100644 index 0000000000..de8906a724 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/default3d16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/default3d@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/default3d@2x.png Binary files differnew file mode 100644 index 0000000000..7ca04a01ea --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/default3d@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon.png Binary files differnew file mode 100644 index 0000000000..5a55bd9f77 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon16.png Binary files differnew file mode 100644 index 0000000000..cd21394e46 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon@2x.png Binary files differnew file mode 100644 index 0000000000..7beee2fab0 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon.png Binary files differnew file mode 100644 index 0000000000..b3b63e3523 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon16.png Binary files differnew file mode 100644 index 0000000000..8d8c7c09b0 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon@2x.png Binary files differnew file mode 100644 index 0000000000..22547a16b8 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-16px.png Binary files differnew file mode 100644 index 0000000000..278690f07f --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-24px.png Binary files differnew file mode 100644 index 0000000000..a286efb032 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-24px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-24px@2x.png Binary files differnew file mode 100644 index 0000000000..47abb7f9e3 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-24px@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-16px.png Binary files differnew file mode 100644 index 0000000000..d9027813d0 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-24px.png Binary files differnew file mode 100644 index 0000000000..a8a0bf65a4 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-24px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-24px@2x.png Binary files differnew file mode 100644 index 0000000000..a2f7bf93d3 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-24px@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon.png Binary files differnew file mode 100644 index 0000000000..bdc2253959 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon16.png Binary files differnew file mode 100644 index 0000000000..d7ab9de8a7 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon@2x.png Binary files differnew file mode 100644 index 0000000000..b28b0fa4d9 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flipable-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/flipable-icon.png Binary files differnew file mode 100644 index 0000000000..1f5f6966c0 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/flipable-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flipable-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/flipable-icon16.png Binary files differnew file mode 100644 index 0000000000..cf252f08b8 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/flipable-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon-16px.png Binary files differnew file mode 100644 index 0000000000..67be7b474d --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon.png Binary files differnew file mode 100644 index 0000000000..f8fa80970e --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon@2x.png Binary files differnew file mode 100644 index 0000000000..fc3deff849 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon.png Binary files differnew file mode 100644 index 0000000000..0dff9a075d --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon16.png Binary files differnew file mode 100644 index 0000000000..50c6f75cd8 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon@2x.png Binary files differnew file mode 100644 index 0000000000..b3ffdea6eb --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon.png Binary files differnew file mode 100644 index 0000000000..32abc8bf1e --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon16.png Binary files differnew file mode 100644 index 0000000000..e5b65ad53b --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon@2x.png Binary files differnew file mode 100644 index 0000000000..8b876f38ec --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon-16px.png Binary files differnew file mode 100644 index 0000000000..47b34f9d14 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon.png Binary files differnew file mode 100644 index 0000000000..10d0b69a7b --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon@2x.png Binary files differnew file mode 100644 index 0000000000..4374b60e7a --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon.png Binary files differnew file mode 100644 index 0000000000..7457fbd7e1 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon16.png Binary files differnew file mode 100644 index 0000000000..038a02ed86 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon@2x.png Binary files differnew file mode 100644 index 0000000000..af233a0df3 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon.png Binary files differnew file mode 100644 index 0000000000..5542ecf8bf --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon16.png Binary files differnew file mode 100644 index 0000000000..9cf4324819 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon@2x.png Binary files differnew file mode 100644 index 0000000000..80dab3c716 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/image-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/image-icon.png Binary files differnew file mode 100644 index 0000000000..318ce0874a --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/image-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/image-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/image-icon16.png Binary files differnew file mode 100644 index 0000000000..3aa46b6106 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/image-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/image-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/image-icon@2x.png Binary files differnew file mode 100644 index 0000000000..cc84918975 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/image-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/item-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/item-icon.png Binary files differnew file mode 100644 index 0000000000..af81cdfdb1 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/item-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/item-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/item-icon16.png Binary files differnew file mode 100644 index 0000000000..46d3ec1dbc --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/item-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/item-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/item-icon@2x.png Binary files differnew file mode 100644 index 0000000000..f05aa57c2f --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/item-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon.png Binary files differnew file mode 100644 index 0000000000..822cf3e7b8 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon16.png Binary files differnew file mode 100644 index 0000000000..b3ed007a0e --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon@2x.png Binary files differnew file mode 100644 index 0000000000..cb81308ff8 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/keyframe-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/keyframe-16px.png Binary files differnew file mode 100644 index 0000000000..6e1c9f912a --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/keyframe-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/label-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/label-icon.png Binary files differnew file mode 100644 index 0000000000..788bef078c --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/label-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/label-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/label-icon16.png Binary files differnew file mode 100644 index 0000000000..b68d384568 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/label-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/label-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/label-icon@2x.png Binary files differnew file mode 100644 index 0000000000..7001413d3b --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/label-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon.png Binary files differnew file mode 100644 index 0000000000..5a2f3c203b --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon16.png Binary files differnew file mode 100644 index 0000000000..2657bf2181 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon@2x.png Binary files differnew file mode 100644 index 0000000000..b1d3fb67d2 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon.png Binary files differnew file mode 100644 index 0000000000..29082eacf1 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon16.png Binary files differnew file mode 100644 index 0000000000..4a2b093259 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon@2x.png Binary files differnew file mode 100644 index 0000000000..750b13bd02 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/media-player-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/media-player-16px.png Binary files differnew file mode 100644 index 0000000000..515287a846 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/media-player-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/media-player-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/media-player-24px.png Binary files differnew file mode 100644 index 0000000000..1b31ddc826 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/media-player-24px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/media-player-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/media-player-24px@2x.png Binary files differnew file mode 100644 index 0000000000..86ae5914ac --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/media-player-24px@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon.png Binary files differnew file mode 100644 index 0000000000..fe316caf8d --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon16.png Binary files differnew file mode 100644 index 0000000000..bc8725fb5f --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon@2x.png Binary files differnew file mode 100644 index 0000000000..04a25e13db --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/page-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/page-icon.png Binary files differnew file mode 100644 index 0000000000..b5ac87e899 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/page-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/page-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/page-icon16.png Binary files differnew file mode 100644 index 0000000000..bc6810b605 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/page-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/page-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/page-icon@2x.png Binary files differnew file mode 100644 index 0000000000..23db032f4a --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/page-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon.png Binary files differnew file mode 100644 index 0000000000..edb6b377bb --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon16.png Binary files differnew file mode 100644 index 0000000000..0fb8967564 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon@2x.png Binary files differnew file mode 100644 index 0000000000..7be0ee813b --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon.png Binary files differnew file mode 100644 index 0000000000..62ebe487ff --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon16.png Binary files differnew file mode 100644 index 0000000000..2b8048441c --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon@2x.png Binary files differnew file mode 100644 index 0000000000..55bb116a69 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon.png Binary files differnew file mode 100644 index 0000000000..8dc82b8196 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon16.png Binary files differnew file mode 100644 index 0000000000..a6a61f61b2 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon@2x.png Binary files differnew file mode 100644 index 0000000000..d654a8e7e6 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon.png Binary files differnew file mode 100644 index 0000000000..a023f73c30 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon16.png Binary files differnew file mode 100644 index 0000000000..6fede21d8c --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon@2x.png Binary files differnew file mode 100644 index 0000000000..0069400335 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon.png Binary files differnew file mode 100644 index 0000000000..d38170e22f --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon16.png Binary files differnew file mode 100644 index 0000000000..07b46a8ab0 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon@2x.png Binary files differnew file mode 100644 index 0000000000..4bbddda4b2 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon.png Binary files differnew file mode 100644 index 0000000000..1c4c7b2948 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon16.png Binary files differnew file mode 100644 index 0000000000..3be4624ddd --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon@2x.png Binary files differnew file mode 100644 index 0000000000..aee69b3302 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon.png Binary files differnew file mode 100644 index 0000000000..3997195f72 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon16.png Binary files differnew file mode 100644 index 0000000000..72893106ae --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon@2x.png Binary files differnew file mode 100644 index 0000000000..150fa50ea2 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon.png Binary files differnew file mode 100644 index 0000000000..efe3ca80b4 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon16.png Binary files differnew file mode 100644 index 0000000000..775a57a38c --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon@2x.png Binary files differnew file mode 100644 index 0000000000..bb541b6711 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon.png Binary files differnew file mode 100644 index 0000000000..d4b470dc25 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon16.png Binary files differnew file mode 100644 index 0000000000..f6f3666639 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon@2x.png Binary files differnew file mode 100644 index 0000000000..4553e165e7 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon-16px.png Binary files differnew file mode 100644 index 0000000000..1c5be82245 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon.png Binary files differnew file mode 100644 index 0000000000..a7e654c918 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon@2x.png Binary files differnew file mode 100644 index 0000000000..48c99f8c0e --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon.png Binary files differnew file mode 100644 index 0000000000..5ef73ff19f --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon16.png Binary files differnew file mode 100644 index 0000000000..f8ca7a3685 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon@2x.png Binary files differnew file mode 100644 index 0000000000..0eb7f9665e --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon.png Binary files differnew file mode 100644 index 0000000000..bd0a9729be --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon16.png Binary files differnew file mode 100644 index 0000000000..a08622df89 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon@2x.png Binary files differnew file mode 100644 index 0000000000..93842e4cdd --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-16.png b/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-16.png Binary files differnew file mode 100644 index 0000000000..676fe13404 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-24.png b/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-24.png Binary files differnew file mode 100644 index 0000000000..29f7f14db3 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-24.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-24@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-24@2x.png Binary files differnew file mode 100644 index 0000000000..a518cada63 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-24@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon.png Binary files differnew file mode 100644 index 0000000000..37277c5e43 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon16.png Binary files differnew file mode 100644 index 0000000000..f88711dd25 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon@2x.png Binary files differnew file mode 100644 index 0000000000..b62a3bad51 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon.png Binary files differnew file mode 100644 index 0000000000..a6ced34925 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon16.png Binary files differnew file mode 100644 index 0000000000..0f19d0efa3 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon@2x.png Binary files differnew file mode 100644 index 0000000000..9b5ef9517b --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon.png Binary files differnew file mode 100644 index 0000000000..031cb27c36 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon16.png Binary files differnew file mode 100644 index 0000000000..446c469690 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon@2x.png Binary files differnew file mode 100644 index 0000000000..0ccb978c46 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon.png Binary files differnew file mode 100644 index 0000000000..e018159286 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon16.png Binary files differnew file mode 100644 index 0000000000..9abd275659 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon@2x.png Binary files differnew file mode 100644 index 0000000000..787f54ca41 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon.png Binary files differnew file mode 100644 index 0000000000..068ebeef0f --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon16.png Binary files differnew file mode 100644 index 0000000000..b96ed468cb --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon@2x.png Binary files differnew file mode 100644 index 0000000000..3b7cb6d5da --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-icon.png Binary files differnew file mode 100644 index 0000000000..29a81f5d6c --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/text-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-icon16.png Binary files differnew file mode 100644 index 0000000000..ee7cc512cb --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/text-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-icon@2x.png Binary files differnew file mode 100644 index 0000000000..1df8f765de --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/text-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon.png Binary files differnew file mode 100644 index 0000000000..c743c22074 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon16.png Binary files differnew file mode 100644 index 0000000000..3ceef6d037 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon@2x.png Binary files differnew file mode 100644 index 0000000000..666644d2d3 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon.png Binary files differnew file mode 100644 index 0000000000..f1b2dc0f84 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon16.png Binary files differnew file mode 100644 index 0000000000..4afc1fbab5 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon@2x.png Binary files differnew file mode 100644 index 0000000000..c32ecc71a9 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon.png Binary files differnew file mode 100644 index 0000000000..ba5537acef --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon16.png Binary files differnew file mode 100644 index 0000000000..c4a62a6582 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon@2x.png Binary files differnew file mode 100644 index 0000000000..e05fd41b9a --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/timeline-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/timeline-16px.png Binary files differnew file mode 100644 index 0000000000..d4ecf00031 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/timeline-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/timeline-animation-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/timeline-animation-16px.png Binary files differnew file mode 100644 index 0000000000..31b8fed666 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/timeline-animation-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/timer-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/timer-16px.png Binary files differnew file mode 100644 index 0000000000..c675d5a707 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/timer-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/timer-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/timer-24px.png Binary files differnew file mode 100644 index 0000000000..bd9419aaa0 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/timer-24px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/timer-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/timer-24px@2x.png Binary files differnew file mode 100644 index 0000000000..ff2d487cc9 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/timer-24px@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon.png Binary files differnew file mode 100644 index 0000000000..5cb5b2e1af --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon16.png Binary files differnew file mode 100644 index 0000000000..569373afa1 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon@2x.png Binary files differnew file mode 100644 index 0000000000..fd9e6ceebc --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon.png Binary files differnew file mode 100644 index 0000000000..3298f69519 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon16.png Binary files differnew file mode 100644 index 0000000000..9ab7861c25 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon@2x.png Binary files differnew file mode 100644 index 0000000000..e5958cded3 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon.png Binary files differnew file mode 100644 index 0000000000..5e99f06f2e --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon16.png Binary files differnew file mode 100644 index 0000000000..68f22c5df1 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon@2x.png Binary files differnew file mode 100644 index 0000000000..549c11c67c --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon.png Binary files differnew file mode 100644 index 0000000000..98eb8232a2 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon16.png Binary files differnew file mode 100644 index 0000000000..ff5f95cf32 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon@2x.png Binary files differnew file mode 100644 index 0000000000..236abf0cfe --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/video-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/video-16px.png Binary files differnew file mode 100644 index 0000000000..caf9c16a61 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/video-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/video-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/video-24px.png Binary files differnew file mode 100644 index 0000000000..df1b84e5c9 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/video-24px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/video-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/video-24px@2x.png Binary files differnew file mode 100644 index 0000000000..4b9f31faf3 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/video-24px@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/video-output-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/video-output-16px.png Binary files differnew file mode 100644 index 0000000000..f00afc52e9 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/video-output-16px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/video-output-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/video-output-24px.png Binary files differnew file mode 100644 index 0000000000..fd3c89c081 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/video-output-24px.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/video-output-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/video-output-24px@2x.png Binary files differnew file mode 100644 index 0000000000..0f651a1013 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/video-output-24px@2x.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/webview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/webview-icon.png Binary files differnew file mode 100644 index 0000000000..22904f2f8b --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/webview-icon.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/webview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/webview-icon16.png Binary files differnew file mode 100644 index 0000000000..ac7be01bb7 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/images/webview-icon16.png diff --git a/share/qtcreator/qmldesigner/itemLibrary/multimedia.metainfo b/share/qtcreator/qmldesigner/itemLibrary/multimedia.metainfo new file mode 100644 index 0000000000..2e3616aa4b --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/multimedia.metainfo @@ -0,0 +1,84 @@ +MetaInfo { + Type { + name: "QtMultimedia.MediaPlayer" + icon: "images/media-player-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Media Player" + category: "f.Qt Quick - Multimedia" + libraryIcon: "images/media-player-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + } + } + + Type { + name: "QtMultimedia.AudioOutput" + icon: "images/audio-output-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Audio Output" + category: "f.Qt Quick - Multimedia" + libraryIcon: "images/audio-output-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + } + } + + Type { + name: "QtMultimedia.VideoOutput" + icon: "images/video-output-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Video Output" + category: "f.Qt Quick - Multimedia" + libraryIcon: "images/video-output-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + } + } + + Type { + name: "QtMultimedia.Video" + icon: "images/video-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: true + canBeContainer: false + } + + ItemLibraryEntry { + name: "Video" + category: "f.Qt Quick - Multimedia" + libraryIcon: "images/video-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + + Property { name: "width"; type: "int"; value: 200; } + Property { name: "height"; type: "int"; value: 200; } + } + } +} diff --git a/share/qtcreator/qmldesigner/itemLibrary/qml.metainfo b/share/qtcreator/qmldesigner/itemLibrary/qml.metainfo new file mode 100644 index 0000000000..4bef02ddd3 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/qml.metainfo @@ -0,0 +1,53 @@ +MetaInfo { + + Type { + name: "QML.Component" + icon: "images/component-icon16.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Component" + category: "e.Qt Quick - Instancers" + libraryIcon: "images/component-icon.png" + version: "1.0" + + QmlSource { source: "source/component.qml" } + toolTip: qsTr("Allows you to define components inline, within a QML document.") + } + + ItemLibraryEntry { + name: "Component 3D" + category: "Instancers" + libraryIcon: "images/component-icon.png" + version: "1.0" + requiredImport: "QtQuick3D" + + QmlSource { source: "source/component3d.qml" } + toolTip: qsTr("Allows you to define 3D components inline, within a QML document.") + } + } + +Type { + name: "QtQml.Base.Timer" + icon: "images/timer-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Timer" + category: "d.Qt Quick - Animation" + libraryIcon: "images/timer-24px.png" + version: "2.0" + toolTip: qsTr(" Triggers an action at a given time.") + } +} +} diff --git a/share/qtcreator/qmldesigner/itemLibrary/qtquickcontrols2.metainfo b/share/qtcreator/qmldesigner/itemLibrary/qtquickcontrols2.metainfo new file mode 100644 index 0000000000..cd4165957d --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/qtquickcontrols2.metainfo @@ -0,0 +1,575 @@ +MetaInfo { + Type { + name: "QtQuick.Controls.Basic.BusyIndicator" + icon: "images/busyindicator-icon16.png" + + ItemLibraryEntry { + name: "Busy Indicator" + category: "Qt Quick - Controls 2" + libraryIcon: "images/busyindicator-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Indicates activity while, for example, content is being loaded.") + } + } + + Type { + name: "QtQuick.Controls.Basic.Button" + icon: "images/button-icon16.png" + + ItemLibraryEntry { + name: "Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/button-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button with text.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Button\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.CheckBox" + icon: "images/checkbox-icon16.png" + + ItemLibraryEntry { + name: "Check Box" + category: "Qt Quick - Controls 2" + libraryIcon: "images/checkbox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A checkbox with a text label.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Check Box\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.CheckDelegate" + icon: "images/checkbox-icon16.png" + + ItemLibraryEntry { + name: "Check Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/checkbox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents items from a model as checkboxes.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Check Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.ComboBox" + icon: "images/combobox-icon16.png" + + ItemLibraryEntry { + name: "Combo Box" + category: "Qt Quick - Controls 2" + libraryIcon: "images/combobox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An editable drop-down list.") + } + } + + Type { + name: "QtQuick.Controls.Basic.Control" + icon: "images/control-icon16.png" + + ItemLibraryEntry { + name: "Control" + category: "Qt Quick - Controls 2" + libraryIcon: "images/control-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An abstract base type for UI controls.") + } + } + + Type { + name: "QtQuick.Controls.Basic.DelayButton" + icon: "images/button-icon16.png" + + ItemLibraryEntry { + name: "Delay Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/delaybutton-icon.png" + version: "2.2" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button with a delay preventing accidental presses.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Delay Button\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.Dial" + icon: "images/dial-icon16.png" + + ItemLibraryEntry { + name: "Dial" + category: "Qt Quick - Controls 2" + libraryIcon: "images/dial-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + + toolTip: qsTr("A circular dial that is rotated to set a value.") + } + } + + Type { + name: "QtQuick.Controls.Basic.Frame" + icon: "images/frame-icon16.png" + + ItemLibraryEntry { + name: "Frame" + category: "Qt Quick - Controls 2" + libraryIcon: "images/frame-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An untitled container for a group of controls.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Basic.GroupBox" + icon: "images/groupbox-icon16.png" + + ItemLibraryEntry { + name: "Group Box" + category: "Qt Quick - Controls 2" + libraryIcon: "images/groupbox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A titled container for a group of controls.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + Property { name: "title"; type: "binding"; value: "qsTr(\"Group Box\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.ItemDelegate" + icon: "images/itemdelegate-icon16.png" + + ItemLibraryEntry { + name: "Item Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/itemdelegate-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents a standard view item. It can be used as a delegate in various views and controls, such as ListView and ComboBox.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Item Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.Label" + icon: "images/label-icon16.png" + + ItemLibraryEntry { + name: "Label" + category: "Qt Quick - Controls 2" + libraryIcon: "images/label-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A text label.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Label\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.Page" + icon: "images/page-icon16.png" + + ItemLibraryEntry { + name: "Page" + category: "Qt Quick - Controls 2" + libraryIcon: "images/page-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A page with header and footer.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Basic.PageIndicator" + icon: "images/pageindicator-icon16.png" + + ItemLibraryEntry { + name: "Page Indicator" + category: "Qt Quick - Controls 2" + libraryIcon: "images/pageindicator-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Indicates the currently active page.") + + Property { name: "count"; type: "int"; value: 3 } + } + } + + Type { + name: "QtQuick.Controls.Basic.Pane" + icon: "images/pane-icon16.png" + + ItemLibraryEntry { + name: "Pane" + category: "Qt Quick - Controls 2" + libraryIcon: "images/pane-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Provides a background matching the application style and theme.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Basic.ProgressBar" + icon: "images/progressbar-icon16.png" + + ItemLibraryEntry { + name: "Progress Bar" + category: "Qt Quick - Controls 2" + libraryIcon: "images/progressbar-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A bar indicating the progress of an operation.") + + Property { name: "value"; type: "real"; value: 0.5 } + } + } + + Type { + name: "QtQuick.Controls.Basic.RadioButton" + icon: "images/radiobutton-icon16.png" + + ItemLibraryEntry { + name: "Radio Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/radiobutton-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An option button that you can toggle on or off.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Radio Button\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.RadioDelegate" + icon: "images/radiobutton-icon16.png" + + ItemLibraryEntry { + name: "Radio Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/radiobutton-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents items from a model as radio buttons.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Radio Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.RangeSlider" + icon: "images/rangeslider-icon16.png" + + ItemLibraryEntry { + name: "Range Slider" + category: "Qt Quick - Controls 2" + libraryIcon: "images/rangeslider-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A bar with adjustable start and end points.") + + Property { name: "first.value"; type: "real"; value: 0.25 } + Property { name: "second.value"; type: "real"; value: 0.75 } + } + } + + Type { + name: "QtQuick.Controls.Basic.RoundButton" + icon: "images/roundbutton-icon16.png" + + ItemLibraryEntry { + name: "Round Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/roundbutton-icon.png" + version: "2.1" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A round button with text.") + + Property { name: "text"; type: "string"; value: "+" } + } + } + + Type { + name: "QtQuick.Controls.Basic.Slider" + icon: "images/slider-icon16.png" + + ItemLibraryEntry { + name: "Slider" + category: "Qt Quick - Controls 2" + libraryIcon: "images/slider-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An adjustable slider.") + + Property { name: "value"; type: "real"; value: 0.5 } + } + } + + Type { + name: "QtQuick.Controls.Basic.SpinBox" + icon: "images/spinbox-icon16.png" + + ItemLibraryEntry { + name: "Spin Box" + category: "Qt Quick - Controls 2" + libraryIcon: "images/spinbox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A box with an adjustable number.") + } + } + + Type { + name: "QtQuick.Controls.Basic.ScrollView" + icon: "images/scrollview-icon16.png" + + ItemLibraryEntry { + name: "Scroll View" + category: "Qt Quick - Controls 2" + libraryIcon: "images/scrollview-icon.png" + version: "2.2" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A scrollable area.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Basic.StackView" + icon: "images/stackview-icon16.png" + + ItemLibraryEntry { + name: "Stack View" + category: "Qt Quick - Controls 2" + libraryIcon: "images/stackview-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Provides a stack-based navigation for a set of pages.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Basic.SwipeDelegate" + icon: "images/itemdelegate-icon16.png" + + ItemLibraryEntry { + name: "Swipe Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/itemdelegate-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents items from a model as items that you can swipe to expose more options.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Swipe Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.SwipeView" + icon: "images/swipeview-icon16.png" + + ItemLibraryEntry { + name: "Swipe View" + category: "Qt Quick - Controls 2" + libraryIcon: "images/swipeview-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Provides a view where you can navigate pages by swiping.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Basic.Switch" + icon: "images/switch-icon16.png" + + ItemLibraryEntry { + name: "Switch" + category: "Qt Quick - Controls 2" + libraryIcon: "images/switch-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button that you can toggle on and off.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Switch\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.SwitchDelegate" + icon: "images/switch-icon16.png" + + ItemLibraryEntry { + name: "Switch Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/switch-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents items from a model as toggle switches.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Switch Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.TabBar" + icon: "images/toolbar-icon16.png" + + ItemLibraryEntry { + name: "Tab Bar" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolbar-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A tab-based navigation model.") + + Property { name: "width"; type: "int"; value: 240 } + } + } + + Type { + name: "QtQuick.Controls.Basic.TabButton" + icon: "images/toolbutton-icon16.png" + + ItemLibraryEntry { + name: "Tab Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolbutton-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button suitable for a tab bar.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Tab Button\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.TextArea" + icon: "images/textarea-icon16.png" + + ItemLibraryEntry { + name: "Text Area" + category: "Qt Quick - Controls 2" + libraryIcon: "images/textarea-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A multi-line text box.") + + Property { name: "placeholderText"; type: "binding"; value: "qsTr(\"Text Area\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.TextField" + icon: "images/textfield-icon16.png" + + ItemLibraryEntry { + name: "Text Field" + category: "Qt Quick - Controls 2" + libraryIcon: "images/textfield-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A single-line text box.") + + Property { name: "placeholderText"; type: "binding"; value: "qsTr(\"Text Field\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.ToolBar" + icon: "images/toolbar-icon16.png" + + ItemLibraryEntry { + name: "Tool Bar" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolbar-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A row that can hold actions and buttons.") + + Property { name: "width"; type: "int"; value: 360 } + } + } + + Type { + name: "QtQuick.Controls.Basic.ToolButton" + icon: "images/toolbutton-icon16.png" + + ItemLibraryEntry { + name: "Tool Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolbutton-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button suitable for a tool bar.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Tool Button\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.ToolSeparator" + icon: "images/toolseparator-icon16.png" + + ItemLibraryEntry { + name: "Tool Separator" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolseparator-icon.png" + version: "2.1" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A line to separate sections in a tool bar.") + } + } + + Type { + name: "QtQuick.Controls.Basic.Tumbler" + icon: "images/tumbler-icon16.png" + + ItemLibraryEntry { + name: "Tumbler" + category: "Qt Quick - Controls 2" + libraryIcon: "images/tumbler-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A spinnable wheel of selectable items.") + + Property { name: "model"; type: "int"; value: "10" } + } + } +} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/quick.metainfo b/share/qtcreator/qmldesigner/itemLibrary/quick.metainfo index f390f72260..98e5684bdc 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/quick.metainfo +++ b/share/qtcreator/qmldesigner/itemLibrary/quick.metainfo @@ -2,7 +2,7 @@ MetaInfo { Type { name: "QtQuick.Item" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleNonDefaultProperties: "layer.effect" @@ -11,7 +11,7 @@ MetaInfo { ItemLibraryEntry { name: "Item" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 200; } @@ -22,12 +22,12 @@ MetaInfo { Type { name: "QtQuick.Rectangle" - icon: ":/qtquickplugin/images/rect-icon16.png" + icon: "images/rect-icon16.png" ItemLibraryEntry { name: "Rectangle" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/rect-icon.png" + libraryIcon: "images/rect-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 200; } @@ -39,12 +39,12 @@ MetaInfo { Type { name: "QtQuick.Text" - icon: ":/qtquickplugin/images/text-icon16.png" + icon: "images/text-icon16.png" ItemLibraryEntry { name: "Text" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/text-icon.png" + libraryIcon: "images/text-icon.png" version: "2.0" Property { name: "font.pixelSize"; type: "int"; value: 12; } @@ -55,12 +55,12 @@ MetaInfo { Type { name: "QtQuick.TextEdit" - icon: ":/qtquickplugin/images/text-edit-icon16.png" + icon: "images/text-edit-icon16.png" ItemLibraryEntry { name: "Text Edit" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/text-edit-icon.png" + libraryIcon: "images/text-edit-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 80; } @@ -73,12 +73,12 @@ MetaInfo { Type { name: "QtQuick.TextInput" - icon: ":/qtquickplugin/images/text-input-icon16.png" + icon: "images/text-input-icon16.png" ItemLibraryEntry { name: "Text Input" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/text-input-icon.png" + libraryIcon: "images/text-input-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 80; } @@ -91,12 +91,12 @@ MetaInfo { Type { name: "QtQuick.MouseArea" - icon: ":/qtquickplugin/images/mouse-area-icon16.png" + icon: "images/mouse-area-icon16.png" ItemLibraryEntry { name: "Mouse Area" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/mouse-area-icon.png" + libraryIcon: "images/mouse-area-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 100; } @@ -107,17 +107,17 @@ MetaInfo { Type { name: "QtQuick.Image" - icon: ":/qtquickplugin/images/image-icon16.png" + icon: "images/image-icon16.png" ItemLibraryEntry { name: "Image" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/image-icon.png" + libraryIcon: "images/image-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 100; } Property { name: "height"; type: "int"; value: 100; } - Property { name: "source"; type: "QUrl"; value:"qrc:/qtquickplugin/images/template_image.png"; } + Property { name: "source"; type: "QUrl"; value:"qrcimages/template_image.png"; } Property { name: "fillMode"; type: "enum"; value: "Image.PreserveAspectFit"; } toolTip: qsTr("Displays an image.") } @@ -125,29 +125,29 @@ MetaInfo { Type { name: "QtQuick.AnimatedImage" - icon: ":/qtquickplugin/images/animated-image-icon16.png" + icon: "images/animated-image-icon16.png" ItemLibraryEntry { name: "Animated Image" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/animated-image-icon.png" + libraryIcon: "images/animated-image-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 100; } Property { name: "height"; type: "int"; value: 100; } - Property { name: "source"; type: "QUrl"; value:"qrc:/qtquickplugin/images/template_image.png"; } + Property { name: "source"; type: "QUrl"; value:"qrcimages/template_image.png"; } toolTip: qsTr("Animates a series of images.") } } Type { name: "QtQuick.AnimatedSprite" - icon: ":/qtquickplugin/images/animated-image-icon16.png" + icon: "images/animated-image-icon16.png" ItemLibraryEntry { name: "Animated Sprite" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/animated-image-icon.png" + libraryIcon: "images/animated-image-icon.png" version: "2.0" Property { name: "frameWidth"; type: "int"; value: 64; } @@ -155,36 +155,36 @@ MetaInfo { Property { name: "frameCount"; type: "int"; value: 4; } Property { name: "frameDuration"; type: "int"; value: 500; } Property { name: "source"; type: "QUrl"; value:"animatedsprite-loading.png"; } - ExtraFile { source: ":/qtquickplugin/images/animatedsprite-loading.png" } + ExtraFile { source: "images/animatedsprite-loading.png" } toolTip: qsTr("Draws a sprite animation.") } } Type { name: "QtQuick.BorderImage" - icon: ":/qtquickplugin/images/border-image-icon16.png" + icon: "images/border-image-icon16.png" ItemLibraryEntry { name: "Border Image" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/border-image-icon.png" + libraryIcon: "images/border-image-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 100; } Property { name: "height"; type: "int"; value: 100; } - Property { name: "source"; type: "QUrl"; value:"qrc:/qtquickplugin/images/template_image.png"; } + Property { name: "source"; type: "QUrl"; value:"qrcimages/template_image.png"; } toolTip: qsTr("A responsive border based on an image.") } } Type { name: "QtQuick.Flickable" - icon: ":/qtquickplugin/images/flickable-icon16.png" + icon: "images/flickable-icon16.png" ItemLibraryEntry { name: "Flickable" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/flickable-icon.png" + libraryIcon: "images/flickable-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 300; } @@ -195,57 +195,57 @@ MetaInfo { Type { name: "QtQuick.GridView" - icon: ":/qtquickplugin/images/gridview-icon16.png" + icon: "images/gridview-icon16.png" ItemLibraryEntry { name: "Grid View" category: "b.Qt Quick - Views" - libraryIcon: ":/qtquickplugin/images/gridview-icon.png" + libraryIcon: "images/gridview-icon.png" version: "2.0" - QmlSource { source: ":/qtquickplugin/source/gridviewv2.qml" } + QmlSource { source: "source/gridviewv2.qml" } toolTip: qsTr("Organizes dynamic data sets in a grid.") } } Type { name: "QtQuick.ListView" - icon: ":/qtquickplugin/images/listview-icon16.png" + icon: "images/listview-icon16.png" ItemLibraryEntry { name: "List View" category: "b.Qt Quick - Views" - libraryIcon: ":/qtquickplugin/images/listview-icon.png" + libraryIcon: "images/listview-icon.png" version: "2.0" - QmlSource { source: ":/qtquickplugin/source/listviewv2.qml" } + QmlSource { source: "source/listviewv2.qml" } toolTip: qsTr("Organizes dynamic data sets in a list.") } } Type { name: "QtQuick.PathView" - icon: ":/qtquickplugin/images/pathview-icon16.png" + icon: "images/pathview-icon16.png" ItemLibraryEntry { name: "Path View" category: "b.Qt Quick - Views" - libraryIcon: ":/qtquickplugin/images/pathview-icon.png" + libraryIcon: "images/pathview-icon.png" version: "2.0" - QmlSource { source: ":/qtquickplugin/source/pathviewv2.qml" } + QmlSource { source: "source/pathviewv2.qml" } toolTip: qsTr("Organizes dynamic data sets along a path.") } } Type { name: "QtQuick.FocusScope" - icon: ":/qtquickplugin/images/focusscope-icon16.png" + icon: "images/focusscope-icon16.png" ItemLibraryEntry { name: "Focus Scope" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/focusscope-icon.png" + libraryIcon: "images/focusscope-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 100; } @@ -256,12 +256,12 @@ MetaInfo { Type { name: "QtQuick.Column" - icon: ":/qtquickplugin/images/column-positioner-icon-16px.png" + icon: "images/column-positioner-icon-16px.png" ItemLibraryEntry { name: "Column" category: "c.Qt Quick - Positioner" - libraryIcon: ":/qtquickplugin/images/column-positioner-icon.png" + libraryIcon: "images/column-positioner-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 200; } @@ -273,12 +273,12 @@ MetaInfo { Type { name: "QtQuick.Row" - icon: ":/qtquickplugin/images/row-positioner-icon-16px.png" + icon: "images/row-positioner-icon-16px.png" ItemLibraryEntry { name: "Row" category: "c.Qt Quick - Positioner" - libraryIcon: ":/qtquickplugin/images/row-positioner-icon.png" + libraryIcon: "images/row-positioner-icon.png" version: "2.0" toolTip: qsTr("Organizes items in a row.") @@ -289,12 +289,12 @@ MetaInfo { Type { name: "QtQuick.Grid" - icon: ":/qtquickplugin/images/grid-positioner-icon-16px.png" + icon: "images/grid-positioner-icon-16px.png" ItemLibraryEntry { name: "Grid" category: "c.Qt Quick - Positioner" - libraryIcon: ":/qtquickplugin/images/grid-positioner-icon.png" + libraryIcon: "images/grid-positioner-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 400; } @@ -305,12 +305,12 @@ MetaInfo { Type { name: "QtQuick.Flow" - icon: ":/qtquickplugin/images/flow-positioner-icon-16px.png" + icon: "images/flow-positioner-icon-16px.png" ItemLibraryEntry { name: "Flow" category: "c.Qt Quick - Positioner" - libraryIcon: ":/qtquickplugin/images/flow-positioner-icon.png" + libraryIcon: "images/flow-positioner-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 400; } @@ -321,7 +321,7 @@ MetaInfo { Type { name: "QtQuick.Timeline.Timeline" - icon: ":/qtquickplugin/images/timeline-16px.png" + icon: "images/timeline-16px.png" Hints { visibleNonDefaultProperties: "animations" @@ -337,7 +337,7 @@ MetaInfo { Type { name: "QtQuick.Timeline.TimelineAnimation" - icon: ":/qtquickplugin/images/timeline-animation-16px.png" + icon: "images/timeline-animation-16px.png" Hints { visibleInLibrary: false @@ -352,7 +352,7 @@ MetaInfo { Type { name: "QtQuick.Timeline.Keyframe" - icon: ":/qtquickplugin/images/keyframe-16px.png" + icon: "images/keyframe-16px.png" ItemLibraryEntry { name: "Keyframe" @@ -364,7 +364,7 @@ MetaInfo { Type { name: "QtQuick.Timeline.KeyframeGroup" - icon: ":/qtquickplugin/images/keyframe-16px.png" + icon: "images/keyframe-16px.png" ItemLibraryEntry { name: "KeyframeGroup" @@ -376,7 +376,7 @@ MetaInfo { Type { name: "QtQuick.PropertyAnimation" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -388,7 +388,7 @@ MetaInfo { ItemLibraryEntry { name: "Property Animation" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Animates changes in property values.") } @@ -396,7 +396,7 @@ MetaInfo { Type { name: "QtQuick.PauseAnimation" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -408,7 +408,7 @@ MetaInfo { ItemLibraryEntry { name: "Pause Animation" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Provides a pause between animations.") } @@ -416,7 +416,7 @@ MetaInfo { Type { name: "QtQuick.SequentialAnimation" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -427,7 +427,7 @@ MetaInfo { ItemLibraryEntry { name: "Sequential Animation" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Runs animations one after the other.") } @@ -435,7 +435,7 @@ MetaInfo { Type { name: "QtQuick.ParallelAnimation" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -446,7 +446,7 @@ MetaInfo { ItemLibraryEntry { name: "Parallel Animation" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Runs animations together at the same time.") } @@ -454,7 +454,7 @@ MetaInfo { Type { name: "QtQuick.PropertyAction" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -466,7 +466,7 @@ MetaInfo { ItemLibraryEntry { name: "Property Action" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Provides an immediate property change during animations.") } @@ -474,7 +474,7 @@ MetaInfo { Type { name: "QtQuick.ScriptAction" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -486,7 +486,7 @@ MetaInfo { ItemLibraryEntry { name: "Script Action" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Runs a script during animation.") } @@ -494,7 +494,7 @@ MetaInfo { Type { name: "QtQuick.ColorAnimation" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -506,7 +506,7 @@ MetaInfo { ItemLibraryEntry { name: "Color Animation" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Animates the color of an item.") } @@ -514,7 +514,7 @@ MetaInfo { Type { name: "QtQuick.NumberAnimation" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -526,7 +526,7 @@ MetaInfo { ItemLibraryEntry { name: "Number Animation" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" Property { name: "to"; type: "int"; value: 0; } Property { name: "from"; type: "int"; value: 0; } @@ -535,74 +535,13 @@ MetaInfo { } Type { - name: "QtQml.Timer" - icon: ":/qtquickplugin/images/timer-16px.png" - - Hints { - visibleInNavigator: true - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Timer" - category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/timer-24px.png" - version: "2.0" - toolTip: qsTr(" Triggers an action at a given time.") - } - } - - Type { - name: "QML.Component" - icon: ":/qtquickplugin/images/component-icon16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - } - - ItemLibraryEntry { - name: "Component" - category: "e.Qt Quick - Instancers" - libraryIcon: ":/qtquickplugin/images/component-icon.png" - version: "1.0" - - QmlSource { source: ":/qtquickplugin/source/component.qml" } - toolTip: qsTr("Allows you to define components inline, within a QML document.") - } - } - - Type { - name: "QML.Component" - icon: ":/qtquickplugin/images/component-icon16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - } - - ItemLibraryEntry { - name: "Component 3D" - category: "Instancers" - libraryIcon: ":/qtquickplugin/images/component-icon.png" - version: "1.0" - requiredImport: "QtQuick3D" - - QmlSource { source: ":/qtquickplugin/source/component3d.qml" } - toolTip: qsTr("Allows you to define 3D components inline, within a QML document.") - } - } - - Type { name: "QtQuick.Loader" - icon: ":/qtquickplugin/images/loader-icon16.png" + icon: "images/loader-icon16.png" ItemLibraryEntry { name: "Loader" category: "e.Qt Quick - Instancers" - libraryIcon: ":/qtquickplugin/images/loader-icon.png" + libraryIcon: "images/loader-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 200; } Property { name: "height"; type: "int"; value: 200; } @@ -612,7 +551,7 @@ MetaInfo { Type { name: "QtQuick.Repeater" - icon: ":/qtquickplugin/images/repeater-icon16.png" + icon: "images/repeater-icon16.png" Hints { canBeDroppedInFormEditor: false @@ -622,216 +561,9 @@ MetaInfo { ItemLibraryEntry { name: "Repeater" category: "e.Qt Quick - Instancers" - libraryIcon: ":/qtquickplugin/images/repeater-icon.png" + libraryIcon: "images/repeater-icon.png" version: "2.0" toolTip: qsTr("Creates a number of copies of the same item.") } } - - Type { - name: "QtMultimedia.MediaPlayer" - icon: ":/qtquickplugin/images/media-player-16px.png" - - Hints { - visibleInNavigator: true - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Media Player" - category: "f.Qt Quick - Multimedia" - libraryIcon: ":/qtquickplugin/images/media-player-24px.png" - version: "6.0" - requiredImport: "QtMultimedia" - } - } - - Type { - name: "QtMultimedia.AudioOutput" - icon: ":/qtquickplugin/images/audio-output-16px.png" - - Hints { - visibleInNavigator: true - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Audio Output" - category: "f.Qt Quick - Multimedia" - libraryIcon: ":/qtquickplugin/images/audio-output-24px.png" - version: "6.0" - requiredImport: "QtMultimedia" - } - } - - Type { - name: "QtMultimedia.VideoOutput" - icon: ":/qtquickplugin/images/video-output-16px.png" - - Hints { - visibleInNavigator: true - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Video Output" - category: "f.Qt Quick - Multimedia" - libraryIcon: ":/qtquickplugin/images/video-output-24px.png" - version: "6.0" - requiredImport: "QtMultimedia" - } - } - - Type { - name: "QtMultimedia.Video" - icon: ":/qtquickplugin/images/video-16px.png" - - Hints { - visibleInNavigator: true - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: true - canBeContainer: false - } - - ItemLibraryEntry { - name: "Video" - category: "f.Qt Quick - Multimedia" - libraryIcon: ":/qtquickplugin/images/video-24px.png" - version: "6.0" - requiredImport: "QtMultimedia" - - Property { name: "width"; type: "int"; value: 200; } - Property { name: "height"; type: "int"; value: 200; } - } - } - - Type { - name: "QtQuick3D.SpatialAudio.AmbientSound" - icon: ":/qtquickplugin/images/ambient-sound-16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeDroppedInView3D: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Ambient Sound" - category: "Spatial Audio" - libraryIcon: ":/qtquickplugin/images/ambient-sound-24.png" - version: "6.0" - requiredImport: "QtQuick3D.SpatialAudio" - toolTip: qsTr("An ambient background sound.") - } - } - - Type { - name: "QtQuick3D.SpatialAudio.AudioEngine" - icon: ":/qtquickplugin/images/audio-engine-16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeDroppedInView3D: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Audio Engine" - category: "Spatial Audio" - libraryIcon: ":/qtquickplugin/images/audio-engine-24.png" - version: "6.0" - requiredImport: "QtQuick3D.SpatialAudio" - toolTip: qsTr("Manages sound objects inside a 3D scene.") - } - } - - Type { - name: "QtQuick3D.SpatialAudio.AudioListener" - icon: ":/qtquickplugin/images/audio-listener-16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeDroppedInView3D: true - } - - ItemLibraryEntry { - name: "Audio Listener" - category: "Spatial Audio" - libraryIcon: ":/qtquickplugin/images/audio-listener-24.png" - version: "6.0" - requiredImport: "QtQuick3D.SpatialAudio" - toolTip: qsTr("Sets the position and orientation of listening.") - } - } - - Type { - name: "QtQuick3D.SpatialAudio.AudioRoom" - icon: ":/qtquickplugin/images/audio-room-16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeDroppedInView3D: true - } - - ItemLibraryEntry { - name: "Audio Room" - category: "Spatial Audio" - libraryIcon: ":/qtquickplugin/images/audio-room-24.png" - version: "6.0" - requiredImport: "QtQuick3D.SpatialAudio" - toolTip: qsTr("Sets up a room for the spatial audio engine.") - } - } - - Type { - name: "QtQuick3D.SpatialAudio.SpatialSound" - icon: ":/qtquickplugin/images/spatial-audio-16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeDroppedInView3D: true - } - - ItemLibraryEntry { - name: "Spatial Sound" - category: "Spatial Audio" - libraryIcon: ":/qtquickplugin/images/spatial-audio-24.png" - version: "6.0" - requiredImport: "QtQuick3D.SpatialAudio" - toolTip: qsTr("A sound object in 3D space.") - } - } - - Type { - name: "QtQuick3D.BakedLightmap" - icon: ":/ItemLibrary/images/item-default-icon.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeDroppedInView3D: false - } - - ItemLibraryEntry { - name: "Baked Lightmap" - category: "Components" - libraryIcon: ":/ItemLibrary/images/item-default-icon.png" - version: "6.5" - requiredImport: "QtQuick3D" - toolTip: qsTr("An object to specify details about baked lightmap of a model.") - - Property { name: "loadPrefix"; type: "string"; value: "lightmaps"; } - } - } } diff --git a/share/qtcreator/qmldesigner/itemLibrary/quick3d.metainfo b/share/qtcreator/qmldesigner/itemLibrary/quick3d.metainfo new file mode 100644 index 0000000000..8f00613966 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/quick3d.metainfo @@ -0,0 +1,125 @@ +MetaInfo { + Type { + name: "QtQuick3D.SpatialAudio.AmbientSound" + icon: "images/ambient-sound-16.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Ambient Sound" + category: "Spatial Audio" + libraryIcon: "images/ambient-sound-24.png" + version: "6.0" + requiredImport: "QtQuick3D.SpatialAudio" + toolTip: qsTr("An ambient background sound.") + } + } + + Type { + name: "QtQuick3D.SpatialAudio.AudioEngine" + icon: "images/audio-engine-16.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Audio Engine" + category: "Spatial Audio" + libraryIcon: "images/audio-engine-24.png" + version: "6.0" + requiredImport: "QtQuick3D.SpatialAudio" + toolTip: qsTr("Manages sound objects inside a 3D scene.") + } + } + + Type { + name: "QtQuick3D.SpatialAudio.AudioListener" + icon: "images/audio-listener-16.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Audio Listener" + category: "Spatial Audio" + libraryIcon: "images/audio-listener-24.png" + version: "6.0" + requiredImport: "QtQuick3D.SpatialAudio" + toolTip: qsTr("Sets the position and orientation of listening.") + } + } + + Type { + name: "QtQuick3D.SpatialAudio.AudioRoom" + icon: "images/audio-room-16.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Audio Room" + category: "Spatial Audio" + libraryIcon: "images/audio-room-24.png" + version: "6.0" + requiredImport: "QtQuick3D.SpatialAudio" + toolTip: qsTr("Sets up a room for the spatial audio engine.") + } + } + + Type { + name: "QtQuick3D.SpatialAudio.SpatialSound" + icon: "images/spatial-audio-16.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Spatial Sound" + category: "Spatial Audio" + libraryIcon: "images/spatial-audio-24.png" + version: "6.0" + requiredImport: "QtQuick3D.SpatialAudio" + toolTip: qsTr("A sound object in 3D space.") + } + } + + Type { + name: "QtQuick3D.BakedLightmap" + icon: ":/ItemLibrary/images/item-default-icon.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Baked Lightmap" + category: "Components" + libraryIcon: ":/ItemLibrary/images/item-default-icon.png" + version: "6.5" + requiredImport: "QtQuick3D" + toolTip: qsTr("An object to specify details about baked lightmap of a model.") + + Property { name: "loadPrefix"; type: "string"; value: "lightmaps"; } + } + } +} diff --git a/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowserContextMenu.qml b/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowserContextMenu.qml index f72d21b35b..248e07bf6c 100644 --- a/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowserContextMenu.qml +++ b/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowserContextMenu.qml @@ -127,4 +127,11 @@ StudioControls.Menu { onTriggered: materialBrowserModel.addNewMaterial() } + + StudioControls.MenuItem { + text: qsTr("Add to Content Library") + enabled: !materialBrowserModel.selectedMaterialIsComponent + + onTriggered: MaterialBrowserBackend.rootView.addMaterialToContentLibrary() + } } diff --git a/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorPane.qml b/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorPane.qml index dde7ecd0dc..0ab7e59d01 100644 --- a/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorPane.qml +++ b/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorPane.qml @@ -4,8 +4,8 @@ import QtQuick import HelperWidgets -PropertyEditorPane { - id: itemPane +Item { + id: root width: 420 height: 420 @@ -17,63 +17,75 @@ PropertyEditorPane { // invoked from C++ to refresh material preview image function refreshPreview() { - topSection.refreshPreview() + itemPane.headerItem.refreshPreview() } // Called from C++ to close context menu on focus out function closeContextMenu() { - topSection.closeContextMenu() + itemPane.headerItem.closeContextMenu() Controller.closeContextMenu() } // Called from C++ to initialize preview menu checkmarks function initPreviewData(env, model) { - topSection.previewEnv = env; - topSection.previewModel = model + itemPane.headerItem.previewEnv = env + itemPane.headerItem.previewModel = model } - MaterialEditorTopSection { - id: topSection + MaterialEditorToolBar { + id: toolbar - onToolBarAction: (action) => itemPane.toolBarAction(action) - onPreviewEnvChanged: itemPane.previewEnvChanged(previewEnv) - onPreviewModelChanged: itemPane.previewModelChanged(previewModel) + width: parent.width + + onToolBarAction: (action) => root.toolBarAction(action) } - Item { width: 1; height: 10 } + PropertyEditorPane { + id: itemPane - DynamicPropertiesSection { - propertiesModel: MaterialEditorDynamicPropertiesModel {} - } + anchors.top: toolbar.bottom + anchors.bottom: parent.bottom + width: parent.width + + clip: true - Loader { - id: specificsTwo + headerComponent: MaterialEditorTopSection { + onPreviewEnvChanged: root.previewEnvChanged(previewEnv) + onPreviewModelChanged: root.previewModelChanged(previewModel) + } + + DynamicPropertiesSection { + propertiesModel: MaterialEditorDynamicPropertiesModel {} + } - property string theSource: specificQmlData + Loader { + id: specificsTwo - anchors.left: parent.left - anchors.right: parent.right - visible: specificsTwo.theSource !== "" - sourceComponent: specificQmlComponent + property string theSource: specificQmlData - onTheSourceChanged: { - specificsTwo.active = false - specificsTwo.active = true + width: parent.width + visible: specificsTwo.theSource !== "" + sourceComponent: specificQmlComponent + + onTheSourceChanged: { + specificsTwo.active = false + specificsTwo.active = true + } } - } - Item { - width: 1 - height: 10 - visible: specificsTwo.visible - } + Item { // spacer + width: 1 + height: 10 + visible: specificsTwo.visible + } - Loader { - id: specificsOne - anchors.left: parent.left - anchors.right: parent.right - source: specificsUrl + Loader { + id: specificsOne + anchors.left: parent.left + anchors.right: parent.right + source: specificsUrl + } } } diff --git a/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorTopSection.qml b/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorTopSection.qml index 23311636bc..d60c98933b 100644 --- a/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorTopSection.qml +++ b/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorTopSection.qml @@ -11,10 +11,11 @@ import StudioTheme as StudioTheme Column { id: root - signal toolBarAction(int action) - property string previewEnv property string previewModel + + property real __horizontalSpacing: 5 + property StudioTheme.ControlStyle buttonStyle: StudioTheme.ViewBarButtonStyle { //This is how you can override stuff from the control styles controlSize: Qt.size(previewOptions.width, previewOptions.width) @@ -37,14 +38,7 @@ Column { anchors.left: parent.left anchors.right: parent.right - MaterialEditorToolBar { - width: root.width - - onToolBarAction: (action) => root.toolBarAction(action) - } - - Item { width: 1; height: 10 } // spacer - + Item { width: 1; height: 5 } // spacer StudioControls.Menu { id: modelMenu @@ -129,6 +123,19 @@ Column { width: parent.width height: previewRect.height + StudioControls.AbstractButton { + id: pinButton + + x: root.__horizontalSpacing + + style: root.buttonStyle + iconSize: StudioTheme.Values.bigFont + buttonIcon: pinButton.checked ? StudioTheme.Constants.pin : StudioTheme.Constants.unpin + checkable: true + checked: itemPane.headerDocked + onCheckedChanged: itemPane.headerDocked = pinButton.checked + } + Rectangle { id: previewRect anchors.horizontalCenter: parent.horizontalCenter @@ -153,6 +160,7 @@ Column { height: previewRect.height anchors.top: previewRect.top anchors.left: previewRect.right + anchors.leftMargin: root.__horizontalSpacing Column { anchors.horizontalCenter: parent.horizontalCenter @@ -172,7 +180,6 @@ Column { } } } - } HelperWidgets.Section { @@ -214,6 +221,7 @@ Column { model: possibleTypes showExtendedFunctionButton: false implicitWidth: StudioTheme.Values.singleControlColumnWidth + enabled: possibleTypes.length > 1 onActivated: changeTypeName(currentValue) } diff --git a/share/qtcreator/qmldesigner/projectstorage/fake.qmltypes b/share/qtcreator/qmldesigner/projectstorage/fake.qmltypes index f6f2159689..60096cd790 100644 --- a/share/qtcreator/qmldesigner/projectstorage/fake.qmltypes +++ b/share/qtcreator/qmldesigner/projectstorage/fake.qmltypes @@ -318,4 +318,13 @@ Component { Component { name: "QScxmlError" } + +Component { + name: "QList<QQuickLayoutItemProxy*>" +} + +Component { + name: "VertexColorMaskFlags" +} + } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml index f88defbff5..1b626623ea 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml @@ -33,7 +33,7 @@ Section { PropertyLabel { text: qsTr("Smooth") - tooltip: qsTr("Toggles if the smoothing is performed using linear interpolation method. Keeping it unchecked would follow non-smooth method using nearest neighbor. It is mostly applicable on image based items. ") + tooltip: qsTr("Toggles if the smoothing is performed using linear interpolation method. Keeping it unchecked would follow non-smooth method using nearest neighbor. It is mostly applicable on image based items.") blockedByTemplate: !backendValues.smooth.isAvailable } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/BusyIndicatorSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/BusyIndicatorSpecifics.qml new file mode 100644 index 0000000000..2cc82d7fab --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/BusyIndicatorSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.BusyIndicatorSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ButtonSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ButtonSpecifics.qml new file mode 100644 index 0000000000..ea32a00594 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ButtonSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.ButtonSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/CheckBoxSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/CheckBoxSpecifics.qml new file mode 100644 index 0000000000..c38b75b327 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/CheckBoxSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.CheckBoxSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/CheckDelegateSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/CheckDelegateSpecifics.qml new file mode 100644 index 0000000000..939433f5ea --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/CheckDelegateSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.CheckDelegateSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ComboBoxSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ComboBoxSpecifics.qml new file mode 100644 index 0000000000..13ad9346d4 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ComboBoxSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.ComboBoxSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ControlSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ControlSpecifics.qml new file mode 100644 index 0000000000..07cc704a07 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ControlSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.ControlSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/DelayButtonSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/DelayButtonSpecifics.qml new file mode 100644 index 0000000000..3818cebc33 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/DelayButtonSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.DelayButtonSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/DialSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/DialSpecifics.qml new file mode 100644 index 0000000000..c62608cd00 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/DialSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.DialSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/DialogSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/DialogSpecifics.qml new file mode 100644 index 0000000000..237cb41862 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/DialogSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.DialogSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/DrawerSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/DrawerSpecifics.qml new file mode 100644 index 0000000000..d5cf0a482e --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/DrawerSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.DrawerSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/FrameSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/FrameSpecifics.qml new file mode 100644 index 0000000000..ac1881a865 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/FrameSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.FrameSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/GroupBoxSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/GroupBoxSpecifics.qml new file mode 100644 index 0000000000..3067af7640 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/GroupBoxSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.GroupBoxSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ItemDelegateSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ItemDelegateSpecifics.qml new file mode 100644 index 0000000000..6c7f5dc812 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ItemDelegateSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.ItemDelegateSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/LabelSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/LabelSpecifics.qml new file mode 100644 index 0000000000..6c826e46ea --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/LabelSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.LabelSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/PageIndicatorSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/PageIndicatorSpecifics.qml new file mode 100644 index 0000000000..7437975f96 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/PageIndicatorSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.PageIndicatorSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/PageSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/PageSpecifics.qml new file mode 100644 index 0000000000..16e8b51cb5 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/PageSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.PageSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/PaneSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/PaneSpecifics.qml new file mode 100644 index 0000000000..dd07a3cf7f --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/PaneSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.PaneSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/PopupSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/PopupSpecifics.qml new file mode 100644 index 0000000000..788b2a4359 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/PopupSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.PopupSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ProgressBarSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ProgressBarSpecifics.qml new file mode 100644 index 0000000000..a58f9e2f36 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ProgressBarSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.ProgressBarSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/RadioButtonSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/RadioButtonSpecifics.qml new file mode 100644 index 0000000000..fc2500dd1b --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/RadioButtonSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.RadioButtonSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/RadioDelegateSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/RadioDelegateSpecifics.qml new file mode 100644 index 0000000000..d07f17b7e8 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/RadioDelegateSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.RadioDelegateSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/RangeSliderSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/RangeSliderSpecifics.qml new file mode 100644 index 0000000000..14e493e69e --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/RangeSliderSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.RangeSliderSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/RoundButtonSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/RoundButtonSpecifics.qml new file mode 100644 index 0000000000..5bd8776f62 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/RoundButtonSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.RoundButtonSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ScrollViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ScrollViewSpecifics.qml new file mode 100644 index 0000000000..2af497fcb7 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ScrollViewSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.ScrollViewSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SliderSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SliderSpecifics.qml new file mode 100644 index 0000000000..846ca8bb14 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SliderSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.SliderSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SpinBoxSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SpinBoxSpecifics.qml new file mode 100644 index 0000000000..f75983a9fa --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SpinBoxSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.SpinBoxSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/StackViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/StackViewSpecifics.qml new file mode 100644 index 0000000000..593cba24d7 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/StackViewSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.StackViewSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SwipeDelegateSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SwipeDelegateSpecifics.qml new file mode 100644 index 0000000000..40648a3431 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SwipeDelegateSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.SwipeDelegateSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SwipeViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SwipeViewSpecifics.qml new file mode 100644 index 0000000000..eaf769135c --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SwipeViewSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.SwipeViewSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SwitchDelegateSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SwitchDelegateSpecifics.qml new file mode 100644 index 0000000000..cba96b930f --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SwitchDelegateSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.SwitchDelegateSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SwitchSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SwitchSpecifics.qml new file mode 100644 index 0000000000..e6647f4f7d --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/SwitchSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.SwitchSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TabBarSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TabBarSpecifics.qml new file mode 100644 index 0000000000..c23580a25e --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TabBarSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.TabBarSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TabButtonSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TabButtonSpecifics.qml new file mode 100644 index 0000000000..dc5bcb36e2 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TabButtonSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.TabButtonSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TextAreaSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TextAreaSpecifics.qml new file mode 100644 index 0000000000..a9871612a9 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TextAreaSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.TextAreaSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TextFieldSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TextFieldSpecifics.qml new file mode 100644 index 0000000000..fbcac9c389 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TextFieldSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.TextFieldSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ToolBarSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ToolBarSpecifics.qml new file mode 100644 index 0000000000..63d1f179eb --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ToolBarSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.ToolBarSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ToolButtonSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ToolButtonSpecifics.qml new file mode 100644 index 0000000000..98aabdd274 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ToolButtonSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.ToolButtonSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ToolSeparatorSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ToolSeparatorSpecifics.qml new file mode 100644 index 0000000000..060808a2a6 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/ToolSeparatorSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.ToolSeparatorSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TumblerSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TumblerSpecifics.qml new file mode 100644 index 0000000000..5ca8280642 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/Basic/TumblerSpecifics.qml @@ -0,0 +1,6 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import ".." as Original + +Original.TumblerSpecifics {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/EffectsSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/EffectsSection.qml new file mode 100644 index 0000000000..3e9a79f8e0 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/EffectsSection.qml @@ -0,0 +1,549 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import QtQuick +import QtQuick.Layouts +import HelperWidgets +import StudioTheme as StudioTheme +import StudioControls as StudioControls + +Section { + id: root + + property bool hasDesignerEffect: false + property var model + property var effectNode + property var effectNodeWrapper + + // Draggging + property Item draggedSec: null + property var secsY: [] + property int moveFromIdx: 0 + property int moveToIdx: 0 + + function invalidate() { + root.effectNode = null + root.model = null + + var effect = modelNodeBackend.allChildrenOfType("DesignEffect") + root.effectNode = effect + root.effectNodeWrapper = modelNodeBackend.registerSubSelectionWrapper(effect) + root.hasDesignerEffect = effect.length === 1 + + if (!root.hasDesignerEffect) + return + + root.model = modelNodeBackend.allChildren(effect[0]) // ids for all effects + } + + leftPadding: 0 + anchors.left: parent.left + anchors.right: parent.right + caption: qsTr('Effects <a style="color:%1;">[beta]</a>').arg(StudioTheme.Values.themeInteraction) + visible: backendValues.layer_effect.isAvailable + + property Connections connection: Connections { + target: modelNodeBackend + + function onSelectionChanged() { root.invalidate() } + function onSelectionToBeChanged() { root.model = [] } + } + + SectionLayout { + x: StudioTheme.Values.sectionLeftPadding + + PropertyLabel {} + + SecondColumnLayout { + Spacer { implicitWidth: StudioTheme.Values.actionIndicatorWidth } + + AbstractButton { + id: effectButton + implicitWidth: StudioTheme.Values.singleControlColumnWidth + width: StudioTheme.Values.singleControlColumnWidth + buttonIcon: root.hasDesignerEffect ? qsTr("Remove Effects") : qsTr("Add Effects") + iconFont: StudioTheme.Constants.font + tooltip: qsTr("Adds visual effects on the component.") + onClicked: { + if (root.hasDesignerEffect) { + root.effectNodeWrapper.deleteModelNode() + } else { + modelNodeBackend.createModelNode(-1, "data", "DesignEffect", "QtQuick.Studio.DesignEffects") + var effectNode = modelNodeBackend.allChildrenOfType("DesignEffect") + modelNodeBackend.createModelNode(effectNode, "effects", "DesignDropShadow") + } + root.invalidate() + } + } + } + + PropertyLabel { + text: qsTr("Visible") + tooltip: qsTr("Toggles the visibility of visual effects on the component.") + visible: root.hasDesignerEffect + } + + SecondColumnLayout { + visible: root.hasDesignerEffect + + CheckBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: root.effectNodeWrapper.properties.visible + } + + ExpandingSpacer {} + } + } + + Item { + visible: root.hasDesignerEffect + width: 1 + height: StudioTheme.Values.sectionHeadSpacerHeight + } + + function handleDragMove() { + root.dragTimer.stop() + if (root.secsY.length === 0) { + for (let i = 0; i < repeater.count; ++i) + root.secsY[i] = repeater.itemAt(i).y + } + + let scrollView = Controller.mainScrollView + + let oldContentY = scrollView.contentY + if (root.draggedSec.y < scrollView.dragScrollMargin + scrollView.contentY + && scrollView.contentY > 0) { + scrollView.contentY -= scrollView.dragScrollMargin / 2 + } else if (root.draggedSec.y > scrollView.contentY + scrollView.height - scrollView.dragScrollMargin + && scrollView.contentY < scrollView.contentHeight - scrollView.height) { + scrollView.contentY += scrollView.dragScrollMargin / 2 + if (scrollView.contentY > scrollView.contentHeight - scrollView.height) + scrollView.contentY = scrollView.contentHeight - scrollView.height + } + + if (scrollView.contentY < 0) + scrollView.contentY = 0 + + if (oldContentY !== scrollView.contentY) { + // Changing dragged section position in drag handler doesn't seem to stick + // when triggered by mouse move, so do it again async + root.dragTimer.targetY = root.draggedSec.y - oldContentY + scrollView.contentY + root.dragTimer.restart() + root.dragConnection.enabled = false + root.draggedSec.y = root.dragTimer.targetY + root.dragConnection.enabled = true + } + + root.moveToIdx = root.moveFromIdx + for (let i = 0; i < repeater.count; ++i) { + let currItem = repeater.itemAt(i) + if (i > root.moveFromIdx) { + if (root.draggedSec.y > currItem.y) { + currItem.y = root.secsY[i] - root.draggedSec.height - nodesCol.spacing + root.moveToIdx = i + } else { + currItem.y = root.secsY[i] + } + } else if (i < root.moveFromIdx) { + if (root.draggedSec.y < currItem.y) { + currItem.y = root.secsY[i] + root.draggedSec.height + nodesCol.spacing + root.moveToIdx = Math.min(root.moveToIdx, i) + } else { + currItem.y = root.secsY[i] + } + } + } + } + + property Connections dragConnection: Connections { + target: root.draggedSec + + function onYChanged() { root.handleDragMove() } + } + + property Timer dragTimer: Timer { + running: false + interval: 16 + repeat: false + + property real targetY: -1 + + onTriggered: { + // Ensure we get position change triggers even if user holds mouse still to + // make scrolling smooth + root.draggedSec.y = targetY + root.handleDragMove() + } + } + + Column { + id: nodesCol + anchors.left: parent.left + anchors.right: parent.right + spacing: 1 + + Section { + sectionHeight: 37 + anchors.left: parent.left + anchors.right: parent.right + caption: qsTr("Layer Blur") + labelCapitalization: Font.MixedCase + visible: root.hasDesignerEffect + category: "DesignEffects" + expanded: false + + SectionLayout { + + PropertyLabel { + text: qsTr("Visible") + tooltip: qsTr("Toggles the visibility of the <b>Layer Blur</b> on the component.") + } + + SecondColumnLayout { + CheckBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: root.effectNodeWrapper.properties.layerBlurVisible + } + + ExpandingSpacer {} + } + + PropertyLabel { + text: qsTr("Blur") + tooltip: qsTr("Sets the intensity of the <b>Layer Blur</b> on the component.") + } + + SecondColumnLayout { + SpinBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: root.effectNodeWrapper.properties.layerBlurRadius + minimumValue: 0 + maximumValue: 250 + } + + ExpandingSpacer {} + } + } + } + + Section { + sectionHeight: 37 + anchors.left: parent.left + anchors.right: parent.right + caption: qsTr("Background Blur") + labelCapitalization: Font.MixedCase + visible: root.hasDesignerEffect + category: "DesignEffects" + expanded: false + + SectionLayout { + + PropertyLabel { + text: qsTr("Visible") + tooltip: qsTr("Toggles the visibility of blur on the selected background component.") + } + + SecondColumnLayout { + CheckBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: root.effectNodeWrapper.properties.backgroundBlurVisible + } + + ExpandingSpacer {} + } + + PropertyLabel { + text: qsTr("Blur") + tooltip: qsTr("Sets the intensity of blur on the selected background component.\n" + + "The foreground component should be transparent, and the background " + + "component should be opaque.") + } + + SecondColumnLayout { + SpinBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: root.effectNodeWrapper.properties.backgroundBlurRadius + minimumValue: 0 + maximumValue: 250 + } + + ExpandingSpacer {} + } + + PropertyLabel { + text: qsTr("Background") + tooltip: qsTr("Sets a component as the background of a transparent component." + + "The <b>Background Blur</b> works only on this component. The component should " + + "be solid.") + } + + SecondColumnLayout { + ItemFilterComboBox { + implicitWidth: StudioTheme.Values.singleControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + width: implicitWidth + typeFilter: "QtQuick.Item" + backendValue: root.effectNodeWrapper.properties.backgroundLayer + } + + ExpandingSpacer {} + } + } + } + + Repeater { + id: repeater + model: root.model + + Section { + id: delegate + + property QtObject wrapper: modelNodeBackend.registerSubSelectionWrapper(modelData) + property bool wasExpanded: false + + Behavior on y { + id: dragAnimation + + PropertyAnimation { + duration: 300 + easing.type: Easing.InOutQuad + } + } + + onStartDrag: function(section) { + root.draggedSec = section + root.moveFromIdx = index + // We only need to animate non-dragged sections + dragAnimation.enabled = false + delegate.wasExpanded = delegate.expanded + delegate.expanded = false + delegate.highlightBorder = true + root.secsY = [] + } + + onStopDrag: { + if (root.secsY.length !== 0) { + if (root.moveFromIdx === root.moveToIdx) + root.draggedSec.y = root.secsY[root.moveFromIdx] + else + modelNodeBackend.moveNode(root.effectNode, "effects", root.moveFromIdx, root.moveToIdx) + } + + delegate.highlightBorder = false + root.draggedSec = null + delegate.expanded = delegate.wasExpanded + dragAnimation.enabled = true + + Qt.callLater(root.invalidate) + } + + sectionHeight: 37 + anchors.left: parent.left + anchors.right: parent.right + category: "DesignEffects" + fillBackground: true + expanded: false + + draggable: true + showCloseButton: true + + content: StudioControls.ComboBox { + id: shadowComboBox + actionIndicatorVisible: false + width: 200 + textRole: "text" + valueRole: "value" + model: [ + { value: "DesignDropShadow", text: qsTr("Drop Shadow") }, + { value: "DesignInnerShadow", text: qsTr("Inner Shadow") } + ] + anchors.verticalCenter: parent.verticalCenter + + // When an item is selected, update the backend. + onActivated: { + delegate.wrapper.properties.showBehind.resetValue() + modelNodeBackend.changeType(modelData, shadowComboBox.currentValue) + } + // Set the initial currentIndex to the value stored in the backend. + Component.onCompleted: { + shadowComboBox.currentIndex = shadowComboBox.indexOfValue(modelNodeBackend.simplifiedTypeName(modelData)) + } + } + + onCloseButtonClicked: { + delegate.wrapper.deleteModelNode() + Qt.callLater(root.invalidate) + } + + SectionLayout { + id: controlContainer + property bool isDropShadow: shadowComboBox.currentValue === "DesignDropShadow" + + PropertyLabel { + text: qsTr("Visible") + tooltip: qsTr("Toggles the visibility of the component shadow.") + } + + SecondColumnLayout { + CheckBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: delegate.wrapper.properties.visible + } + + ExpandingSpacer {} + } + + PropertyLabel { + text: qsTr("Blur") + tooltip: qsTr("Sets the softness of the component shadow. A larger value" + + " causes the edges of the shadow to appear more blurry.") + } + + SecondColumnLayout { + SpinBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: delegate.wrapper.properties.blur + minimumValue: 0 + maximumValue: 250 + } + + ExpandingSpacer {} + } + + PropertyLabel { + text: qsTr("Spread") + tooltip: modelNodeBackend.isInstanceOf("Rectangle") + ? qsTr("Resizes the base shadow of the component by pixels.") + : qsTr("Only supported for Rectangles.") + enabled: modelNodeBackend.isInstanceOf("Rectangle") + } + + SecondColumnLayout { + SpinBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: delegate.wrapper.properties.spread + enabled: modelNodeBackend.isInstanceOf("Rectangle") + minimumValue: -2048 + maximumValue: 2048 + } + + ExpandingSpacer {} + } + + PropertyLabel { + text: qsTr("Color") + tooltip: qsTr("Sets the color of the shadow.") + } + + ColorEditor { + backendValue: delegate.wrapper.properties.color + supportGradient: false + } + + PropertyLabel { + text: qsTr("Offset") + tooltip: qsTr("Moves the shadow with respect to the component in " + + "X and Y coordinates by pixels.") + } + + SecondColumnLayout { + SpinBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: delegate.wrapper.properties.offsetX + minimumValue: -0xffff + maximumValue: 0xffff + } + + Spacer { implicitWidth: StudioTheme.Values.controlLabelGap } + + ControlLabel { + text: "X" + tooltip: qsTr("X-coordinate") + } + + Spacer { implicitWidth: StudioTheme.Values.controlGap } + + SpinBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: delegate.wrapper.properties.offsetY + minimumValue: -0xffff + maximumValue: 0xffff + } + + Spacer { implicitWidth: StudioTheme.Values.controlLabelGap } + + ControlLabel { + text: "Y" + tooltip: qsTr("Y-coordinate") + } + + ExpandingSpacer {} + } + + + PropertyLabel { + visible: controlContainer.isDropShadow + text: qsTr("Show behind") + tooltip: qsTr("Toggles the visibility of the shadow behind a transparent component.") + } + + SecondColumnLayout { + visible: controlContainer.isDropShadow + + CheckBox { + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + backendValue: delegate.wrapper.properties.showBehind + } + + ExpandingSpacer {} + } + } + } + } + } + + Item { + visible: root.hasDesignerEffect + width: 1 + height: StudioTheme.Values.sectionHeadSpacerHeight + } + + SectionLayout { + x: StudioTheme.Values.sectionLeftPadding + visible: root.hasDesignerEffect + + PropertyLabel {} + + SecondColumnLayout { + Spacer { implicitWidth: StudioTheme.Values.actionIndicatorWidth } + + AbstractButton { + id: addShadowEffectButton + implicitWidth: StudioTheme.Values.singleControlColumnWidth + width: StudioTheme.Values.singleControlColumnWidth + buttonIcon: qsTr("Add Shadow Effect") + iconFont: StudioTheme.Constants.font + tooltip: qsTr("Adds <b>Drop Shadow</b> or <b>Inner Shadow</b> effects to a component.") + onClicked: { + modelNodeBackend.createModelNode(root.effectNode, + "effects", + "DesignDropShadow") + root.invalidate() + } + } + + ExpandingSpacer {} + } + } +} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml index 60bd415a6a..aeef8a9598 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml @@ -133,6 +133,10 @@ PropertyEditorPane { visible: specificsOne.source.toString() !== "" } + EffectsSection { + expanded: false + } + AdvancedSection { expanded: false } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml index 2072f13a8e..aeaeacbd4e 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml @@ -12,7 +12,10 @@ Section { caption: qsTr("Column Layout") SectionLayout { - PropertyLabel { text: qsTr("Column spacing") } + PropertyLabel { + text: qsTr("Column spacing") + tooltip: qsTr("Sets the space between the items in pixels in the <b>Column Layout</b>.") + } SecondColumnLayout { SpinBox { @@ -30,6 +33,7 @@ Section { PropertyLabel { text: qsTr("Layout direction") blockedByTemplate: !backendValues.layoutDirection.isAvailable + tooltip: qsTr("Sets the direction of the item flow in the <b>Column Layout</b>.") } SecondColumnLayout { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/GridLayoutSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/GridLayoutSpecifics.qml index 8eea143542..e6606ffe00 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/GridLayoutSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/GridLayoutSpecifics.qml @@ -12,7 +12,10 @@ Section { caption: qsTr("Grid Layout") SectionLayout { - PropertyLabel { text: qsTr("Columns & Rows") } + PropertyLabel { + text: qsTr("Columns & Rows") + tooltip: qsTr("Sets the number of columns and rows in the <b>Grid Layout</b>.") + } SecondColumnLayout { SpinBox { @@ -49,7 +52,10 @@ Section { ExpandingSpacer {} } - PropertyLabel { text: qsTr("Spacing") } + PropertyLabel { + text: qsTr("Spacing") + tooltip: qsTr("Sets the space between the items in pixels in the rows and columns in the <b>Grid Layout</b>.") + } SecondColumnLayout { SpinBox { @@ -86,7 +92,10 @@ Section { ExpandingSpacer {} } - PropertyLabel { text: qsTr("Flow") } + PropertyLabel { + text: qsTr("Flow") + tooltip: qsTr("Set the direction of dynamic items to flow in rows or columns in the <b>Grid Layout</b>.") + } SecondColumnLayout { ComboBox { @@ -100,7 +109,11 @@ Section { ExpandingSpacer {} } - PropertyLabel { text: qsTr("Layout direction") } + PropertyLabel { + text: qsTr("Layout direction") + tooltip: qsTr("Sets the direction of the dynamic items left to right or right to left in the <b>Grid Layout</b>.") + + } SecondColumnLayout { ComboBox { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml index b4a2ced1cd..726b3783fb 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml @@ -12,7 +12,10 @@ Section { caption: qsTr("Row Layout") SectionLayout { - PropertyLabel { text: qsTr("Row spacing") } + PropertyLabel { + text: qsTr("Row spacing") + tooltip: qsTr("Sets the space between the items in pixels in the <b>Row Layout</b>.") + } SecondColumnLayout { SpinBox { @@ -30,6 +33,7 @@ Section { PropertyLabel { text: qsTr("Layout direction") blockedByTemplate: !backendValues.layoutDirection.isAvailable + tooltip: qsTr("Sets the direction of the item flow in the <b>Row Layout</b>.") } SecondColumnLayout { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/StackLayoutSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/StackLayoutSpecifics.qml index 110a8cbf1a..dc865bf128 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/StackLayoutSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/StackLayoutSpecifics.qml @@ -12,7 +12,10 @@ Section { caption: qsTr("Stack Layout") SectionLayout { - PropertyLabel { text: qsTr("Current index") } + PropertyLabel { + text: qsTr("Current index") + tooltip: qsTr("Sets the index of the child item currently visible in the <b>Stack Layout</b>.") + } SecondColumnLayout { SpinBox { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/CheckBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/CheckBox.qml index 95788a9ec6..7f1e6f5d46 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/CheckBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/CheckBox.qml @@ -22,17 +22,25 @@ StudioControls.CheckBox { labelColor: colorLogic.textColor + property bool __block: false + ColorLogic { id: colorLogic backendValue: checkBox.backendValue onValueFromBackendChanged: { + checkBox.__block = true if (colorLogic.valueFromBackend !== undefined && checkBox.checked !== colorLogic.valueFromBackend) checkBox.checked = colorLogic.valueFromBackend + checkBox.__block = false } + } onCheckedChanged: { + if (checkBox.__block) + return + if (backendValue.value !== checkBox.checked) backendValue.value = checkBox.checked } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml index 4b4d2b8dc6..cc8247d706 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml @@ -38,6 +38,10 @@ SecondColumnLayout { property alias showHexTextField: hexTextField.visible property bool shapeGradients: false + + //for now, gradients on MCUs are limited to Basic and Shape Linear Gradient: + property bool mcuGradients: false + property color originalColor property bool isVector3D: false @@ -219,7 +223,10 @@ SecondColumnLayout { function open() { popupDialog.ensureLoader() + popupDialog.show(preview) + + popupDialog.loaderItem.aboutToBeShown() //need it for now } function determineActiveColorMode() { @@ -235,9 +242,11 @@ SecondColumnLayout { sourceComponent: ColorEditorPopup { shapeGradients: colorEditor.shapeGradients + mcuGradients: colorEditor.mcuGradients supportGradient: colorEditor.supportGradient width: popupDialog.contentWidth visible: popupDialog.visible + parentWindow: popupDialog.window } onLoaded: { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditorPopup.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditorPopup.qml index 22be367c37..41f2c433fa 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditorPopup.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditorPopup.qml @@ -12,10 +12,20 @@ import QtQuickDesignerColorPalette Column { id: root + // There seems to be an issue on Windows and MacOS with ColorPickers + // Canvases not being painted on initialization + // because ColorEditorPopup is invisible at init time, + // so we use this signal to explicitly pass visibility status + signal aboutToBeShown + property bool eyeDropperActive: ColorPaletteBackend.eyeDropperActive property bool supportGradient: false property bool shapeGradients: false + + //for now, gradients on MCUs are limited to Basic and Shape Linear Gradient: + property bool mcuGradients: false + property alias gradientLine: gradientLine property alias popupHexTextField: popupHexTextField property alias gradientPropertyName: root.gradientModel.gradientPropertyName @@ -23,6 +33,8 @@ Column { property alias gradientModel: gradientModel + property Window parentWindow: null + property bool isInValidState: false readonly property real twoColumnWidth: (colorColumn.width - StudioTheme.Values.controlGap) * 0.5 @@ -224,12 +236,12 @@ Column { ceMode.items.append({ value: "RadialGradient", text: qsTr("Radial"), - enabled: root.supportGradient && root.shapeGradients + enabled: root.supportGradient && root.shapeGradients && !root.mcuGradients }) ceMode.items.append({ value: "ConicalGradient", text: qsTr("Conical"), - enabled: root.supportGradient && root.shapeGradients + enabled: root.supportGradient && root.shapeGradients && !root.mcuGradients }) } @@ -429,6 +441,13 @@ Column { hsvValueSpinBox.value = colorPicker.value hsvAlphaSpinBox.value = colorPicker.alpha } + + Connections { + target: root + onAboutToBeShown: { + colorPicker.aboutToBeShown() + } + } } Column { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DoubleSpinBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DoubleSpinBox.qml index a44e8c690b..11ce0e1e75 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DoubleSpinBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DoubleSpinBox.qml @@ -53,5 +53,6 @@ Item { decimals: 2 onRealValueModified: wrapper.valueModified() + onCompressedRealValueModified: wrapper.valueModified() } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DynamicPropertiesSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DynamicPropertiesSection.qml index 39176ca82a..e0c70ff946 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DynamicPropertiesSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DynamicPropertiesSection.qml @@ -291,53 +291,64 @@ Section { property int vecSize: 0 property var proxyValues: [] property var spinBoxes: [boxX, boxY, boxZ, boxW] + property bool block: false signal remove - onVecSizeChanged: updateProxyValues() + onVecSizeChanged: layoutVector.updateProxyValues() - spacing: StudioTheme.Values.sectionRowSpacing / 2 + spacing: StudioTheme.Values.sectionRowSpacing function isValidValue(v) { return !(v === undefined || isNaN(v)) } - function updateExpression() { + function updateExpressionFromExpression() { + if (layoutVector.block) + return + + layoutVector.backendValue.expression = layoutVector.proxyValues[0].expression + // Only the first proxy value has an expression editor enabled + } + + function updateExpressionFromValue() { + if (layoutVector.block) + return + for (let i = 0; i < vecSize; ++i) { - if (!isValidValue(proxyValues[i].value)) + if (!layoutVector.isValidValue(layoutVector.proxyValues[i].value)) return } - let expStr = "Qt.vector" + vecSize + "d("+proxyValues[0].value - for (let j=1; j < vecSize; ++j) - expStr += ", " + proxyValues[j].value + let expStr = "Qt.vector" + layoutVector.vecSize + "d(" + layoutVector.proxyValues[0].value + for (let j=1; j < layoutVector.vecSize; ++j) + expStr += ", " + layoutVector.proxyValues[j].value expStr += ")" layoutVector.backendValue.expression = expStr } function updateProxyValues() { - if (!backendValue) + if (!layoutVector.backendValue) return; - const startIndex = backendValue.expression.indexOf('(') - const endIndex = backendValue.expression.indexOf(')') - if (startIndex === -1 || endIndex === -1 || endIndex < startIndex) - return - const numberStr = backendValue.expression.slice(startIndex + 1, endIndex) - const numbers = numberStr.split(",") - if (!Array.isArray(numbers) || numbers.length !== vecSize) - return + let vals = layoutVector.backendValue.getExpressionAsVector() - let vals = [] - for (let i = 0; i < vecSize; ++i) { - vals[i] = parseFloat(numbers[i]) - if (!isValidValue(vals[i])) - return + layoutVector.block = true + + if (layoutVector.vecSize === vals.length) { + for (let j = 0; j < layoutVector.vecSize; ++j) { + layoutVector.proxyValues[j].setForceBound(false) + layoutVector.proxyValues[j].value = vals[j] + } + } else { + for (let j = 0; j < layoutVector.vecSize; ++j) { + layoutVector.proxyValues[j].setForceBound(true) // Required since the backendValue is just proxied + layoutVector.proxyValues[j].expression = layoutVector.backendValue.expression + } } - for (let j = 0; j < vecSize; ++j) - proxyValues[j].value = vals[j] + layoutVector.block = false } SecondColumnLayout { @@ -357,15 +368,18 @@ Section { tooltip: "X" } - Spacer { implicitWidth: StudioTheme.Values.controlGap } + Spacer { + implicitWidth: StudioTheme.Values.controlGap + + StudioTheme.Values.actionIndicatorWidth + } SpinBox { id: boxY + actionIndicatorVisible: false minimumValue: -9999999 maximumValue: 9999999 decimals: 2 implicitWidth: StudioTheme.Values.twoControlColumnWidth - + StudioTheme.Values.actionIndicatorWidth } Spacer { implicitWidth: StudioTheme.Values.controlLabelGap } @@ -386,14 +400,16 @@ Section { } SecondColumnLayout { - visible: vecSize > 2 + visible: layoutVector.vecSize > 2 + Spacer { implicitWidth: StudioTheme.Values.actionIndicatorWidth } + SpinBox { id: boxZ + actionIndicatorVisible: false minimumValue: -9999999 maximumValue: 9999999 decimals: 2 implicitWidth: StudioTheme.Values.twoControlColumnWidth - + StudioTheme.Values.actionIndicatorWidth } Spacer { implicitWidth: StudioTheme.Values.controlLabelGap } @@ -401,19 +417,22 @@ Section { ControlLabel { text: "Z" tooltip: "Z" - visible: vecSize > 2 + visible: layoutVector.vecSize > 2 } - Spacer { implicitWidth: StudioTheme.Values.controlGap } + Spacer { + implicitWidth: StudioTheme.Values.controlGap + + StudioTheme.Values.actionIndicatorWidth + } SpinBox { id: boxW + actionIndicatorVisible: false minimumValue: -9999999 maximumValue: 9999999 decimals: 2 implicitWidth: StudioTheme.Values.twoControlColumnWidth - + StudioTheme.Values.actionIndicatorWidth - visible: vecSize > 3 + visible: layoutVector.vecSize > 3 } Spacer { implicitWidth: StudioTheme.Values.controlLabelGap } @@ -421,7 +440,7 @@ Section { ControlLabel { text: "W" tooltip: "W" - visible: vecSize > 3 + visible: layoutVector.vecSize > 3 } Spacer { implicitWidth: StudioTheme.Values.controlGap } @@ -430,7 +449,7 @@ Section { height: 10 implicitWidth: StudioTheme.Values.twoControlColumnWidth + StudioTheme.Values.actionIndicatorWidth - visible: vecSize === 2 // Placeholder for last spinbox + visible: layoutVector.vecSize === 2 // Placeholder for last spinbox } Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap } @@ -486,9 +505,12 @@ Section { model: root.propertiesModel row: index } + PropertyLabel { text: propertyName tooltip: propertyType + Layout.alignment: Qt.AlignTop + Layout.topMargin: 6 } Loader { @@ -506,6 +528,8 @@ Section { return intEditor if (propertyType == "real") return realEditor + if (propertyType == "double") + return realEditor if (propertyType == "string") return stringEditor if (propertyType == "bool") @@ -540,7 +564,8 @@ Section { for (let i = 0; i < vecSize; ++i) { var newProxyValue = propertyRow.createProxyBackendValue() loader.item.proxyValues.push(newProxyValue) - newProxyValue.valueChangedQml.connect(loader.item.updateExpression) + newProxyValue.valueChangedQml.connect(loader.item.updateExpressionFromValue) + newProxyValue.expressionChangedQml.connect(loader.item.updateExpressionFromExpression) loader.item.spinBoxes[i].backendValue = newProxyValue } propertyRow.backendValue.expressionChanged.connect(loader.item.updateProxyValues) @@ -685,7 +710,7 @@ Section { StudioControls.ComboBox { id: comboBox actionIndicator.visible: false - model: ["int", "real", "color", "string", "bool", "url", "alias", + model: ["int", "real", "double", "color", "string", "bool", "url", "alias", "signal", "TextureInput", "vector2d", "vector3d", "vector4d"] width: cePopup.itemWidth } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExtendedFunctionLogic.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExtendedFunctionLogic.qml index 76e6bd8f09..8a8c8c33ce 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExtendedFunctionLogic.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExtendedFunctionLogic.qml @@ -103,7 +103,7 @@ Item { StudioControls.MenuItem { text: qsTr("Insert Keyframe") enabled: hasActiveTimeline - onTriggered: insertKeyframe(backendValue.name) + onTriggered: backendValue.insertKeyframe() } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlagsComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlagsComboBox.qml index 46c98f25c5..edf17374e2 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlagsComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlagsComboBox.qml @@ -132,6 +132,8 @@ StudioControls.CustomComboBox { ExtendedFunctionLogic { id: extFuncLogic backendValue: root.backendValue + + onMenuVisibleChanged: root.popup.visible = false } actionIndicator.icon.color: extFuncLogic.color diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconButton.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconButton.qml index 008320cb92..4534d3fe7d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconButton.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconButton.qml @@ -8,9 +8,9 @@ import StudioTheme as StudioTheme Rectangle { id: root - signal clicked() - signal pressed() - signal released() + signal clicked(mouse: var) + signal pressed(mouse: var) + signal released(mouse: var) property alias icon: icon.text property alias tooltip: toolTip.text @@ -30,18 +30,17 @@ Rectangle { property color hoverColor: root.transparentBg ? "transparent" : StudioTheme.Values.themeControlBackgroundHover property color pressColor: root.transparentBg ? "transparent" : StudioTheme.Values.themeControlBackgroundInteraction - width: buttonSize - height: buttonSize + width: root.buttonSize + height: root.buttonSize - color: !enabled ? normalColor - : mouseArea.pressed ? pressColor - : mouseArea.containsMouse ? hoverColor - : normalColor + color: !root.enabled ? root.normalColor + : mouseArea.pressed ? root.pressColor + : mouseArea.containsMouse ? root.hoverColor + : root.normalColor Text { id: icon anchors.centerIn: root - color: root.enabled ? StudioTheme.Values.themeTextColor : StudioTheme.Values.themeTextColorDisabled font.family: StudioTheme.Constants.iconFont.family font.pixelSize: StudioTheme.Values.baseIconFontSize @@ -49,30 +48,29 @@ Rectangle { MouseArea { id: mouseArea - anchors.fill: parent hoverEnabled: root.visible - onClicked: { + onClicked: function(mouse) { // We need to keep mouse area enabled even when button is disabled to make tooltip work if (root.enabled) - root.clicked() + root.clicked(mouse) } - onPressed: { + onPressed: function(mouse) { if (root.enabled) - root.pressed() + root.pressed(mouse) } - onReleased: { + onReleased: function(mouse) { if (root.enabled) - root.released() + root.released(mouse) } } ToolTip { id: toolTip - visible: mouseArea.containsMouse && text !== "" + visible: mouseArea.containsMouse && toolTip.text !== "" delay: 1000 } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertyEditorPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertyEditorPane.qml index 7046ca48e1..309d815d7a 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertyEditorPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertyEditorPane.qml @@ -19,30 +19,83 @@ Rectangle { default property alias content: mainColumn.children property alias scrollView: mainScrollView + property bool headerDocked: false + readonly property Item headerItem: headerDocked ? dockedHeaderLoader.item : undockedHeaderLoader.item + + property Component headerComponent: null + // Called from C++ to close context menu on focus out function closeContextMenu() { Controller.closeContextMenu() } + Loader { + id: dockedHeaderLoader + + anchors.top: itemPane.top + z: parent.z + 1 + height: item ? item.implicitHeight : 0 + width: parent.width + + active: itemPane.headerDocked + sourceComponent: itemPane.headerComponent + + HeaderBackground{} + } + MouseArea { anchors.fill: parent - onClicked: forceActiveFocus() + onClicked: itemPane.forceActiveFocus() } HelperWidgets.ScrollView { id: mainScrollView - //clip: true - anchors.fill: parent + + clip: true + anchors { + top: dockedHeaderLoader.bottom + bottom: itemPane.bottom + left: itemPane.left + right: itemPane.right + } interactive: !Controller.contextMenuOpened - Column { - id: mainColumn - y: -1 - width: itemPane.width + ColumnLayout { + spacing: 2 + width: mainScrollView.width - onWidthChanged: StudioTheme.Values.responsiveResize(itemPane.width) - Component.onCompleted: StudioTheme.Values.responsiveResize(itemPane.width) + Loader { + id: undockedHeaderLoader + + Layout.fillWidth: true + Layout.preferredHeight: item ? item.implicitHeight : 0 + + active: !itemPane.headerDocked + sourceComponent: itemPane.headerComponent + + HeaderBackground{} + } + + Column { + id: mainColumn + + Layout.fillWidth: true + + onWidthChanged: StudioTheme.Values.responsiveResize(itemPane.width) + Component.onCompleted: StudioTheme.Values.responsiveResize(itemPane.width) + } } } + + component HeaderBackground: Rectangle { + anchors.fill: parent + anchors.leftMargin: -StudioTheme.Values.border + anchors.rightMargin: -StudioTheme.Values.border + z: parent.z - 1 + + color: StudioTheme.Values.themeToolbarBackground + border.color: StudioTheme.Values.themePanelBackground + border.width: StudioTheme.Values.border + } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml index dbbb200f73..245b8506a2 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml @@ -9,11 +9,13 @@ import StudioTheme as StudioTheme Item { id: section - property alias caption: label.text - property alias labelColor: label.color + + property string caption: "Title" + property color labelColor: StudioTheme.Values.themeTextColor + property int labelCapitalization: Font.AllUppercase property alias sectionHeight: header.height property alias sectionBackgroundColor: header.color - property alias sectionFontSize: label.font.pixelSize + property int sectionFontSize: StudioTheme.Values.myFontSize property alias showTopSeparator: topSeparator.visible property alias showArrow: arrow.visible property alias showLeftBorder: leftBorder.visible @@ -26,6 +28,17 @@ Item { property alias fillBackground: sectionBackground.visible property alias highlightBorder: sectionBorder.visible + property Item content: Controls.Label { + id: label + text: section.caption + color: section.labelColor + elide: Text.ElideRight + font.pixelSize: section.sectionFontSize + font.capitalization: section.labelCapitalization + anchors.verticalCenter: parent?.verticalCenter + textFormat: Text.RichText + } + property int leftPadding: StudioTheme.Values.sectionLeftPadding property int rightPadding: 0 property int topPadding: StudioTheme.Values.sectionHeadSpacerHeight @@ -59,7 +72,7 @@ Item { Connections { target: Controller function onCollapseAll(cat) { - if (collapsible && cat === section.category) { + if (section.collapsible && cat === section.category) { if (section.expandOnClick) section.expanded = false else @@ -106,6 +119,22 @@ Item { onExited: section.dropExit() } + StudioControls.Menu { + id: contextMenu + + StudioControls.MenuItem { + text: qsTr("Expand All") + onTriggered: Controller.expandAll(section.category) + } + + StudioControls.MenuItem { + text: qsTr("Collapse All") + onTriggered: Controller.collapseAll(section.category) + } + + onOpenedChanged: Controller.contextMenuOpened = contextMenu.opened + } + Rectangle { id: header height: section.hideHeader ? 0 : StudioTheme.Values.sectionHeadHeight @@ -116,43 +145,6 @@ Item { : Qt.lighter(StudioTheme.Values.themeSectionHeadBackground, 1.0 + (0.2 * section.level)) - Item { - StudioControls.Menu { - id: contextMenu - - StudioControls.MenuItem { - text: qsTr("Expand All") - onTriggered: Controller.expandAll(section.category) - } - - StudioControls.MenuItem { - text: qsTr("Collapse All") - onTriggered: Controller.collapseAll(section.category) - } - - onOpenedChanged: Controller.contextMenuOpened = contextMenu.opened - } - } - - Image { - id: arrow - width: 8 - height: 4 - source: "image://icons/down-arrow" - anchors.left: parent.left - anchors.leftMargin: 4 + (section.level * section.levelShift) + (section.draggable ? 20 : 0) + (section.showEyeButton ? 25 : 0) - anchors.verticalCenter: parent.verticalCenter - } - - Controls.Label { - id: label - anchors.verticalCenter: parent.verticalCenter - color: StudioTheme.Values.themeTextColor - x: arrow.x + 18 - font.pixelSize: StudioTheme.Values.myFontSize - font.capitalization: Font.AllUppercase - } - MouseArea { id: mouseArea anchors.fill: parent @@ -173,58 +165,102 @@ Item { } } - IconButton { - id: closeButton + RowLayout { + spacing: 1 + anchors.fill: parent - icon: StudioTheme.Constants.closeCross - buttonSize: 22 - iconScale: containsMouse ? 1.2 : 1 - transparentBg: true - anchors.right: parent.right - anchors.rightMargin: 10 - visible: false + IconButton { + id: dragButton + visible: false + icon: StudioTheme.Constants.dragmarks + buttonSize: 21 + iconScale: dragButton.enabled && dragButton.containsMouse ? 1.2 : 1 + transparentBg: true - onClicked: root.closeButtonClicked() - } + Layout.alignment: Qt.AlignVCenter + Layout.preferredWidth: dragButton.width + Layout.maximumWidth: dragButton.width + + drag.target: dragButton.enabled ? section : null + drag.axis: Drag.YAxis + + onPressed: { + section.startDrag(section) + section.z = ++section.parent.z // put the dragged section on top + } - IconButton { - id: dragButton + onReleased: { + section.stopDrag() + } + } - icon: StudioTheme.Constants.dragmarks - buttonSize: 22 - iconScale: dragButton.enabled && dragButton.containsMouse ? 1.2 : 1 - transparentBg: true + IconButton { + id: eyeButton - visible: false - drag.target: dragButton.enabled ? section : null - drag.axis: Drag.YAxis + visible: false + icon: section.eyeEnabled ? StudioTheme.Constants.visible_small + : StudioTheme.Constants.invisible_small + buttonSize: 21 + iconScale: eyeButton.containsMouse ? 1.2 : 1 + transparentBg: true - onPressed: { - section.startDrag(section) + Layout.alignment: Qt.AlignVCenter + Layout.preferredWidth: eyeButton.width + Layout.maximumWidth: eyeButton.width - section.z = ++section.parent.z // put the dragged section on top + onClicked: { + section.eyeEnabled = !section.eyeEnabled + section.eyeButtonClicked() + } } - onReleased: { - section.stopDrag() + IconButton { + id: arrow + icon: StudioTheme.Constants.sectionToggle + transparentBg: true + + buttonSize: 21 + iconSize: StudioTheme.Values.smallIconFontSize + iconColor: StudioTheme.Values.themeTextColor + + Layout.alignment: Qt.AlignVCenter + Layout.preferredWidth: arrow.width + Layout.maximumWidth: arrow.width + + onClicked: function(mouse) { + if (!section.collapsible && section.expanded) + return + + transition.enabled = true + if (section.expandOnClick) + section.expanded = !section.expanded + else + section.toggleExpand() + } } - } - IconButton { - id: eyeButton + Item { + id: headerContent + height: header.height + Layout.fillWidth: true + children: [ section.content ] + } - anchors.left: dragButton.right + IconButton { + id: closeButton - icon: section.eyeEnabled ? StudioTheme.Constants.visible_small : StudioTheme.Constants.invisible_small - buttonSize: 22 - iconScale: eyeButton.containsMouse ? 1.2 : 1 - transparentBg: true + visible: false + icon: StudioTheme.Constants.closeCross + buttonSize: 21 + iconScale: closeButton.containsMouse ? 1.2 : 1 + transparentBg: true - visible: false + Layout.alignment: Qt.AlignVCenter + Layout.preferredWidth: closeButton.width + Layout.maximumWidth: closeButton.width + Layout.rightMargin: 10 - onClicked: { - section.eyeEnabled = !section.eyeEnabled - root.eyeButtonClicked() + onClicked: section.closeButtonClicked() } } } @@ -266,6 +302,7 @@ Item { border.width: 1 visible: false } + Item { id: topSpacer height: section.addTopPadding && column.height > 0 ? section.topPadding : 0 @@ -285,7 +322,7 @@ Item { id: leftBorder visible: false width: 1 - height: parent.height - bottomPadding + height: parent.height - section.bottomPadding color: header.color } @@ -320,8 +357,8 @@ Item { } onRunningChanged: { - if (!running) - enabled = false + if (!transition.running) + transition.enabled = false } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/SpinBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/SpinBox.qml index f125c459c5..04cbb78f35 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/SpinBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/SpinBox.qml @@ -22,6 +22,9 @@ Item { property alias realDragRange: spinBox.realDragRange property alias pixelsPerUnit: spinBox.pixelsPerUnit + property alias actionIndicatorEnabled: spinBox.actionIndicator.enabled + property alias actionIndicatorVisible: spinBox.actionIndicatorVisible + width: 96 implicitHeight: spinBox.height diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/UrlChooser.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/UrlChooser.qml index c73e736ef4..8dadd1db2c 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/UrlChooser.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/UrlChooser.qml @@ -448,9 +448,10 @@ Row { for (var j = 0; j < myModel.length; ++j) { let item = myModel[j] if (root.hideDuplicates && nameMap.has(item.fileName)) { - // Prefer hiding imported asset files rather than other project files + // Prefer hiding generated component files rather than other project files let listIndex = nameMap.get(item.fileName) - if (comboBox.listModel.get(listIndex).absoluteFilePath.includes("/asset_imports/")) { + let absPath = comboBox.listModel.get(listIndex).absoluteFilePath + if (absPath.includes("/Generated/") || absPath.includes("/asset_imports/")) { comboBox.listModel.set(listIndex, { absoluteFilePath: item.absoluteFilePath, relativeFilePath: item.relativeFilePath, diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml index 573b78012f..7e565e3a47 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml @@ -14,7 +14,6 @@ T.CheckBox { // This property is used to indicate the global hover state property bool hover: control.hovered && control.enabled - property bool edit: false property alias actionIndicatorVisible: actionIndicator.visible property real __actionIndicatorWidth: control.style.actionIndicatorSize.width diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/MenuItem.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/MenuItem.qml index 07265e41a7..28372e41be 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/MenuItem.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/MenuItem.qml @@ -9,7 +9,7 @@ import StudioTheme 1.0 as StudioTheme T.MenuItem { id: control - property alias shortcut: itemAction.shortcut + property alias shortcut: shortcutObserver.shortcutWorkaround property StudioTheme.ControlStyle style: StudioTheme.Values.controlStyle @@ -24,9 +24,6 @@ T.MenuItem { padding: 0 spacing: 0 horizontalPadding: control.style.contextMenuHorizontalPadding - action: Action { - id: itemAction - } contentItem: Item { Text { @@ -41,16 +38,23 @@ T.MenuItem { Text { id: shortcutLabel + anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter text: shortcutObserver.nativeText + ? shortcutObserver.nativeText + : control.action + ? control.action.fakeShortcut ? control.action.fakeShortcut : "" + : "" font: control.font color: textLabel.color Shortcut { id: shortcutObserver - property int shortcutWorkaround: control.shortcut ?? 0 + + property int shortcutWorkaround: 0 sequence: shortcutObserver.shortcutWorkaround + enabled: false } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/PopupDialog.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/PopupDialog.qml index 40c35df27c..821ba3a849 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/PopupDialog.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/PopupDialog.qml @@ -104,7 +104,7 @@ QtObject { return root.maximumHeight + (2 * window.margin) } visible: false - flags: Qt.FramelessWindowHint | Qt.Tool | Qt.WindowStaysOnTopHint + flags: Qt.FramelessWindowHint | Qt.Tool color: "transparent" onClosing: function (close) { @@ -286,10 +286,8 @@ QtObject { enabled: root.visible function onFocusWindowChanged(focusWindow) { - if (!focusWindow) { - root.close() + if (!focusWindow) return - } if (root.keepOpen) return diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/impl/ColorPicker.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/impl/ColorPicker.qml index cd52511426..fc2a025664 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/impl/ColorPicker.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/impl/ColorPicker.qml @@ -13,6 +13,8 @@ Column { HSLA } + signal aboutToBeShown + property int mode: ColorPicker.Mode.HSVA property color color: "#303091" @@ -206,6 +208,8 @@ Column { target: root function onHueChanged() { gradientOverlay.requestPaint() } function onModeChanged() { gradientOverlay.requestPaint() } + function onAlphaChanged() { gradientOverlay.requestPaint() } + function onAboutToBeShown() { gradientOverlay.requestPaint() } } onPaint: { @@ -249,6 +253,7 @@ Column { function onColorInvalidated() { pickerCross.requestPaint() } function onColorChanged() { pickerCross.requestPaint() } function onModeChanged() { pickerCross.requestPaint() } + function onAboutToBeShown() { pickerCross.requestPaint() } } onPaint: { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml index ee2df02e04..3c74243f68 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml @@ -75,309 +75,310 @@ QtObject { readonly property string binding_medium: "\u005C" readonly property string bounds_small: "\u005D" readonly property string branch_medium: "\u005E" - readonly property string camera_medium: "\u005F" - readonly property string camera_small: "\u0060" - readonly property string centerHorizontal: "\u0061" - readonly property string centerVertical: "\u0062" - readonly property string cleanLogs_medium: "\u0063" - readonly property string clearList_large: "\u0064" - readonly property string clearList_medium: "\u0065" - readonly property string closeCross: "\u0066" - readonly property string closeFile_large: "\u0067" - readonly property string closeLink: "\u0068" - readonly property string close_small: "\u0069" - readonly property string code: "\u006A" - readonly property string codeEditor_medium: "\u006B" - readonly property string codeview_medium: "\u006C" - readonly property string colorPopupClose: "\u006D" - readonly property string colorSelection_medium: "\u006E" - readonly property string columnsAndRows: "\u006F" - readonly property string comboBox_medium: "\u0070" - readonly property string cone_medium: "\u0071" - readonly property string cone_small: "\u0072" - readonly property string connection_small: "\u0073" - readonly property string connections_medium: "\u0074" - readonly property string copyLink: "\u0075" - readonly property string copyStyle: "\u0076" - readonly property string copy_small: "\u0077" - readonly property string cornerA: "\u0078" - readonly property string cornerB: "\u0079" - readonly property string cornersAll: "\u007A" - readonly property string createComponent_large: "\u007B" - readonly property string createComponent_small: "\u007C" - readonly property string createObject_medium: "\u007D" - readonly property string create_medium: "\u007E" - readonly property string create_small: "\u007F" - readonly property string cube_medium: "\u0080" - readonly property string cube_small: "\u0081" - readonly property string curveDesigner: "\u0082" - readonly property string curveDesigner_medium: "\u0083" - readonly property string curveEditor: "\u0084" - readonly property string customMaterialEditor: "\u0085" - readonly property string cylinder_medium: "\u0086" - readonly property string cylinder_small: "\u0087" - readonly property string decisionNode: "\u0088" - readonly property string deleteColumn: "\u0089" - readonly property string deleteMaterial: "\u008A" - readonly property string deleteRow: "\u008B" - readonly property string deleteTable: "\u008C" - readonly property string delete_medium: "\u008D" - readonly property string delete_small: "\u008E" - readonly property string deletecolumn_medium: "\u008F" - readonly property string deletepermanently_medium: "\u0090" - readonly property string deleterow_medium: "\u0091" - readonly property string designMode_large: "\u0092" - readonly property string detach: "\u0093" - readonly property string directionalLight_small: "\u0094" - readonly property string distributeBottom: "\u0095" - readonly property string distributeCenterHorizontal: "\u0096" - readonly property string distributeCenterVertical: "\u0097" - readonly property string distributeLeft: "\u0098" - readonly property string distributeOriginBottomRight: "\u0099" - readonly property string distributeOriginCenter: "\u009A" - readonly property string distributeOriginNone: "\u009B" - readonly property string distributeOriginTopLeft: "\u009D" - readonly property string distributeRight: "\u009E" - readonly property string distributeSpacingHorizontal: "\u009F" - readonly property string distributeSpacingVertical: "\u00A0" - readonly property string distributeTop: "\u00A1" - readonly property string download: "\u00A2" - readonly property string downloadUnavailable: "\u00A3" - readonly property string downloadUpdate: "\u00A4" - readonly property string downloaded: "\u00A5" - readonly property string dragmarks: "\u00A6" - readonly property string duplicate_small: "\u00A7" - readonly property string edit: "\u00A8" - readonly property string editComponent_large: "\u00A9" - readonly property string editComponent_small: "\u00AA" - readonly property string editLightOff_medium: "\u00AB" - readonly property string editLightOn_medium: "\u00AC" - readonly property string edit_medium: "\u00AE" - readonly property string edit_small: "\u00AF" - readonly property string effects: "\u00B0" - readonly property string events_small: "\u00B1" - readonly property string export_medium: "\u00B2" - readonly property string eyeDropper: "\u00B3" - readonly property string favorite: "\u00B4" - readonly property string fitAll_medium: "\u00B5" - readonly property string fitSelected_small: "\u00B6" - readonly property string fitSelection_medium: "\u00B7" - readonly property string fitToView_medium: "\u00B8" - readonly property string flowAction: "\u00B9" - readonly property string flowTransition: "\u00BA" - readonly property string fontStyleBold: "\u00BB" - readonly property string fontStyleItalic: "\u00BC" - readonly property string fontStyleStrikethrough: "\u00BD" - readonly property string fontStyleUnderline: "\u00BE" - readonly property string forward_medium: "\u00BF" - readonly property string globalOrient_medium: "\u00C0" - readonly property string gradient: "\u00C1" - readonly property string gridView: "\u00C2" - readonly property string grid_medium: "\u00C3" - readonly property string group_small: "\u00C4" - readonly property string help: "\u00C5" - readonly property string home_large: "\u00C6" - readonly property string idAliasOff: "\u00C7" - readonly property string idAliasOn: "\u00C8" - readonly property string import_medium: "\u00C9" - readonly property string imported: "\u00CA" - readonly property string importedModels_small: "\u00CB" - readonly property string infinity: "\u00CC" - readonly property string invisible_medium: "\u00CD" - readonly property string invisible_small: "\u00CE" - readonly property string jumpToCode_medium: "\u00CF" - readonly property string jumpToCode_small: "\u00D0" - readonly property string keyframe: "\u00D1" - readonly property string languageList_medium: "\u00D2" - readonly property string layouts_small: "\u00D3" - readonly property string lights_small: "\u00D4" - readonly property string linear_medium: "\u00D5" - readonly property string linkTriangle: "\u00D6" - readonly property string linked: "\u00D7" - readonly property string listView: "\u00D8" - readonly property string listView_medium: "\u00D9" - readonly property string list_medium: "\u00DA" - readonly property string localOrient_medium: "\u00DB" - readonly property string lockOff: "\u00DC" - readonly property string lockOn: "\u00DD" - readonly property string loopPlayback_medium: "\u00DE" - readonly property string materialBrowser_medium: "\u00DF" - readonly property string materialPreviewEnvironment: "\u00E0" - readonly property string materialPreviewModel: "\u00E1" - readonly property string material_medium: "\u00E2" - readonly property string maxBar_small: "\u00E3" - readonly property string mergeCells: "\u00E4" - readonly property string merge_small: "\u00E5" - readonly property string minus: "\u00E6" - readonly property string mirror: "\u00E7" - readonly property string more_medium: "\u00E8" - readonly property string mouseArea_small: "\u00E9" - readonly property string moveDown_medium: "\u00EA" - readonly property string moveInwards_medium: "\u00EB" - readonly property string moveUp_medium: "\u00EC" - readonly property string moveUpwards_medium: "\u00ED" - readonly property string move_medium: "\u00EE" - readonly property string newMaterial: "\u00EF" - readonly property string nextFile_large: "\u00F0" - readonly property string normalBar_small: "\u00F1" - readonly property string openLink: "\u00F2" - readonly property string openMaterialBrowser: "\u00F3" - readonly property string orientation: "\u00F4" - readonly property string orthCam_medium: "\u00F5" - readonly property string orthCam_small: "\u00F6" - readonly property string paddingEdge: "\u00F7" - readonly property string paddingFrame: "\u00F8" - readonly property string particleAnimation_medium: "\u00F9" - readonly property string pasteStyle: "\u00FA" - readonly property string paste_small: "\u00FB" - readonly property string pause: "\u00FC" - readonly property string pause_medium: "\u00FD" - readonly property string perspectiveCam_medium: "\u00FE" - readonly property string perspectiveCam_small: "\u00FF" - readonly property string pin: "\u0100" - readonly property string plane_medium: "\u0101" - readonly property string plane_small: "\u0102" - readonly property string play: "\u0103" - readonly property string playFill_medium: "\u0104" - readonly property string playOutline_medium: "\u0105" - readonly property string plus: "\u0106" - readonly property string pointLight_small: "\u0107" - readonly property string positioners_small: "\u0108" - readonly property string previewEnv_medium: "\u0109" - readonly property string previousFile_large: "\u010A" - readonly property string promote: "\u010B" - readonly property string properties_medium: "\u010C" - readonly property string readOnly: "\u010D" - readonly property string recent_medium: "\u010E" - readonly property string recordFill_medium: "\u010F" - readonly property string recordOutline_medium: "\u0110" - readonly property string redo: "\u0111" - readonly property string reload_medium: "\u0112" - readonly property string remove_medium: "\u0113" - readonly property string remove_small: "\u0114" - readonly property string rename_small: "\u0115" - readonly property string replace_small: "\u0116" - readonly property string resetView_small: "\u0117" - readonly property string restartParticles_medium: "\u0118" - readonly property string reverseOrder_medium: "\u0119" - readonly property string roatate_medium: "\u011A" - readonly property string rotationFill: "\u011B" - readonly property string rotationOutline: "\u011C" - readonly property string runProjFill_large: "\u011D" - readonly property string runProjOutline_large: "\u011E" - readonly property string s_anchors: "\u011F" - readonly property string s_annotations: "\u0120" - readonly property string s_arrange: "\u0121" - readonly property string s_boundingBox: "\u0122" - readonly property string s_component: "\u0123" - readonly property string s_connections: "\u0124" - readonly property string s_edit: "\u0125" - readonly property string s_enterComponent: "\u0126" - readonly property string s_eventList: "\u0127" - readonly property string s_group: "\u0128" - readonly property string s_layouts: "\u0129" - readonly property string s_merging: "\u012A" - readonly property string s_mouseArea: "\u012B" - readonly property string s_positioners: "\u012C" - readonly property string s_selection: "\u012D" - readonly property string s_snapping: "\u012E" - readonly property string s_timeline: "\u012F" - readonly property string s_visibility: "\u0130" - readonly property string saveAs_medium: "\u0131" - readonly property string saveLogs_medium: "\u0132" - readonly property string save_medium: "\u0133" - readonly property string scale_medium: "\u0134" - readonly property string search: "\u0135" - readonly property string search_small: "\u0136" - readonly property string sectionToggle: "\u0137" - readonly property string selectFill_medium: "\u0138" - readonly property string selectOutline_medium: "\u0139" - readonly property string selectParent_small: "\u013A" - readonly property string selection_small: "\u013B" - readonly property string settings_medium: "\u013C" - readonly property string signal_small: "\u013D" - readonly property string snapping_conf_medium: "\u013E" - readonly property string snapping_medium: "\u013F" - readonly property string snapping_small: "\u0140" - readonly property string sortascending_medium: "\u0141" - readonly property string sortdescending_medium: "\u0142" - readonly property string sphere_medium: "\u0143" - readonly property string sphere_small: "\u0144" - readonly property string splitColumns: "\u0145" - readonly property string splitRows: "\u0146" - readonly property string splitScreen_medium: "\u0147" - readonly property string spotLight_small: "\u0148" - readonly property string stackedContainer_small: "\u0149" - readonly property string startNode: "\u014A" - readonly property string step_medium: "\u014B" - readonly property string stop_medium: "\u014C" - readonly property string tableView_medium: "\u014D" - readonly property string testIcon: "\u014E" - readonly property string textAlignBottom: "\u014F" - readonly property string textAlignCenter: "\u0150" - readonly property string textAlignJustified: "\u0151" - readonly property string textAlignLeft: "\u0152" - readonly property string textAlignMiddle: "\u0153" - readonly property string textAlignRight: "\u0154" - readonly property string textAlignTop: "\u0155" - readonly property string textBulletList: "\u0156" - readonly property string textFullJustification: "\u0157" - readonly property string textNumberedList: "\u0158" - readonly property string textures_medium: "\u0159" - readonly property string tickIcon: "\u015A" - readonly property string tickMark_small: "\u015B" - readonly property string timeline_small: "\u015C" - readonly property string toEndFrame_medium: "\u015D" - readonly property string toNextFrame_medium: "\u015E" - readonly property string toPrevFrame_medium: "\u015F" - readonly property string toStartFrame_medium: "\u0160" - readonly property string topToolbar_annotations: "\u0161" - readonly property string topToolbar_closeFile: "\u0162" - readonly property string topToolbar_designMode: "\u0163" - readonly property string topToolbar_enterComponent: "\u0164" - readonly property string topToolbar_home: "\u0165" - readonly property string topToolbar_makeComponent: "\u0166" - readonly property string topToolbar_navFile: "\u0167" - readonly property string topToolbar_runProject: "\u0168" - readonly property string translationCreateFiles: "\u0169" - readonly property string translationCreateReport: "\u016A" - readonly property string translationExport: "\u016B" - readonly property string translationImport: "\u016C" - readonly property string translationSelectLanguages: "\u016D" - readonly property string translationTest: "\u016E" - readonly property string transparent: "\u016F" - readonly property string triState: "\u0170" - readonly property string triangleArcA: "\u0171" - readonly property string triangleArcB: "\u0172" - readonly property string triangleCornerA: "\u0173" - readonly property string triangleCornerB: "\u0174" - readonly property string unLinked: "\u0175" - readonly property string undo: "\u0176" - readonly property string unify_medium: "\u0177" - readonly property string unpin: "\u0178" - readonly property string upDownIcon: "\u0179" - readonly property string upDownSquare2: "\u017A" - readonly property string updateAvailable_medium: "\u017B" - readonly property string updateContent_medium: "\u017C" - readonly property string visibilityOff: "\u017D" - readonly property string visibilityOn: "\u017E" - readonly property string visible_medium: "\u017F" - readonly property string visible_small: "\u0180" - readonly property string warning_medium: "\u0181" - readonly property string wildcard: "\u0182" - readonly property string wizardsAutomotive: "\u0183" - readonly property string wizardsDesktop: "\u0184" - readonly property string wizardsGeneric: "\u0185" - readonly property string wizardsMcuEmpty: "\u0186" - readonly property string wizardsMcuGraph: "\u0187" - readonly property string wizardsMobile: "\u0188" - readonly property string wizardsUnknown: "\u0189" - readonly property string zoomAll: "\u018A" - readonly property string zoomIn: "\u018B" - readonly property string zoomIn_medium: "\u018C" - readonly property string zoomOut: "\u018D" - readonly property string zoomOut_medium: "\u018E" - readonly property string zoomSelection: "\u018F" + readonly property string cameraSpeed_medium: "\u005F" + readonly property string camera_medium: "\u0060" + readonly property string camera_small: "\u0061" + readonly property string centerHorizontal: "\u0062" + readonly property string centerVertical: "\u0063" + readonly property string cleanLogs_medium: "\u0064" + readonly property string clearList_large: "\u0065" + readonly property string clearList_medium: "\u0066" + readonly property string closeCross: "\u0067" + readonly property string closeFile_large: "\u0068" + readonly property string closeLink: "\u0069" + readonly property string close_small: "\u006A" + readonly property string code: "\u006B" + readonly property string codeEditor_medium: "\u006C" + readonly property string codeview_medium: "\u006D" + readonly property string colorPopupClose: "\u006E" + readonly property string colorSelection_medium: "\u006F" + readonly property string columnsAndRows: "\u0070" + readonly property string comboBox_medium: "\u0071" + readonly property string cone_medium: "\u0072" + readonly property string cone_small: "\u0073" + readonly property string connection_small: "\u0074" + readonly property string connections_medium: "\u0075" + readonly property string copyLink: "\u0076" + readonly property string copyStyle: "\u0077" + readonly property string copy_small: "\u0078" + readonly property string cornerA: "\u0079" + readonly property string cornerB: "\u007A" + readonly property string cornersAll: "\u007B" + readonly property string createComponent_large: "\u007C" + readonly property string createComponent_small: "\u007D" + readonly property string createObject_medium: "\u007E" + readonly property string create_medium: "\u007F" + readonly property string create_small: "\u0080" + readonly property string cube_medium: "\u0081" + readonly property string cube_small: "\u0082" + readonly property string curveDesigner: "\u0083" + readonly property string curveDesigner_medium: "\u0084" + readonly property string curveEditor: "\u0085" + readonly property string customMaterialEditor: "\u0086" + readonly property string cylinder_medium: "\u0087" + readonly property string cylinder_small: "\u0088" + readonly property string decisionNode: "\u0089" + readonly property string deleteColumn: "\u008A" + readonly property string deleteMaterial: "\u008B" + readonly property string deleteRow: "\u008C" + readonly property string deleteTable: "\u008D" + readonly property string delete_medium: "\u008E" + readonly property string delete_small: "\u008F" + readonly property string deletecolumn_medium: "\u0090" + readonly property string deletepermanently_medium: "\u0091" + readonly property string deleterow_medium: "\u0092" + readonly property string designMode_large: "\u0093" + readonly property string detach: "\u0094" + readonly property string directionalLight_small: "\u0095" + readonly property string distributeBottom: "\u0096" + readonly property string distributeCenterHorizontal: "\u0097" + readonly property string distributeCenterVertical: "\u0098" + readonly property string distributeLeft: "\u0099" + readonly property string distributeOriginBottomRight: "\u009A" + readonly property string distributeOriginCenter: "\u009B" + readonly property string distributeOriginNone: "\u009D" + readonly property string distributeOriginTopLeft: "\u009E" + readonly property string distributeRight: "\u009F" + readonly property string distributeSpacingHorizontal: "\u00A0" + readonly property string distributeSpacingVertical: "\u00A1" + readonly property string distributeTop: "\u00A2" + readonly property string download: "\u00A3" + readonly property string downloadUnavailable: "\u00A4" + readonly property string downloadUpdate: "\u00A5" + readonly property string downloaded: "\u00A6" + readonly property string dragmarks: "\u00A7" + readonly property string duplicate_small: "\u00A8" + readonly property string edit: "\u00A9" + readonly property string editComponent_large: "\u00AA" + readonly property string editComponent_small: "\u00AB" + readonly property string editLightOff_medium: "\u00AC" + readonly property string editLightOn_medium: "\u00AE" + readonly property string edit_medium: "\u00AF" + readonly property string edit_small: "\u00B0" + readonly property string effects: "\u00B1" + readonly property string events_small: "\u00B2" + readonly property string export_medium: "\u00B3" + readonly property string eyeDropper: "\u00B4" + readonly property string favorite: "\u00B5" + readonly property string fitAll_medium: "\u00B6" + readonly property string fitSelected_small: "\u00B7" + readonly property string fitSelection_medium: "\u00B8" + readonly property string fitToView_medium: "\u00B9" + readonly property string flowAction: "\u00BA" + readonly property string flowTransition: "\u00BB" + readonly property string fontStyleBold: "\u00BC" + readonly property string fontStyleItalic: "\u00BD" + readonly property string fontStyleStrikethrough: "\u00BE" + readonly property string fontStyleUnderline: "\u00BF" + readonly property string forward_medium: "\u00C0" + readonly property string globalOrient_medium: "\u00C1" + readonly property string gradient: "\u00C2" + readonly property string gridView: "\u00C3" + readonly property string grid_medium: "\u00C4" + readonly property string group_small: "\u00C5" + readonly property string help: "\u00C6" + readonly property string home_large: "\u00C7" + readonly property string idAliasOff: "\u00C8" + readonly property string idAliasOn: "\u00C9" + readonly property string import_medium: "\u00CA" + readonly property string imported: "\u00CB" + readonly property string importedModels_small: "\u00CC" + readonly property string infinity: "\u00CD" + readonly property string invisible_medium: "\u00CE" + readonly property string invisible_small: "\u00CF" + readonly property string jumpToCode_medium: "\u00D0" + readonly property string jumpToCode_small: "\u00D1" + readonly property string keyframe: "\u00D2" + readonly property string languageList_medium: "\u00D3" + readonly property string layouts_small: "\u00D4" + readonly property string lights_small: "\u00D5" + readonly property string linear_medium: "\u00D6" + readonly property string linkTriangle: "\u00D7" + readonly property string linked: "\u00D8" + readonly property string listView: "\u00D9" + readonly property string listView_medium: "\u00DA" + readonly property string list_medium: "\u00DB" + readonly property string localOrient_medium: "\u00DC" + readonly property string lockOff: "\u00DD" + readonly property string lockOn: "\u00DE" + readonly property string loopPlayback_medium: "\u00DF" + readonly property string materialBrowser_medium: "\u00E0" + readonly property string materialPreviewEnvironment: "\u00E1" + readonly property string materialPreviewModel: "\u00E2" + readonly property string material_medium: "\u00E3" + readonly property string maxBar_small: "\u00E4" + readonly property string mergeCells: "\u00E5" + readonly property string merge_small: "\u00E6" + readonly property string minus: "\u00E7" + readonly property string mirror: "\u00E8" + readonly property string more_medium: "\u00E9" + readonly property string mouseArea_small: "\u00EA" + readonly property string moveDown_medium: "\u00EB" + readonly property string moveInwards_medium: "\u00EC" + readonly property string moveUp_medium: "\u00ED" + readonly property string moveUpwards_medium: "\u00EE" + readonly property string move_medium: "\u00EF" + readonly property string newMaterial: "\u00F0" + readonly property string nextFile_large: "\u00F1" + readonly property string normalBar_small: "\u00F2" + readonly property string openLink: "\u00F3" + readonly property string openMaterialBrowser: "\u00F4" + readonly property string orientation: "\u00F5" + readonly property string orthCam_medium: "\u00F6" + readonly property string orthCam_small: "\u00F7" + readonly property string paddingEdge: "\u00F8" + readonly property string paddingFrame: "\u00F9" + readonly property string particleAnimation_medium: "\u00FA" + readonly property string pasteStyle: "\u00FB" + readonly property string paste_small: "\u00FC" + readonly property string pause: "\u00FD" + readonly property string pause_medium: "\u00FE" + readonly property string perspectiveCam_medium: "\u00FF" + readonly property string perspectiveCam_small: "\u0100" + readonly property string pin: "\u0101" + readonly property string plane_medium: "\u0102" + readonly property string plane_small: "\u0103" + readonly property string play: "\u0104" + readonly property string playFill_medium: "\u0105" + readonly property string playOutline_medium: "\u0106" + readonly property string plus: "\u0107" + readonly property string pointLight_small: "\u0108" + readonly property string positioners_small: "\u0109" + readonly property string previewEnv_medium: "\u010A" + readonly property string previousFile_large: "\u010B" + readonly property string promote: "\u010C" + readonly property string properties_medium: "\u010D" + readonly property string readOnly: "\u010E" + readonly property string recent_medium: "\u010F" + readonly property string recordFill_medium: "\u0110" + readonly property string recordOutline_medium: "\u0111" + readonly property string redo: "\u0112" + readonly property string reload_medium: "\u0113" + readonly property string remove_medium: "\u0114" + readonly property string remove_small: "\u0115" + readonly property string rename_small: "\u0116" + readonly property string replace_small: "\u0117" + readonly property string resetView_small: "\u0118" + readonly property string restartParticles_medium: "\u0119" + readonly property string reverseOrder_medium: "\u011A" + readonly property string roatate_medium: "\u011B" + readonly property string rotationFill: "\u011C" + readonly property string rotationOutline: "\u011D" + readonly property string runProjFill_large: "\u011E" + readonly property string runProjOutline_large: "\u011F" + readonly property string s_anchors: "\u0120" + readonly property string s_annotations: "\u0121" + readonly property string s_arrange: "\u0122" + readonly property string s_boundingBox: "\u0123" + readonly property string s_component: "\u0124" + readonly property string s_connections: "\u0125" + readonly property string s_edit: "\u0126" + readonly property string s_enterComponent: "\u0127" + readonly property string s_eventList: "\u0128" + readonly property string s_group: "\u0129" + readonly property string s_layouts: "\u012A" + readonly property string s_merging: "\u012B" + readonly property string s_mouseArea: "\u012C" + readonly property string s_positioners: "\u012D" + readonly property string s_selection: "\u012E" + readonly property string s_snapping: "\u012F" + readonly property string s_timeline: "\u0130" + readonly property string s_visibility: "\u0131" + readonly property string saveAs_medium: "\u0132" + readonly property string saveLogs_medium: "\u0133" + readonly property string save_medium: "\u0134" + readonly property string scale_medium: "\u0135" + readonly property string search: "\u0136" + readonly property string search_small: "\u0137" + readonly property string sectionToggle: "\u0138" + readonly property string selectFill_medium: "\u0139" + readonly property string selectOutline_medium: "\u013A" + readonly property string selectParent_small: "\u013B" + readonly property string selection_small: "\u013C" + readonly property string settings_medium: "\u013D" + readonly property string signal_small: "\u013E" + readonly property string snapping_conf_medium: "\u013F" + readonly property string snapping_medium: "\u0140" + readonly property string snapping_small: "\u0141" + readonly property string sortascending_medium: "\u0142" + readonly property string sortdescending_medium: "\u0143" + readonly property string sphere_medium: "\u0144" + readonly property string sphere_small: "\u0145" + readonly property string splitColumns: "\u0146" + readonly property string splitRows: "\u0147" + readonly property string splitScreen_medium: "\u0148" + readonly property string spotLight_small: "\u0149" + readonly property string stackedContainer_small: "\u014A" + readonly property string startNode: "\u014B" + readonly property string step_medium: "\u014C" + readonly property string stop_medium: "\u014D" + readonly property string tableView_medium: "\u014E" + readonly property string testIcon: "\u014F" + readonly property string textAlignBottom: "\u0150" + readonly property string textAlignCenter: "\u0151" + readonly property string textAlignJustified: "\u0152" + readonly property string textAlignLeft: "\u0153" + readonly property string textAlignMiddle: "\u0154" + readonly property string textAlignRight: "\u0155" + readonly property string textAlignTop: "\u0156" + readonly property string textBulletList: "\u0157" + readonly property string textFullJustification: "\u0158" + readonly property string textNumberedList: "\u0159" + readonly property string textures_medium: "\u015A" + readonly property string tickIcon: "\u015B" + readonly property string tickMark_small: "\u015C" + readonly property string timeline_small: "\u015D" + readonly property string toEndFrame_medium: "\u015E" + readonly property string toNextFrame_medium: "\u015F" + readonly property string toPrevFrame_medium: "\u0160" + readonly property string toStartFrame_medium: "\u0161" + readonly property string topToolbar_annotations: "\u0162" + readonly property string topToolbar_closeFile: "\u0163" + readonly property string topToolbar_designMode: "\u0164" + readonly property string topToolbar_enterComponent: "\u0165" + readonly property string topToolbar_home: "\u0166" + readonly property string topToolbar_makeComponent: "\u0167" + readonly property string topToolbar_navFile: "\u0168" + readonly property string topToolbar_runProject: "\u0169" + readonly property string translationCreateFiles: "\u016A" + readonly property string translationCreateReport: "\u016B" + readonly property string translationExport: "\u016C" + readonly property string translationImport: "\u016D" + readonly property string translationSelectLanguages: "\u016E" + readonly property string translationTest: "\u016F" + readonly property string transparent: "\u0170" + readonly property string triState: "\u0171" + readonly property string triangleArcA: "\u0172" + readonly property string triangleArcB: "\u0173" + readonly property string triangleCornerA: "\u0174" + readonly property string triangleCornerB: "\u0175" + readonly property string unLinked: "\u0176" + readonly property string undo: "\u0177" + readonly property string unify_medium: "\u0178" + readonly property string unpin: "\u0179" + readonly property string upDownIcon: "\u017A" + readonly property string upDownSquare2: "\u017B" + readonly property string updateAvailable_medium: "\u017C" + readonly property string updateContent_medium: "\u017D" + readonly property string visibilityOff: "\u017E" + readonly property string visibilityOn: "\u017F" + readonly property string visible_medium: "\u0180" + readonly property string visible_small: "\u0181" + readonly property string warning_medium: "\u0182" + readonly property string wildcard: "\u0183" + readonly property string wizardsAutomotive: "\u0184" + readonly property string wizardsDesktop: "\u0185" + readonly property string wizardsGeneric: "\u0186" + readonly property string wizardsMcuEmpty: "\u0187" + readonly property string wizardsMcuGraph: "\u0188" + readonly property string wizardsMobile: "\u0189" + readonly property string wizardsUnknown: "\u018A" + readonly property string zoomAll: "\u018B" + readonly property string zoomIn: "\u018C" + readonly property string zoomIn_medium: "\u018D" + readonly property string zoomOut: "\u018E" + readonly property string zoomOut_medium: "\u018F" + readonly property string zoomSelection: "\u0190" readonly property font iconFont: Qt.font({ "family": controlIcons.name, diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml index 59030cd126..69803cf320 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml @@ -243,15 +243,6 @@ QtObject { property real dialogButtonSpacing: 10 property real dialogButtonPadding: 4 - // Collection Editor - property real collectionItemTextSideMargin: 10 - property real collectionItemTextMargin: 5 - property real collectionItemTextPadding: 5 - property real collectionTableHorizontalMargin: 10 - property real collectionTableVerticalMargin: 10 - property real collectionCellMinimumWidth: 60 - property real collectionCellMinimumHeight: 20 - // NEW NEW NEW readonly property int flowMargin: 7 readonly property int flowSpacing: 7 // Odd so cursor has a center location diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf Binary files differindex 714cd4b753..cdce3eeefd 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf diff --git a/share/qtcreator/qmldesigner/qt4mcu/metadata.qml b/share/qtcreator/qmldesigner/qt4mcu/metadata.qml index b4ae840bdd..2df700e72a 100644 --- a/share/qtcreator/qmldesigner/qt4mcu/metadata.qml +++ b/share/qtcreator/qmldesigner/qt4mcu/metadata.qml @@ -5,7 +5,7 @@ Metadata { id: metadataFile - defaultVersion: v26 + defaultVersion: v27 VersionData { id: v14 @@ -72,4 +72,10 @@ Metadata { name: "Qt for MCUs 2.6" path: "qul-26.qml" } + + VersionData { + id: v27 + name: "Qt for MCUs 2.7" + path: "qul-27.qml" + } } diff --git a/share/qtcreator/qmldesigner/qt4mcu/qul-27.qml b/share/qtcreator/qmldesigner/qt4mcu/qul-27.qml new file mode 100644 index 0000000000..6cb5640472 --- /dev/null +++ b/share/qtcreator/qmldesigner/qt4mcu/qul-27.qml @@ -0,0 +1,227 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +// new import: QUL.Studio.Components +// new types: ArcItem, Gradients, Basic and LinearGradient +// new properties: gradients related +// Layer Application renamed to ApplicationScreens + +VersionData { + name: "Qt for MCUs 2.7" + + bannedItems: [ + "QtQuick.AnimatedImage", + "QtQuick.Flow", + "QtQuick.FocusScope", + "QtQuick.Grid", + "QtQuick.GridView", + "QtQuick.PathView", + "QtQuick.TextEdit", + "QtQuick.TextInput", + "QtQuick.Controls", + "QtQuick.Controls.BusyIndicator", + "QtQuick.Controls.ButtonGroup", + "QtQuick.Controls.CheckDelegate", + "QtQuick.Controls.ComboBox", + "QtQuick.Controls.Container", + "QtQuick.Controls.DelayButton", + "QtQuick.Controls.Frame", + "QtQuick.Controls.GroupBox", + "QtQuick.Controls.ItemDelegate", + "QtQuick.Controls.Label", + "QtQuick.Controls.Page", + "QtQuick.Controls.PageIndicator", + "QtQuick.Controls.Pane", + "QtQuick.Controls.RadioDelegate", + "QtQuick.Controls.RangeSlider", + "QtQuick.Controls.RoundButton", + "QtQuick.Controls.ScrollView", + "QtQuick.Controls.SpinBox", + "QtQuick.Controls.StackView", + "QtQuick.Controls.SwipeDelegate", + "QtQuick.Controls.SwitchDelegate", + "QtQuick.Controls.TabBar", + "QtQuick.Controls.TabButton", + "QtQuick.Controls.TextArea", + "QtQuick.Controls.TextField", + "QtQuick.Controls.ToolBar", + "QtQuick.Controls.ToolButton", + "QtQuick.Controls.ToolSeparator", + "QtQuick.Controls.Tumbler", + "QtQuick.Shapes.ConicalGradient", + "QtQuick.Shapes.RadialGradient" + ] + + allowedImports: [ + "QtQuick", + "QtQuick.Controls", + "QtQuick.Shapes", + "QtQuick.Timeline", + "QtQuickUltralite.Extras", + "QtQuickUltralite.Layers", + "QtQuickUltralite.Profiling", + "QtQuickUltralite.Studio.Components" + ] + + bannedImports: [ + "FlowView", + "SimulinkConnector" + ] + + //ComplexProperty is not a type, it's just a way to handle bigger props + ComplexProperty { + prefix: "font" + bannedProperties: ["wordSpacing", "letterSpacing", "hintingPreference", + "kerning", "preferShaping", "capitalization", + "strikeout", "underline", "styleName"] + } + + QtQml.Timer { + bannedProperties: ["triggeredOnStart"] + } + + QtQuick.Item { + bannedProperties: ["layer", "opacity", "smooth", "antialiasing", + "baselineOffset", "focus", "activeFocusOnTab", + "rotation", "scale", "transformOrigin"] + } + + QtQuick.Rectangle { + bannedProperties: ["border"] + } + + QtQuick.Flickable { + bannedProperties: ["boundsMovement", "flickDeceleration", + "leftMargin", "rightMargin", "bottomMargin", "topMargin", + "originX", "originY", "pixelAligned", "pressDelay", "synchronousDrag"] + } + + QtQuick.MouseArea { + bannedProperties: ["propagateComposedEvents", "preventStealing", "cursorShape", + "scrollGestureEnabled", "drag", "acceptedButtons", "hoverEnabled"] + } + + QtQuick.Image { + allowChildren: false + allowedProperties: ["rotation", "scale", "transformOrigin"] + bannedProperties: ["mirror", "mipmap", "cache", "autoTransform", "asynchronous", + "sourceSize", "smooth"] + } + + QtQuick.BorderImage { + bannedProperties: ["asynchronous", "cache", "currentFrame", "frameCount", + "horizontalTileMode", "mirror", "progress", "smooth", "sourceSize", + "status", "verticalTileMode"] + } + + QtQuick.Text { + allowChildren: false + allowedProperties: ["rotation", "scale", "transformOrigin"] + bannedProperties: ["lineHeight", "lineHeightMode", "style", + "styleColor", "minimumPointSize", "minimumPixelSize", + "fontSizeMode", "renderType", "renderTypeQuality", "maximumLineCount"] + } + + QtQuick.Loader { + bannedProperties: ["asynchronous", "progress", "status"] + } + + //Padding is not an actual item, but rather set of properties in Text + Padding { + bannedProperties: ["bottomPadding", "topPadding", "leftPadding", "rightPadding"] + } + + QtQuick.Column { + bannedProperties: ["bottomPadding", "leftPadding", "rightPadding", "topPadding"] + } + + QtQuick.Row { + bannedProperties: ["bottomPadding", "leftPadding", "rightPadding", "topPadding", + "effectiveLayoutDirection", "layoutDirection"] + } + + QtQuick.ListView { + bannedProperties: ["cacheBuffer", "highlightRangeMode", "highlightMoveDuration", + "highlightResizeDuration", "preferredHighlightBegin", "layoutDirection", + "preferredHighlightEnd", "highlightFollowsCurrentItem", "keyNavigationWraps", + "snapMode", "highlightMoveVelocity", "highlightResizeVelocity"] + } + + QtQuick.Animation { + bannedProperties: ["paused"] + } + + QtQuick.AnimatedSprite { + allowedProperties: ["currentFrame", "frameCount", "paused"] + bannedProperties: ["finishBehavior", "frameRate", "frameSync", + "frameX", "frameY", "interpolate", "reverse"] + } + + //Quick Controls2 Items and properties: + + QtQuick.Controls.Control { + bannedProperties: ["focusPolicy", "hoverEnabled", "wheelEnabled"] + } + + QtQuick.Controls.AbstractButton { + bannedProperties: ["display", "autoExclusive", "icon"] + } + + QtQuick.Controls.ProgressBar { + bannedProperties: ["indeterminate"] + } + + QtQuick.Controls.Slider { + bannedProperties: ["live", "snapMode", "touchDragThreshold"] + } + + //Path and Shapes related: + + QtQuick.Path { + bannedProperties: ["scale", "pathElements"] + } + + QtQuick.PathArc { + bannedProperties: ["relativeX", "relativeY"] + } + + QtQuick.PathLine { + bannedProperties: ["relativeX", "relativeY"] + } + + QtQuick.PathMove { + bannedProperties: ["relativeX", "relativeY"] + } + + QtQuick.PathQuad { + bannedProperties: ["relativeX", "relativeY", + "relativeControlX", "relativeControlY"] + } + + QtQuick.PathCubic { + bannedProperties: ["relativeX", "relativeY", + "relativeControl1X", "relativeControl1Y", + "relativeControl2X", "relativeControl2Y"] + } + + QtQuick.PathElement { + //nothing + } + + QtQuick.PathSvg { + //nothing + } + + QtQuick.Shapes.Shape { + bannedProperties: ["asynchronous", "containsMode", "data", + "renderType", "status", "vendorExtensionsEnabled"] + } + + QtQuick.Shapes.ShapePath { + bannedProperties: ["dashOffset", "dashPattern", "strokeStyle"] + } + + QtQuickUltralite.Extras.ItemBuffer { + allowedProperties: ["rotation", "scale", "transformOrigin"] + } +} diff --git a/share/qtcreator/qmldesigner/studio_templates/files/javascript/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/javascript/wizard.json index 7ba90f75f6..f70ed11c1d 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/javascript/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/javascript/wizard.json @@ -9,13 +9,46 @@ "icon": "file_javascript.png", "platformIndependent": true, + "options": + [ + { "key": "JSFile", "value": "%{Class}.%{JS: Util.preferredSuffix('application/javascript')}" }, + { "key": "ApplicationImport", "value": "%{QmlProjectName} 1.0" }, + { "key": "RootItem", "value": "%{JS: %{RootItemCB}.RootItem}" }, + { "key": "UseImportDefault", "value": "%{JS: false}" }, + { "key": "UseQtQuickControls2Default", "value": "%{JS: true}" } + ], "pages" : - [ + [ { - "trDisplayName": "Location", - "trShortTitle": "Location", - "typeId": "File" + "trDisplayName": "Define Class", + "trShortTitle": "Details", + "typeId": "Fields", + "data" : + [ + { + "name": "Class", + "trDisplayName": "Component name:", + "mandatory": true, + "type": "LineEdit", + "data": { + "validator": "(?:[A-Z_][a-zA-Z_0-9]*|)", + "fixup": "%{JS: '%{INPUT}'.charAt(0).toUpperCase() + '%{INPUT}'.slice(1) }" + } + }, + { + "name": "TargetPath", + "type": "PathChooser", + "trDisplayName": "Path:", + "mandatory": true, + "data": + { + "kind": "existingDirectory", + "basePath": "%{InitialPath}", + "path": "%{InitialPath}" + } + } + ] }, { "trDisplayName": "Options", @@ -34,21 +67,16 @@ } } ] - }, - { - "trDisplayName": "Project Management", - "trShortTitle": "Summary", - "typeId": "Summary" } ], "generators" : - [ + [ { "typeId": "File", "data": { "source": "file.js.tpl", - "target": "%{JS: Util.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('application/javascript')}')}", + "target": "%{TargetPath}/%{JSFile}", "openInEditor": true } } diff --git a/share/qtcreator/qmldesigner/studio_templates/files/qtquickfile/file.qml.tpl b/share/qtcreator/qmldesigner/studio_templates/files/qtquickfile/file.qml.tpl index f77f7d99c9..996d474208 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/qtquickfile/file.qml.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/files/qtquickfile/file.qml.tpl @@ -7,6 +7,7 @@ import %{ApplicationImport} @endif %{RootItem} { + id: root @if %{UseImport} width: Constants.width height: Constants.height diff --git a/share/qtcreator/qmldesigner/studio_templates/files/qtuiquickfile/file.qml.tpl b/share/qtcreator/qmldesigner/studio_templates/files/qtuiquickfile/file.qml.tpl index 47ca3af299..e7e86e9ffa 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/qtuiquickfile/file.qml.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/files/qtuiquickfile/file.qml.tpl @@ -14,6 +14,7 @@ import %{ApplicationImport} @endif %{RootItem} { + id: root @if %{UseImport} width: Constants.width height: Constants.height diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json index 42d0bf748c..a897fa421a 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json @@ -18,6 +18,8 @@ { "key": "ProjectPluginClassName", "value": "%{ProjectName}Plugin" }, { "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qmlproject')}" }, { "key": "IsQt6Project", "value": "%{JS: value('QtQuickVersion') !== '2.15' }" }, + { "key": "AssetDir", "value": "Generated" }, + { "key": "ContentDir", "value": "%{ProjectName}Content" }, { "key": "ImportModuleName", "value": "%{ProjectName}" }, { "key": "UIClassName", "value": "Screen01" }, { "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" }, @@ -236,7 +238,7 @@ "type": "ComboBox", "data": { - "index": 3, + "index": 5, "items": [ { @@ -278,6 +280,14 @@ 'TargetQuickVersion': '6.6', 'TargetQuick3DVersion': '6.6' })" + }, + { + "trKey": "Qt 6.7", + "value": + "({ + 'TargetQuickVersion': '6.7', + 'TargetQuick3DVersion': '6.7' + })" } ] } @@ -298,98 +308,49 @@ "openAsProject": true }, { - "source": "../common/CMakeLists.main.txt.tpl", - "target": "%{ProjectDirectory}/CMakeLists.txt" - }, - { - "source": "../common/qmlmodules.tpl", - "target": "%{ProjectDirectory}/qmlmodules" - }, - { - "source": "../common/qmlcomponents.tpl", - "target": "%{ProjectDirectory}/qmlcomponents" - }, - { - "source": "../common/insight.tpl", - "target": "%{ProjectDirectory}/insight" - }, - { - "source": "../common/main.qml", - "target": "%{ProjectDirectory}/main.qml" - }, - { "source": "../common/qtquickcontrols2.conf.tpl", "target": "%{ProjectDirectory}/qtquickcontrols2.conf" }, { - "source": "../common/main.cpp.tpl", - "target": "%{ProjectDirectory}/src/main.cpp" - }, - { - "source": "../common/app_environment.h.tpl", - "target": "%{ProjectDirectory}/src/app_environment.h" - }, - { - "source": "../common/import_qml_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_plugins.h" - }, - { - "source": "../common/import_qml_components_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_components_plugins.h" - }, - - { - "source": "../common/CMakeLists.content.txt.tpl", - "target": "%{ProjectDirectory}/content/CMakeLists.txt" - }, - { "source": "../common/App.qml.tpl", - "target": "%{ProjectDirectory}/content/App.qml" + "target": "%{ProjectDirectory}/%{ContentDir}/App.qml" }, { "source": "Screen01.ui.qml.tpl", - "target": "%{ProjectDirectory}/content/Screen01.ui.qml", + "target": "%{ProjectDirectory}/%{ContentDir}/Screen01.ui.qml", "openInEditor": true }, { "source": "../common/fonts.txt", - "target": "%{ProjectDirectory}/content/fonts/fonts.txt" + "target": "%{ProjectDirectory}/%{ContentDir}/fonts/fonts.txt" }, { "source": "../common/asset_imports.txt", - "target": "%{ProjectDirectory}/asset_imports/asset_imports.txt" - }, - { - "source": "../common/CMakeLists.imports.txt.tpl", - "target": "%{ProjectDirectory}/imports/CMakeLists.txt" - }, - { - "source": "../shared-plugin/name/CMakeLists.importmodule.txt.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/CMakeLists.txt" + "target": "%{ProjectDirectory}/%{AssetDir}/%{AssetDir}.txt" }, { "source": "../shared-plugin/name/importmodule.qmldir.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/qmldir" + "target": "%{ProjectDirectory}/%{ImportModuleName}/qmldir" }, { "source": "../shared-plugin/name/Constants.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, { "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListModel.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" }, { "source": "../shared-plugin/name/EventListSimulator.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListSimulator.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListSimulator.qml" }, { "source": "../shared-plugin/name/designer/plugin.metainfo", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo" + "target": "%{ProjectDirectory}/%{ImportModuleName}/designer/plugin.metainfo" } ] } diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-extended-3d/Screen01.ui.qml.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/application-extended-3d/Screen01.ui.qml.tpl index 2b26fe3f0c..41d562fb53 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-extended-3d/Screen01.ui.qml.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-extended-3d/Screen01.ui.qml.tpl @@ -19,7 +19,7 @@ Rectangle { color: Constants.backgroundColor View3D { - id: view3D + id: extendedView3D anchors.fill: parent environment: sceneEnvironment diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-extended-3d/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application-extended-3d/wizard.json index 101d5c6903..ccd522f7c8 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-extended-3d/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-extended-3d/wizard.json @@ -18,6 +18,8 @@ { "key": "ProjectPluginClassName", "value": "%{ProjectName}Plugin" }, { "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qmlproject')}" }, { "key": "IsQt6Project", "value": "%{JS: value('QtQuickVersion') !== '2.15' }" }, + { "key": "AssetDir", "value": "Generated" }, + { "key": "ContentDir", "value": "%{ProjectName}Content" }, { "key": "ImportModuleName", "value": "%{ProjectName}" }, { "key": "UIClassName", "value": "Screen01" }, { "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" }, @@ -236,34 +238,10 @@ "type": "ComboBox", "data": { - "index": 3, + "index": 2, "items": [ { - "trKey": "Qt 6.2", - "value": - "({ - 'TargetQuickVersion': '6.2', - 'TargetQuick3DVersion': '6.2' - })" - }, - { - "trKey": "Qt 6.3", - "value": - "({ - 'TargetQuickVersion': '6.3', - 'TargetQuick3DVersion': '6.3' - })" - }, - { - "trKey": "Qt 6.4", - "value": - "({ - 'TargetQuickVersion': '6.4', - 'TargetQuick3DVersion': '6.4' - })" - }, - { "trKey": "Qt 6.5", "value": "({ @@ -278,6 +256,14 @@ 'TargetQuickVersion': '6.6', 'TargetQuick3DVersion': '6.6' })" + }, + { + "trKey": "Qt 6.7", + "value": + "({ + 'TargetQuickVersion': '6.7', + 'TargetQuick3DVersion': '6.7' + })" } ] } @@ -298,98 +284,49 @@ "openAsProject": true }, { - "source": "../common/CMakeLists.main.txt.tpl", - "target": "%{ProjectDirectory}/CMakeLists.txt" - }, - { - "source": "../common/qmlmodules.tpl", - "target": "%{ProjectDirectory}/qmlmodules" - }, - { - "source": "../common/qmlcomponents.tpl", - "target": "%{ProjectDirectory}/qmlcomponents" - }, - { - "source": "../common/insight.tpl", - "target": "%{ProjectDirectory}/insight" - }, - { - "source": "../common/main.qml", - "target": "%{ProjectDirectory}/main.qml" - }, - { "source": "../common/qtquickcontrols2.conf.tpl", "target": "%{ProjectDirectory}/qtquickcontrols2.conf" }, { - "source": "../common/main.cpp.tpl", - "target": "%{ProjectDirectory}/src/main.cpp" - }, - { - "source": "../common/app_environment.h.tpl", - "target": "%{ProjectDirectory}/src/app_environment.h" - }, - { - "source": "../common/import_qml_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_plugins.h" - }, - { - "source": "../common/import_qml_components_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_components_plugins.h" - }, - - { - "source": "../common/CMakeLists.content.txt.tpl", - "target": "%{ProjectDirectory}/content/CMakeLists.txt" - }, - { "source": "../common/App.qml.tpl", - "target": "%{ProjectDirectory}/content/App.qml" + "target": "%{ProjectDirectory}/%{ContentDir}/App.qml" }, { "source": "Screen01.ui.qml.tpl", - "target": "%{ProjectDirectory}/content/Screen01.ui.qml", + "target": "%{ProjectDirectory}/%{ContentDir}/Screen01.ui.qml", "openInEditor": true }, { "source": "../common/fonts.txt", - "target": "%{ProjectDirectory}/content/fonts/fonts.txt" + "target": "%{ProjectDirectory}/%{ContentDir}/fonts/fonts.txt" }, { "source": "../common/asset_imports.txt", - "target": "%{ProjectDirectory}/asset_imports/asset_imports.txt" - }, - { - "source": "../common/CMakeLists.imports.txt.tpl", - "target": "%{ProjectDirectory}/imports/CMakeLists.txt" - }, - { - "source": "../shared-plugin/name/CMakeLists.importmodule.txt.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/CMakeLists.txt" + "target": "%{ProjectDirectory}/%{AssetDir}/%{AssetDir}.txt" }, { "source": "../shared-plugin/name/importmodule.qmldir.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/qmldir" + "target": "%{ProjectDirectory}/%{ImportModuleName}/qmldir" }, { "source": "../shared-plugin/name/Constants.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, { "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListModel.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" }, { "source": "../shared-plugin/name/EventListSimulator.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListSimulator.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListSimulator.qml" }, { "source": "../shared-plugin/name/designer/plugin.metainfo", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo" + "target": "%{ProjectDirectory}/%{ImportModuleName}/designer/plugin.metainfo" } ] } diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/app_mcu.qmlproject.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/app_mcu.qmlproject.tpl index f17d608f96..7c4453752a 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/app_mcu.qmlproject.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/app_mcu.qmlproject.tpl @@ -42,7 +42,9 @@ Project { "Controls", "ControlsTemplates", "Timeline", - "Shapes" + "Shapes", + "Profiling", + "StudioComponents" ] } @@ -55,8 +57,8 @@ Project { QDS.qtForMCUs: true QDS.qt6Project: true - QDS.qdsVersion: "4.3" - QDS.quickVersion: "6.5" + QDS.qdsVersion: "4.5" + QDS.quickVersion: "6.7" /* List of plugin directories passed to QML runtime */ importPaths: [ "imports" ] diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json index c8b74dec49..f0f98c3331 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json @@ -17,6 +17,8 @@ { "key": "ProjectPluginName", "value": "%{ProjectName}plugin" }, { "key": "ProjectPluginClassName", "value": "%{ProjectName}Plugin" }, { "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qmlproject')}" }, + { "key": "AssetDir", "value": "Generated" }, + { "key": "ContentDir", "value": "%{ProjectName}Content" }, { "key": "ImportModuleName", "value": "%{ProjectName}" }, { "key": "UIClassName", "value": "Screen01" }, { "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" }, @@ -236,7 +238,7 @@ "type": "ComboBox", "data": { - "index": 4, + "index": 6, "items": [ { @@ -280,6 +282,13 @@ "({ 'TargetQuickVersion': '6.6' })" + }, + { + "trKey": "Qt 6.7", + "value": + "({ + 'TargetQuickVersion': '6.7' + })" } ] } @@ -300,108 +309,48 @@ "openAsProject": true }, { - "source": "../common/CMakeLists.main.txt.tpl", - "target": "%{ProjectDirectory}/CMakeLists.txt", - "condition": "%{IsQt6Project}" - }, - { - "source": "../common/qmlmodules.tpl", - "target": "%{ProjectDirectory}/qmlmodules", - "condition": "%{IsQt6Project}" - }, - { - "source": "../common/qmlcomponents.tpl", - "target": "%{ProjectDirectory}/qmlcomponents", - "condition": "%{IsQt6Project}" - }, - { - "source": "../common/insight.tpl", - "target": "%{ProjectDirectory}/insight", - "condition": "%{IsQt6Project}" - }, - { - "source": "../common/main.qml", - "target": "%{ProjectDirectory}/main.qml", - "condition": "%{IsQt6Project}" - }, - { "source": "../common/qtquickcontrols2.conf.tpl", "target": "%{ProjectDirectory}/qtquickcontrols2.conf" }, { - "source": "../common/main.cpp.tpl", - "target": "%{ProjectDirectory}/src/main.cpp", - "condition": "%{IsQt6Project}" - }, - { - "source": "../common/app_environment.h.tpl", - "target": "%{ProjectDirectory}/src/app_environment.h", - "condition": "%{IsQt6Project}" - }, - { - "source": "../common/import_qml_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_plugins.h", - "condition": "%{IsQt6Project}" - }, - { - "source": "../common/import_qml_components_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_components_plugins.h", - "condition": "%{IsQt6Project}" - }, - { - "source": "../common/CMakeLists.content.txt.tpl", - "target": "%{ProjectDirectory}/content/CMakeLists.txt", - "condition": "%{IsQt6Project}" - }, - { "source": "../common/App.qml.tpl", - "target": "%{ProjectDirectory}/content/App.qml" + "target": "%{ProjectDirectory}/%{ContentDir}/App.qml" }, { "source": "Screen01.ui.qml.tpl", - "target": "%{ProjectDirectory}/content/Screen01.ui.qml" + "target": "%{ProjectDirectory}/%{ContentDir}/Screen01.ui.qml" }, { "source": "../common/fonts.txt", - "target": "%{ProjectDirectory}/content/fonts/fonts.txt" + "target": "%{ProjectDirectory}/%{ContentDir}/fonts/fonts.txt" }, { "source": "../common/asset_imports.txt", - "target": "%{ProjectDirectory}/asset_imports/asset_imports.txt" - }, - { - "source": "../common/CMakeLists.imports.txt.tpl", - "target": "%{ProjectDirectory}/imports/CMakeLists.txt", - "condition": "%{IsQt6Project}" - }, - { - "source": "../shared-plugin/name/CMakeLists.importmodule.txt.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/CMakeLists.txt", - "condition": "%{IsQt6Project}" + "target": "%{ProjectDirectory}/%{AssetDir}/Quick3DAssets.txt" }, { "source": "../shared-plugin/name/importmodule.qmldir.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/qmldir" + "target": "%{ProjectDirectory}/%{ImportModuleName}/qmldir" }, { "source": "../shared-plugin/name/Constants.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, { "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListModel.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" }, { "source": "../shared-plugin/name/EventListSimulator.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListSimulator.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListSimulator.qml" }, { "source": "../shared-plugin/name/designer/plugin.metainfo", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo" + "target": "%{ProjectDirectory}/%{ImportModuleName}/designer/plugin.metainfo" } ] } diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.content.txt.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.content.txt.tpl deleted file mode 100644 index a5a4360e3f..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.content.txt.tpl +++ /dev/null @@ -1,14 +0,0 @@ -### This file is automatically generated by Qt Design Studio. -### Do not change - -qt_add_library(content STATIC) -qt6_add_qml_module(content - URI "content" - VERSION 1.0 - RESOURCE_PREFIX "/qt/qml" - QML_FILES - App.qml - %{UIClassFileName} - RESOURCES - fonts/fonts.txt -) diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.imports.txt.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.imports.txt.tpl deleted file mode 100644 index 418f6d7719..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.imports.txt.tpl +++ /dev/null @@ -1,4 +0,0 @@ -### This file is automatically generated by Qt Design Studio. -### Do not change - -add_subdirectory(%{ImportModuleName}) diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl deleted file mode 100644 index eb621ef219..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl +++ /dev/null @@ -1,56 +0,0 @@ -cmake_minimum_required(VERSION 3.21.1) - -option(LINK_INSIGHT "Link Qt Insight Tracker library" ON) -option(BUILD_QDS_COMPONENTS "Build design studio components" ON) - -project(%{ProjectName}App LANGUAGES CXX) - -set(CMAKE_AUTOMOC ON) - -find_package(Qt6 6.2 REQUIRED COMPONENTS Core Gui Qml Quick) - -if (Qt6_VERSION VERSION_GREATER_EQUAL 6.3) - qt_standard_project_setup() -endif() - -qt_add_executable(%{ProjectName}App src/main.cpp) - -qt_add_resources(%{ProjectName}App "configuration" - PREFIX "/" - FILES - qtquickcontrols2.conf -) - -target_link_libraries(%{ProjectName}App PRIVATE - Qt6::Core - Qt6::Gui - Qt6::Qml - Qt6::Quick -) - -set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml) -set(QML_IMPORT_PATH ${QT_QML_OUTPUT_DIRECTORY} - CACHE STRING "Import paths for Qt Creator's code model" - FORCE -) - -if (BUILD_QDS_COMPONENTS) - include(${CMAKE_CURRENT_SOURCE_DIR}/qmlcomponents) -endif() - -include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules) - -if (LINK_INSIGHT) - include(${CMAKE_CURRENT_SOURCE_DIR}/insight) -endif () - -include(GNUInstallDirs) -install(TARGETS %{ProjectName}App - BUNDLE DESTINATION . - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -) - -# make IDEs aware of the QML import path -set(QML_IMPORT_PATH ${PROJECT_BINARY_DIR}/qml CACHE PATH - "Path to the custom QML components defined by the project") diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/app.qmlproject.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/app.qmlproject.tpl index 75aeae6714..6d346818e4 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/app.qmlproject.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/projects/common/app.qmlproject.tpl @@ -5,32 +5,36 @@ import QmlProject 1.1 @endif Project { - mainFile: "content/App.qml" - mainUiFile: "content/Screen01.ui.qml" + mainFile: "%{ContentDir}/App.qml" + mainUiFile: "%{ContentDir}/Screen01.ui.qml" /* Include .qml, .js, and image files from current directory and subdirectories */ QmlFiles { - directory: "content" + directory: "%{ProjectName}" } QmlFiles { - directory: "imports" + directory: "%{ContentDir}" + } + + QmlFiles { + directory: "%{AssetDir}" } JavaScriptFiles { - directory: "content" + directory: "%{ProjectName}" } JavaScriptFiles { - directory: "imports" + directory: "%{ProjectName}" } ImageFiles { - directory: "content" + directory: "%{ContentDir}" } ImageFiles { - directory: "asset_imports" + directory: "%{AssetDir}" } Files { @@ -69,17 +73,12 @@ Project { Files { filter: "*.mesh" - directory: "asset_imports" + directory: "%{AssetDir}" } Files { filter: "*.qad" - directory: "asset_imports" - } - - Files { - filter: "*.qml" - directory: "asset_imports" + directory: "%{AssetDir}" } Environment { @@ -109,7 +108,7 @@ Project { @endif /* List of plugin directories passed to QML runtime */ - importPaths: [ "imports", "asset_imports" ] + importPaths: [ "." ] /* Required for deployment */ targetDirectory: "/opt/%{ProjectName}" @@ -125,10 +124,10 @@ Project { /* args: Specifies command line arguments for qsb tool to generate shaders. files: Specifies target files for qsb tool. If path is included, it must be relative to this file. Wildcard '*' can be used in the file name part of the path. - e.g. files: [ "content/shaders/*.vert", "*.frag" ] */ + e.g. files: [ "%{ContentDir}/shaders/*.vert", "*.frag" ] */ ShaderTool { args: "-s --glsl \\\"100 es,120,150\\\" --hlsl 50 --msl 12" - files: [ "content/shaders/*" ] + files: [ "%{ContentDir}/shaders/*" ] } @endif diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/app_environment.h.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/app_environment.h.tpl deleted file mode 100644 index e1f7ec2e23..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/app_environment.h.tpl +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is automatically generated by Qt Design Studio. - * Do not change. -*/ - -#include <QGuiApplication> - -void set_qt_environment() -{ -@if %{UseVirtualKeyboard} - qputenv("QT_IM_MODULE", "qtvirtualkeyboard"); - qputenv("QT_VIRTUALKEYBOARD_DESKTOP_DISABLE", "1"); -@endif - qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1"); - qputenv("QT_ENABLE_HIGHDPI_SCALING", "0"); - qputenv("QT_LOGGING_RULES", "qt.qml.connections=false"); - qputenv("QT_QUICK_CONTROLS_CONF", ":/qtquickcontrols2.conf"); - qputenv("QML_COMPAT_RESOLVE_URLS_ON_ASSIGNMENT", "1"); -} diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/contentmodule.main.qml.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/contentmodule.main.qml.tpl deleted file mode 100644 index ac0b0b28c0..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/contentmodule.main.qml.tpl +++ /dev/null @@ -1,17 +0,0 @@ -import QtQuick %{QtQuickVersion} -@if !%{IsQt6Project} -import QtQuick.Window %{QtQuickVersion} -@endif -import %{ApplicationImport} - -Window { - width: Constants.width - height: Constants.height - - visible: true - - Screen01 { - width: parent.width - height: parent.height - } -} diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/import_qml_components_plugins.h.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/import_qml_components_plugins.h.tpl deleted file mode 100644 index 167481d7c7..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/import_qml_components_plugins.h.tpl +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is automatically generated by Qt Design Studio. - * Do not change. -*/ - -#include "qqmlextensionplugin.h" - -#ifdef BUILD_QDS_COMPONENTS - -Q_IMPORT_QML_PLUGIN(QtQuick_Studio_ComponentsPlugin) -Q_IMPORT_QML_PLUGIN(QtQuick_Studio_EffectsPlugin) -Q_IMPORT_QML_PLUGIN(QtQuick_Studio_ApplicationPlugin) -Q_IMPORT_QML_PLUGIN(FlowViewPlugin) -Q_IMPORT_QML_PLUGIN(QtQuick_Studio_LogicHelperPlugin) -Q_IMPORT_QML_PLUGIN(QtQuick_Studio_MultiTextPlugin) -Q_IMPORT_QML_PLUGIN(QtQuick_Studio_EventSimulatorPlugin) -Q_IMPORT_QML_PLUGIN(QtQuick_Studio_EventSystemPlugin) - -#endif diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/import_qml_plugins.h.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/import_qml_plugins.h.tpl deleted file mode 100644 index f9700ff452..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/import_qml_plugins.h.tpl +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This file is automatically generated by Qt Design Studio. - * Do not change. -*/ - -#include <QtQml/qqmlextensionplugin.h> - -Q_IMPORT_QML_PLUGIN(contentPlugin) -Q_IMPORT_QML_PLUGIN(%{ProjectPluginClassName}) diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/insight.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/insight.tpl deleted file mode 100644 index 8245e31f0d..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/insight.tpl +++ /dev/null @@ -1,19 +0,0 @@ -### This file is automatically generated by Qt Design Studio. -### Do not change - -if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qtinsight.conf) - if (QT_VERSION GREATER_EQUAL 6.5.0) - find_package(Qt6 REQUIRED COMPONENTS InsightTracker) - - qt_add_resources(${CMAKE_PROJECT_NAME} "configuration" - PREFIX "/" - FILES - qtinsight.conf - ) - target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE - Qt6::InsightTracker - ) - else() - message(WARNING "You need Qt 6.5.0 or newer to build the application.") - endif() -endif() diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/main.cpp.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/main.cpp.tpl deleted file mode 100644 index 915d08462e..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/main.cpp.tpl +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only - -#include <QGuiApplication> -#include <QQmlApplicationEngine> - -#include "app_environment.h" -#include "import_qml_components_plugins.h" -#include "import_qml_plugins.h" - -int main(int argc, char *argv[]) -{ - set_qt_environment(); - - QGuiApplication app(argc, argv); - - QQmlApplicationEngine engine; - const QUrl url(u"qrc:/qt/qml/Main/main.qml"_qs); - QObject::connect( - &engine, &QQmlApplicationEngine::objectCreated, &app, - [url](QObject *obj, const QUrl &objUrl) { - if (!obj && url == objUrl) - QCoreApplication::exit(-1); - }, - Qt::QueuedConnection); - - engine.addImportPath(QCoreApplication::applicationDirPath() + "/qml"); - engine.addImportPath(":/"); - - engine.load(url); - - if (engine.rootObjects().isEmpty()) { - return -1; - } - - return app.exec(); -} diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/main.qml b/share/qtcreator/qmldesigner/studio_templates/projects/common/main.qml deleted file mode 100644 index 2c4f857df3..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/main.qml +++ /dev/null @@ -1,8 +0,0 @@ -/* This file is generated and only relevant for integrating the project into a Qt 6 and cmake based -C++ project. */ - -import QtQuick -import content - -App { -} diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/qmlcomponents.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/qmlcomponents.tpl deleted file mode 100644 index 2e940be032..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/qmlcomponents.tpl +++ /dev/null @@ -1,34 +0,0 @@ -### This file is automatically generated by Qt Design Studio. -### Do not change - -message("Building designer components.") - -set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml") - -include(FetchContent) -FetchContent_Declare( - ds - GIT_TAG qds-4.4 - GIT_REPOSITORY https://code.qt.io/qt-labs/qtquickdesigner-components.git -) - -FetchContent_GetProperties(ds) -FetchContent_Populate(ds) - -target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE - QuickStudioComponentsplugin - QuickStudioEffectsplugin - QuickStudioApplicationplugin - FlowViewplugin - QuickStudioLogicHelperplugin - QuickStudioMultiTextplugin - QuickStudioEventSimulatorplugin - QuickStudioEventSystemplugin - QuickStudioUtilsplugin -) - -add_subdirectory(${ds_SOURCE_DIR} ${ds_BINARY_DIR}) - -target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE - BULD_QDS_COMPONENTS=true -) diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/qmlmodules.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/qmlmodules.tpl deleted file mode 100644 index 5a22661b5a..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/qmlmodules.tpl +++ /dev/null @@ -1,18 +0,0 @@ -### This file is automatically generated by Qt Design Studio. -### Do not change - -qt6_add_qml_module(${CMAKE_PROJECT_NAME} - URI "Main" - VERSION 1.0 - RESOURCE_PREFIX "/qt/qml" - NO_PLUGIN - QML_FILES main.qml -) - -add_subdirectory(content) -add_subdirectory(imports) - -target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE - contentplugin - %{ProjectPluginName} -) diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/qtquickcontrols2.conf b/share/qtcreator/qmldesigner/studio_templates/projects/common/qtquickcontrols2.conf deleted file mode 100644 index 9c7633fb0a..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/qtquickcontrols2.conf +++ /dev/null @@ -1,23 +0,0 @@ -; This file can be edited to change the style of the application -; Read "Qt Quick Controls 2 Configuration File" for details: -; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html - -[Controls] -Style=%{QtQuickControlsStyle} -@if '%{QtQuickControlsStyle}' == 'Universal' - -[Universal] -Theme=%{QtQuickControlsStyleTheme} -;Accent=Steel -;Foreground=Brown -;Background=Steel -@endif -@if '%{QtQuickControlsStyle}' == 'Material' - -[Material] -Theme=%{QtQuickControlsStyleTheme} -;Accent=BlueGrey -;Primary=BlueGray -;Foreground=Brown -;Background=Grey -@endif diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json index 01a603eb9d..c15d4dbf74 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json @@ -17,6 +17,8 @@ { "key": "ProjectPluginName", "value": "%{ProjectName}plugin" }, { "key": "ProjectPluginClassName", "value": "%{ProjectName}Plugin" }, { "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qmlproject')}" }, + { "key": "AssetDir", "value": "Generated" }, + { "key": "ContentDir", "value": "%{ProjectName}Content" }, { "key": "ImportModuleName", "value": "%{ProjectName}" }, { "key": "UIClassName", "value": "Screen01" }, { "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" }, @@ -298,97 +300,49 @@ "openAsProject": true }, { - "source": "../common/CMakeLists.main.txt.tpl", - "target": "%{ProjectDirectory}/CMakeLists.txt" - }, - { - "source": "../common/qmlmodules.tpl", - "target": "%{ProjectDirectory}/qmlmodules" - }, - { - "source": "../common/qmlcomponents.tpl", - "target": "%{ProjectDirectory}/qmlcomponents" - }, - { - "source": "../common/insight.tpl", - "target": "%{ProjectDirectory}/insight" - }, - { - "source": "../common/main.qml", - "target": "%{ProjectDirectory}/main.qml" - }, - { "source": "../common/qtquickcontrols2.conf.tpl", "target": "%{ProjectDirectory}/qtquickcontrols2.conf" }, { - "source": "../common/main.cpp.tpl", - "target": "%{ProjectDirectory}/src/main.cpp" - }, - { - "source": "../common/app_environment.h.tpl", - "target": "%{ProjectDirectory}/src/app_environment.h" - }, - { - "source": "../common/import_qml_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_plugins.h" - }, - { - "source": "../common/import_qml_components_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_components_plugins.h" - }, - { - "source": "../common/CMakeLists.content.txt.tpl", - "target": "%{ProjectDirectory}/content/CMakeLists.txt" - }, - { "source": "../common/App.qml.tpl", - "target": "%{ProjectDirectory}/content/App.qml" + "target": "%{ProjectDirectory}/%{ContentDir}/App.qml" }, { "source": "Screen01.ui.qml.tpl", - "target": "%{ProjectDirectory}/content/Screen01.ui.qml", + "target": "%{ProjectDirectory}/%{ContentDir}/Screen01.ui.qml", "openInEditor": true }, { "source": "../common/fonts.txt", - "target": "%{ProjectDirectory}/content/fonts/fonts.txt" + "target": "%{ProjectDirectory}/%{ContentDir}/fonts/fonts.txt" }, { "source": "../common/asset_imports.txt", - "target": "%{ProjectDirectory}/asset_imports/asset_imports.txt" - }, - { - "source": "../common/CMakeLists.imports.txt.tpl", - "target": "%{ProjectDirectory}/imports/CMakeLists.txt" - }, - { - "source": "../shared-plugin/name/CMakeLists.importmodule.txt.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/CMakeLists.txt" + "target": "%{ProjectDirectory}/%{AssetDir}/%{AssetDir}.txt" }, { "source": "../shared-plugin/name/importmodule.qmldir.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/qmldir" + "target": "%{ProjectDirectory}/%{ImportModuleName}/qmldir" }, { "source": "../shared-plugin/name/Constants.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, { "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListModel.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" }, { "source": "../shared-plugin/name/EventListSimulator.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListSimulator.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListSimulator.qml" }, { "source": "../shared-plugin/name/designer/plugin.metainfo", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo" + "target": "%{ProjectDirectory}/%{ImportModuleName}/designer/plugin.metainfo" } ] } diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json index d521cc201e..d9e4b97908 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json @@ -17,6 +17,8 @@ { "key": "ProjectPluginName", "value": "%{ProjectName}plugin" }, { "key": "ProjectPluginClassName", "value": "%{ProjectName}Plugin" }, { "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qmlproject')}" }, + { "key": "AssetDir", "value": "Generated" }, + { "key": "ContentDir", "value": "%{ProjectName}Content" }, { "key": "ImportModuleName", "value": "%{ProjectName}" }, { "key": "UIClassName", "value": "Screen01" }, { "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" }, @@ -193,7 +195,7 @@ "type": "ComboBox", "data": { - "index": 4, + "index": 6, "items": [ { @@ -237,6 +239,13 @@ "({ 'TargetQuickVersion': '6.6' })" + }, + { + "trKey": "Qt 6.7", + "value": + "({ + 'TargetQuickVersion': '6.7' + })" } ] } @@ -257,97 +266,49 @@ "openAsProject": true }, { - "source": "../common/CMakeLists.main.txt.tpl", - "target": "%{ProjectDirectory}/CMakeLists.txt" - }, - { - "source": "../common/qmlmodules.tpl", - "target": "%{ProjectDirectory}/qmlmodules" - }, - { - "source": "../common/qmlcomponents.tpl", - "target": "%{ProjectDirectory}/qmlcomponents" - }, - { - "source": "../common/insight.tpl", - "target": "%{ProjectDirectory}/insight" - }, - { - "source": "../common/main.qml", - "target": "%{ProjectDirectory}/main.qml" - }, - { "source": "../common/qtquickcontrols2.conf.tpl", "target": "%{ProjectDirectory}/qtquickcontrols2.conf" }, { - "source": "../common/main.cpp.tpl", - "target": "%{ProjectDirectory}/src/main.cpp" - }, - { - "source": "../common/app_environment.h.tpl", - "target": "%{ProjectDirectory}/src/app_environment.h" - }, - { - "source": "../common/import_qml_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_plugins.h" - }, - { - "source": "../common/import_qml_components_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_components_plugins.h" - }, - { - "source": "../common/CMakeLists.content.txt.tpl", - "target": "%{ProjectDirectory}/content/CMakeLists.txt" - }, - { "source": "../common/App.qml.tpl", - "target": "%{ProjectDirectory}/content/App.qml" + "target": "%{ProjectDirectory}/%{ContentDir}/App.qml" }, { "source": "Screen01.ui.qml.tpl", - "target": "%{ProjectDirectory}/content/Screen01.ui.qml", + "target": "%{ProjectDirectory}/%{ContentDir}/Screen01.ui.qml", "openInEditor": true }, { "source": "../common/fonts.txt", - "target": "%{ProjectDirectory}/content/fonts/fonts.txt" + "target": "%{ProjectDirectory}/%{ContentDir}/fonts/fonts.txt" }, { "source": "../common/asset_imports.txt", - "target": "%{ProjectDirectory}/asset_imports/asset_imports.txt" - }, - { - "source": "../common/CMakeLists.imports.txt.tpl", - "target": "%{ProjectDirectory}/imports/CMakeLists.txt" - }, - { - "source": "../shared-plugin/name/CMakeLists.importmodule.txt.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/CMakeLists.txt" + "target": "%{ProjectDirectory}/%{AssetDir}/%{AssetDir}.txt" }, { "source": "../shared-plugin/name/importmodule.qmldir.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/qmldir" + "target": "%{ProjectDirectory}/%{ImportModuleName}/qmldir" }, { "source": "../shared-plugin/name/Constants.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, { "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListModel.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" }, { "source": "../shared-plugin/name/EventListSimulator.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListSimulator.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListSimulator.qml" }, { "source": "../shared-plugin/name/designer/plugin.metainfo", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo" + "target": "%{ProjectDirectory}/%{ImportModuleName}/designer/plugin.metainfo" } ] } diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json index 17cd30d507..910c32a42c 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json @@ -17,6 +17,8 @@ { "key": "ProjectPluginName", "value": "%{ProjectName}plugin" }, { "key": "ProjectPluginClassName", "value": "%{ProjectName}Plugin" }, { "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qmlproject')}" }, + { "key": "AssetDir", "value": "Generated" }, + { "key": "ContentDir", "value": "%{ProjectName}Content" }, { "key": "ImportModuleName", "value": "%{ProjectName}" }, { "key": "IsQt6Project", "value": "%{JS: value('QtQuickVersion') !== '2.15' }" }, { "key": "QtQuickVersion", "value": "%{JS: %{TargetQtVersion}.TargetQuickVersion}" }, @@ -191,7 +193,7 @@ "type": "ComboBox", "data": { - "index": 4, + "index": 6, "items": [ { @@ -235,6 +237,13 @@ "({ 'TargetQuickVersion': '6.6' })" + }, + { + "trKey": "Qt 6.7", + "value": + "({ + 'TargetQuickVersion': '6.7' + })" } ] } @@ -254,102 +263,54 @@ "openAsProject": true }, { - "source": "../common/CMakeLists.main.txt.tpl", - "target": "%{ProjectDirectory}/CMakeLists.txt" - }, - { - "source": "../common/qmlmodules.tpl", - "target": "%{ProjectDirectory}/qmlmodules" - }, - { - "source": "../common/qmlcomponents.tpl", - "target": "%{ProjectDirectory}/qmlcomponents" - }, - { - "source": "../common/insight.tpl", - "target": "%{ProjectDirectory}/insight" - }, - { - "source": "../common/main.qml", - "target": "%{ProjectDirectory}/main.qml" - }, - { "source": "../common/qtquickcontrols2.conf.tpl", "target": "%{ProjectDirectory}/qtquickcontrols2.conf" }, { - "source": "../common/main.cpp.tpl", - "target": "%{ProjectDirectory}/src/main.cpp" - }, - { - "source": "../common/app_environment.h.tpl", - "target": "%{ProjectDirectory}/src/app_environment.h" - }, - { - "source": "../common/import_qml_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_plugins.h" - }, - { - "source": "../common/import_qml_components_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_components_plugins.h" - }, - { - "source": "CMakeLists.content.txt.tpl", - "target": "%{ProjectDirectory}/content/CMakeLists.txt" - }, - { "source": "App.qml.tpl", - "target": "%{ProjectDirectory}/content/App.qml" + "target": "%{ProjectDirectory}/%{ContentDir}/App.qml" }, { "source": "Screen01.ui.qml.tpl", - "target": "%{ProjectDirectory}/content/Screen01.ui.qml", + "target": "%{ProjectDirectory}/%{ContentDir}/Screen01.ui.qml", "openInEditor": true }, { "source": "Screen02.ui.qml.tpl", - "target": "%{ProjectDirectory}/content/Screen02.ui.qml", + "target": "%{ProjectDirectory}/%{ContentDir}/Screen02.ui.qml", "openInEditor": true }, { "source": "../common/fonts.txt", - "target": "%{ProjectDirectory}/content/fonts/fonts.txt" + "target": "%{ProjectDirectory}/%{ContentDir}/fonts/fonts.txt" }, { "source": "../common/asset_imports.txt", - "target": "%{ProjectDirectory}/asset_imports/asset_imports.txt" - }, - { - "source": "../common/CMakeLists.imports.txt.tpl", - "target": "%{ProjectDirectory}/imports/CMakeLists.txt" - }, - { - "source": "../shared-plugin/name/CMakeLists.importmodule.txt.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/CMakeLists.txt" + "target": "%{ProjectDirectory}/%{AssetDir}/%{AssetDir}.txt" }, { "source": "../shared-plugin/name/importmodule.qmldir.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/qmldir" + "target": "%{ProjectDirectory}/%{ImportModuleName}/qmldir" }, { "source": "../shared-plugin/name/Constants.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, { "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListModel.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" }, { "source": "../shared-plugin/name/EventListSimulator.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListSimulator.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListSimulator.qml" }, { "source": "../shared-plugin/name/designer/plugin.metainfo", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo" + "target": "%{ProjectDirectory}/%{ImportModuleName}/designer/plugin.metainfo" } ] } diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json index 37710ae91d..1f5be300e1 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json @@ -17,6 +17,8 @@ { "key": "ProjectPluginName", "value": "%{ProjectName}plugin" }, { "key": "ProjectPluginClassName", "value": "%{ProjectName}Plugin" }, { "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qmlproject')}" }, + { "key": "AssetDir", "value": "Generated" }, + { "key": "ContentDir", "value": "%{ProjectName}Content" }, { "key": "ImportModuleName", "value": "%{ProjectName}" }, { "key": "IsQt6Project", "value": "%{JS: value('QtQuickVersion') !== '2.15' }" }, { "key": "QtQuickVersion", "value": "%{JS: %{TargetQtVersion}.TargetQuickVersion}" }, @@ -191,7 +193,7 @@ "type": "ComboBox", "data": { - "index": 4, + "index": 6, "items": [ { @@ -235,6 +237,13 @@ "({ 'TargetQuickVersion': '6.6' })" + }, + { + "trKey": "Qt 6.7", + "value": + "({ + 'TargetQuickVersion': '6.7' + })" } ] } @@ -254,102 +263,54 @@ "openAsProject": true }, { - "source": "../common/CMakeLists.main.txt.tpl", - "target": "%{ProjectDirectory}/CMakeLists.txt" - }, - { - "source": "../common/qmlmodules.tpl", - "target": "%{ProjectDirectory}/qmlmodules" - }, - { - "source": "../common/qmlcomponents.tpl", - "target": "%{ProjectDirectory}/qmlcomponents" - }, - { - "source": "../common/insight.tpl", - "target": "%{ProjectDirectory}/insight" - }, - { - "source": "../common/main.qml", - "target": "%{ProjectDirectory}/main.qml" - }, - { "source": "../common/qtquickcontrols2.conf.tpl", "target": "%{ProjectDirectory}/qtquickcontrols2.conf" }, { - "source": "../common/main.cpp.tpl", - "target": "%{ProjectDirectory}/src/main.cpp" - }, - { - "source": "../common/app_environment.h.tpl", - "target": "%{ProjectDirectory}/src/app_environment.h" - }, - { - "source": "../common/import_qml_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_plugins.h" - }, - { - "source": "../common/import_qml_components_plugins.h.tpl", - "target": "%{ProjectDirectory}/src/import_qml_components_plugins.h" - }, - { - "source": "CMakeLists.content.txt.tpl", - "target": "%{ProjectDirectory}/content/CMakeLists.txt" - }, - { "source": "App.qml.tpl", - "target": "%{ProjectDirectory}/content/App.qml" + "target": "%{ProjectDirectory}/%{ContentDir}/App.qml" }, { "source": "Screen01.ui.qml.tpl", - "target": "%{ProjectDirectory}/content/Screen01.ui.qml", + "target": "%{ProjectDirectory}/%{ContentDir}/Screen01.ui.qml", "openInEditor": true }, { "source": "Screen02.ui.qml.tpl", - "target": "%{ProjectDirectory}/content/Screen02.ui.qml", + "target": "%{ProjectDirectory}/%{ContentDir}/Screen02.ui.qml", "openInEditor": true }, { "source": "../common/fonts.txt", - "target": "%{ProjectDirectory}/content/fonts/fonts.txt" + "target": "%{ProjectDirectory}/%{ContentDir}/fonts/fonts.txt" }, { "source": "../common/asset_imports.txt", - "target": "%{ProjectDirectory}/asset_imports/asset_imports.txt" - }, - { - "source": "../common/CMakeLists.imports.txt.tpl", - "target": "%{ProjectDirectory}/imports/CMakeLists.txt" - }, - { - "source": "../shared-plugin/name/CMakeLists.importmodule.txt.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/CMakeLists.txt" + "target": "%{ProjectDirectory}/%{AssetDir}/%{AssetDir}.txt" }, { "source": "../shared-plugin/name/importmodule.qmldir.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/qmldir" + "target": "%{ProjectDirectory}/%{ImportModuleName}/qmldir" }, { "source": "../shared-plugin/name/Constants.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, { "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListModel.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" }, { "source": "../shared-plugin/name/EventListSimulator.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListSimulator.qml" + "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListSimulator.qml" }, { "source": "../shared-plugin/name/designer/plugin.metainfo", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo" + "target": "%{ProjectDirectory}/%{ImportModuleName}/designer/plugin.metainfo" } ] } diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/Colors.json.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/Colors.json.tpl deleted file mode 100644 index 052b7abd01..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/Colors.json.tpl +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "colorCode": "#ff0000", - "name": "Red" - }, - { - "colorCode": "#00ff00", - "name": "Green" - }, - { - "colorCode": "#0000ff", - "name": "Blue" - }, - { - "colorCode": "#ffffff", - "name": "White" - } -] diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/Constants.qml.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/Constants.qml.tpl index cc5da7be55..35aa48896b 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/Constants.qml.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/Constants.qml.tpl @@ -26,7 +26,7 @@ QtObject { @if %{IsQt6Project} property StudioApplication application: StudioApplication { - fontPath: Qt.resolvedUrl("../../content/" + relativeFontDirectory) + fontPath: Qt.resolvedUrl("../../%{ContentDir}/" + relativeFontDirectory) } @else property DirectoryFontLoader directoryFontLoader: DirectoryFontLoader { diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DataStore.qml.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DataStore.qml.tpl deleted file mode 100644 index ca8b45ede0..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DataStore.qml.tpl +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2023 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only - -pragma Singleton -import QtQuick 6.5 -import QtQuick.Studio.Utils 1.0 - -JsonListModel { - id: models - source: Qt.resolvedUrl("models.json") - - property ChildListModel book: ChildListModel { - modelName: "book" - } - - property JsonData backend: JsonData {} -} diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DirectoryFontLoader.qml.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DirectoryFontLoader.qml.tpl index 677fe05428..56ecc9f2f8 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DirectoryFontLoader.qml.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DirectoryFontLoader.qml.tpl @@ -7,7 +7,7 @@ import Qt.labs.folderlistmodel %{QtQuickVersion} QtObject { id: loader - property url fontDirectory: Qt.resolvedUrl("../../content/" + relativeFontDirectory) + property url fontDirectory: Qt.resolvedUrl("../../%{ContentDir}/" + relativeFontDirectory) property string relativeFontDirectory: "fonts" function loadFont(url) { diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/models.json.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/models.json.tpl deleted file mode 100644 index ca9c173651..0000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/models.json.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{ - "book": { - "columns": [ - { - "name": "author", - "type": "String" - }, - { - "name": "category", - "type": "String" - }, - { - "name": "isbn", - "type": "String" - }, - { - "name": "price", - "type": "Real" - }, - { - "name": "title", - "type": "String" - } - ], - "data": [ - [ - "Nigel Rees", - "reference", - "", - 8.95, - "Sayings of the Century" - ], - [ - "Evelyn Waugh", - "fiction", - "", - 12.99, - "Sword of Honor" - ], - [ - "Herman Melville", - "fiction", - "0-553-21311-3", - 8.99, - "Moby Dick" - ], - [ - "J. R. R. Tolkien", - "fiction", - "0-395-19395-8", - 22.99, - "The Lord of the Rings" - ] - ] - } -} diff --git a/share/qtcreator/qmldesigner/toolbar/Main.qml b/share/qtcreator/qmldesigner/toolbar/Main.qml index 7235028df6..88a9bd744a 100644 --- a/share/qtcreator/qmldesigner/toolbar/Main.qml +++ b/share/qtcreator/qmldesigner/toolbar/Main.qml @@ -190,6 +190,26 @@ Rectangle { onActivated: backend.openFileByIndex(index) } + Text { + parent:currentFile.contentItem + visible: backend.isDocumentDirty + + anchors.right: parent.right + anchors.rightMargin: parent.width - metric.textWidth - 18 + color: StudioTheme.Values.themeTextColor + text: StudioTheme.Constants.wildcard + font.family: StudioTheme.Constants.iconFont.family + font.pixelSize: StudioTheme.Values.smallIconFont + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: -4 + + FontMetrics { + id: metric + font: currentFile.font + property int textWidth: metric.boundingRect(currentFile.currentText).width + } + } + ToolbarButton { id: backButton anchors.verticalCenter: parent.verticalCenter diff --git a/share/qtcreator/qmldesigner/welcomepage/MainGridStack.qml b/share/qtcreator/qmldesigner/welcomepage/MainGridStack.qml index 73b023bddc..555596223b 100644 --- a/share/qtcreator/qmldesigner/welcomepage/MainGridStack.qml +++ b/share/qtcreator/qmldesigner/welcomepage/MainGridStack.qml @@ -88,7 +88,17 @@ Item { Layout.fillWidth: true Layout.fillHeight: true hover: hoverHandler.hovered - model: ExamplesModel { id: examplesModel} + + Component.onCompleted: { + // remove items with old versions from the examples model + for (let i = examplesModel.count - 1; i >= 0; --i) { + if (!projectModel.exampleVersionOk(examplesModel.get(i).minQDSVersion)) + examplesModel.remove(i) + } + } + + model: ExamplesModelV2 { id: examplesModel } + delegate: ThumbnailDelegate { type: ThumbnailDelegate.Type.Example downloadable: showDownload |