forked from qt-creator/qt-creator
QmlDesigner: Adapt wizards to the new project structure
and removed some unused templates Change-Id: I7e3e4a94ef31cbf5c98a0c1ad26dcaaa340c1e97 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
e8a47b1b8a
commit
4ee7b297ce
@@ -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": "GeneratedComponents" },
|
||||
{ "key": "ContentDir", "value": "%{ProjectName}Content" },
|
||||
{ "key": "ImportModuleName", "value": "%{ProjectName}" },
|
||||
{ "key": "UIClassName", "value": "Screen01" },
|
||||
{ "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" },
|
||||
@@ -305,99 +307,50 @@
|
||||
"target": "%{ProjectDirectory}/%{QmlProjectFileName}",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -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": "GeneratedComponents" },
|
||||
{ "key": "ContentDir", "value": "%{ProjectName}Content" },
|
||||
{ "key": "ImportModuleName", "value": "%{ProjectName}" },
|
||||
{ "key": "UIClassName", "value": "Screen01" },
|
||||
{ "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" },
|
||||
@@ -281,99 +283,50 @@
|
||||
"target": "%{ProjectDirectory}/%{QmlProjectFileName}",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -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": "GeneratedComponents" },
|
||||
{ "key": "ContentDir", "value": "%{ProjectName}Content" },
|
||||
{ "key": "ImportModuleName", "value": "%{ProjectName}" },
|
||||
{ "key": "UIClassName", "value": "Screen01" },
|
||||
{ "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" },
|
||||
@@ -306,109 +308,49 @@
|
||||
"target": "%{ProjectDirectory}/%{QmlProjectFileName}",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -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
|
||||
)
|
@@ -1,4 +0,0 @@
|
||||
### This file is automatically generated by Qt Design Studio.
|
||||
### Do not change
|
||||
|
||||
add_subdirectory(%{ImportModuleName})
|
@@ -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")
|
@@ -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
|
||||
|
||||
|
@@ -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");
|
||||
}
|
@@ -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
|
||||
}
|
||||
}
|
@@ -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
|
@@ -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})
|
@@ -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()
|
@@ -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();
|
||||
}
|
@@ -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 {
|
||||
}
|
@@ -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.5
|
||||
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
|
||||
)
|
@@ -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}
|
||||
)
|
@@ -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
|
@@ -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": "GeneratedComponents" },
|
||||
{ "key": "ContentDir", "value": "%{ProjectName}Content" },
|
||||
{ "key": "ImportModuleName", "value": "%{ProjectName}" },
|
||||
{ "key": "UIClassName", "value": "Screen01" },
|
||||
{ "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" },
|
||||
@@ -297,98 +299,50 @@
|
||||
"target": "%{ProjectDirectory}/%{QmlProjectFileName}",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -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": "GeneratedComponents" },
|
||||
{ "key": "ContentDir", "value": "%{ProjectName}Content" },
|
||||
{ "key": "ImportModuleName", "value": "%{ProjectName}" },
|
||||
{ "key": "UIClassName", "value": "Screen01" },
|
||||
{ "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" },
|
||||
@@ -263,98 +265,50 @@
|
||||
"target": "%{ProjectDirectory}/%{QmlProjectFileName}",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -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": "GeneratedComponents" },
|
||||
{ "key": "ContentDir", "value": "%{ProjectName}Content" },
|
||||
{ "key": "ImportModuleName", "value": "%{ProjectName}" },
|
||||
{ "key": "IsQt6Project", "value": "%{JS: value('QtQuickVersion') !== '2.15' }" },
|
||||
{ "key": "QtQuickVersion", "value": "%{JS: %{TargetQtVersion}.TargetQuickVersion}" },
|
||||
@@ -260,103 +262,55 @@
|
||||
"target": "%{ProjectDirectory}/%{QmlProjectFileName}",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -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": "GeneratedComponents" },
|
||||
{ "key": "ContentDir", "value": "%{ProjectName}Content" },
|
||||
{ "key": "ImportModuleName", "value": "%{ProjectName}" },
|
||||
{ "key": "IsQt6Project", "value": "%{JS: value('QtQuickVersion') !== '2.15' }" },
|
||||
{ "key": "QtQuickVersion", "value": "%{JS: %{TargetQtVersion}.TargetQuickVersion}" },
|
||||
@@ -260,103 +262,55 @@
|
||||
"target": "%{ProjectDirectory}/%{QmlProjectFileName}",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -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 {
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user