diff --git a/src/plugins/mcusupport/mcusupport.qrc b/src/plugins/mcusupport/mcusupport.qrc
index 23934d4df40..abbfb969e3a 100644
--- a/src/plugins/mcusupport/mcusupport.qrc
+++ b/src/plugins/mcusupport/mcusupport.qrc
@@ -10,6 +10,11 @@
wizards/application/main.qml.tplwizards/application/wizard.jsonwizards/qmlproject/CMakeLists.txt
+ wizards/qmlproject/DejaVuSansMono.ttf
+ wizards/qmlproject/LICENSE
+ wizards/qmlproject/translation.nb_NO.ts
+ wizards/qmlproject/BackendObject.h
+ wizards/qmlproject/main_big.qml.tplwizards/qmlproject/main.qml.tplwizards/qmlproject/project.qmlproject.tplwizards/qmlproject/module.qmlproject.tpl
diff --git a/src/plugins/mcusupport/wizards/application/wizard.json b/src/plugins/mcusupport/wizards/application/wizard.json
index 7e1f30660d7..370b88ce74d 100644
--- a/src/plugins/mcusupport/wizards/application/wizard.json
+++ b/src/plugins/mcusupport/wizards/application/wizard.json
@@ -1,11 +1,11 @@
{
"version": 1,
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject" ],
- "id": "M.McuSupportApplication",
+ "id": "M.McuSupportCmakeApplication",
"category": "D.ApplicationMCU",
- "trDescription": "Creates a Qt for MCUs application with an empty UI.",
- "trDisplayName": "Qt for MCUs Application",
- "trDisplayCategory": "Application (Qt for MCUs)",
+ "trDescription": "Suitable for Qt for MCUs versions up to 2.3.x. Creates a Qt for MCUs application with an empty UI, based on CMake APIs that are deprecated in version 2.4.",
+ "trDisplayName": "Qt for MCUs Application (deprecated since 2.4)",
+ "trDisplayCategory": "Application (Qt for MCUs) (Versions 2.3.x and lower)",
"icon": "../icon.png",
"iconKind": "Themed",
"enabled": true,
diff --git a/src/plugins/mcusupport/wizards/qmlproject/BackendObject.h b/src/plugins/mcusupport/wizards/qmlproject/BackendObject.h
new file mode 100644
index 00000000000..9fda8633a65
--- /dev/null
+++ b/src/plugins/mcusupport/wizards/qmlproject/BackendObject.h
@@ -0,0 +1,18 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+#include
+#include
+#include
+
+struct BackendObject : public Qul::Singleton
+{
+ Qul::Property customProperty;
+ Qul::Signal customPropertyChanged;
+
+ BackendObject() : customProperty(true) {}
+ void toggle()
+ {
+ customProperty.setValue(!customProperty.value());
+ customPropertyChanged();
+ }
+};
diff --git a/src/plugins/mcusupport/wizards/qmlproject/CMakeLists.txt b/src/plugins/mcusupport/wizards/qmlproject/CMakeLists.txt
index 5374e7d2fe1..4a47af2de03 100644
--- a/src/plugins/mcusupport/wizards/qmlproject/CMakeLists.txt
+++ b/src/plugins/mcusupport/wizards/qmlproject/CMakeLists.txt
@@ -4,6 +4,5 @@ project(%{CorrectedProjectName} VERSION 0.0.1 LANGUAGES C CXX ASM)
find_package(Qul)
-qul_add_target(%{CorrectedProjectName} QML_PROJECT %{QmlProjectFile})
+qul_add_target(%{CorrectedProjectName} QML_PROJECT %{QmlProjectFile} GENERATE_ENTRYPOINT)
app_target_setup_os(%{CorrectedProjectName})
-app_target_default_entrypoint(%{CorrectedProjectName} %{RootItemName})
diff --git a/src/plugins/mcusupport/wizards/qmlproject/DejaVuSansMono.ttf b/src/plugins/mcusupport/wizards/qmlproject/DejaVuSansMono.ttf
new file mode 100644
index 00000000000..57d2c68412e
Binary files /dev/null and b/src/plugins/mcusupport/wizards/qmlproject/DejaVuSansMono.ttf differ
diff --git a/src/plugins/mcusupport/wizards/qmlproject/LICENSE b/src/plugins/mcusupport/wizards/qmlproject/LICENSE
new file mode 100644
index 00000000000..8d71958606b
--- /dev/null
+++ b/src/plugins/mcusupport/wizards/qmlproject/LICENSE
@@ -0,0 +1,187 @@
+Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
+Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below)
+
+
+Bitstream Vera Fonts Copyright
+------------------------------
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
+a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of the fonts accompanying this license ("Fonts") and associated
+documentation files (the "Font Software"), to reproduce and distribute the
+Font Software, including without limitation the rights to use, copy, merge,
+publish, distribute, and/or sell copies of the Font Software, and to permit
+persons to whom the Font Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright and trademark notices and this permission notice shall
+be included in all copies of one or more of the Font Software typefaces.
+
+The Font Software may be modified, altered, or added to, and in particular
+the designs of glyphs or characters in the Fonts may be modified and
+additional glyphs or characters may be added to the Fonts, only if the fonts
+are renamed to names not containing either the words "Bitstream" or the word
+"Vera".
+
+This License becomes null and void to the extent applicable to Fonts or Font
+Software that has been modified and is distributed under the "Bitstream
+Vera" names.
+
+The Font Software may be sold as part of a larger software package but no
+copy of one or more of the Font Software typefaces may be sold by itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
+TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
+FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
+ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
+FONT SOFTWARE.
+
+Except as contained in this notice, the names of Gnome, the Gnome
+Foundation, and Bitstream Inc., shall not be used in advertising or
+otherwise to promote the sale, use or other dealings in this Font Software
+without prior written authorization from the Gnome Foundation or Bitstream
+Inc., respectively. For further information, contact: fonts at gnome dot
+org.
+
+Arev Fonts Copyright
+------------------------------
+
+Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the fonts accompanying this license ("Fonts") and
+associated documentation files (the "Font Software"), to reproduce
+and distribute the modifications to the Bitstream Vera Font Software,
+including without limitation the rights to use, copy, merge, publish,
+distribute, and/or sell copies of the Font Software, and to permit
+persons to whom the Font Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright and trademark notices and this permission notice
+shall be included in all copies of one or more of the Font Software
+typefaces.
+
+The Font Software may be modified, altered, or added to, and in
+particular the designs of glyphs or characters in the Fonts may be
+modified and additional glyphs or characters may be added to the
+Fonts, only if the fonts are renamed to names not containing either
+the words "Tavmjong Bah" or the word "Arev".
+
+This License becomes null and void to the extent applicable to Fonts
+or Font Software that has been modified and is distributed under the
+"Tavmjong Bah Arev" names.
+
+The Font Software may be sold as part of a larger software package but
+no copy of one or more of the Font Software typefaces may be sold by
+itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
+
+Except as contained in this notice, the name of Tavmjong Bah shall not
+be used in advertising or otherwise to promote the sale, use or other
+dealings in this Font Software without prior written authorization
+from Tavmjong Bah. For further information, contact: tavmjong @ free
+. fr.
+
+TeX Gyre DJV Math
+-----------------
+Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
+
+Math extensions done by B. Jackowski, P. Strzelczyk and P. Pianowski
+(on behalf of TeX users groups) are in public domain.
+
+Letters imported from Euler Fraktur from AMSfonts are (c) American
+Mathematical Society (see below).
+Bitstream Vera Fonts Copyright
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera
+is a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of the fonts accompanying this license (“Fonts”) and associated
+documentation
+files (the “Font Software”), to reproduce and distribute the Font Software,
+including without limitation the rights to use, copy, merge, publish,
+distribute,
+and/or sell copies of the Font Software, and to permit persons to whom
+the Font Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright and trademark notices and this permission notice
+shall be
+included in all copies of one or more of the Font Software typefaces.
+
+The Font Software may be modified, altered, or added to, and in particular
+the designs of glyphs or characters in the Fonts may be modified and
+additional
+glyphs or characters may be added to the Fonts, only if the fonts are
+renamed
+to names not containing either the words “Bitstream” or the word “Vera”.
+
+This License becomes null and void to the extent applicable to Fonts or
+Font Software
+that has been modified and is distributed under the “Bitstream Vera”
+names.
+
+The Font Software may be sold as part of a larger software package but
+no copy
+of one or more of the Font Software typefaces may be sold by itself.
+
+THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
+TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
+FOUNDATION
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL,
+SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN
+ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
+INABILITY TO USE
+THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
+Except as contained in this notice, the names of GNOME, the GNOME
+Foundation,
+and Bitstream Inc., shall not be used in advertising or otherwise to promote
+the sale, use or other dealings in this Font Software without prior written
+authorization from the GNOME Foundation or Bitstream Inc., respectively.
+For further information, contact: fonts at gnome dot org.
+
+AMSFonts (v. 2.2) copyright
+
+The PostScript Type 1 implementation of the AMSFonts produced by and
+previously distributed by Blue Sky Research and Y&Y, Inc. are now freely
+available for general use. This has been accomplished through the
+cooperation
+of a consortium of scientific publishers with Blue Sky Research and Y&Y.
+Members of this consortium include:
+
+Elsevier Science IBM Corporation Society for Industrial and Applied
+Mathematics (SIAM) Springer-Verlag American Mathematical Society (AMS)
+
+In order to assure the authenticity of these fonts, copyright will be
+held by
+the American Mathematical Society. This is not meant to restrict in any way
+the legitimate use of the fonts, such as (but not limited to) electronic
+distribution of documents containing these fonts, inclusion of these fonts
+into other public domain or commercial font collections or computer
+applications, use of the outline data to create derivative fonts and/or
+faces, etc. However, the AMS does require that the AMS copyright notice be
+removed from any derivative versions of the fonts which have been altered in
+any way. In addition, to ensure the fidelity of TeX documents using Computer
+Modern fonts, Professor Donald Knuth, creator of the Computer Modern faces,
+has requested that any alterations which yield different font metrics be
+given a different name.
+
+$Id$
diff --git a/src/plugins/mcusupport/wizards/qmlproject/component.qml.tpl b/src/plugins/mcusupport/wizards/qmlproject/component.qml.tpl
index 15219a2fa12..f475661d60f 100644
--- a/src/plugins/mcusupport/wizards/qmlproject/component.qml.tpl
+++ b/src/plugins/mcusupport/wizards/qmlproject/component.qml.tpl
@@ -1,7 +1,26 @@
import QtQuick 2.0
+import QtQuick.Templates 2.15
-Text {
- color: "salmon"
- text: "Hello World!"
- font.pixelSize: 30
+Button {
+ id: btn
+
+ implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
+ implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
+
+ leftPadding: 28
+ topPadding: 20
+ rightPadding: 28
+ bottomPadding: 20
+
+ contentItem: Text {
+ text: btn.text
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ background: Rectangle {
+ color: "green"
+ opacity: btn.down ? 0.8 : 1
+ radius: 4
+ }
}
diff --git a/src/plugins/mcusupport/wizards/qmlproject/main.qml.tpl b/src/plugins/mcusupport/wizards/qmlproject/main.qml.tpl
index 183a9b91745..44f4788740c 100644
--- a/src/plugins/mcusupport/wizards/qmlproject/main.qml.tpl
+++ b/src/plugins/mcusupport/wizards/qmlproject/main.qml.tpl
@@ -2,7 +2,23 @@ import QtQuick 2.0
import CustomModule
Rectangle {
- CustomComponent {
- anchors.centerIn: parent
+
+ Row {
+ Image {
+ anchors.centerIn: parent
+ source: "assets/icon.png"
+ }
+ Text {
+ anchors.centerIn: parent
+ text: " for MCUs"
+ }
}
+
+ CustomButton {
+ anchors.centerIn: parent
+ text: qsTr("Hello world!")
+ onClicked: BackendObject.toggle()
+ }
+
+ BackendObject.onCustomPropertyChanged: Qt.uiLanguage = BackendObject.customProperty ? "en_US" : "nb_NO"
}
diff --git a/src/plugins/mcusupport/wizards/qmlproject/main_big.qml.tpl b/src/plugins/mcusupport/wizards/qmlproject/main_big.qml.tpl
new file mode 100644
index 00000000000..60f77144499
--- /dev/null
+++ b/src/plugins/mcusupport/wizards/qmlproject/main_big.qml.tpl
@@ -0,0 +1,30 @@
+import QtQuick 2.0
+import CustomModule
+
+Rectangle {
+ // Component.onCompleted: Qt.uiLanguage = "nb_NO" // Uncomment to change the UI language //TODO: Is this the "official" method of setting ui language?
+
+ Row {
+ visible: CustomObject.customProperty
+ Image {
+ anchors.centerIn: parent
+ id: icon
+ source: "assets/icon.png"
+ }
+ Text {
+ anchors.centerIn: parent
+ font.pixelSize: 28
+ id: title
+ text: " for MCUs"
+ }
+ }
+
+ CustomComponent {
+ anchors.centerIn: parent
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: CustomObject.toggle()
+ }
+}
diff --git a/src/plugins/mcusupport/wizards/qmlproject/module.qmlproject.tpl b/src/plugins/mcusupport/wizards/qmlproject/module.qmlproject.tpl
index 11e04b8325d..27621552c00 100644
--- a/src/plugins/mcusupport/wizards/qmlproject/module.qmlproject.tpl
+++ b/src/plugins/mcusupport/wizards/qmlproject/module.qmlproject.tpl
@@ -9,4 +9,8 @@ Project {
QmlFiles {
files: ["%{QmlComponent}"]
}
+
+ ModuleFiles {
+ MCU.qulModules: ["Qul::ControlsTemplates"]
+ }
}
diff --git a/src/plugins/mcusupport/wizards/qmlproject/project.qmlproject.tpl b/src/plugins/mcusupport/wizards/qmlproject/project.qmlproject.tpl
index d799190038a..71a1db1e167 100644
--- a/src/plugins/mcusupport/wizards/qmlproject/project.qmlproject.tpl
+++ b/src/plugins/mcusupport/wizards/qmlproject/project.qmlproject.tpl
@@ -1,64 +1,48 @@
import QmlProject 1.3
Project {
- // importPaths: ["."] // optional extra import paths
- // projectRootPath: "." // optional root path relative to qmlproject file path
+ qtForMCUs: true // Required by QDS to enable/disable features Supported/Unsupported by QtMCUs projects. Currently ignored by qmlprojectexporter.
+ // importPaths: ["imports/CustomModule"] // Alternative API for importing modules.
+ // projectRootPath: "." // Optional root path relative to qmlproject file path.
+ mainFile: "%{MainQmlFile}" // Required to determin which qml file is the application entrypoint, when no custom c++ entrypoint is specified.
/* Global configuration */
MCU.Config {
controlsStyle: "QtQuick.Controls.StyleDefault"
debugBytecode: false
debugLineDirectives: false
- binaryAssetOptions: "Automatic"
- // platformImageAlignment: 1 // undefined by default
- platformPixelWidthAlignment: 1
- platformAlphaPixelFormat: "ARGB8888"
- platformOpaquePixelFormat: "XRGB8888"
- platformAlphaCompressedLosslessResourcePixelFormat: "ARGB8888RLE"
- platformOpaqueCompressedLosslessResourcePixelFormat: "RGB888RLE"
- // maxResourceCacheSize: 102400 // undefined by default
- // global defaults for image properties
- resourceAlphaOptions: "ForTransformations"
- resourceRlePremultipliedAlpha: true
+ // maxResourceCacheSize: 0 // Set to 0 by default. Required for OnDemand resource cache policy and resource compression.
+
+ // Global settings for image properties. Can be overridden for selected resources in ImageFiles nodes.
resourceImagePixelFormat: "Automatic"
- resourceCachePolicy: "OnStartup"
+ resourceCachePolicy: "NoCaching"
resourceCompression: false
- resourceStorageSection: "QulResourceData"
- resourceRuntimeAllocationType: 3
- resourceOptimizeForRotation: false
- resourceOptimizeForScale: false
- // default font engine selection
- fontEngine: "Static" // alternative option: "Spark"
+ // Font engine selection
+ fontEngine: "Static" // alternative option: "Spark".
- // font defaults for both engines
- defaultFontFamily: "DejaVu Sans"
+ // Font defaults for both engines
+ defaultFontFamily: "DejaVu Sans Mono"
defaultFontQuality: "VeryHigh"
- glyphsCachePolicy: "OnStartup"
- glyphsStorageSection: "QulFontResourceData"
- glyphsRuntimeAllocationType: 3
+ glyphsCachePolicy: "NoCaching"
+ maxParagraphSize: 100
- // font defaults for "Static"
+ // Font properties for "Static"
+ addDefaultFonts: false // Set to true to add the default fonts to your project.
autoGenerateGlyphs: true
- complexTextRendering: true
- fontFilesCachePolicy: "OnStartup"
- fontFilesStorageSection: "QulFontResourceData"
- fontFilesRuntimeAllocationType: 3
- // font properties for "Spark"
- fontCachePriming: true
- fontCacheSize: 104800
- fontHeapSize: -1
+ // Font properties for "Spark"
+ // These properties are in effect only if the "Spark" font engine is used
+ complexTextRendering: true // Set this to false if complex scripts are not needed (Arabic scripts, Indic scripts, etc.)
+ fontCachePriming: false // Set to true to decrease application startup time. Only applies to fonts configured with unicode ranges (font.unicodeCoverage).
+ fontCacheSize: 0 // If this is needed, use a suitable number. Setting this to a sensible value will improve performance, the global default is 104800.
+ fontHeapSize: -1 // Set to sufficient value to improve performance. -1 means no restrictions to heap allocation.
fontHeapPrealloc: true
fontCachePrealloc: true
- fontVectorOutlinesDrawing: false
- maxParagraphSize: 100
}
/* QML files */
- // optional root property for adding one single qml file
- // mainFile: "%{MainQmlFile}"
QmlFiles {
files: ["%{MainQmlFile}"]
MCU.copyQmlFiles: false
@@ -66,25 +50,29 @@ Project {
/* Images */
ImageFiles {
- // files: [""] // uncomment and add image files
- MCU.base: "images" // example base "images".
- MCU.prefix: "pics" // example prefix "pics".
+ files: ["images/icon.png"]
+ MCU.base: "images"
+ MCU.prefix: "assets"
- MCU.resourceAlphaOptions: "ForTransformations"
- MCU.resourceRlePremultipliedAlpha: true
- MCU.resourceImagePixelFormat: "Automatic"
- MCU.resourceCachePolicy: "OnStartup"
MCU.resourceCompression: false
- MCU.resourceStorageSection: "QulResourceData"
- MCU.resourceRuntimeAllocationType: 3
+ MCU.resourceImagePixelFormat: "Automatic"
MCU.resourceOptimizeForRotation: false
MCU.resourceOptimizeForScale: false
+
+ // Uncomment to override the default values for images in this node
+ // MCU.resourceCachePolicy: "NoCaching" // Uncomment to override the default cache policy for these images.
+ // MCU.resourceStorageSection: "QulResourceData" // Uncomment to override the default storage section for these images
+
+ // Uncomment the following properties as needed when adding image files for an animated sprite:
+ // MCU.resourceAnimatedSprite: true
+ // MCU.resourceAnimatedSpriteFrameWidth: 180
+ // MCU.resourceAnimatedSpriteFrameHeight: 160
}
/* Modules */
ModuleFiles {
- files: ["%{ModuleFile}"]
- // qulModules: [ // Uncomment for adding Qul modules
+ files: ["imports/CustomModule/%{ModuleFile}"]
+ // MCU.qulModules: [ // Uncomment for adding Qul modules
// "Qul::Controls",
// "Qul::ControlsTemplates",
// "Qul::Shapes",
@@ -94,46 +82,17 @@ Project {
/* Interfaces */
InterfaceFiles {
- // files: [""] // uncomment for adding header files
+ files: ["src/%{InterfaceFile}"]
MCU.qmlImports: ["QtQuick"]
}
/* Translations */
TranslationFiles {
- // files: [""] // Uncomment for adding translation files with .ts extension
+ files: ["translations/%{TsFile}"]
MCU.omitSourceLanguage: false
}
FontFiles {
- // files: [""] // Uncomment for adding font files (.ttf, .otf, .pfa, .ttc, .pfb)
- MCU.addDefaultFonts: true
- }
-
- FontConfiguration {
- // font engine selection overriddes default
- MCU.fontEngine: "Static" // or "Spark"
-
- // properties shared between both engines
- MCU.defaultFontFamily: "DejaVu Sans"
- MCU.defaultFontQuality: "VeryHigh"
- MCU.glyphsCachePolicy: "OnStartup"
- MCU.glyphsStorageSection: "QulFontResourceData"
- MCU.glyphsRuntimeAllocationType: 3
-
- // properties for Static engine
- MCU.autoGenerateGlyphs: true
- MCU.complexTextRendering: true
- MCU.fontFilesCachePolicy: "OnStartup"
- MCU.fontFilesStorageSection: "QulFontResourceData"
- MCU.fontFilesRuntimeAllocationType: 3
-
- // monotype for Spark engine
- MCU.fontCachePriming: true
- MCU.fontCacheSize: 104800
- MCU.fontHeapSize: -1
- MCU.fontHeapPrealloc: true
- MCU.fontCachePrealloc: true
- MCU.fontVectorOutlinesDrawing: false
- MCU.maxParagraphSize: 100
+ files: ["fonts/DejaVuSansMono.ttf"]
}
}
diff --git a/src/plugins/mcusupport/wizards/qmlproject/translation.nb_NO.ts b/src/plugins/mcusupport/wizards/qmlproject/translation.nb_NO.ts
new file mode 100644
index 00000000000..2cd70a44edd
--- /dev/null
+++ b/src/plugins/mcusupport/wizards/qmlproject/translation.nb_NO.ts
@@ -0,0 +1,12 @@
+
+
+
+
+ %{CorrectedProjectName}
+
+
+ Hello world!
+ Hallo verden!
+
+
+
diff --git a/src/plugins/mcusupport/wizards/qmlproject/wizard.json b/src/plugins/mcusupport/wizards/qmlproject/wizard.json
index 5b433358c98..0dd565d731e 100644
--- a/src/plugins/mcusupport/wizards/qmlproject/wizard.json
+++ b/src/plugins/mcusupport/wizards/qmlproject/wizard.json
@@ -1,10 +1,10 @@
{
"version": 1,
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject" ],
- "id": "M.McuSupportQmlprojectApplication",
+ "id": "M.McuSupportApplication",
"category": "D.ApplicationMCU",
- "trDescription": "Creates a Qt for MCUs application with an empty UI, based on qmlproject (Technical Preview).",
- "trDisplayName": "Qt for MCUs QmlProject Application (Technical Preview)",
+ "trDescription": "Suitable for Qt for MCUs versions 2.4 and later. Creates a Qt for MCUs application with a simple UI, based on qmlproject.",
+ "trDisplayName": "Qt for MCUs Application",
"trDisplayCategory": "QmlProject Application (Qt for MCUs)",
"icon": "../icon.png",
"iconKind": "Themed",
@@ -18,7 +18,9 @@
{ "key": "RootItemName", "value": "%{CorrectedProjectName}" },
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
{ "key": "ModuleFile", "value": "CustomModule.qmlproject"},
- { "key": "QmlComponent", "value": "CustomComponent.qml"}
+ { "key": "QmlComponent", "value": "CustomButton.qml"},
+ { "key": "InterfaceFile", "value": "BackendObject.h"},
+ { "key": "TsFile", "value": "%{CorrectedProjectName}.nb_NO.ts"}
],
"pages":
@@ -65,12 +67,37 @@
},
{
"source": "component.qml.tpl",
- "target": "%{ProjectDirectory}/%{QmlComponent}",
+ "target": "%{ProjectDirectory}/imports/CustomModule/%{QmlComponent}",
"openInEditor": true
},
{
"source": "module.qmlproject.tpl",
- "target": "%{ProjectDirectory}/%{ModuleFile}",
+ "target": "%{ProjectDirectory}/imports/CustomModule/%{ModuleFile}",
+ "openInEditor": true
+ },
+ {
+ "source": "BackendObject.h",
+ "target": "%{ProjectDirectory}/src/%{InterfaceFile}",
+ "openInEditor": true
+ },
+ {
+ "source": "../icon.png",
+ "target": "%{ProjectDirectory}/images/icon.png",
+ "isBinary": true
+ },
+ {
+ "source": "DejaVuSansMono.ttf",
+ "target": "%{ProjectDirectory}/fonts/DejaVuSansMono.ttf",
+ "isBinary": true
+ },
+ {
+ "source": "LICENSE",
+ "target": "%{ProjectDirectory}/fonts/LICENSE",
+ "isBinary": true
+ },
+ {
+ "source": "translation.nb_NO.ts",
+ "target": "%{ProjectDirectory}/translations/%{TsFile}",
"openInEditor": true
},
{