forked from qt-creator/qt-creator
QmlDesigner: Add wizard data for models and backend json data
Added the new files to all wizards, since the change of the qmldir file otherwise breaks the wizard. Adding json files to qmlproject for cmake generation. New files have to be added to cmakefiles.txt. Change-Id: If00eb4507b6f1364ce3cfa00db39632635febd09 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -367,14 +367,6 @@
|
||||
"source": "../shared-plugin/name/Constants.qml.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.json.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.json"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.qml.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml"
|
||||
@@ -390,6 +382,22 @@
|
||||
{
|
||||
"source": "../shared-plugin/name/designer/plugin.metainfo",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/JsonData.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/JsonData.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/models.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/models.json"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/data.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/data.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -380,14 +380,6 @@
|
||||
"source": "../shared-plugin/name/Constants.qml.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.json.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.json"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.qml.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml"
|
||||
@@ -403,6 +395,22 @@
|
||||
{
|
||||
"source": "../shared-plugin/name/designer/plugin.metainfo",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/JsonData.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/JsonData.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/models.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/models.json"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/data.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/data.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -63,6 +63,10 @@ Project {
|
||||
filter: "*.qsb"
|
||||
}
|
||||
|
||||
Files {
|
||||
filter: "*.json"
|
||||
}
|
||||
|
||||
Files {
|
||||
filter: "*.mesh"
|
||||
directory: "asset_imports"
|
||||
|
@@ -367,14 +367,6 @@
|
||||
"source": "../shared-plugin/name/Constants.qml.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.json.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.json"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.qml.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml"
|
||||
@@ -390,6 +382,22 @@
|
||||
{
|
||||
"source": "../shared-plugin/name/designer/plugin.metainfo",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/JsonData.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/JsonData.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/models.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/models.json"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/data.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/data.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -341,6 +341,22 @@
|
||||
{
|
||||
"source": "../shared-plugin/name/designer/plugin.metainfo",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/JsonData.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/JsonData.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/models.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/models.json"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/data.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/data.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -343,6 +343,22 @@
|
||||
{
|
||||
"source": "../shared-plugin/name/designer/plugin.metainfo",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/JsonData.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/JsonData.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/models.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/models.json"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/data.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/data.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -343,6 +343,22 @@
|
||||
{
|
||||
"source": "../shared-plugin/name/designer/plugin.metainfo",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/JsonData.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/JsonData.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/models.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/models.json"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/data.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/data.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,10 +11,14 @@ qt6_add_qml_module(%{ImportModuleName}
|
||||
URI "%{ImportModuleName}"
|
||||
VERSION 1.0
|
||||
RESOURCE_PREFIX "/qt/qml"
|
||||
QML_FILES
|
||||
QML_FILES
|
||||
Constants.qml
|
||||
DataStore.qml
|
||||
DirectoryFontLoader.qml
|
||||
EventListModel.qml
|
||||
EventListSimulator.qml
|
||||
JsonData.qml
|
||||
RESOURCES
|
||||
data.json
|
||||
models.json
|
||||
)
|
||||
|
@@ -0,0 +1,15 @@
|
||||
pragma Singleton
|
||||
import QtQuick 6.5
|
||||
import QtQuick.Studio.Utils 1.0
|
||||
|
||||
JsonListModel {
|
||||
id: models
|
||||
source: Qt.resolvedUrl("models.json")
|
||||
|
||||
property ChildListModel exampleModel: ChildListModel {
|
||||
modelName: "exampleModel"
|
||||
}
|
||||
|
||||
property JsonData backend: JsonData {}
|
||||
}
|
||||
|
@@ -0,0 +1,9 @@
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Studio.Utils 1.0
|
||||
|
||||
JsonBackend {
|
||||
property string name: "someName"
|
||||
property int number: 1
|
||||
source: Qt.resolvedUrl("data.json")
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "Christen Anderson",
|
||||
"number": "+3455641"
|
||||
}
|
@@ -4,3 +4,4 @@ singleton Constants 1.0 Constants.qml
|
||||
EventListSimulator 1.0 EventListSimulator.qml
|
||||
EventListModel 1.0 EventListModel.qml
|
||||
DirectoryFontLoader 1.0 DirectoryFontLoader.qml
|
||||
singleton DataStore 1.0 DataStore.qml
|
||||
|
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"exampleModel": [
|
||||
{
|
||||
"name": "Christen Anderson",
|
||||
"number": "+3455641"
|
||||
},
|
||||
{
|
||||
"name": "Armanda Cox",
|
||||
"number": "+21155641"
|
||||
},
|
||||
{
|
||||
"name": "Ken Garza",
|
||||
"number": "+3288642"
|
||||
},
|
||||
{
|
||||
"name": "Rodney Hamilton",
|
||||
"number": "+3558848"
|
||||
},
|
||||
{
|
||||
"name": "Andrew Battles",
|
||||
"number": "+42488649"
|
||||
}
|
||||
]
|
||||
}
|
@@ -3,3 +3,4 @@ singleton DataStore 1.0 DataStore.qml
|
||||
EventListModel 1.0 EventListModel.qml
|
||||
EventListSimulator 1.0 EventListSimulator.qml
|
||||
DirectoryFontLoader 1.0 DirectoryFontLoader.qml
|
||||
singleton DataStore 1.0 DataStore.qml
|
||||
|
@@ -242,16 +242,6 @@
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml",
|
||||
"condition": "%{QdsProjectStyle}"
|
||||
},
|
||||
{
|
||||
"source": "%{QdsWizardPath}/shared-plugin/name/DataStore.json.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.json",
|
||||
"condition": "%{QdsProjectStyle}"
|
||||
},
|
||||
{
|
||||
"source": "%{QdsWizardPath}/shared-plugin/name/DataStore.qml.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.qml",
|
||||
"condition": "%{QdsProjectStyle}"
|
||||
},
|
||||
{
|
||||
"source": "%{QdsWizardPath}/shared-plugin/name/DirectoryFontLoader.qml.tpl",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml",
|
||||
@@ -271,6 +261,22 @@
|
||||
"source": "%{QdsWizardPath}/shared-plugin/name/designer/plugin.metainfo",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo",
|
||||
"condition": "%{QdsProjectStyle}"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/JsonData.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/JsonData.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/DataStore.qml",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DataStore.qml"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/models.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/models.json"
|
||||
},
|
||||
{
|
||||
"source": "../shared-plugin/name/data.json",
|
||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/data.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user