forked from qt-creator/qt-creator
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 <alessandro.portale@qt.io>
This commit is contained in:
committed by
Yasser Grimes
parent
c31522731c
commit
d8b2673ad1
@@ -10,6 +10,11 @@
|
|||||||
<file>wizards/application/main.qml.tpl</file>
|
<file>wizards/application/main.qml.tpl</file>
|
||||||
<file>wizards/application/wizard.json</file>
|
<file>wizards/application/wizard.json</file>
|
||||||
<file>wizards/qmlproject/CMakeLists.txt</file>
|
<file>wizards/qmlproject/CMakeLists.txt</file>
|
||||||
|
<file>wizards/qmlproject/DejaVuSansMono.ttf</file>
|
||||||
|
<file>wizards/qmlproject/LICENSE</file>
|
||||||
|
<file>wizards/qmlproject/translation.nb_NO.ts</file>
|
||||||
|
<file>wizards/qmlproject/BackendObject.h</file>
|
||||||
|
<file>wizards/qmlproject/main_big.qml.tpl</file>
|
||||||
<file>wizards/qmlproject/main.qml.tpl</file>
|
<file>wizards/qmlproject/main.qml.tpl</file>
|
||||||
<file>wizards/qmlproject/project.qmlproject.tpl</file>
|
<file>wizards/qmlproject/project.qmlproject.tpl</file>
|
||||||
<file>wizards/qmlproject/module.qmlproject.tpl</file>
|
<file>wizards/qmlproject/module.qmlproject.tpl</file>
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject" ],
|
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject" ],
|
||||||
"id": "M.McuSupportApplication",
|
"id": "M.McuSupportCmakeApplication",
|
||||||
"category": "D.ApplicationMCU",
|
"category": "D.ApplicationMCU",
|
||||||
"trDescription": "Creates a Qt for MCUs application with an empty UI.",
|
"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",
|
"trDisplayName": "Qt for MCUs Application (deprecated since 2.4)",
|
||||||
"trDisplayCategory": "Application (Qt for MCUs)",
|
"trDisplayCategory": "Application (Qt for MCUs) (Versions 2.3.x and lower)",
|
||||||
"icon": "../icon.png",
|
"icon": "../icon.png",
|
||||||
"iconKind": "Themed",
|
"iconKind": "Themed",
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
18
src/plugins/mcusupport/wizards/qmlproject/BackendObject.h
Normal file
18
src/plugins/mcusupport/wizards/qmlproject/BackendObject.h
Normal file
@@ -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 <qul/singleton.h>
|
||||||
|
#include <qul/property.h>
|
||||||
|
#include <qul/signal.h>
|
||||||
|
|
||||||
|
struct BackendObject : public Qul::Singleton<BackendObject>
|
||||||
|
{
|
||||||
|
Qul::Property<bool> customProperty;
|
||||||
|
Qul::Signal<void()> customPropertyChanged;
|
||||||
|
|
||||||
|
BackendObject() : customProperty(true) {}
|
||||||
|
void toggle()
|
||||||
|
{
|
||||||
|
customProperty.setValue(!customProperty.value());
|
||||||
|
customPropertyChanged();
|
||||||
|
}
|
||||||
|
};
|
@@ -4,6 +4,5 @@ project(%{CorrectedProjectName} VERSION 0.0.1 LANGUAGES C CXX ASM)
|
|||||||
|
|
||||||
find_package(Qul)
|
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_setup_os(%{CorrectedProjectName})
|
||||||
app_target_default_entrypoint(%{CorrectedProjectName} %{RootItemName})
|
|
||||||
|
BIN
src/plugins/mcusupport/wizards/qmlproject/DejaVuSansMono.ttf
Normal file
BIN
src/plugins/mcusupport/wizards/qmlproject/DejaVuSansMono.ttf
Normal file
Binary file not shown.
187
src/plugins/mcusupport/wizards/qmlproject/LICENSE
Normal file
187
src/plugins/mcusupport/wizards/qmlproject/LICENSE
Normal file
@@ -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$
|
@@ -1,7 +1,26 @@
|
|||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Templates 2.15
|
||||||
|
|
||||||
Text {
|
Button {
|
||||||
color: "salmon"
|
id: btn
|
||||||
text: "Hello World!"
|
|
||||||
font.pixelSize: 30
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,23 @@ import QtQuick 2.0
|
|||||||
import CustomModule
|
import CustomModule
|
||||||
|
|
||||||
Rectangle {
|
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"
|
||||||
}
|
}
|
||||||
|
30
src/plugins/mcusupport/wizards/qmlproject/main_big.qml.tpl
Normal file
30
src/plugins/mcusupport/wizards/qmlproject/main_big.qml.tpl
Normal file
@@ -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()
|
||||||
|
}
|
||||||
|
}
|
@@ -9,4 +9,8 @@ Project {
|
|||||||
QmlFiles {
|
QmlFiles {
|
||||||
files: ["%{QmlComponent}"]
|
files: ["%{QmlComponent}"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ModuleFiles {
|
||||||
|
MCU.qulModules: ["Qul::ControlsTemplates"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,64 +1,48 @@
|
|||||||
import QmlProject 1.3
|
import QmlProject 1.3
|
||||||
|
|
||||||
Project {
|
Project {
|
||||||
// importPaths: ["."] // optional extra import paths
|
qtForMCUs: true // Required by QDS to enable/disable features Supported/Unsupported by QtMCUs projects. Currently ignored by qmlprojectexporter.
|
||||||
// projectRootPath: "." // optional root path relative to qmlproject file path
|
// 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 */
|
/* Global configuration */
|
||||||
MCU.Config {
|
MCU.Config {
|
||||||
controlsStyle: "QtQuick.Controls.StyleDefault"
|
controlsStyle: "QtQuick.Controls.StyleDefault"
|
||||||
debugBytecode: false
|
debugBytecode: false
|
||||||
debugLineDirectives: 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
|
// maxResourceCacheSize: 0 // Set to 0 by default. Required for OnDemand resource cache policy and resource compression.
|
||||||
resourceAlphaOptions: "ForTransformations"
|
|
||||||
resourceRlePremultipliedAlpha: true
|
// Global settings for image properties. Can be overridden for selected resources in ImageFiles nodes.
|
||||||
resourceImagePixelFormat: "Automatic"
|
resourceImagePixelFormat: "Automatic"
|
||||||
resourceCachePolicy: "OnStartup"
|
resourceCachePolicy: "NoCaching"
|
||||||
resourceCompression: false
|
resourceCompression: false
|
||||||
resourceStorageSection: "QulResourceData"
|
|
||||||
resourceRuntimeAllocationType: 3
|
|
||||||
resourceOptimizeForRotation: false
|
|
||||||
resourceOptimizeForScale: false
|
|
||||||
|
|
||||||
// default font engine selection
|
// Font engine selection
|
||||||
fontEngine: "Static" // alternative option: "Spark"
|
fontEngine: "Static" // alternative option: "Spark".
|
||||||
|
|
||||||
// font defaults for both engines
|
// Font defaults for both engines
|
||||||
defaultFontFamily: "DejaVu Sans"
|
defaultFontFamily: "DejaVu Sans Mono"
|
||||||
defaultFontQuality: "VeryHigh"
|
defaultFontQuality: "VeryHigh"
|
||||||
glyphsCachePolicy: "OnStartup"
|
glyphsCachePolicy: "NoCaching"
|
||||||
glyphsStorageSection: "QulFontResourceData"
|
maxParagraphSize: 100
|
||||||
glyphsRuntimeAllocationType: 3
|
|
||||||
|
|
||||||
// font defaults for "Static"
|
// Font properties for "Static"
|
||||||
|
addDefaultFonts: false // Set to true to add the default fonts to your project.
|
||||||
autoGenerateGlyphs: true
|
autoGenerateGlyphs: true
|
||||||
complexTextRendering: true
|
|
||||||
fontFilesCachePolicy: "OnStartup"
|
|
||||||
fontFilesStorageSection: "QulFontResourceData"
|
|
||||||
fontFilesRuntimeAllocationType: 3
|
|
||||||
|
|
||||||
// font properties for "Spark"
|
// Font properties for "Spark"
|
||||||
fontCachePriming: true
|
// These properties are in effect only if the "Spark" font engine is used
|
||||||
fontCacheSize: 104800
|
complexTextRendering: true // Set this to false if complex scripts are not needed (Arabic scripts, Indic scripts, etc.)
|
||||||
fontHeapSize: -1
|
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
|
fontHeapPrealloc: true
|
||||||
fontCachePrealloc: true
|
fontCachePrealloc: true
|
||||||
fontVectorOutlinesDrawing: false
|
|
||||||
maxParagraphSize: 100
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QML files */
|
/* QML files */
|
||||||
// optional root property for adding one single qml file
|
|
||||||
// mainFile: "%{MainQmlFile}"
|
|
||||||
QmlFiles {
|
QmlFiles {
|
||||||
files: ["%{MainQmlFile}"]
|
files: ["%{MainQmlFile}"]
|
||||||
MCU.copyQmlFiles: false
|
MCU.copyQmlFiles: false
|
||||||
@@ -66,25 +50,29 @@ Project {
|
|||||||
|
|
||||||
/* Images */
|
/* Images */
|
||||||
ImageFiles {
|
ImageFiles {
|
||||||
// files: [""] // uncomment and add image files
|
files: ["images/icon.png"]
|
||||||
MCU.base: "images" // example base "images".
|
MCU.base: "images"
|
||||||
MCU.prefix: "pics" // example prefix "pics".
|
MCU.prefix: "assets"
|
||||||
|
|
||||||
MCU.resourceAlphaOptions: "ForTransformations"
|
|
||||||
MCU.resourceRlePremultipliedAlpha: true
|
|
||||||
MCU.resourceImagePixelFormat: "Automatic"
|
|
||||||
MCU.resourceCachePolicy: "OnStartup"
|
|
||||||
MCU.resourceCompression: false
|
MCU.resourceCompression: false
|
||||||
MCU.resourceStorageSection: "QulResourceData"
|
MCU.resourceImagePixelFormat: "Automatic"
|
||||||
MCU.resourceRuntimeAllocationType: 3
|
|
||||||
MCU.resourceOptimizeForRotation: false
|
MCU.resourceOptimizeForRotation: false
|
||||||
MCU.resourceOptimizeForScale: 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 */
|
/* Modules */
|
||||||
ModuleFiles {
|
ModuleFiles {
|
||||||
files: ["%{ModuleFile}"]
|
files: ["imports/CustomModule/%{ModuleFile}"]
|
||||||
// qulModules: [ // Uncomment for adding Qul modules
|
// MCU.qulModules: [ // Uncomment for adding Qul modules
|
||||||
// "Qul::Controls",
|
// "Qul::Controls",
|
||||||
// "Qul::ControlsTemplates",
|
// "Qul::ControlsTemplates",
|
||||||
// "Qul::Shapes",
|
// "Qul::Shapes",
|
||||||
@@ -94,46 +82,17 @@ Project {
|
|||||||
|
|
||||||
/* Interfaces */
|
/* Interfaces */
|
||||||
InterfaceFiles {
|
InterfaceFiles {
|
||||||
// files: [""] // uncomment for adding header files
|
files: ["src/%{InterfaceFile}"]
|
||||||
MCU.qmlImports: ["QtQuick"]
|
MCU.qmlImports: ["QtQuick"]
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Translations */
|
/* Translations */
|
||||||
TranslationFiles {
|
TranslationFiles {
|
||||||
// files: [""] // Uncomment for adding translation files with .ts extension
|
files: ["translations/%{TsFile}"]
|
||||||
MCU.omitSourceLanguage: false
|
MCU.omitSourceLanguage: false
|
||||||
}
|
}
|
||||||
|
|
||||||
FontFiles {
|
FontFiles {
|
||||||
// files: [""] // Uncomment for adding font files (.ttf, .otf, .pfa, .ttc, .pfb)
|
files: ["fonts/DejaVuSansMono.ttf"]
|
||||||
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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="nb_NO">
|
||||||
|
<context>
|
||||||
|
<name>%{CorrectedProjectName}</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../%{MainQmlFile}" line="37"/>
|
||||||
|
<source>Hello world!</source>
|
||||||
|
<translation>Hallo verden!</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject" ],
|
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject" ],
|
||||||
"id": "M.McuSupportQmlprojectApplication",
|
"id": "M.McuSupportApplication",
|
||||||
"category": "D.ApplicationMCU",
|
"category": "D.ApplicationMCU",
|
||||||
"trDescription": "Creates a Qt for MCUs application with an empty UI, based on qmlproject (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 QmlProject Application (Technical Preview)",
|
"trDisplayName": "Qt for MCUs Application",
|
||||||
"trDisplayCategory": "QmlProject Application (Qt for MCUs)",
|
"trDisplayCategory": "QmlProject Application (Qt for MCUs)",
|
||||||
"icon": "../icon.png",
|
"icon": "../icon.png",
|
||||||
"iconKind": "Themed",
|
"iconKind": "Themed",
|
||||||
@@ -18,7 +18,9 @@
|
|||||||
{ "key": "RootItemName", "value": "%{CorrectedProjectName}" },
|
{ "key": "RootItemName", "value": "%{CorrectedProjectName}" },
|
||||||
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
||||||
{ "key": "ModuleFile", "value": "CustomModule.qmlproject"},
|
{ "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":
|
"pages":
|
||||||
@@ -65,12 +67,37 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "component.qml.tpl",
|
"source": "component.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{QmlComponent}",
|
"target": "%{ProjectDirectory}/imports/CustomModule/%{QmlComponent}",
|
||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "module.qmlproject.tpl",
|
"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
|
"openInEditor": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user