From d8b2673ad1504603dbd73752ee87a22f97d507fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sivert=20Kr=C3=B8vel?= Date: Tue, 24 Jan 2023 14:56:59 +0100 Subject: [PATCH] McuSupport: Update qmlproject wizard to stable API Updating the New project-wizard for qmlproject based projects to use the stable API as released in Qt for MCUs 2.4. Task-number: QTCREATORBUG-27721 Change-Id: Ie97d6478135022c1733927c98a3c7f729dc0bb52 Reviewed-by: Alessandro Portale --- src/plugins/mcusupport/mcusupport.qrc | 5 + .../wizards/application/wizard.json | 8 +- .../wizards/qmlproject/BackendObject.h | 18 ++ .../wizards/qmlproject/CMakeLists.txt | 3 +- .../wizards/qmlproject/DejaVuSansMono.ttf | Bin 0 -> 27208 bytes .../mcusupport/wizards/qmlproject/LICENSE | 187 ++++++++++++++++++ .../wizards/qmlproject/component.qml.tpl | 27 ++- .../wizards/qmlproject/main.qml.tpl | 20 +- .../wizards/qmlproject/main_big.qml.tpl | 30 +++ .../wizards/qmlproject/module.qmlproject.tpl | 4 + .../wizards/qmlproject/project.qmlproject.tpl | 121 ++++-------- .../wizards/qmlproject/translation.nb_NO.ts | 12 ++ .../mcusupport/wizards/qmlproject/wizard.json | 39 +++- 13 files changed, 375 insertions(+), 99 deletions(-) create mode 100644 src/plugins/mcusupport/wizards/qmlproject/BackendObject.h create mode 100644 src/plugins/mcusupport/wizards/qmlproject/DejaVuSansMono.ttf create mode 100644 src/plugins/mcusupport/wizards/qmlproject/LICENSE create mode 100644 src/plugins/mcusupport/wizards/qmlproject/main_big.qml.tpl create mode 100644 src/plugins/mcusupport/wizards/qmlproject/translation.nb_NO.ts 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.tpl wizards/application/wizard.json wizards/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.tpl wizards/qmlproject/main.qml.tpl wizards/qmlproject/project.qmlproject.tpl wizards/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 0000000000000000000000000000000000000000..57d2c68412e457bf3f1efa8124c53bab94ab9c3a GIT binary patch literal 27208 zcmZQzWME(rW@KPsVK8uW3-PT`T(+HoAxnjUfkDRI#np{LouP?=A>$4M1B0Ao-DfdMSez;Y2J0+oYMHDHk%1}g?uumBUoCWa#n-3$y&!VHJOB8)5-87DBX zGO(~3v(98-V3dQ<%-0#xn1mP@n7G+EnK@XPm{^`MsQtgh@bfnl1A_)gXF!^33WEa! zuj(H*k$)l#3>=}%>In>t_wU~a$uhlRZ~@UQ7a2hAVqm$*#KLlsF^J_N0~5R%SDDXmWvFnEEgHR zv0P-B!E%wI6DrmZ74K%b$k5Dkk)a-<9;6p!1{{B3xyT^Ra*;t5YCcFk$c&>b7a3sY zgZL*|E;8go&A-laks*xbA_GWmDa%C$kXjH8vJ)hx&vKDrGQ|C0{|Q0OpTlyI@jS$R zj8QBX89X5VXB3CJ^&rbdhQllu8LFWe#s<-wSS~W`V!6ohhUFr|0;pR+;vlzy!mE?z zB4ZZIMTVPrnUok9 z7(wwZ$iToT$iTpGhJk_6oq>TN8loN={xI_yApQdT?J~81p@7+Kp4z}5{wKC%q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(K?p4Ul zOUp0H1se&fV)IH8lS`~%&4m($bWlhsq~w<<Ms1q}LV<9rNw=TP;_GqW@GGxJhXEA$F73iP36GI*T>^rne_VhmAWJ~~mu zz`zLF;Kj_q!obSF#=y?N!NAGD#lX$L!@$eH$H31Zz#zyV#30Nd!XU~Z#vslh!63;X z#URZf!ywBb#~{z3z@W&W#GuTe!l25a#-Pri!Jx^Y#h}fg!=THc$Dq$(z+lK=1fI1v zWiVqfXRu(fWUykeX0TzfWw2wgXK-Ku^(URd<40}`piu}<1}_G01|J4r@CZTxLm)#C z18Afnlp%~EoFRfCk|ByAnjwZEmLZNIo*{uDk&%Uwm5~j+IG>Y|i;4GauiAhe?alm_#S3=F`0 zBLf4lIwJ!EBal33K?0OEfzqZ>+6+pYLum^rZ3(3vA+#aXTth>yw9NF8h>M|up^bq#xw0sS zK_tB>HJd>#C$S`t!H9v2fiXD9Nr8cjf#Lsuuvsi1O;EN81BYj@uL6UKH<0D}aB0)qnh zt{^SYDTLs71-TT2LB~3P;+c_wnSp~rh(Qjlj}fdIw9XBD#tO)l;Pso#49s8|kWMZJ w8wNWRf69UV3EBh90CpMVnkJB6ky&8F!0u$YqB3I_h>LQ+5o6@^Hai9e08;RvX8-^I literal 0 HcmV?d00001 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 }, {