Merge "Merge remote-tracking branch 'origin/4.15'"

This commit is contained in:
The Qt Project
2021-03-22 09:56:01 +00:00
117 changed files with 9092 additions and 5452 deletions

54
dist/changes-4.14.2.md vendored Normal file
View File

@@ -0,0 +1,54 @@
Qt Creator 4.14.2
=================
Qt Creator version 4.14.2 contains bug fixes.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline origin/v4.14.1..v4.14.2
General
-------
### Building Qt Creator with CMake
* Fixed installation location of desktop and appstream files
Help
----
* Fixed crash with `Previous/Next Open Document in History` (QDS-3743)
Editing
-------
* Re-added generic highlighting for Autoconf files (QTCREATORBUG-25391)
Debugging
---------
### LLDB
* Fixed performance issue (QTCREATORBUG-25185, QTCREATORBUG-25217)
Platforms
---------
### macOS
* Fixed vanishing controls in Welcome mode in Dark Mode (QTCREATORBUG-25405)
Credits for these changes go to:
--------------------------------
Alessandro Portale
Christian Stenger
Christophe Giboudeaux
David Schulz
Eike Ziller
Heiko Becker
Ivan Komissarov
Miikka Heikkinen
Robert Löhning

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Creator documentation. ** This file is part of the Qt Creator documentation.
@@ -30,11 +30,11 @@
\title Creating a Qt Quick Application \title Creating a Qt Quick Application
This tutorial uses built-in QML types and illustrates basic concepts of This tutorial uses preset components and illustrates basic concepts of
\l{Qt Quick}. \l{Qt Quick}.
For more information about the UI choices you have, see \l{User Interfaces}. For more information about the UI choices you have, see \l{User Interfaces}.
This tutorial describes how to use \QC to implement Qt Quick states and This tutorial describes how to use \QC to implement states and
transitions. We create an application that displays a Qt logo that moves transitions. We create an application that displays a Qt logo that moves
between three rectangles on the page when you click them. between three rectangles on the page when you click them.
@@ -47,13 +47,13 @@
\include qtquick-tutorial-create-empty-project.qdocinc qtquick empty application \include qtquick-tutorial-create-empty-project.qdocinc qtquick empty application
\QC generates a QML file, \e main.qml, and opens it in \QC generates a component file, \e main.qml, and opens it in
\uicontrol {Text Editor}. The wizard template uses the \l Window type, \uicontrol {Text Editor}. The wizard template uses the \l Window component,
which does not support adding states. Because we want to use states in which does not support adding states. Because we want to use states in
this example, we first replace the Window type with a \l {basic-rectangle} this example, we first replace the Window component with a \l {basic-rectangle}
{Rectangle} type. We must also remove the line that sets the \c title {Rectangle} component. We must also remove the line that sets the \c title
property, which the Rectangle type does not have. If you change the value of property, which the Rectangle component does not have. If you change the value of
the \uicontrol Type property in the \uicontrol Properties view, \QC offers the \uicontrol component property in the \l Properties view, \QC offers
to automatically remove the \c title property. to automatically remove the \c title property.
\section1 Creating the Main View \section1 Creating the Main View
@@ -62,20 +62,19 @@
the top left corner of the view and two empty rectangles. the top left corner of the view and two empty rectangles.
We use the \e qt-logo.png image in this tutorial, but you can also use We use the \e qt-logo.png image in this tutorial, but you can also use
any other image or a QML type, instead. any other image or a component, instead.
\note If a view is hidden, you can show it by selecting \uicontrol View > \note If a view is hidden, you can show it by selecting \uicontrol View >
\uicontrol Views. \uicontrol Views.
\list 1 \list 1
\li Select \uicontrol Rectangle in \uicontrol Navigator, and enter \li Select \uicontrol Rectangle in \l Navigator, and enter
\e page in the \uicontrol Id field in the \uicontrol Properties \e page in the \uicontrol Id field in \uicontrol Properties.
view.
\li Select \uicontrol Library > \uicontrol Assets > \li Select \l Library > \uicontrol Assets > \inlineimage plus.png
\uicontrol {Add New Assets} to locate qt-logo.png (or your own to locate qt-logo.png (or your own image) and add it to the
image) and add it to the project folder. project folder.
\li Drag and drop the image from \uicontrol Assets to \e page in \li Drag and drop the image from \uicontrol Assets to \e page in
\uicontrol Navigator. \uicontrol Navigator.
@@ -93,9 +92,10 @@
\endlist \endlist
\li In \uicontrol Library > \uicontrol {QML Types} > \li In \uicontrol Library > \uicontrol Components >
\uicontrol {Qt Quick - Basic}, select \uicontrol Rectangle and \uicontrol {Default Components} > \uicontrol Basic, select
drag and drop it to \e page in \uicontrol Navigator. \uicontrol Rectangle and drag and drop it to \e page in
\uicontrol Navigator.
\image qmldesigner-tutorial-topleftrect.png "Rectangle properties" \image qmldesigner-tutorial-topleftrect.png "Rectangle properties"
@@ -131,7 +131,7 @@
\endlist \endlist
\li Drag and drop a \uicontrol {Mouse Area} type from the \li Drag and drop a \uicontrol {Mouse Area} component from the
\uicontrol Library to \e topLeftRect in \uicontrol Navigator. \uicontrol Library to \e topLeftRect in \uicontrol Navigator.
\li Click \uicontrol {Layout}, and then click the \li Click \uicontrol {Layout}, and then click the
@@ -142,7 +142,7 @@
\li In the \uicontrol Navigator, copy topLeftRect (by pressing \li In the \uicontrol Navigator, copy topLeftRect (by pressing
\key {Ctrl+C}) and paste it to \e page in \uicontrol Navigator \key {Ctrl+C}) and paste it to \e page in \uicontrol Navigator
twice (by pressing \key {Ctrl+V}). \QC renames the new instances twice (by pressing \key {Ctrl+V}). \QC renames the new instances
of the type topLeftRect1 and topLeftRect2. of the component topLeftRect1 and topLeftRect2.
\li Select topLeftRect1 and edit its properties: \li Select topLeftRect1 and edit its properties:
@@ -194,9 +194,9 @@
For more information about the views you used, see: For more information about the views you used, see:
\list \list
\li \l{Creating Components} \li \l Library
\li \l{Navigator} \li \l Navigator
\li \l{Specifying Component Properties} \li \l Properties
\endlist \endlist
Next, we will make the image move between the rectangles when users click Next, we will make the image move between the rectangles when users click
@@ -247,7 +247,7 @@
For more information about the views you used, see: For more information about the views you used, see:
\list \list
\li \l{Adding States} \li \l States
\li \l{Connecting Components to Signals} \li \l{Connecting Components to Signals}
\endlist \endlist
@@ -305,7 +305,7 @@
\list \list
\li \l{Editing Easing Curves} \li \l{Editing Easing Curves}
\li \l{Animating Transitions Between States} \li \l{Transition Editor}
\endlist \endlist
Click the rectangles to view the animated transitions. Click the rectangles to view the animated transitions.

View File

@@ -52,15 +52,15 @@
target platforms. target platforms.
\li \uicontrol {Qt Quick Application - Scroll} uses the \li \uicontrol {Qt Quick Application - Scroll} uses the
\l{ScrollView} type to implement a scrollable list view \l{ScrollView} component to implement a scrollable list view
(requires Qt 5.9 or later). (requires Qt 5.9 or later).
\li \uicontrol {Qt Quick Application - Stack} uses the \li \uicontrol {Qt Quick Application - Stack} uses the
\l{StackView} type to implement a set of pages with a stack-based \l{StackView} component to implement a set of pages with a stack-based
navigation model (requires Qt 5.7 or later). navigation model (requires Qt 5.7 or later).
\li \uicontrol {Qt Quick Application - Swipe} uses the \li \uicontrol {Qt Quick Application - Swipe} uses the
\l{SwipeView} type to implement a set of pages with a swipe-based \l{SwipeView} component to implement a set of pages with a swipe-based
navigation model (requires Qt 5.7 or later). navigation model (requires Qt 5.7 or later).
\endlist \endlist
@@ -179,7 +179,7 @@
\e main.qml, that you can modify in the \uicontrol {Form Editor} \e main.qml, that you can modify in the \uicontrol {Form Editor}
or the \uicontrol {Text Editor}. or the \uicontrol {Text Editor}.
For the Stack and Swipe applications, \QC generates two UI files, For the Stack and Swipe applications, \QC generates two \l{UI Files}{UI files},
\e Page1Form.ui.qml and \e Page2Form.ui.qml, that you can modify in the \e Page1Form.ui.qml and \e Page2Form.ui.qml, that you can modify in the
\uicontrol {Form Editor} and a QML file, \e main.qml, that you can \uicontrol {Form Editor} and a QML file, \e main.qml, that you can
modify in the \uicontrol {Text Editor} to add the application logic. modify in the \uicontrol {Text Editor} to add the application logic.
@@ -269,7 +269,7 @@
files in the project folder belong to the project. Therefore, you do files in the project folder belong to the project. Therefore, you do
not need to individually list all the files in the project. not need to individually list all the files in the project.
\li .qml file defines an UI item, such as a component or the \li .qml file defines a UI item, such as a component or the
whole application UI. whole application UI.
\li ui.qml file defines a form for the application UI. This file is \li ui.qml file defines a form for the application UI. This file is

View File

@@ -30,13 +30,13 @@
\title User Interaction Methods \title User Interaction Methods
You can use a set of basic QML types to add interaction methods to UIs, You can use a set of basic components to add interaction methods to UIs,
such as performing actions by using a pointing device or the keyboard, such as performing actions by using a pointing device or the keyboard,
or flicking the visible area of the screen horizontally or vertically. or flicking the visible area of the screen horizontally or vertically.
Further, you can use \l{Qt Quick Controls} types to inform users about Further, you can use \l{Qt Quick Controls} components to inform users about
the progress of the application or to gather input from users. the progress of the application or to gather input from users.
\image qtquick-designer-qtquickcontrols-types.png "Qt Quick Controls 2 types in Library" \image qtquick-designer-qtquickcontrols-types.png "Qt Quick Controls components in Library"
The following types of controls are available for user interaction: The following types of controls are available for user interaction:
@@ -50,7 +50,7 @@
\endlist \endlist
You can specify values for the properties of components in the You can specify values for the properties of components in the
\uicontrol Properties view. Some properties are common to all components, \l Properties view. Some properties are common to all components,
whereas some are common to particular types of controls. Some properties whereas some are common to particular types of controls. Some properties
are only available for a particular component. The following sections are only available for a particular component. The following sections
describe the basic interaction methods, the controls, and their properties. describe the basic interaction methods, the controls, and their properties.
@@ -63,17 +63,17 @@
\section2 Mouse Area \section2 Mouse Area
QML uses signals and handlers to deliver mouse interactions. Specifically, Signals and handlers are used to deliver mouse interactions. Specifically,
Qt Quick provides a \uicontrol {Mouse Area} type that developers can use to you can use a \uicontrol {Mouse Area} component to define JavaScript
define JavaScript callbacks (also called signal handlers), which accept callbacks (also called signal handlers), which accept mouse events within
mouse events within a defined area. a defined area.
A mouse area receives events within a defined area. One quick way to define A mouse area receives events within a defined area. One quick way to define
this area is to \l{Setting Anchors and Margins}{anchor} the mouse area to this area is to \l{Setting Anchors and Margins}{anchor} the mouse area to
its parent's area. If the parent is a \l {basic-rectangle}{Rectangle} (or its parent's area. If the parent is a \l {basic-rectangle}{Rectangle} (or
any component that is derived from an \l {basic-item}{Item}), the mouse area any component that is derived from an \l {basic-item}{Item}), the mouse area
will fill the area defined by the parent's dimensions. Alternatively, you will fill the area defined by the parent's dimensions. Alternatively, you
can define an area smaller or larger than the parent. Several controls,such can define an area smaller or larger than the parent. Several controls, such
as \l {Button}{buttons}, contain a mouse area. as \l {Button}{buttons}, contain a mouse area.
A mouse area emits \l{Connecting Components to Signals}{signals} in response A mouse area emits \l{Connecting Components to Signals}{signals} in response
@@ -102,38 +102,38 @@
to the focused component. If no component has active focus, the key event to the focused component. If no component has active focus, the key event
is ignored. If the component with active focus accepts the key event, is ignored. If the component with active focus accepts the key event,
propagation stops. Otherwise the event is sent to the component's parent propagation stops. Otherwise the event is sent to the component's parent
until the event is accepted, or the root item is reached and the event is until the event is accepted, or the root component is reached and the event
ignored. is ignored.
A component has focus when the \uicontrol Focus property in the A component has focus when the \uicontrol Focus property in the
\uicontrol Advanced tab is set to \c true. However, for reusable \uicontrol Advanced tab is set to \c true. However, for reusable
or imported components, this is not sufficient, and you should use or imported components, this is not sufficient, and you should use
a \uicontrol {Focus Scope} type. a \uicontrol {Focus Scope} component.
Within each focus scope, one object may have focus enabled. If more Within each focus scope, one object may have focus enabled. If more
than one component have it enabled, the last component to enable it than one component have it enabled, the last component to enable it
will have the focus and the others are unset, similarly to when there will have the focus and the others are unset, similarly to when there
are no focus scopes. are no focus scopes.
When a focus scope receives active focus, the contained type with When a focus scope receives active focus, the contained component with
focus set (if any) also gets the active focus. If this type is focus set (if any) also gets the active focus. If this component is
also a focus scope, both the focus scope and the sub-focused item also a focus scope, both the focus scope and the sub-focused component
will have active focus. will have active focus.
The \uicontrol {Focus Scope} type is not a visual type, and therefore the The \uicontrol {Focus Scope} component is not a visual component and
properties of its children need to be exposed to the parent item of the therefore the properties of its children need to be exposed to the parent
focus scope. \l{Using Layouts}{Layouts} and \l{Using Positioners} component of the focus scope. \l{Using Layouts}{Layouts} and
{positioners} will use these visual and styling properties to create the \l{Using Positioners}{positioners} will use these visual and styling
layout. properties to create the layout.
For more information, see \l {Keyboard Focus in Qt Quick}. For more information, see \l {Keyboard Focus in Qt Quick}.
\section2 Flickable \section2 Flickable
\uicontrol Flickable places its children on a surface that can be dragged \uicontrol Flickable places its children on a surface that can be dragged
and flicked, causing the view onto the child items to scroll. This and flicked, causing the view onto the child components to scroll. This
behavior forms the basis of components that are designed to show large behavior forms the basis of components that are designed to show large
numbers of child items, such as \uicontrol {List View} and numbers of child components, such as \uicontrol {List View} and
\uicontrol {Grid View}. For more information, see \l{List and Grid Views}. \uicontrol {Grid View}. For more information, see \l{List and Grid Views}.
In traditional user interfaces, views can be scrolled using standard In traditional user interfaces, views can be scrolled using standard
@@ -144,14 +144,14 @@
scrolling continues after the user has stopped touching the view. scrolling continues after the user has stopped touching the view.
The contents of a flickable component are not automatically clipped. If The contents of a flickable component are not automatically clipped. If
the component is not used as a full-screen item, consider selecting the the component is not used as a full-screen component, consider selecting the
\uicontrol Clip check box in the \uicontrol Visibility section. \uicontrol Clip check box in the \uicontrol Visibility section.
\image qtquick-designer-flickable-properties.png "Flickable properties" \image qtquick-designer-flickable-properties.png "Flickable properties"
Users can interact with a flickable component if the \uicontrol Interactive Users can interact with a flickable component if the \uicontrol Interactive
property is set to \c true. Set it to \c false to temporarily disable property is set to \c true. Set it to \c false to temporarily disable
flicking. This enables special interaction with the components children. flicking. This enables special interaction with the component's children.
For example, you might want to freeze a flickable map while scrolling For example, you might want to freeze a flickable map while scrolling
through a pop-up that is a child of the Flickable. through a pop-up that is a child of the Flickable.
@@ -202,20 +202,20 @@
The \uicontrol {Content size} field specifies the dimensions of the The \uicontrol {Content size} field specifies the dimensions of the
surface controlled by a flickable. Typically, set the values of the surface controlled by a flickable. Typically, set the values of the
\uicontrol W and \uicontrol H fields to the combined size of the items \uicontrol W and \uicontrol H fields to the combined size of the components
placed in the flickable. You can set additional margins around the placed in the flickable. You can set additional margins around the
content in the \uicontrol Margins field. content in the \uicontrol Margins field.
The \uicontrol Origin field specifies the origin of the content. It The \uicontrol Origin field specifies the origin of the content. It
refers to the top-left position of the content regardless of layout refers to the top-left position of the content regardless of layout
direction. Usually, the \uicontrol X and \uicontrol Y are set to 0. direction. Usually, the \uicontrol X and \uicontrol Y values are set to 0.
However, a \l{ListView}{List View} and \l {GridView}{Grid View} However, a \l{ListView}{List View} and \l {GridView}{Grid View}
may have an arbitrary origin due to delegate size variation, or item may have an arbitrary origin due to delegate size variation, or component
insertion or removal outside the visible region. insertion or removal outside the visible region.
\section1 General Control Properties \section1 General Control Properties
You can set control properties in the \uicontrol Properties view. You can set control properties in the \l Properties view.
\image qtquick-designer-control-properties.png "Control section in Properties" \image qtquick-designer-control-properties.png "Control section in Properties"
@@ -229,7 +229,7 @@
components, unless it has been explicitly set for them. components, unless it has been explicitly set for them.
\note Take care when enabling wheel events for controls within scrollable \note Take care when enabling wheel events for controls within scrollable
items, such as \l Flickable, because the control will consume the components, such as \l Flickable, because the control will consume the
events, and therefore interrupt scrolling of the flickable. events, and therefore interrupt scrolling of the flickable.
\uicontrol Spacing is useful for controls that have multiple or repetitive \uicontrol Spacing is useful for controls that have multiple or repetitive
@@ -296,7 +296,7 @@
\if defined(qtdesignstudio) \if defined(qtdesignstudio)
To create a button that contains an icon, use the wizard template to To create a button that contains an icon, use the wizard template to
\l{Creating Custom Controls}{create a custom button} and drag-and-drop \l{Creating Custom Controls}{create a custom button} and drag-and-drop
the icon to the button background item. For an example of using the the icon to the button background component. For an example of using the
wizard template, see \l{Creating a Push Button}. wizard template, see \l{Creating a Push Button}.
\endif \endif
@@ -323,7 +323,7 @@
\image qtquickcontrols2-checkdelegate.gif "Check delegate" \image qtquickcontrols2-checkdelegate.gif "Check delegate"
Use check boxes to build multi-selection option lists, where any number Use check boxes to build multi-selection option lists where any number
of options can be selected, including none, but the options are not of options can be selected, including none, but the options are not
mutually exclusive. mutually exclusive.
@@ -346,11 +346,11 @@
When options can be grouped, you can use a partially checked check box to When options can be grouped, you can use a partially checked check box to
represent the whole group. Select \uicontrol PartiallyChecked in the represent the whole group. Select \uicontrol PartiallyChecked in the
\uicontrol {Check state} field to indicate that users selected some \uicontrol {Check state} field to indicate that users selected some
sub-items in the group, but not all of them. sub-components in the group but not all of them.
The checkable options are often listed vertically. The checkable options are often listed vertically.
The check box label should be a statement that the check mark makes true, The check box label should be a statement that the check mark makes true
and that the absence of a check mark makes false. Therefore, the check box and that the absence of a check mark makes false. Therefore, the check box
label should not contain a negative statement. label should not contain a negative statement.
@@ -421,7 +421,7 @@
focus. Select the \uicontrol Checkable check box to make a button checkable. focus. Select the \uicontrol Checkable check box to make a button checkable.
To make the button checked, select the \uicontrol Checked check box. To make the button checked, select the \uicontrol Checked check box.
Buttons that belong to the same parent item can be mutually exclusive. Buttons that belong to the same parent component can be mutually exclusive.
Users can click a button to check it, and the previous selection is Users can click a button to check it, and the previous selection is
cleared. Users cannot uncheck the currently checked button by clicking cleared. Users cannot uncheck the currently checked button by clicking
it. Instead, they must click another button in the group to set the new it. Instead, they must click another button in the group to set the new
@@ -463,7 +463,7 @@
that the UI has to wait for the operation to complete. that the UI has to wait for the operation to complete.
A busy indicator is similar to an indeterminate \l {Progress Bar}. Both can A busy indicator is similar to an indeterminate \l {Progress Bar}. Both can
be used to indicate background activity. The main difference is visual, and be used to indicate background activity. The main difference is visual and
that a progress bar can also present a concrete amount of progress (when it that a progress bar can also present a concrete amount of progress (when it
can be determined). Due to the visual difference, busy indicators and can be determined). Due to the visual difference, busy indicators and
indeterminate progress bars fit in different places in UIs. indeterminate progress bars fit in different places in UIs.
@@ -620,7 +620,7 @@
A flat combo box does not draw a background unless it is A flat combo box does not draw a background unless it is
interacted with, which makes it blend into the UI. Use flat combo interacted with, which makes it blend into the UI. Use flat combo
boxes on a tool bar, for example, to match the flat look of tool boxes on a toolbar, for example, to match the flat look of tool
buttons. To create a flat combo box, select the \uicontrol Flat buttons. To create a flat combo box, select the \uicontrol Flat
check box. check box.
@@ -682,24 +682,24 @@
\uicontrol {Tool Bar} contains application-wide and context-sensitive \uicontrol {Tool Bar} contains application-wide and context-sensitive
actions and controls, such as navigation buttons and search fields. A actions and controls, such as navigation buttons and search fields. A
tool bar is commonly used as a header or footer of an \l ApplicationWindow. toolbar is commonly used as a header or footer of an \l ApplicationWindow.
Select the toolbar position in the \uicontrol Position field. Select the toolbar position in the \uicontrol Position field.
\image qtquick-designer-toolbar-properties.png "Tool Bar properties" \image qtquick-designer-toolbar-properties.png "Tool Bar properties"
\uicontrol {Tool Button} is nearly identical to \l Button, but it has a \uicontrol {Tool Button} is nearly identical to \l Button, but it has a
graphical appearance that makes it more suitable for insertion into a graphical appearance that makes it more suitable for insertion into a
tool bar. toolbar.
A tool bar does not provide a layout of its own, but requires you to A toolbar does not provide a layout of its own, but requires you to
position its contents, for instance by creating a \l RowLayout. If the position its contents, for instance by creating a \l RowLayout. If the
tool bar contains only one item, it will resize to fit the implicit item toolbar contains only one item, it will resize to fit the implicit item
size. This makes a tool bar particularly suitable for use together with size. This makes a toolbar particularly suitable for use together with
\l{Using Layouts}{layouts}. However, you can specify content size in the \l{Using Layouts}{layouts}. However, you can specify content size in the
\uicontrol {Content width} and \uicontrol {Content height} fields. \uicontrol {Content width} and \uicontrol {Content height} fields.
\uicontrol {Tool Separator} is used to visually distinguish between \uicontrol {Tool Separator} is used to visually distinguish between
groups of items on a tool bar by separating them with a line. It can groups of items on a toolbar by separating them with a line. It can
be used in horizontal or vertical toolbars by setting the value of be used in horizontal or vertical toolbars by setting the value of
the \uicontrol Orientation field. the \uicontrol Orientation field.
@@ -747,10 +747,10 @@
\section1 Summary of User Interaction Methods \section1 Summary of User Interaction Methods
The following table lists the QML types that you can use to add interaction The following table lists the components that you can use to add interaction
methods to UIs. The \e Location column contains the tab name where you can methods to UIs. The \e Location column contains the module where you can
find the type in \uicontrol Library. The \e MCU column indicates which types find the component in \l Library > \uicontrol Components. The \e MCU column
are supported on MCUs. indicates which components are supported on MCUs.
\table \table
\header \header
@@ -762,118 +762,118 @@
\row \row
\li \inlineimage icons/busyindicator-icon16.png \li \inlineimage icons/busyindicator-icon16.png
\li \l [QtQuickControls]{BusyIndicator}{Busy Indicator} \li \l [QtQuickControls]{BusyIndicator}{Busy Indicator}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li Indicates activity while content is being loaded. \li Indicates activity while content is being loaded.
\row \row
\li \inlineimage icons/button-icon16.png \li \inlineimage icons/button-icon16.png
\li \l [QtQuickControls]{Button} \li \l [QtQuickControls]{Button}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \inlineimage ok \li \inlineimage ok
\li A push button that you can associate with an action. \li A push button that you can associate with an action.
\row \row
\li \inlineimage icons/checkbox-icon16.png \li \inlineimage icons/checkbox-icon16.png
\li \l [QtQuickControls]{CheckBox}{Check Box} \li \l [QtQuickControls]{CheckBox}{Check Box}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \inlineimage ok \li \inlineimage ok
\li An option button that can be toggled on (checked) or off \li An option button that can be toggled on (checked) or off
(unchecked). (unchecked).
\row \row
\li \inlineimage icons/checkbox-icon16.png \li \inlineimage icons/checkbox-icon16.png
\li \l [QtQuickControls]{CheckDelegate}{Check Delegate} \li \l [QtQuickControls]{CheckDelegate}{Check Delegate}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li An item delegate that can be toggled on (checked) or off \li An item delegate that can be toggled on (checked) or off
(unchecked). (unchecked).
\row \row
\li \inlineimage icons/combobox-icon16.png \li \inlineimage icons/combobox-icon16.png
\li \l [QtQuickControls]{ComboBox}{Combo Box} \li \l [QtQuickControls]{ComboBox}{Combo Box}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li A combined button and popup list that is populated by using a data \li A combined button and popup list that is populated by using a data
model. model.
\row \row
\li \inlineimage icons/delaybutton-icon16.png \li \inlineimage icons/delaybutton-icon16.png
\li \l [QtQuickControls]{DelayButton}{Delay Button} \li \l [QtQuickControls]{DelayButton}{Delay Button}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li An option button that is triggered when held down long enough. \li An option button that is triggered when held down long enough.
\row \row
\li \inlineimage icons/dial-icon16.png \li \inlineimage icons/dial-icon16.png
\li \l [QtQuickControls]{Dial} \li \l [QtQuickControls]{Dial}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \inlineimage ok \li \inlineimage ok
\li A circular dial that is rotated to set a value. \li A circular dial that is rotated to set a value.
\row \row
\li \inlineimage flickable-icon16.png \li \inlineimage flickable-icon16.png
\li \l [QML]{Flickable} \li \l [QML]{Flickable}
\li Qt Quick - Basic \li Default Components - Basic
\li \inlineimage ok \li \inlineimage ok
\li Items can be flicked horizontally or vertically. \li Items can be flicked horizontally or vertically.
\row \row
\li \inlineimage focusscope-icon16.png \li \inlineimage focusscope-icon16.png
\li \l{FocusScope}{Focus Scope} \li \l{FocusScope}{Focus Scope}
\li Qt Quick - Basic \li Default Components - Basic
\li \li
\li Assists in keyboard focus handling when building reusable QML \li Assists in keyboard focus handling when building reusable QML
components. components.
\row \row
\li \inlineimage mouse-area-icon16.png \li \inlineimage mouse-area-icon16.png
\li \l [QtQuick]{MouseArea}{Mouse Area} \li \l [QtQuick]{MouseArea}{Mouse Area}
\li Qt Quick - Basic \li Default Components - Basic
\li \inlineimage ok \li \inlineimage ok
\li Enables simple mouse handling. \li Enables simple mouse handling.
\row \row
\li \inlineimage icons/pageindicator-icon16.png \li \inlineimage icons/pageindicator-icon16.png
\li \l [QtQuickControls]{PageIndicator}{Page Indicator} \li \l [QtQuickControls]{PageIndicator}{Page Indicator}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li Indicates the indicate the currently active page in a container of \li Indicates the indicate the currently active page in a container of
multiple pages. multiple pages.
\row \row
\li \inlineimage icons/progressbar-icon16.png \li \inlineimage icons/progressbar-icon16.png
\li \l [QtQuickControls]{ProgressBar}{Progress Bar} \li \l [QtQuickControls]{ProgressBar}{Progress Bar}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \inlineimage ok \li \inlineimage ok
\li Indicates the progress of an operation. \li Indicates the progress of an operation.
\row \row
\li \inlineimage icons/radiobutton-icon16.png \li \inlineimage icons/radiobutton-icon16.png
\li \l [QtQuickControls]{RadioButton}{Radio Button} \li \l [QtQuickControls]{RadioButton}{Radio Button}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \inlineimage ok \li \inlineimage ok
\li An option button that can be switched on (checked) or off \li An option button that can be switched on (checked) or off
(unchecked). (unchecked).
\row \row
\li \inlineimage icons/radiobutton-icon16.png \li \inlineimage icons/radiobutton-icon16.png
\li \l [QtQuickControls]{RadioDelegate}{Radio Delegate} \li \l [QtQuickControls]{RadioDelegate}{Radio Delegate}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li An item delegate that can be toggled on (checked) or off \li An item delegate that can be toggled on (checked) or off
(unchecked). (unchecked).
\row \row
\li \inlineimage icons/rangeslider-icon16.png \li \inlineimage icons/rangeslider-icon16.png
\li \l [QtQuickControls]{RangeSlider}{Range Slider} \li \l [QtQuickControls]{RangeSlider}{Range Slider}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li Enables users to select a range of values by sliding two handles \li Enables users to select a range of values by sliding two handles
along a track. along a track.
\row \row
\li \inlineimage icons/roundbutton-icon16.png \li \inlineimage icons/roundbutton-icon16.png
\li \l [QtQuickControls]{RoundButton}{Round Button} \li \l [QtQuickControls]{RoundButton}{Round Button}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li A push button with rounded corners that you can associate with an \li A push button with rounded corners that you can associate with an
action. action.
\row \row
\li \inlineimage icons/slider-icon16.png \li \inlineimage icons/slider-icon16.png
\li \l [QtQuickControls]{Slider} \li \l [QtQuickControls]{Slider}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \inlineimage ok \li \inlineimage ok
\li Enables users to select a value by sliding a handle along a track. \li Enables users to select a value by sliding a handle along a track.
\row \row
\li \inlineimage icons/spinbox-icon16.png \li \inlineimage icons/spinbox-icon16.png
\li \l [QtQuickControls]{SpinBox}{Spin Box} \li \l [QtQuickControls]{SpinBox}{Spin Box}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li Enables users to specify a value by clicking the up or down buttons, \li Enables users to specify a value by clicking the up or down buttons,
by pressing up or down on the keyboard, or by entering a value in by pressing up or down on the keyboard, or by entering a value in
@@ -881,54 +881,54 @@
\row \row
\li \inlineimage icons/switch-icon16.png \li \inlineimage icons/switch-icon16.png
\li \l [QtQuickControls]{Switch} \li \l [QtQuickControls]{Switch}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \inlineimage ok \li \inlineimage ok
\li An option button that can be toggled on or off. \li An option button that can be toggled on or off.
\row \row
\li \inlineimage icons/switch-icon16.png \li \inlineimage icons/switch-icon16.png
\li \l [QtQuickControls]{SwitchDelegate}{Switch Delegate} \li \l [QtQuickControls]{SwitchDelegate}{Switch Delegate}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li An item delegate with a switch indicator that can be toggled on or \li An item delegate with a switch indicator that can be toggled on or
off. off.
\row \row
\li \inlineimage icons/toolbar-icon16.png \li \inlineimage icons/toolbar-icon16.png
\li \l [QtQuickControls] {TabBar}{Tab Bar} \li \l [QtQuickControls] {TabBar}{Tab Bar}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li Enables users to switch between different views or subtasks. \li Enables users to switch between different views or subtasks.
\row \row
\li \inlineimage icons/toolbutton-icon16.png \li \inlineimage icons/toolbutton-icon16.png
\li \l [QtQuickControls]{TabButton}{Tab Button} \li \l [QtQuickControls]{TabButton}{Tab Button}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li A button that is functionally similar to \uicontrol Button, but \li A button that is functionally similar to \uicontrol Button, but
provides a look that is more suitable for a \uicontrol {Tab Bar}. provides a look that is more suitable for a \uicontrol {Tab Bar}.
\row \row
\li \inlineimage icons/toolbar-icon16.png \li \inlineimage icons/toolbar-icon16.png
\li \l [QtQuickControls]{ToolBar}{Tool Bar} \li \l [QtQuickControls]{ToolBar}{Tool Bar}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li A container of application-wide and context sensitive actions and \li A container of application-wide and context sensitive actions and
controls, such as navigation buttons and search fields. controls, such as navigation buttons and search fields.
\row \row
\li \inlineimage icons/toolbutton-icon16.png \li \inlineimage icons/toolbutton-icon16.png
\li \l [QtQuickControls]{ToolButton}{Tool Button} \li \l [QtQuickControls]{ToolButton}{Tool Button}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li A button that is functionally similar to \uicontrol Button, but \li A button that is functionally similar to \uicontrol Button, but
provides a look that is more suitable for a \uicontrol {Tool Bar}. provides a look that is more suitable for a \uicontrol {Tool Bar}.
\row \row
\li \inlineimage icons/toolseparator-icon16.png \li \inlineimage icons/toolseparator-icon16.png
\li \l [QtQuickControls]{ToolSeparator}{Tool Separator} \li \l [QtQuickControls]{ToolSeparator}{Tool Separator}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li Separates a group of items from adjacent items on a \li Separates a group of items from adjacent items on a
\uicontrol {Tool Bar}. \uicontrol {Tool Bar}.
\row \row
\li \inlineimage icons/tumbler-icon16.png \li \inlineimage icons/tumbler-icon16.png
\li \l [QtQuickControls]{Tumbler} \li \l [QtQuickControls]{Tumbler}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li A spinnable wheel of items that can be selected. \li A spinnable wheel of items that can be selected.
\endtable \endtable

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Creator documentation. ** This file is part of the Qt Creator documentation.
@@ -35,15 +35,15 @@
\title Lists and Other Data Models \title Lists and Other Data Models
Applications typically need to handle and display data that is organized Applications typically need to handle and display data that is organized
into list or grid views. Qt Quick uses models, views, and delegates for into list or grid views. Models, views, and delegates are used for
this purpose. They modularize the visualization of data in order to give this purpose. They modularize the visualization of data in order to give
you control over the different aspects of the data. For example, you can you control over the different aspects of the data. For example, you can
swap a list view with a grid view with little changes to the data. swap a list view with a grid view with little changes to the data.
Similarly, encapsulating an instance of the data in a delegate allows Similarly, encapsulating an instance of the data in a delegate allows
developers to dictate how to present or handle the data. developers to dictate how to present or handle the data.
A \e model contains the data and its structure. There are several QML A \e model contains the data and its structure. There are several
types for creating different types of models. A \e view is a container components for creating different types of models. A \e view is a container
that displays the data in a list or a grid, or along a path. A \e delegate that displays the data in a list or a grid, or along a path. A \e delegate
dictates how the data should appear in the view. The delegate takes each dictates how the data should appear in the view. The delegate takes each
piece of data in the model and encapsulates it. The data is then accessible piece of data in the model and encapsulates it. The data is then accessible
@@ -56,10 +56,10 @@
\section1 List and Grid Views \section1 List and Grid Views
A list view organizes items as a list, whereas a grid view organizes them as A list view organizes components as a list, whereas a grid view organizes
a grid. By default, items in list and grid views flow vertically from left them as a grid. By default, components in list and grid views flow
to right. They are laid out from left to right horizontally, and from top to vertically from left to right. They are laid out from left to right
bottom vertically. horizontally, and from top to bottom vertically.
You can change the list view orientation in the \uicontrol Orientation You can change the list view orientation in the \uicontrol Orientation
field and the grid view flow in the \uicontrol Flow field. You can change field and the grid view flow in the \uicontrol Flow field. You can change
@@ -111,7 +111,7 @@
\note Setting the \uicontrol Cache property is not a replacement for \note Setting the \uicontrol Cache property is not a replacement for
creating efficient delegates. It can improve the smoothness of scrolling creating efficient delegates. It can improve the smoothness of scrolling
behavior at the expense of additional memory usage. The fewer objects and behavior at the expense of additional memory usage. The fewer items and
bindings in a delegate, the faster a view can be scrolled. It is important bindings in a delegate, the faster a view can be scrolled. It is important
to realize that setting a cache will only postpone issues caused by to realize that setting a cache will only postpone issues caused by
slow-loading delegates, it is not a solution to this problem. slow-loading delegates, it is not a solution to this problem.
@@ -174,7 +174,7 @@
You can replace the default model and delegate with other, You can replace the default model and delegate with other,
more complex models and delegates in \uicontrol {Text Editor}. more complex models and delegates in \uicontrol {Text Editor}.
\l{ItemDelegate}{Item Delegate} and \l{SwipeDelegate}{Swipe Delegate} \l{ItemDelegate}{Item Delegate} and \l{SwipeDelegate}{Swipe Delegate}
types are also available in \uicontrol Library. components are also available in \uicontrol Library.
\include qtquick-pathview-editor.qdocinc pathview \include qtquick-pathview-editor.qdocinc pathview
\if defined(qtdesignstudio) \if defined(qtdesignstudio)
@@ -183,10 +183,10 @@
\section1 Summary of Model Components \section1 Summary of Model Components
The following table lists the QML types that you can use to add data models The following table lists the components that you can use to add data models
to UIs. The \e Location column contains the tab name where you can find the to UIs. The \e Location column contains the tab name where you can find the
type in \uicontrol Library. The \e MCU column indicates which types are component in \l Library > \uicontrol Components. The \e MCU column indicates
supported on MCUs. which components are supported on MCUs.
\table \table
\header \header
@@ -198,39 +198,39 @@
\row \row
\li \inlineimage gridview-icon16.png \li \inlineimage gridview-icon16.png
\li \l{GridView}{Grid View} \li \l{GridView}{Grid View}
\li Qt Quick - Views \li Default Components - Views
\li \li
\li A grid vizualization of a model. \li A grid vizualization of a model.
\row \row
\li \inlineimage icons/itemdelegate-icon16.png \li \inlineimage icons/itemdelegate-icon16.png
\li \l{ItemDelegate}{Item Delegate} \li \l{ItemDelegate}{Item Delegate}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li A standard view item that can be used as a delegate in various \li A standard view item that can be used as a delegate in various
views and controls, such as \l ListView and \l ComboBox. views and controls, such as \l ListView and \l ComboBox.
\row \row
\li \inlineimage listview-icon16.png \li \inlineimage listview-icon16.png
\li \l{ListView}{List View} \li \l{ListView}{List View}
\li Qt Quick - Views \li Default Components - Views
\li \inlineimage ok \li \inlineimage ok
\li A list vizualization of a model. \li A list vizualization of a model.
\row \row
\li \inlineimage pathview-icon16.png \li \inlineimage pathview-icon16.png
\li \l{Path View} \li \l{Path View}
\li Qt Quick - Views \li Default Components - Views
\li \li
\li Vizualizes the contents of a model along a path. \li Vizualizes the contents of a model along a path.
\row \row
\li \inlineimage icons/scrollview-icon16.png \li \inlineimage icons/scrollview-icon16.png
\li \l [QtQuickControls] {ScrollView}{Scroll View} \li \l [QtQuickControls] {ScrollView}{Scroll View}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li Provides scrolling for user-defined content. It can be used instead \li Provides scrolling for user-defined content. It can be used instead
of a \l Flickable item. of a \l Flickable component.
\row \row
\li \inlineimage icons/stackview-icon16.png \li \inlineimage icons/stackview-icon16.png
\li \l [QtQuickControls] {StackView}{Stack View} \li \l [QtQuickControls] {StackView}{Stack View}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li A stack-based navigation model. \li A stack-based navigation model.
\if defined(qtdesignstudio) \if defined(qtdesignstudio)
@@ -244,7 +244,7 @@
\row \row
\li \inlineimage icons/itemdelegate-icon16.png \li \inlineimage icons/itemdelegate-icon16.png
\li \l{SwipeDelegate}{Swipe Delegate} \li \l{SwipeDelegate}{Swipe Delegate}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li A view item that can be swiped left or right to expose more \li A view item that can be swiped left or right to expose more
options or information. It is used as a delegate in views such options or information. It is used as a delegate in views such
@@ -252,7 +252,7 @@
\row \row
\li \inlineimage icons/swipeview-icon16.png \li \inlineimage icons/swipeview-icon16.png
\li \l[QtQuickControls] {SwipeView}{Swipe View} \li \l[QtQuickControls] {SwipeView}{Swipe View}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \inlineimage ok \li \inlineimage ok
\li Enables users to navigate pages by swiping sideways. \li Enables users to navigate pages by swiping sideways.
\endtable \endtable

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Creator documentation. ** This file is part of the Qt Creator documentation.
@@ -31,30 +31,30 @@
\title Images \title Images
\target basic-image \target basic-image
The Image type is used for adding images to the UI in several supported The Image component is used for adding images to the UI in several supported
formats, including bitmap formats, such as PNG and JPEG, and vector graphics formats, including bitmap formats, such as PNG and JPEG, and vector graphics
formats, such as SVG. You must add the images to your project in the formats, such as SVG. You must add the images to your project in the
\uicontrol Assets tab of \uicontrol Library to be able to use them in \uicontrol Assets tab of \uicontrol Library to be able to use them in
designs. designs.
\image qtquick-designer-image-type.png "Image type in different views" \image qtquick-designer-image-type.png "Image component in different views"
When you drag and drop an image file from the \uicontrol Assets tab of When you drag and drop an image file from the \uicontrol Assets tab of
\uicontrol Library to \uicontrol Navigator or \uicontrol {Form Editor}, \uicontrol Library to \uicontrol Navigator or \uicontrol {Form Editor},
\QC automatically creates a component of the Image type for you with \QC automatically creates a component of the Image component for you with
the path to the image file set as the value of the \uicontrol Source the path to the image file set as the value of the \uicontrol Source
field in \uicontrol Properties. field in \uicontrol Properties.
To load images from a URL using a supported URL scheme, specify the URL To load images from a URL using a supported URL scheme, specify the URL
in the \uicontrol Source field. in the \uicontrol Source field.
You can use the \l {Border Image} type to display an image, You can use the \l {Border Image} component to display an image,
such as a PNG file, as a border and a background. For more such as a PNG file, as a border and a background. For more
information about using border images to create buttons, see information about using border images to create buttons, see
\l {Creating Scalable Buttons and Borders}. \l {Creating Scalable Buttons and Borders}.
If you need to display animated images, such as GIFs, use the If you need to display animated images, such as GIFs, use the
\l {Animated Image} type. \l {Animated Image} component.
\section1 Image Size \section1 Image Size
@@ -63,13 +63,13 @@
If the image \uicontrol Size is not specified, the size of the source If the image \uicontrol Size is not specified, the size of the source
image is used automatically. image is used automatically.
By default, explicitly setting the width and height of the item causes By default, explicitly setting the width and height of the component causes
the image to be scaled to that size. To change this behavior, set the the image to be scaled to that size. To change this behavior, set the
value of the \uicontrol {Fill mode} field. Images can be stretched, tiled, value of the \uicontrol {Fill mode} field. Images can be stretched, tiled,
or scaled uniformly to the specified size with or without cropping. The or scaled uniformly to the specified size with or without cropping. The
\uicontrol Pad option means that the image is not transformed. \uicontrol Pad option means that the image is not transformed.
\note If the \uicontrol Clip check box is not selected, the item might \note If the \uicontrol Clip check box is not selected, the component might
paint outside its bounding rectangle even if the \uicontrol {Fill mode} paint outside its bounding rectangle even if the \uicontrol {Fill mode}
is set to \uicontrol PreserveAspectCrop. is set to \uicontrol PreserveAspectCrop.
@@ -146,11 +146,11 @@
\section1 Border Image \section1 Border Image
The Border Image type extends the features of the Image type. It is used The Border Image component extends the features of the Image component.
to create borders out of images by scaling or tiling parts of each image. A It is used to create borders out of images by scaling or tiling parts
source image is broken into 9 regions that are scaled or tiled individually. of each image. A source image is broken into 9 regions that are scaled or
The corner regions are not scaled at all, while the horizontal and vertical tiled individually. The corner regions are not scaled at all, while the
regions are scaled according to the values of the horizontal and vertical regions are scaled according to the values of the
\uicontrol {Horizontal tile mode} and \uicontrol {Vertical tile mode} field, \uicontrol {Horizontal tile mode} and \uicontrol {Vertical tile mode} field,
or both. or both.
@@ -169,13 +169,13 @@
\note You cannot change the \uicontrol {Source size} of a border image. \note You cannot change the \uicontrol {Source size} of a border image.
For examples of using border images, see the documentation of the For examples of using border images, see the documentation of the
\l [QtQuick]{BorderImage} type. \l [QtQuick]{BorderImage} component.
\section1 Animated Image \section1 Animated Image
The Animated Image type extends the features of the Image type, providing The Animated Image component extends the features of the Image component,
a way to play animations stored as images containing a series of frames, providing a way to play animations stored as images containing a series of
such as those stored in GIF files. frames, such as those stored in GIF files.
Set the speed of the animation in the \uicontrol Speed field. The speed is Set the speed of the animation in the \uicontrol Speed field. The speed is
measured in percentage of the original animated image speed. The default measured in percentage of the original animated image speed. The default
@@ -199,10 +199,10 @@
\section1 Summary of Images \section1 Summary of Images
The following table lists the QML types that you can use to add images. The following table lists the components that you can use to add images.
The \e Location column contains the tab name where you can find the type The \e Location column contains the tab name where you can find the
in \uicontrol Library. The \e MCU column indicates which types are supported component in \l Library > \uicontrol Components. The \e MCU column
on MCUs. indicates which components are supported on MCUs.
\table \table
\header \header
@@ -214,20 +214,20 @@
\row \row
\li \inlineimage animated-image-icon16.png \li \inlineimage animated-image-icon16.png
\li \l [QtQuick]{AnimatedImage}{Animated Image} \li \l [QtQuick]{AnimatedImage}{Animated Image}
\li Qt Quick - Basic \li Default Components - Basic
\li \li
\li An images that stores animations containing a series of frames, \li An images that stores animations containing a series of frames,
such as those stored in GIF files. such as those stored in GIF files.
\row \row
\li \inlineimage border-image-icon16.png \li \inlineimage border-image-icon16.png
\li \l [QtQuick]{BorderImage}{Border Image} \li \l [QtQuick]{BorderImage}{Border Image}
\li Qt Quick - Basic \li Default Components - Basic
\li \inlineimage ok \li \inlineimage ok
\li An image that is used as a border or background. \li An image that is used as a border or background.
\row \row
\li \inlineimage image-icon16.png \li \inlineimage image-icon16.png
\li \l [QtQuick]{Image} \li \l [QtQuick]{Image}
\li Qt Quick - Basic \li Default Components - Basic
\li \inlineimage ok \li \inlineimage ok
\li An image in one of the supported formats, including bitmap formats \li An image in one of the supported formats, including bitmap formats
such as PNG and JPEG and vector graphics formats such as SVG. such as PNG and JPEG and vector graphics formats such as SVG.
@@ -238,7 +238,7 @@
\li Studio Components \li Studio Components
\li \li
\li An icon from an ISO 7000 icon library specified as a \l Picture \li An icon from an ISO 7000 icon library specified as a \l Picture
type. You can select the icon to use and its color. component. You can select the icon to use and its color.
\endif \endif
\endtable \endtable
*/ */

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Creator documentation. ** This file is part of the Qt Creator documentation.
@@ -28,7 +28,7 @@
\section1 Path View \section1 Path View
The Path View type lays out data provided by data models on a \l{Path}. The Path View component lays out data provided by data models on a \l{Path}.
A graphical spline editor enables you to specify path view paths, which A graphical spline editor enables you to specify path view paths, which
is a non-trivial task to do in the code editor. is a non-trivial task to do in the code editor.
@@ -36,7 +36,7 @@
\image qmldesigner-pathview-editor.png "Path View editor" \image qmldesigner-pathview-editor.png "Path View editor"
To start editing the path, double-click the path view in To start editing the path, double-click the path view in
\uicontrol {Form Editor}. The editor composes the path of PathCubic path \l {Form Editor}. The editor composes the path of PathCubic path
objects. They are cubic Bezier curves to a given position with two control objects. They are cubic Bezier curves to a given position with two control
points. Drag and drop the control points in \uicontrol {Form Editor} to points. Drag and drop the control points in \uicontrol {Form Editor} to
construct the curve. construct the curve.
@@ -78,7 +78,7 @@
\section1 SvgPath \section1 SvgPath
The Svg Path type uses an SVG path data string to draw a path as a line. The Svg Path component uses an SVG path data string to draw a path as a line.
The stroke property values that specify the appearance of the path are The stroke property values that specify the appearance of the path are
described in \l{Strokes}. described in \l{Strokes}.
@@ -89,10 +89,10 @@
string that specifies the path. For more information, see string that specifies the path. For more information, see
\l{https://www.w3.org/TR/SVG/paths.html#PathData}{W3C SVG Path Data}. \l{https://www.w3.org/TR/SVG/paths.html#PathData}{W3C SVG Path Data}.
\note Mixing SvgPath with other types of elements is not always supported. \note Mixing SvgPath with other types of components is not always supported.
For example, when \l Shape is backed by \c GL_NV_path_rendering, a For example, when \l Shape is backed by \c GL_NV_path_rendering, a
\l ShapePath can contain one or more SvgPath elements, or one or more \l ShapePath can contain one or more SvgPath elements, or one or more
elements of other types, but not both. components of other types, but not both.
//! [svgpath] //! [svgpath]
*/ */

View File

@@ -45,18 +45,18 @@
\image studio-shapes.png "Shapes in Form Editor" \image studio-shapes.png "Shapes in Form Editor"
\else \else
You can use the Rectangle type to draw basic shapes in You can use the Rectangle component to draw basic shapes in
\uicontrol {Form Editor}. \l {Form Editor}.
\image qml-shapes.png "Shapes in Form Editor" \image qml-shapes.png "Shapes in Form Editor"
\endif \endif
Most visual types in \uicontrol Library are based on the \l [QtQuick] Most visual components in \uicontrol Library are based on the \l [QtQuick]
{Item} type. Even though it has no visual appearance itself (similarly {Item} component. Even though it has no visual appearance itself (similarly
to a mouse area, for example), it defines all the properties that are to a mouse area, for example), it defines all the properties that are
common across visual types, such as position, size, and visibility. For common across visual components, such as position, size, and visibility. For
more information, see \l{Specifying Basic Component Properties}. more information, see \l{Specifying Basic Component Properties}.
In addition, each type has a set of properties that specify its visual In addition, each component has a set of properties that specify its visual
appearance and behavior. You can modify the property values to set fill appearance and behavior. You can modify the property values to set fill
and border colors, stroke width, and other characteristics of the shapes. and border colors, stroke width, and other characteristics of the shapes.
@@ -67,7 +67,7 @@
\target basic-rectangle \target basic-rectangle
\section1 Rectangle \section1 Rectangle
The basic \l [QtQuick] {Rectangle} QML type is used for drawing shapes The basic \l [QtQuick] {Rectangle} component is used for drawing shapes
with four sides and corners, as well as a solid border. with four sides and corners, as well as a solid border.
\if defined(qtdesignstudio) \if defined(qtdesignstudio)
@@ -101,9 +101,9 @@
\section2 Studio Rectangle \section2 Studio Rectangle
If you want to modify each corner of the rectangle independently If you want to modify each corner of the rectangle independently
or use a dashed border, select the Rectangle type in the or use a dashed border, select the Rectangle component in the
\uicontrol {Studio Components} tab of \uicontrol Library instead \uicontrol {Studio Components} tab of \uicontrol Library instead
of the basic rectangle type. of the basic rectangle component.
By setting the values of properties in the \uicontrol {Corner Radiuses} By setting the values of properties in the \uicontrol {Corner Radiuses}
group, you can draw each corner independently. By using radius values group, you can draw each corner independently. By using radius values
@@ -121,7 +121,7 @@
\section1 Border \section1 Border
The Border type is used to create borders out of four segments: The Border component is used to create borders out of four segments:
left, top, right, and bottom. By selecting the \uicontrol {Draw top}, left, top, right, and bottom. By selecting the \uicontrol {Draw top},
\uicontrol {Draw right}, \uicontrol {Draw bottom}, and \uicontrol {Draw right}, \uicontrol {Draw bottom}, and
\uicontrol {Draw left} check boxes, you can determine whether each \uicontrol {Draw left} check boxes, you can determine whether each
@@ -141,7 +141,7 @@
line. line.
In the \uicontrol {Border mode} field, you can specify whether the border In the \uicontrol {Border mode} field, you can specify whether the border
is drawn along the inside or outside edge of the item, or on top of the is drawn along the inside or outside edge of the component, or on top of the
edge. edge.
If you select a dashed or dotted pattern in the \uicontrol {Stroke style} If you select a dashed or dotted pattern in the \uicontrol {Stroke style}
@@ -170,8 +170,8 @@
\section1 Triangle \section1 Triangle
The Triangle type can be used to draw triangles with different dimensions The Triangle component can be used to draw triangles with different dimensions
and shapes. The type is enclosed in an invisible rectangle that determines and shapes. The component is enclosed in an invisible rectangle that determines
its size. The dimensions of the triangle can be changed to make it elongated its size. The dimensions of the triangle can be changed to make it elongated
or squatter with space around it by setting the left, right, top, and bottom or squatter with space around it by setting the left, right, top, and bottom
margins in the \uicontrol Margins group. The margins are set between the margins in the \uicontrol Margins group. The margins are set between the
@@ -210,7 +210,7 @@
\section1 Pie \section1 Pie
The Pie type is used to create a pie slice, a pie that is missing slices, The Pie component is used to create a pie slice, a pie that is missing slices,
or just the pie rind (similar to an arc), depending on the values of the or just the pie rind (similar to an arc), depending on the values of the
\uicontrol Begin, \uicontrol End, and \uicontrol {Hide line} properties. \uicontrol Begin, \uicontrol End, and \uicontrol {Hide line} properties.
@@ -222,10 +222,10 @@
\section1 Summary of Shapes \section1 Summary of Shapes
The following table lists the QML types that you can use to draw shapes. The following table lists the components that you can use to draw shapes.
The \e Location column contains the tab name where you can find the type The \e Location column contains the tab name where you can find the
in \uicontrol Library. The \e MCU column indicates which types are supported component in \l Library > \uicontrol Components. The \e MCU column
on MCUs. indicates which components are supported on MCUs.
\table \table
\header \header
@@ -255,7 +255,7 @@
\row \row
\li \inlineimage rect-icon16.png \li \inlineimage rect-icon16.png
\li \l Rectangle \li \l Rectangle
\li Qt Quick - Basic \li Default Components - Basic
\li \inlineimage ok \li \inlineimage ok
\li A rectangle that is painted with a solid fill color or linear \li A rectangle that is painted with a solid fill color or linear
gradient and an optional border. You can use the radius property gradient and an optional border. You can use the radius property

View File

@@ -30,11 +30,11 @@
\title Text \title Text
You can use several different text types to add read-only or editable text You can use several different text components to add read-only or editable
to a UI, such as titles or labels and text input fields with placeholder text to a UI, such as titles or labels and text input fields with
text. The \l Text type adds formatted text, the \l TextEdit type adds a placeholder text. The \l Text component adds formatted text, the \l TextEdit
multiline line edit, and the \l TextInput type adds a single editable line component adds a multiline line edit, and the \l TextInput component adds a
field. single editable line field.
You can select the font to use and specify extensive properties for each You can select the font to use and specify extensive properties for each
text string, such as size in points or pixels, style name, emphasis, text string, such as size in points or pixels, style name, emphasis,
@@ -44,7 +44,7 @@
\youtube yOUdg1o2KJM \youtube yOUdg1o2KJM
To create a label with a background, use the \l Label type from the To create a label with a background, use the \l Label component from the
Qt Quick Controls module. Qt Quick Controls module.
\section1 Using Rich Text \section1 Using Rich Text
@@ -78,7 +78,7 @@
size, emphasis, aligment, and spacing of the text. Specify the font size, emphasis, aligment, and spacing of the text. Specify the font
size in either points or pixels in the \uicontrol Size field. size in either points or pixels in the \uicontrol Size field.
\image qtquick-designer-text-properties.png "Text type properties" \image qtquick-designer-text-properties.png "Text component properties"
To display custom fonts in the list of available fonts in the To display custom fonts in the list of available fonts in the
\uicontrol Font field, add them in the \uicontrol Assets tab \uicontrol Font field, add them in the \uicontrol Assets tab
@@ -104,8 +104,8 @@
\section1 Text Alignment \section1 Text Alignment
You can align text items horizontally and vertically. By default, text is You can align text components horizontally and vertically. By default, text
vertically aligned to the top. Horizontal alignment follows the natural is vertically aligned to the top. Horizontal alignment follows the natural
alignment of the text. By default, left-to-right text like English is alignment of the text. By default, left-to-right text like English is
aligned to the left side of the text area, whereas right-to-left text aligned to the left side of the text area, whereas right-to-left text
like Arabic is aligned to the right side of the text area. like Arabic is aligned to the right side of the text area.
@@ -116,7 +116,7 @@
For a single line of text, the size of the text is the area of the text. For a single line of text, the size of the text is the area of the text.
In this common case, all alignments are equivalent. To center a text in In this common case, all alignments are equivalent. To center a text in
its parent, use \l{Setting Anchors and Margins}{anchoring} or bind the its parent, use \l{Setting Anchors and Margins}{anchoring} or bind the
width of the text item to that of the parent. For more information, see width of the text component to that of the parent. For more information, see
\l{Setting Bindings}. \l{Setting Bindings}.
\section1 Text and Style Colors \section1 Text and Style Colors
@@ -129,17 +129,17 @@
or sunken text. You set the font style in the \uicontrol Style field of or sunken text. You set the font style in the \uicontrol Style field of
the \uicontrol Font section. the \uicontrol Font section.
For the \uicontrol {Text Edit} and \uicontrol {Text Input} types, you For the \uicontrol {Text Edit} and \uicontrol {Text Input} components, you
can also set the color of selected text and the text highlight color can also set the color of selected text and the text highlight color
that is used behind selections in the \uicontrol {Selected text color} that is used behind selections in the \uicontrol {Selected text color}
and \uicontrol {Selection color} fields. and \uicontrol {Selection color} fields.
For more information about selecting colors, see \l{Picking Colors}. You For more information about selecting colors, see \l{Picking Colors}. You
can only set solid colors for text items. can only set solid colors for text components.
\section1 Advanced Text Properties \section1 Advanced Text Properties
The height and width of a text item are determined automatically depending The height and width of a text component are determined automatically depending
on the values of the properties you set, to accommodate the length of the on the values of the properties you set, to accommodate the length of the
string that you specify in the \uicontrol Text field and the font size, for string that you specify in the \uicontrol Text field and the font size, for
example. example.
@@ -148,15 +148,15 @@
size of the displayed text is determined. Select \uicontrol FixedSize to size of the displayed text is determined. Select \uicontrol FixedSize to
use the size specified in the \uicontrol Size field in pixels or points. use the size specified in the \uicontrol Size field in pixels or points.
Select \uicontrol HorizontalFit or \uicontrol VerticalFit to use the largest Select \uicontrol HorizontalFit or \uicontrol VerticalFit to use the largest
size up to the size specified that fits the width or height of the item. size up to the size specified that fits the width or height of the component.
Select \uicontrol Fit to use the largest size up to the size specified that Select \uicontrol Fit to use the largest size up to the size specified that
fits within the width and height of the item. The font size of fitted text fits within the width and height of the component. The font size of fitted text
has a minimum bound specified by the \uicontrol {Minimum size} field and has a minimum bound specified by the \uicontrol {Minimum size} field and
maximum bound specified by the \uicontrol Size field. maximum bound specified by the \uicontrol Size field.
In the \uicontrol {Wrap mode} field, you can wrap the text to the text In the \uicontrol {Wrap mode} field, you can wrap the text to the text
item's width. The text will only wrap if you set an explicit width for component's width. The text will only wrap if you set an explicit width for
the text item. By default, text is not wrapped. Select \uicontrol WordWrap the text component. By default, text is not wrapped. Select \uicontrol WordWrap
to restrict wrapping to word boundaries only. Select \uicontrol WrapAnywhere to restrict wrapping to word boundaries only. Select \uicontrol WrapAnywhere
to enable wrapping at any point on a line, even if it occurs in the middle to enable wrapping at any point on a line, even if it occurs in the middle
of a word. Select \uicontrol Wrap to wrap at a word boundary, if possible, of a word. Select \uicontrol Wrap to wrap at a word boundary, if possible,
@@ -165,7 +165,7 @@
You can use the \uicontrol Elide property with the \uicontrol Wrap You can use the \uicontrol Elide property with the \uicontrol Wrap
option to fit a single line of plain text to a set width. Select option to fit a single line of plain text to a set width. Select
\uicontrol ElideRight, and set the \uicontrol {Maximum line count} \uicontrol ElideRight, and set the \uicontrol {Maximum line count}
or the text item height (in the \uicontrol H field). If you set both, or the text component height (in the \uicontrol H field). If you set both,
the maximum line count will apply unless the lines do not fit in the the maximum line count will apply unless the lines do not fit in the
height allowed. height allowed.
@@ -197,7 +197,7 @@
better performance than rich text. better performance than rich text.
In the \uicontrol {Render type} field, you can override the default In the \uicontrol {Render type} field, you can override the default
rendering type for a text item. Select \uicontrol NativeRendering if rendering type for a text component. Select \uicontrol NativeRendering if
you prefer text to look native on the target platform and do not you prefer text to look native on the target platform and do not
require advanced features such as \l {Managing 2D Transformations} require advanced features such as \l {Managing 2D Transformations}
{transformation} of the text. Using rotation or scaling in combination {transformation} of the text. Using rotation or scaling in combination
@@ -206,12 +206,12 @@
\target text-edit \target text-edit
\section1 Text Input \section1 Text Input
You can use the \uicontrol {Text Edit} and \uicontrol {Text Input} types to You can use the \uicontrol {Text Edit} and \uicontrol {Text Input}
add text fields where users can enter text. components to add text fields where users can enter text.
The Text Input type displays a single line of editable plain text, whereas The Text Input component displays a single line of editable plain text,
the Text Edit type displays a block of editable, formatted text. Both types whereas the Text Edit component displays a block of editable, formatted
are used to accept text input. text. Both components are used to accept text input.
\image qtquick-designer-text-input-properties.png "Text input field properties" \image qtquick-designer-text-input-properties.png "Text input field properties"
@@ -258,7 +258,7 @@
be overwritten. be overwritten.
If the \uicontrol {Persistent selection} check box is selected, a text edit If the \uicontrol {Persistent selection} check box is selected, a text edit
or input keeps its selection when active focus moves to another item. or input keeps its selection when active focus moves to another component.
To use a pointer device for selecting text, select the To use a pointer device for selecting text, select the
\uicontrol {Select by mouse} check box. \uicontrol {Select by mouse} check box.
@@ -276,10 +276,10 @@
\section1 Summary of Text Components \section1 Summary of Text Components
The following table lists the QML types that you can use to add text to The following table lists the components that you can use to add text to
UIs. The \e Location column contains the tab name where you can find the UIs. The \e Location column contains the tab name where you can find the
type in \uicontrol Library. The \e MCU column indicates which types are component in \l Library > \uicontrol Components. The \e MCU column
supported on MCUs. indicates which components are supported on MCUs.
\table \table
\header \header
@@ -291,37 +291,37 @@
\row \row
\li \inlineimage icons/label-icon16.png \li \inlineimage icons/label-icon16.png
\li \l [QtQuickControls]{Label} \li \l [QtQuickControls]{Label}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li A text label with inherited styling and font. \li A text label with inherited styling and font.
\row \row
\li \inlineimage text-icon16.png \li \inlineimage text-icon16.png
\li \l [QtQuick]{Text} \li \l [QtQuick]{Text}
\li Qt Quick - Basic \li Default Components - Basic
\li \inlineimage ok \li \inlineimage ok
\li Formatted read-only text. \li Formatted read-only text.
\row \row
\li \inlineimage icons/textarea-icon16.png \li \inlineimage icons/textarea-icon16.png
\li \l [QtQuickControls]{TextArea}{Text Area} \li \l [QtQuickControls]{TextArea}{Text Area}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li Multiple lines of editable formatted text. \li Multiple lines of editable formatted text.
\row \row
\li \inlineimage text-edit-icon16.png \li \inlineimage text-edit-icon16.png
\li \l [QtQuick]{TextEdit}{Text Edit} \li \l [QtQuick]{TextEdit}{Text Edit}
\li Qt Quick - Basic \li Default Components - Basic
\li \li
\li A single line of editable formatted text that can be validated. \li A single line of editable formatted text that can be validated.
\row \row
\li \inlineimage icons/textfield-icon16.png \li \inlineimage icons/textfield-icon16.png
\li \l [QtQuickControls]{TextField}{Text Field} \li \l [QtQuickControls]{TextField}{Text Field}
\li Qt Quick - Controls 2 \li Qt Quick Controls
\li \li
\li A single line of editable plain text. \li A single line of editable plain text.
\row \row
\li \inlineimage text-input-icon16.png \li \inlineimage text-input-icon16.png
\li \l [QtQuick]{TextInput}{Text Input} \li \l [QtQuick]{TextInput}{Text Input}
\li Qt Quick - Basic \li Default Components - Basic
\li \li
\li A single line of editable plain text that can be validated. \li A single line of editable plain text that can be validated.
\endtable \endtable

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -55,11 +55,10 @@
changed in all the child components, for example. changed in all the child components, for example.
\li \l {Adding States} \li \l {Adding States}
Qt Quick allows you to declare various UI states that describe You can declare various UI states that describe how component
how component properties change from a base state. Therefore, properties change from a base state. Therefore, states can be
states can be a useful way of organizing your UI a useful way of organizing your UI logic. You can associate
logic. You can associate transitions with items to define transitions with components to define how their properties will
how their properties will animate when they change due to a state animate when they change due to a state change.
change.
\endlist \endlist
*/ */

View File

@@ -38,9 +38,9 @@
the property that is to be animated, and apply the animation depending on the property that is to be animated, and apply the animation depending on
the type of behavior that is required. the type of behavior that is required.
You can drag and drop the following QML types from \uicontrol Library You can drag and drop the following components from \l Library >
> \uicontrol {QML Types} > \uicontrol {Qt Quick - Animation} to \uicontrol Components > \uicontrol {Default Components} >
\uicontrol Navigator or \uicontrol {Form Editor}: \uicontrol Animation to \l Navigator or \l {Form Editor}:
\list \list
\li \l [QML] {ColorAnimation}{Color Animation} is a specialized \li \l [QML] {ColorAnimation}{Color Animation} is a specialized
@@ -65,10 +65,10 @@
animations to be run sequentially. animations to be run sequentially.
\endlist \endlist
For more information about using the QML types, see For more information about using the components, see
\l{Animation and Transitions in Qt Quick}. \l{Animation and Transitions in Qt Quick}.
For more information about animating properties in the \uicontrol Timeline For more information about animating properties in the \l Timeline
view, see \l{Creating Animations}. For more information about animating view, see \l{Creating Animations}. For more information about animating
property changes in states, see \l{Animating Transitions Between States}. property changes in states, see \l{Animating Transitions Between States}.

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Creator documentation. ** This file is part of the Qt Creator documentation.
@@ -36,7 +36,7 @@
\title Creating Buttons \title Creating Buttons
To create a button type: To create a button component:
\list 1 \list 1
@@ -49,20 +49,20 @@
\uicontrol Choose to create a QML file called Button.qml (for \uicontrol Choose to create a QML file called Button.qml (for
example). example).
\note Types are listed in the \uicontrol Library only if the \note Components are listed in \l Library > \uicontrol Components >
filename begins with a capital letter. \uicontrol {My Components} only if the filename begins with a
capital letter.
\li Click \uicontrol {Design} to edit the file in the \li Click \uicontrol {Design} to edit the file in \l {Form Editor}.
\uicontrol {Form Editor}.
\li In the \uicontrol Navigator, select \uicontrol Item and set the \li In \l Navigator, select \uicontrol Item and set the width
width (\uicontrol W) and height (\uicontrol H) of the button in the (\uicontrol W) and height (\uicontrol H) of the button in
\uicontrol Properties view. \l Properties.
\li Drag and drop a \uicontrol Rectangle from the \uicontrol Library to \li Drag and drop a \uicontrol Rectangle from \uicontrol Library to
the item in \uicontrol Navigator. This creates a nested item where the component in \uicontrol Navigator. This creates a nested
the item is the parent of the rectangle. Items are positioned component where the Item is the parent of the Rectangle. Components
relative to their parents. are positioned relative to their parents.
\li In the \uicontrol Properties view, modify the appearance of the \li In the \uicontrol Properties view, modify the appearance of the
rectangle: rectangle:
@@ -76,17 +76,17 @@
\li Select \uicontrol {Layout}, and then select the \li Select \uicontrol {Layout}, and then select the
\inlineimage icons/anchor-fill.png \inlineimage icons/anchor-fill.png
(\uicontrol {Fill to Parent}) button to anchor the rectangle to (\uicontrol {Fill to Parent}) button to anchor the Rectangle to
the item. the Item.
\endlist \endlist
\li Drag and drop a \uicontrol {Text} type to the item in \li Drag and drop a \uicontrol {Text} component to the Item in
\uicontrol Navigator. \uicontrol Navigator.
\li In the \uicontrol Properties view, edit the properties of the \uicontrol Text \li In the \uicontrol Properties view, edit the properties of the
type. \uicontrol Text component
\list a \list a
@@ -110,16 +110,16 @@
\endlist \endlist
To be useful, the button type has to be created in a project. To be useful, the button component has to be created in a project.
When you work on other QML files in the project to create screens When you work on other files in the project to create screens
or other components for the UI, the button type appears in the or other components for the UI, the button component appears in
\uicontrol {My QML Components} tab of the \uicontrol Library view. \uicontrol Library > \uicontrol Components > \uicontrol {My Components}.
You can use it to create button instances and modify their properties You can use it to create button instances and modify their properties
to assign them useful IDs, change their appearance, and set the button to assign them useful IDs, change their appearance, and set the button
text for each button instance, for example. text for each button instance, for example.
To create a graphical button that scales beautifully without using To create a graphical button that scales beautifully without using
vector graphics, use the \l {Border Image} type. For more vector graphics, use the \l {Border Image} component. For more
information, see \l{Creating Scalable Buttons and Borders}. information, see \l{Creating Scalable Buttons and Borders}.
*/ */
@@ -131,7 +131,7 @@
\title Creating Scalable Buttons and Borders \title Creating Scalable Buttons and Borders
You can use the \l {Border Image} type to display an image, such as a You can use the \l {Border Image} component to display an image, such as a
PNG file, as a border and a background. PNG file, as a border and a background.
Use two border images and suitable graphics to change the appearance of Use two border images and suitable graphics to change the appearance of
@@ -141,49 +141,49 @@
change the appearance of the button depending on other mouse events, change the appearance of the button depending on other mouse events,
such as hovered. such as hovered.
Use a \l Text type to add button text. Use a \l Text component to add button text.
You can use states also to change the button text color and font size. For You can use states also to change the button text color and font size. For
example, you can scale the button text up or down. example, you can scale the button text up or down.
Add a \l {Mouse Area} type that covers the whole area and Add a \l {Mouse Area} component that covers the whole area and
reacts to mouse events. reacts to mouse events.
\image qmldesigner-borderimage-type.png "Button type in Form Editor and States" \image qmldesigner-borderimage-type.png "Button component in Form Editor and States"
\section1 Creating the Button Type \section1 Creating the Button Component
To create a button type, select \uicontrol File > To create a button component, select \uicontrol File >
\uicontrol {New File or Project} > \uicontrol {New File or Project} >
\if defined(qtcreator) \if defined(qtcreator)
\uicontrol Qt > \uicontrol {QML File (Qt Quick 2)} > \uicontrol Qt > \uicontrol {QML File (Qt Quick 2)} >
\else \else
\uicontrol {Qt Quick Files} > \uicontrol {Qt Quick File} > \uicontrol {Qt Quick Files} > \uicontrol {Qt Quick File} >
\endif \endif
\uicontrol Choose to create a QML file called Button.qml (for example). \uicontrol Choose to create a file called Button.qml (for example).
\note Types are listed in the \uicontrol Library only if the \note Components are listed in \l Library > \uicontrol Components >
filename begins with a capital letter. \uicontrol {My Components} only if the filename begins with a
capital letter.
\section1 Constructing the Button Component \section1 Constructing the Button Component
To construct the button component: To construct the button component:
\list 1 \list 1
\li Click \uicontrol {Design} to edit the QML file in the \li Click \uicontrol {Design} to edit the component file in
\uicontrol {Form Editor}. \l {Form Editor}.
\li In the \uicontrol {Assets} tab of \uicontrol Library, select \li In the \uicontrol {Assets} tab of \l Library, select
\uicontrol {Add New Assets} to copy the image files you want \inlineimage plus.png
to use to the project folder. to copy the image files you want to use to the project folder.
\li In the \uicontrol Navigator, select the root item and set the \li In \l Navigator, select the root component and set the
width (\uicontrol W) and height (\uicontrol H) of the button in the width (\uicontrol W) and height (\uicontrol H) of the button in the
\uicontrol Properties view to match the size of the images \l Properties view to match the size of the images
you plan to use. This specifies the initial size of the button you plan to use. This specifies the initial size of the button
component. component.
\li Drag and drop two \uicontrol {Border Image} types from \li Drag and drop two \uicontrol {Border Image} components from
\uicontrol Library to the root item in \uicontrol Navigator. \uicontrol Library to the root component in \uicontrol Navigator.
\li Drag and drop a \uicontrol Text type to the root item. \li Drag and drop a \uicontrol Text component to the root component.
\li Drag and drop a \uicontrol {Mouse Area} to the root item in \li Drag and drop a \uicontrol {Mouse Area} to the root component.
\uicontrol Navigator.
\li Select a border image to edit the values of its properties: \li Select a border image to edit the values of its properties:
\list a \list a
\li In the \uicontrol Id field, enter an ID for the border \li In the \uicontrol Id field, enter an ID for the border
@@ -208,11 +208,11 @@
\inlineimage icons/anchor-fill.png \inlineimage icons/anchor-fill.png
(\uicontrol {Fill to Parent}) button. (\uicontrol {Fill to Parent}) button.
\endlist \endlist
\li Select the text item to specify font size and color in \li Select the text component to specify font size and color in
\uicontrol Properties: \uicontrol Properties:
\list a \list a
\li In the \uicontrol Color field, use \li In the \uicontrol Color field, use the \l{Picking Colors}
the color picker to select the font color, or enter a value {color picker} to select the font color, or enter a value
in the field. in the field.
\li In \uicontrol Font group, \uicontrol Size field, enter the \li In \uicontrol Font group, \uicontrol Size field, enter the
font size. font size.
@@ -230,7 +230,7 @@
\section1 Using States to Change Component Property Values \section1 Using States to Change Component Property Values
\list 1 \list 1
\li In the \uicontrol States view, select \uicontrol {Create New State} \li In the \l States view, select \uicontrol {Create New State}
twice to create two new states. twice to create two new states.
\image qmldesigner-borderimage-states.png "Active and inactive states" \image qmldesigner-borderimage-states.png "Active and inactive states"
\li Select \uicontrol State1. \li Select \uicontrol State1.
@@ -239,10 +239,10 @@
, and then select \uicontrol {Set when Condition} to determine , and then select \uicontrol {Set when Condition} to determine
when the state should be applied. when the state should be applied.
\li In the \uicontrol {Binding Editor}, select the \c mouseArea \li In the \uicontrol {Binding Editor}, select the \c mouseArea
type and the \c pressed signal to specify that the state is component and the \c pressed signal to specify that the state is
applied when the mouse button is pressed down. applied when the mouse button is pressed down.
\image qmldesigner-borderimage-bindings.png "Active state when condition" \image qmldesigner-borderimage-bindings.png "Active state when condition"
\li Select the text item in \uicontrol Navigator to specify that the \li Select the text component in \uicontrol Navigator to specify that the
text size is scaled up when the button is pressed down. text size is scaled up when the button is pressed down.
\li In \uicontrol Properties, select the \uicontrol Advanced tab, and \li In \uicontrol Properties, select the \uicontrol Advanced tab, and
increase the value of the \uicontrol Scale property. increase the value of the \uicontrol Scale property.
@@ -255,8 +255,6 @@
specify that the state is applied when the mouse button is not specify that the state is applied when the mouse button is not
pressed down. pressed down.
\image qmldesigner-borderimage-bindings1.png "Inactive state when condition" \image qmldesigner-borderimage-bindings1.png "Inactive state when condition"
it in the \e inactive state by changing the value of its
\uicontrol Visibility property in \uicontrol Properties.
\li Press \key {Ctrl+S} to save the button. \li Press \key {Ctrl+S} to save the button.
\li Select the \inlineimage live_preview.png \li Select the \inlineimage live_preview.png
(\uicontrol {Show Live Preview}) button to check how the (\uicontrol {Show Live Preview}) button to check how the
@@ -265,10 +263,10 @@
component. component.
\endlist \endlist
To be useful, the button type has to be created in a project. To be useful, the button component has to be created in a project.
When you work on other QML files in the project to create screens When you work on other files in the project to create screens
or other components for the UI, the button type appears in the or other components for the UI, the button component appears in
\uicontrol {My QML Components} tab of the \uicontrol Library view. \l Library > \uicontrol Components > \uicontrol {My Components}.
You can drag and drop it to \uicontrol {Form Editor} or You can drag and drop it to \uicontrol {Form Editor} or
\uicontrol Navigator to create button instances and modify the values \uicontrol Navigator to create button instances and modify the values
of their properties to assign them useful IDs, change their appearance, of their properties to assign them useful IDs, change their appearance,

View File

@@ -180,15 +180,15 @@
Choose \uicontrol Tools > \uicontrol Options > \uicontrol {Qt Quick} > Choose \uicontrol Tools > \uicontrol Options > \uicontrol {Qt Quick} >
\uicontrol {Qt Quick Designer} to specify settings for snapping. In the \uicontrol {Qt Quick Designer} to specify settings for snapping. In the
\uicontrol {Parent item padding} field, specify the \uicontrol {Parent component padding} field, specify the
distance in pixels between the parent component and the snapping lines. In distance in pixels between the parent component and the snapping lines. In
the \uicontrol {Sibling item spacing} field, specify the distance in pixels the \uicontrol {Sibling component spacing} field, specify the distance in
between sibling components and the snapping lines. pixels between sibling components and the snapping lines.
\image qtquick-designer-options.png "Qt Quick Designer options" \image qtquick-designer-options.png "Qt Quick Designer options"
The following image shows the snapping lines (1) when The following image shows the snapping lines (1) when
\uicontrol {Parent item padding} is set to 5 pixels. \uicontrol {Parent component padding} is set to 5 pixels.
\image qmldesigner-snap-margins.png "Snapping lines on canvas" \image qmldesigner-snap-margins.png "Snapping lines on canvas"
@@ -220,9 +220,9 @@
\image qmldesigner-preview-size.png "Component width and height" \image qmldesigner-preview-size.png "Component width and height"
To set the initial size of the root component, select \uicontrol Tools > To set the initial size of the root component, select \uicontrol Tools >
\uicontrol Options > \uicontrol {Qt Quick} > \uicontrol {Qt Quick Designer} and \uicontrol Options > \uicontrol {Qt Quick} > \uicontrol {Qt Quick Designer}
specify the component width and height in the \uicontrol {Root Item Init Size} and specify the component width and height in the
group. \uicontrol {Root Component Init Size} group.
\section1 Specifying Canvas Size \section1 Specifying Canvas Size

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Creator documentation. ** This file is part of the Qt Creator documentation.
@@ -46,12 +46,11 @@
the contained components, and therefore, the modules must provide extra type the contained components, and therefore, the modules must provide extra type
information for code completion and the semantic checks to work correctly. information for code completion and the semantic checks to work correctly.
To create a QML module and make it appear in the \uicontrol Library view in To create a QML module and make it appear in the \l Library view:
the Design mode:
\list 1 \list 1
\li Create custom QML controls and place all the \c .qml files in a \li Create custom components and place all the \c .qml files in a
directory dedicated to your module. For example: directory dedicated to your module. For example:
\c {imports\asset_imports}. \c {imports\asset_imports}.
@@ -72,8 +71,8 @@
\li Create a \c .metainfo file for your module and place it in the \li Create a \c .metainfo file for your module and place it in the
\c designer directory. Meta information is needed to display the \c designer directory. Meta information is needed to display the
components in the \uicontrol {QML Types} tab in \uicontrol components in the \uicontrol Components tab in \uicontrol Library.
Library. Use a metainfo file delivered with Qt, such as Use a metainfo file delivered with Qt, such as
\c qtquickcontrols2.metainfo, as an example. \c qtquickcontrols2.metainfo, as an example.
\if defined(qtcreator) \if defined(qtcreator)
@@ -91,9 +90,9 @@
\endlist \endlist
Your module should now appear in the \uicontrol {QML Imports} tab in Your module should now appear in the \uicontrol Components tab in
\uicontrol Library in the Design mode. Your components should appear in the \uicontrol Library. Your components should appear in a subsection of
\uicontrol {QML Types} tab if a valid \c .metainfo file is in place. the \uicontrol Components tab if a valid \c .metainfo file is in place.
\if defined(qtcreator) \if defined(qtcreator)
\section1 Registering QML Types \section1 Registering QML Types
@@ -116,7 +115,7 @@
Ideally, QML modules have a \c{plugins.qmltypes} file in the same directory Ideally, QML modules have a \c{plugins.qmltypes} file in the same directory
as the \c qmldir file. The \c qmltypes file contains a description of the as the \c qmldir file. The \c qmltypes file contains a description of the
types exported by the module's plugins and is loaded by \QC when the components exported by the module's plugins and is loaded by \QC when the
module is imported. module is imported.
For Qt 4.8 and later, one or more \c qmltypes files can be listed in the For Qt 4.8 and later, one or more \c qmltypes files can be listed in the
@@ -131,7 +130,7 @@
Once you have obtained \c qmlplugindump for the Qt version the QML module's Once you have obtained \c qmlplugindump for the Qt version the QML module's
plugins were compiled with, run the following command to load My.Module plugins were compiled with, run the following command to load My.Module
version 1.0 from \c{/import/path/my/module} including all its plugins and version 1.0 from \c{/import/path/my/module} including all its plugins and
output a description of the plugins' types to output a description of the plugins' components to
\c{/import/path/my/module/plugins.qmltypes}: \c{/import/path/my/module/plugins.qmltypes}:
\code \code
@@ -175,7 +174,7 @@
\section1 Running QML Modules in Design Mode \section1 Running QML Modules in Design Mode
A QML emulation layer (also called QML Puppet) is used in the Design mode to A QML emulation layer (also called QML Puppet) is used in the Design mode to
render and preview images and to collect data. To be able to render custom types render and preview images and to collect data. To be able to render custom components
correctly from QML modules, the emulation layer must be built with the same correctly from QML modules, the emulation layer must be built with the same
Qt version and compiler as the QML modules. Qt version and compiler as the QML modules.

View File

@@ -38,9 +38,9 @@
\image qmldesigner-navigator.png "Navigator with component preview" \image qmldesigner-navigator.png "Navigator with component preview"
You can select components in the \uicontrol Navigator view to edit their You can select components in the \uicontrol Navigator view to edit their
properties in the \uicontrol Properties view. Components can access the properties in the \l Properties view. Components can access the
properties of their parent component. To select components in the properties of their parent component. To select components in the
\uicontrol {Form Editor} view, right-click a component, and select another \l {Form Editor} view, right-click a component, and select another
component in the \uicontrol Selection submenu. component in the \uicontrol Selection submenu.
Typically, child components are located within the parent component in Typically, child components are located within the parent component in
@@ -123,7 +123,8 @@
To hide invisible components in \uicontrol Navigator, click To hide invisible components in \uicontrol Navigator, click
\inlineimage filtericon.png \inlineimage filtericon.png
(\uicontrol {Filter Tree}) and select \uicontrol {Show only visible items}. (\uicontrol {Filter Tree}) and select
\uicontrol {Show Only Visible Components}.
\section1 Locking Components \section1 Locking Components
@@ -142,14 +143,14 @@
\image qtquick-designer-navigator-lock.gif "Locking components in Navigator" \image qtquick-designer-navigator-lock.gif "Locking components in Navigator"
You cannot select locked components in \uicontrol {Form Editor} or You cannot select locked components in \uicontrol {Form Editor} or
\uicontrol {3D Editor} nor access their properties in \l {3D Editor} nor access their properties in
\uicontrol Properties. \uicontrol Properties.
If you attempt to \l{Adding States}{remove a state} that changes the If you attempt to \l{Adding States}{remove a state} that changes the
properties of a locked component, you are prompted to confirm the removal. properties of a locked component, you are prompted to confirm the removal.
If you have \l{Editing Animation Curves}{added easing curves} to keyframe If you have \l{Editing Animation Curves}{added easing curves} to keyframe
animations, you can lock and unlock them in the \uicontrol {Curve Editor} animations, you can lock and unlock them in the \l {Curve Editor}
view. If you lock the components that contain the easing curves, the lock view. If you lock the components that contain the easing curves, the lock
status is synchronized between \uicontrol Navigator and status is synchronized between \uicontrol Navigator and
\uicontrol {Curve Editor}. \uicontrol {Curve Editor}.
@@ -164,7 +165,7 @@
components in \uicontrol {Form Editor}. To list the components in the order components in \uicontrol {Form Editor}. To list the components in the order
in which they appear in the file, as some other tools do, click in which they appear in the file, as some other tools do, click
\inlineimage filtericon.png \inlineimage filtericon.png
(\uicontrol {Filter Tree}), and select \uicontrol {Reverse item order}. (\uicontrol {Filter Tree}), and select \uicontrol {Reverse Component Order}.
To move a component to the top or bottom of the tree within its parent, To move a component to the top or bottom of the tree within its parent,
right-click it in \uicontrol Navigator or \uicontrol {Form Editor} right-click it in \uicontrol Navigator or \uicontrol {Form Editor}
@@ -218,7 +219,7 @@
right-click an instance of a component and then select right-click an instance of a component and then select
\uicontrol {Go into Component} in the context menu or \uicontrol {Go into Component} in the context menu or
press \key F2. press \key F2.
\li In \uicontrol Properties, select \uicontrol {Edit Master Component}. \li In \uicontrol Properties, select \uicontrol {Edit Base Component}.
\endlist \endlist
The component hierarchy is displayed as a bread crumb path, where you can The component hierarchy is displayed as a bread crumb path, where you can

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -113,7 +113,8 @@
\section1 Using Timelines to Animate Transitions \section1 Using Timelines to Animate Transitions
The Coffee Machine application screens for choosing coffee, empty cup, and The Coffee Machine application screens for choosing coffee, empty cup, and
brewing each use custom QML types specified in separate QML files. brewing each use custom components specified in separate component files
(.qml).
We use the \uicontrol Timeline view to animate the transitions between We use the \uicontrol Timeline view to animate the transitions between
the screens during the application flow in \e {ApplicationFlow.ui.qml}. the screens during the application flow in \e {ApplicationFlow.ui.qml}.
@@ -122,7 +123,7 @@
Our viewport contains 200 frames, so we select the Our viewport contains 200 frames, so we select the
\inlineimage plus.png "Plus button" \inlineimage plus.png "Plus button"
button to add a 1200-frame timeline to the root element. button to add a 1200-frame timeline to the root component.
We use the default values for all other fields. We use the default values for all other fields.
To start recording the transition from the startup screen to the coffee To start recording the transition from the startup screen to the coffee

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -55,7 +55,7 @@
Our viewport contains 1000 frames, so we select the Our viewport contains 1000 frames, so we select the
\inlineimage plus.png "Plus button" \inlineimage plus.png "Plus button"
button to add a 5000-frame timeline to the root element. button to add a 5000-frame timeline to the root component.
We use the default values for all other fields. We use the default values for all other fields.
To start recording the transitions between the Standard screen and the To start recording the transitions between the Standard screen and the
@@ -79,10 +79,10 @@
new timeline appears in the view. new timeline appears in the view.
When we select \e tripScreen in the \uicontrol Navigator, we can see the When we select \e tripScreen in the \uicontrol Navigator, we can see the
properties of the TripScreen QML type that we can animate in the properties of the TripScreen component that we can animate in the
\uicontrol Properties view. \uicontrol Properties view.
\image ebikedesign-trip-properties.png "Properties view of the Trip type" \image ebikedesign-trip-properties.png "Properties view of the Trip component"
We set values for the \uicontrol Visibility, We set values for the \uicontrol Visibility,
\uicontrol Opacity, \uicontrol currentFrame, and \uicontrol Scale properties \uicontrol Opacity, \uicontrol currentFrame, and \uicontrol Scale properties

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -38,12 +38,12 @@
\e{Log In UI - Part 1} is the first in a series of tutorials that build on \e{Log In UI - Part 1} is the first in a series of tutorials that build on
each other to illustrate how to use \QDS to create a simple UI with some each other to illustrate how to use \QDS to create a simple UI with some
basic UI components, such as pages, buttons, and fields. Part 1 describes basic UI components, such as pages, buttons, and fields. Part 1 describes
how to use the \QDS wizard templates to create a Qt Quick project and a how to use the \QDS wizard templates to create a project and a
button UI control, and how to modify the files generated by the wizard button UI control, and how to modify the files generated by the wizard
templates to design your own UI. templates to design your own UI.
The \e {Learn Qt Quick} sections provide additional information about the The \e {Learn More} sections provide additional information about the
tasks performed by the wizards and about the basics of QML and Qt Quick. tasks performed by the wizards and about other basic tasks and concepts.
\section1 Creating the UI Project \section1 Creating the UI Project
@@ -78,8 +78,8 @@
\image loginui1-project.png "Log In UI project in the Design mode" \image loginui1-project.png "Log In UI project in the Design mode"
The UI is built using a \l{basic-rectangle}{Rectangle} QML type that forms The UI is built using a \l{basic-rectangle}{Rectangle} component that forms
the background and a \l Text type that displays some text. the background and a \l Text component that displays some text.
\note The visibility of views depends on the selected workspace, \note The visibility of views depends on the selected workspace,
so your \QDS might look somewhat different from the above image. so your \QDS might look somewhat different from the above image.
@@ -184,7 +184,7 @@
\li Drag and drop the Qt logo from the \uicontrol Assets tab of \li Drag and drop the Qt logo from the \uicontrol Assets tab of
\uicontrol Library to the top-left corner of the rectangle. \uicontrol Library to the top-left corner of the rectangle.
\image loginui1-library-assets.png "Library view Assets tab" \image loginui1-library-assets.png "Library view Assets tab"
\QDS automatically creates a component of the \l{Images}{Image} type \QDS automatically creates a component of the \l{Images}{Image} component
for you with the path to the image file set as the value of for you with the path to the image file set as the value of
the \uicontrol Source field in \uicontrol Properties. the \uicontrol Source field in \uicontrol Properties.
\image loginui1-image-properties.png "Image properties" \image loginui1-image-properties.png "Image properties"
@@ -198,15 +198,15 @@
\image loginui1-main-page.png "Modified UI in the Design mode" \image loginui1-main-page.png "Modified UI in the Design mode"
\section2 Learn Qt Quick - QML Types \section2 Learn More - Components
The \l {Qt Quick} module provides all the basic types necessary for creating \QDS provides preset \l{glossary-component}{components} for creating
UIs. It provides a visual canvas and includes types for creating and UIs, including components for creating and animating visual components,
animating visual components, receiving user input, and creating data models receiving user input, and creating data models and views.
and views.
To be able to use the functionality of Qt Quick types, the wizard template To be able to use the functionality of preset components, the wizard template
adds the following \e import statements to the QML files that it creates: adds the following \e import statements to the UI files (.ui.qml) that it
creates:
\quotefromfile loginui1/Screen01.ui.qml \quotefromfile loginui1/Screen01.ui.qml
\skipto import \skipto import
@@ -214,72 +214,72 @@
You can view the import statements in the \uicontrol {Text Editor} view. You can view the import statements in the \uicontrol {Text Editor} view.
The \uicontrol Library view lists the QML types in each Qt module that are The \l Library view lists the components in each module that are
supported by \QDS. You can use the basic types to create your own QML supported by \QDS. You can use the basic components to create your own
types, and they will be listed under \uicontrol {My QML Components}. components, and they will be listed under \uicontrol {My Components}.
This section is only visible if you have created custom QML components. This section is only visible if you have created custom components.
The \l {basic-rectangle}{Rectangle}, \l Text, and \l {Images}{Image} types The \l {basic-rectangle}{Rectangle}, \l Text, and \l {Images}{Image}
used in this tutorial are based on the \l Item type. It is the base type for components used in this tutorial are based on the \l Item component.
all visual elements, with implementation of basic functions and properties, It is the base component for all visual elements, with implementation
such as type name, ID, position, size, and visibility. of basic functions and properties, such as component name, ID, position,
size, and visibility.
For more information, see \l{Use Case - Visual Elements In QML}. For For more information, see \l{Use Case - Visual Elements In QML}. For
descriptions of all QML types, see \l{All QML Types} in the Qt reference descriptions of all components, see \l{All QML Types} in the Qt reference
documentation. documentation.
\section3 Regtangle Properties \section3 Regtangle Properties
The basic \l {basic-rectangle}{Rectangle} QML type is used for drawing shapes The default \l {basic-rectangle}{Rectangle} component is used for drawing
with four sides and four corners. You can fill rectangles either with a shapes with four sides and four corners. You can fill rectangles either with
solid fill color or a gradient. You can specify the border color separately. a solid fill color or a gradient. You can specify the border color separately.
By setting the value of the radius property, you can create shapes with By setting the value of the radius property, you can create shapes with
rounded corners. rounded corners.
If you want to specify the radius of each corner separately, you can use the If you want to specify the radius of each corner separately, you can use the
\l{studio-rectangle}{Rectangle} type from the Qt Quick Studio Components \l{studio-rectangle}{Rectangle} component from the Studio Components
module instead of the basic rectangle type. It is available in the module instead of the basic rectangle component. It is available in the
\uicontrol {Studio Components} tab of \uicontrol Library. \uicontrol {Studio Components} tab of \l Library > \uicontrol Components.
\section3 Text Properties \section3 Text Properties
The \l Text type is used for adding static text to the UI, such as titles The \l Text component is used for adding static text to the UI, such as
and labels. You can select the font to use and specify extensive properties titles and labels. You can select the font to use and specify extensive
for each text item, such as size in points or pixels, weight, style, and properties for each text component, such as size in points or pixels,
spacing. weight, style, and spacing.
To display custom fonts in the list of available fonts in To display custom fonts in the list of available fonts in \l Properties,
\uicontrol Properties, add them in the \uicontrol Assets add them in the \uicontrol Assets tab of \uicontrol Library.
tab of \uicontrol Library.
If you want to create a label with a background, use the \l Label type If you want to create a label with a background, use the \l Label component
from the Qt Quick Controls module instead of the Text type. from the Qt Quick Controls module instead of the Text component.
\section3 Image Properties \section3 Image Properties
The \l {Images}{Image} type is used for adding images to the UI in several The \l {Images}{Image} component is used for adding images to the UI in several
supported formats, including bitmap formats such as PNG and JPEG and vector supported formats, including bitmap formats such as PNG and JPEG and vector
graphics formats such as SVG. You must add the images to your project in the graphics formats such as SVG. You must add the images to your project in the
\uicontrol Assets tab of \uicontrol Library to be able to use them in \uicontrol Assets tab of \uicontrol Library to be able to use them in
designs. designs.
If you need to display animated images, use the \l {Animated Image} type, If you need to display animated images, use the \l {Animated Image}
also available in the \uicontrol {Qt Quick - Basic} component, also available in \uicontrol Library > \uicontrol Components >
tab of \uicontrol Library. \uicontrol {Default Components} > \uicontrol Basic.
\section1 Creating a Push Button \section1 Creating a Push Button
You can use another wizard template to create a push button and to add it to You can use another wizard template to create a push button and to add it to
the project. The wizard template creates a reusable button component that the project. The wizard template creates a reusable button component that
appears under \uicontrol {My QML Components} in \uicontrol Library. You can appears under \uicontrol {My Components} in \uicontrol Library > Components.
drag and drop it to \uicontrol {Form Editor} and modify its properties You can drag and drop it to \l {Form Editor} and modify its properties
in \uicontrol Properties to change its appearance and functionality. in \l Properties to change its appearance and functionality.
If you find that you cannot use the wizard template nor the ready-made If you find that you cannot use the wizard template nor the ready-made
button controls available in the \uicontrol {Qt Quick Controls 2} tab button controls available in the \uicontrol {Qt Quick Controls} tab
in \uicontrol Library to create the kind of push button that you want, in \uicontrol Library > \uicontrol Components to create the kind of push
you can create your button from scratch using basic QML types. For more button that you want, you can create your button from scratch using default
information, see \l {Creating Buttons} and components. For more information, see \l {Creating Buttons} and
\l {Creating Scalable Buttons and Borders}. \l {Creating Scalable Buttons and Borders}.
To create a push button by using the wizard template: To create a push button by using the wizard template:
@@ -289,7 +289,7 @@
\uicontrol {Files and Classes} > \uicontrol {Qt Quick Controls} > \uicontrol {Files and Classes} > \uicontrol {Qt Quick Controls} >
\uicontrol {Custom Button} > \uicontrol Choose. \uicontrol {Custom Button} > \uicontrol Choose.
\li In the \uicontrol {Component name} field, enter a name for your \li In the \uicontrol {Component name} field, enter a name for your
button type: \e {PushButton}. button component: \e {PushButton}.
\li Select \uicontrol Finish (or \uicontrol Done on \macos) to create \li Select \uicontrol Finish (or \uicontrol Done on \macos) to create
the button. the button.
\endlist \endlist
@@ -298,16 +298,16 @@
\image loginui1-button.png "Button in the Design mode." \image loginui1-button.png "Button in the Design mode."
\section2 Learn Qt Quick - Qt Quick Controls \section2 Learn More - UI Controls
The \e {Custom Button} wizard template creates a \l {Button} The \e {Custom Button} wizard template creates a \l {Button}
QML type that belongs to the \l {Qt Quick Controls 2} module. It is a component that belongs to the \l {Qt Quick Controls} module. It is a
push-button control that can be pushed or clicked by the user. Buttons push-button control that can be pushed or clicked by the user. Buttons
are normally used to perform an action or to answer a question. The Button are normally used to perform an action or to answer a question. The Button
type inherits properties and functionality from another QML type. These component inherits properties and functionality from another component. These
enable you to set text, display an icon, react to mouse clicks, and so on. enable you to set text, display an icon, react to mouse clicks, and so on.
To be able to use the functionality of the Button type, the wizard template To be able to use the functionality of the Button component, the wizard template
adds the following \e import statements to the \e PushButton.ui.qml file: adds the following \e import statements to the \e PushButton.ui.qml file:
\quotefromfile loginui1/PushButton.ui.qml \quotefromfile loginui1/PushButton.ui.qml
@@ -315,9 +315,9 @@
\printuntil loginui1 \printuntil loginui1
The \l {Qt Quick Templates 2} module provides the functionality of the The \l {Qt Quick Templates 2} module provides the functionality of the
Button type. The module is imported as \e T, and the alias is added to Button component. The module is imported as \e T, and the alias is added to
the Button type definition to indicate that the Button type from the the Button component definition to indicate that the Button component from the
Qt Quick Controls 2 module is used, instead of some other type with the Qt Quick Controls module is used, instead of some other component with the
same name. same name.
\printuntil text \printuntil text
@@ -331,7 +331,7 @@
\section1 Styling the Button \section1 Styling the Button
You can now modify the properties of the PushButton type to your liking. To You can now modify the properties of the PushButton component to your liking. To
make the changes apply to all the button instances, you must make them in make the changes apply to all the button instances, you must make them in
the \e PushButton.ui.qml file. the \e PushButton.ui.qml file.
@@ -362,7 +362,7 @@
rounded corners. rounded corners.
\li In the \uicontrol States view, select the \e down state and modify \li In the \uicontrol States view, select the \e down state and modify
the background and border color as above. the background and border color as above.
\li Select the text item in \uicontrol Navigator to display its \li Select the text component in \uicontrol Navigator to display its
properties in \uicontrol Properties. properties in \uicontrol Properties.
\li In the \uicontrol {Text Color} field, select \uicontrol Actions > \li In the \uicontrol {Text Color} field, select \uicontrol Actions >
\uicontrol Reset to reset the text color to the default color, \uicontrol Reset to reset the text color to the default color,
@@ -379,26 +379,25 @@
\image loginui1-button-styled.png "Modified button in the Form Editor" \image loginui1-button-styled.png "Modified button in the Form Editor"
\section2 Learn Qt Quick - Property Bindings \section2 Learn More - Property Bindings
An object's property can be assigned a static value which stays constant A component's property can be assigned a static value which stays constant
until it is explicitly assigned a new value. In this tutorial, the color until it is explicitly assigned a new value. In this tutorial, the color
values you set in \uicontrol {Binding Editor} are static. values you set in \uicontrol {Binding Editor} are static.
However, to make the fullest use of QML and its built-in support for dynamic However, to make the fullest use of the built-in support for dynamic
object behavior, you can use property bindings that specify relationships component behavior, you can use property bindings that specify relationships
between different object properties. When a property's dependencies change between different component properties. When a property's dependencies change
in value, the property is automatically updated according to the specified in value, the property is automatically updated according to the specified
relationship. relationship.
Behind the scenes, the QML engine monitors the property's dependencies Behind the scenes, the property's dependencies are monitored (that is, the
(that is, the variables in the binding expression). When it detects a variables in the binding expression). When a change is detected, the binding
change, it re-evaluates the binding expression and applies the new result expression is re-evaluated and the new result is applied to the property.
to the property.
For more information, see \l {Property Binding}. For more information, see \l {Property Binding}.
Next, you will use the \e PushButton type in the main UI QML file, Next, you will use the \e PushButton component in the main UI file,
\e Screen01.ui.qml to add two instances of the button to the UI \e Screen01.ui.qml to add two instances of the button to the UI
and to modify their text labels. and to modify their text labels.
@@ -409,9 +408,9 @@
\list 1 \list 1
\li Double-click \e Screen01.ui.qml in \uicontrol Projects \li Double-click \e Screen01.ui.qml in \uicontrol Projects
to open it in \uicontrol {Form Editor}. to open it in \uicontrol {Form Editor}.
\li Drag and drop two instances of the PushButton type from \li Drag and drop two instances of the PushButton component from
\uicontrol Library to \uicontrol {Form Editor}. \uicontrol Library to \uicontrol {Form Editor}.
\image loginui1-library.png "My QML Components tab of Library view" \image loginui1-library.png "My Components tab of Library view"
\li Select one of the buttons in \uicontrol Navigator to modify \li Select one of the buttons in \uicontrol Navigator to modify
its id and text label in \uicontrol Properties. its id and text label in \uicontrol Properties.
\li In the \uicontrol Id field, enter \e loginButton. \li In the \uicontrol Id field, enter \e loginButton.
@@ -422,7 +421,7 @@
\li Select the other button, and change its id to \e registerButton \li Select the other button, and change its id to \e registerButton
and text label to \e {Create Account}. Again, mark the text and text label to \e {Create Account}. Again, mark the text
translatable. translatable.
\li When an element is selected, selection handles are displayed in its \li When a component is selected, selection handles are displayed in its
corners and on its sides. Use the selection handles to resize the corners and on its sides. Use the selection handles to resize the
buttons so that the text fits comfortably on the button background. buttons so that the text fits comfortably on the button background.
In this tutorial, the button width is set to 120 pixels. In this tutorial, the button width is set to 120 pixels.
@@ -440,10 +439,10 @@
\image loginui1-ready.png "The finished UI in the Design mode" \image loginui1-ready.png "The finished UI in the Design mode"
\section2 Learn Qt Quick - QML Ids \section2 Learn More - Component IDs
Each QML type and each instance of a QML type has an \e id that uniquely Each component and each instance of a component has an \e id that uniquely
identifies it and enables other objects' properties to be bound to it. An identifies it and enables other components' properties to be bound to it. An
id must be unique, it must begin with a lower-case letter or an underscore id must be unique, it must begin with a lower-case letter or an underscore
character, and it can contain only letters, numbers, and underscore character, and it can contain only letters, numbers, and underscore
characters. characters.

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -48,8 +48,8 @@
These instructions build on \l {Log In UI - Part 1}. These instructions build on \l {Log In UI - Part 1}.
The \e {Learn Qt Quick} sections provide additional information about the The \e {Learn More} sections provide additional information about the
features of QML and Qt Quick that are relevant to the task at hand. task at hand.
\section1 Anchoring UI Components \section1 Anchoring UI Components
@@ -91,23 +91,23 @@
\image loginui2-loginpage.png "Login page in the Design mode" \image loginui2-loginpage.png "Login page in the Design mode"
\section2 Learn Qt Quick - Anchors \section2 Learn More - Anchors
In an anchor-based layout, each QML type can be thought of as having a set In an anchor-based layout, each component can be thought of as having a set
of invisible \e anchor lines: top, bottom, left, right, fill, horizontal of invisible \e anchor lines: top, bottom, left, right, fill, horizontal
center, vertical center, and baseline. center, vertical center, and baseline.
Anchors enable placing an object either adjacent to or inside of another Anchors enable placing a component either adjacent to or inside of another
object, by attaching one or more of the object's anchor lines to the anchor component, by attaching one or more of the component's anchor lines to the
lines of the other object. If an object changes, the objects that are anchor lines of the other component. If a component changes, the components
anchored to it will adjust automatically to maintain the anchoring. that are anchored to it will adjust automatically to maintain the anchoring.
For more information, see \l{Positioning with Anchors}. For more information, see \l{Positioning with Anchors}.
\section1 Using Column Positioners \section1 Using Column Positioners
You will now add two entry fields to the page and position them in a column You will now add two entry fields to the page and position them in a column
to learn another method of \l{Using Positioners}{positioning items}. to learn another method of \l{Using Positioners}{positioning components}.
Next, you will position the push buttons on the page in another column. Next, you will position the push buttons on the page in another column.
Finally, you will anchor the columns to the page to enable their positions Finally, you will anchor the columns to the page to enable their positions
to change when the screen size changes. to change when the screen size changes.
@@ -115,15 +115,15 @@
To add entry fields to the page: To add entry fields to the page:
\list 1 \list 1
\li In \uicontrol Library > \uicontrol {QML Types}, select the \li In \l Library > \uicontrol Components, select the
\uicontrol {+ \QtQuick.Controls} button to display the \inlineimage plus.png
\l {Qt Quick Controls 2} types in the tab: button to add the \l {Qt Quick Controls} module to the project:
\image loginui2-imports.png \image loginui2-imports.png
\li Drag and drop two instances of the \uicontrol {Text Field} \li Drag and drop two instances of the \uicontrol {Text Field}
type from the \uicontrol {Qt Quick Controls 2} tab to component from the \uicontrol {Qt Quick Controls} tab to
\uicontrol {Form Editor}. \l {Form Editor}.
\li Select one of the text fields in \uicontrol Navigator, and \li Select one of the text fields in \l Navigator, and
change its id to \e usernameField in \uicontrol Properties. change its id to \e usernameField in \l Properties.
\li In the \uicontrol Geometry group, \uicontrol Size field, \li In the \uicontrol Geometry group, \uicontrol Size field,
make the field wide enough to accommodate long user names make the field wide enough to accommodate long user names
by setting its width to \e 300 pixels. by setting its width to \e 300 pixels.
@@ -136,7 +136,7 @@
and width to \e 300 pixels. and width to \e 300 pixels.
\endlist \endlist
The Text Field type has additional properties that you can use to change The Text Field component has additional properties that you can use to change
its appearance. For example, you can change the color, font, alignment, or its appearance. For example, you can change the color, font, alignment, or
word and letter spacing of the placeholder text. word and letter spacing of the placeholder text.
@@ -187,22 +187,18 @@
\image loginui2-loginpage-ready.png "Login page in the Design mode" \image loginui2-loginpage-ready.png "Login page in the Design mode"
\section1 Learn Qt Quick - Positioners \section1 Learn More - Positioners
Qt Quick provides built-in positioner items. For many use cases, the best For many use cases, the best positioner to use is a simple grid, row, or
positioner to use is a simple grid, row, or column, and Qt Quick provides column, and \QDS provides components that will position children in these
items that will position children in these formations in the most efficient formations in the most efficient manner possible. For more information
manner possible. For more information about using pre-defined positioners, about using preset positioners, see \l {Using Positioners}.
see \l {Item Positioners}.
For more complicated UI designs, you can use QML types from the For more complicated UI designs, you can use components from the
\l {Qt Quick Layouts Overview}{Qt Quick Layouts module}. \l {Using Layouts}{Qt Quick Layouts module}.
\section1 Next Steps \section1 Next Steps
To learn more about positioning items in \QDS, see
\l{Positioning Items}.
To learn how to add a second page and move to it from the main page, see To learn how to add a second page and move to it from the main page, see
the next tutorial in the series, \l {Log In UI - Part 3}. the next tutorial in the series, \l {Log In UI - Part 3}.
*/ */

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -42,8 +42,8 @@
first page, users can enter a username and password to log in. On the first page, users can enter a username and password to log in. On the
second page, they can register if they do not already have an account. second page, they can register if they do not already have an account.
Because the second page will contain most of the same UI elements as the Because the second page will contain most of the same UI components as the
login page, you will use \e states to show and hide UI elements as necessary login page, you will use \e states to show and hide UI components as necessary
when a user selects the \uicontrol {Create Account} button. when a user selects the \uicontrol {Create Account} button.
These instructions build on: These instructions build on:
@@ -53,8 +53,8 @@
\li \l {Log In UI - Part 2} \li \l {Log In UI - Part 2}
\endlist \endlist
The \e {Learn Qt Quick} sections provide additional information about the The \e {Learn More} sections provide additional information relevant to the
features of QML and Qt Quick that are relevant to the task at hand. task at hand.
\section1 Adding UI Components \section1 Adding UI Components
@@ -71,18 +71,18 @@
To add the text field and a back button needed on the registration page: To add the text field and a back button needed on the registration page:
\list 1 \list 1
\li Open \e {Screen01.ui.qml} in \uicontrol {Form Editor} for editing. \li Open \e {Screen01.ui.qml} in \l {Form Editor} for editing.
\li Drag and drop a \uicontrol {Text Field} from \uicontrol Library \li Drag and drop a \uicontrol {Text Field} from \l Library
> \uicontrol {QML Types} > \uicontrol {Qt Quick Controls 2} to > \uicontrol Components > \uicontrol {Qt Quick Controls} to
\e fieldColumn in \uicontrol Navigator. \e fieldColumn in \l Navigator.
\li In \uicontrol Properties, change the id of the text field to \li In \l Properties, change the ID of the text field to
\e verifyPasswordField. \e verifyPasswordField.
\li In the \uicontrol Geometry group, \uicontrol Size field, set the \li In the \uicontrol Geometry group, \uicontrol Size field, set the
width of the field to \e 300 pixels to match the size of the width of the field to \e 300 pixels to match the size of the
existing fields. existing fields.
\li In the \uicontrol Placeholder field, set the placeholder text to \li In the \uicontrol Placeholder field, set the placeholder text to
\e {Verify password} and mark the text translatable. \e {Verify password} and mark the text translatable.
\li Drag and drop a PushButton type from \uicontrol Library > \li Drag and drop a PushButton component from \uicontrol Library >
\uicontrol {My QML Components} to their parent rectangle in \uicontrol {My QML Components} to their parent rectangle in
\uicontrol Navigator. \uicontrol Navigator.
\li Select the button in \uicontrol Navigator and change its id to \li Select the button in \uicontrol Navigator and change its id to
@@ -145,32 +145,28 @@
\image loginui3-states.png "States view" \image loginui3-states.png "States view"
\section2 Learn Qt Quick - States \section2 Learn More - States
In Qt Quick, the \e state of a particular visual item is the set of The \l{Adding States}{state} of a particular visual component is the set of
information which describes how and where the individual component information which describes how and where the individual parts of the visual
parts of the visual item are displayed within it, and all the data component are displayed within it, and all the data associated with that
associated with that state. Most visual items in a UI will have a state. Most visual components in a UI will have a limited number of states,
limited number of states, each with well-defined properties. each with well-defined properties.
For example, an element in a list may be either selected or not, and if For example, a list item may be either selected or not, and if
selected, it may either be the currently active single selection or it selected, it may either be the currently active single selection or it
may be part of a selection group. Each of those states may have certain may be part of a selection group. Each of those states may have certain
associated visual appearance (neutral, highlighted, expanded, and so on). associated visual appearance (neutral, highlighted, expanded, and so on).
Qt Quick provides a \l State type with properties which define its Youn can apply states to trigger behavior or animations. UI components
semantics and can be used to trigger behavior or animations. UI components typically have a default state that contains all of a component's initial
typically have a state property and a default state. The default state property values and is therefore useful for managing property values before
contains all of an item's initial property values, and is therefore useful state changes.
for managing property values before state changes.
UI components can specify additional states by adding new State objects to You can specify additional states by adding new states. Each state within a
the state property. Each state within a component has a unique name. To component has a unique name. To change the current state of an component,
change the current state of an item, the state property is set to the name the state property is set to the name of the state. State changes can be
of the state. State changes can be bound to conditions by using the \c when bound to conditions by using the \c when property.
property.
For more information, see \l{Qt Quick States}.
Next, you will create connections to specify that clicking the Next, you will create connections to specify that clicking the
\uicontrol {Create Account} button on the login page triggers a \uicontrol {Create Account} button on the login page triggers a
@@ -180,12 +176,12 @@
\section1 Connecting Buttons to States \section1 Connecting Buttons to States
QML types have predefined signals that are emitted when users interact Components have predefined signals that are emitted when users interact
with the UI. The \e PushButton QML type contains a \l{Mouse Area} type with the UI. The \e PushButton component contains a \l{Mouse Area} component
that has a \e clicked signal. The signal is emitted whenever the mouse that has a \e clicked signal. The signal is emitted whenever the mouse
is clicked within the area. is clicked within the area.
You will now use the \uicontrol Connections view to You will now use the \l Connections view to
\l{Connecting Components to Signals}{connect} the clicked signal of \l{Connecting Components to Signals}{connect} the clicked signal of
\e registerButton to \e registerState and that of \e backButton \e registerButton to \e registerState and that of \e backButton
to \e loginState: to \e loginState:
@@ -217,7 +213,7 @@
\image loginui3.gif "Moving between login page and registration page" \image loginui3.gif "Moving between login page and registration page"
\section2 Learn Qt Quick - Signal and Event Handlers \section2 Learn More - Signal and Event Handlers
UI components need to communicate with each other. For example, a button UI components need to communicate with each other. For example, a button
needs to know that the user has clicked on it. In response, the button may needs to know that the user has clicked on it. In response, the button may
@@ -233,8 +229,8 @@
\section1 Next Steps \section1 Next Steps
For a more complicated UI, you would typically use QML types that specify For a more complicated UI, you would typically use components that specify
a view of items provided by a model, such as a \l ListView or \l StackView. a view of components provided by a model, such as a \l ListView or \l StackView.
For more information, see \l{Using Data Models}. For more information, see \l{Using Data Models}.
To learn how to use a timeline to animate the transition between the login To learn how to use a timeline to animate the transition between the login

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -53,8 +53,8 @@
\li \l {Log In UI - Part 3} \li \l {Log In UI - Part 3}
\endlist \endlist
The \e {Learn Qt Quick} sections provide additional information about the The \e {Learn More} sections provide additional information relevant to the
features of QML and Qt Quick that are relevant to the task at hand. task at hand.
\section1 Animating UI Components \section1 Animating UI Components
@@ -287,14 +287,14 @@
\image loginui4.gif "Moving between login page and registration page" \image loginui4.gif "Moving between login page and registration page"
\section2 Learn Qt Quick - Timeline \section2 Learn More - Timeline
The Qt Quick Timeline module provides QML types to use timelines and The Qt Quick Timeline module provides components to use timelines and
keyframes to animate component properties in UIs. Animating properties keyframes to animate component properties in UIs. Animating properties
enables their values to move through intermediate values instead of enables their values to move through intermediate values instead of
immediately changing to the target value. immediately changing to the target value.
The Keyframe type specifies the value of a keyframe on a timeline. \QDS The Keyframe component specifies the value of a keyframe on a timeline. \QDS
automatically adds keyframes between two keyframes, and sets their values automatically adds keyframes between two keyframes, and sets their values
evenly to create an appearance of movement or transformation. evenly to create an appearance of movement or transformation.
@@ -302,14 +302,15 @@
of the animation. For more information about easing curve types, see the of the animation. For more information about easing curve types, see the
documentation for \l [QML] {PropertyAnimation}{easing curves}. documentation for \l [QML] {PropertyAnimation}{easing curves}.
To be able to use the functionality of Qt Quick Timeline types, \QDS adds To be able to use the functionality of Timeline components, \QDS adds
the following \e import statement to the QML files where it uses the types: the following \e import statement to the UI files where it uses the
components:
\quotefromfile loginui4/Screen01.ui.qml \quotefromfile loginui4/Screen01.ui.qml
\skipto QtQuick.Timeline \skipto QtQuick.Timeline
\printuntil 1.0 \printuntil 1.0
All the properties and functions of the QML types from this module are All the properties and functions of the components from this module are
available in the Design mode, and therefore it is enough to learn how to available in the Design mode, and therefore it is enough to learn how to
use \uicontrol Timeline, as described in \l {Creating Animations}. use \uicontrol Timeline, as described in \l {Creating Animations}.

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -36,36 +36,36 @@
\section1 Creating the Progress Bar \section1 Creating the Progress Bar
First, we create an empty Qt Quick project, as described in First, we create an empty project, as described in \l {Creating Projects}.
\l {Creating Projects}. For the purposes of this example, For the purposes of this example, we call the project \e progressbar.
we call the project \e progressbar.
In this example, we use two overlapping rectangles and a text label to In this example, we use two overlapping rectangles and a text label to
create the progress bar. For another example of a progress bar, see the create the progress bar. For another example of a progress bar, see the
\l {progress-bar-control}{Progress Bar} type in Qt Quick Controls. \l {progress-bar-control}{Progress Bar} component in Qt Quick Controls.
In the Design mode, we drag and drop a \uicontrol Rectangle from the In the Design mode, we drag and drop a \uicontrol Rectangle from
\uicontrol Library to the \uicontrol {Form Editor} and modify its size \l Library to \l {Form Editor} and modify its size to create the
to create the background for the progress bar. We change its id to background for the progress bar. We change its ID to \e background in
\e background in the \uicontrol Properties view. \l Properties.
We want to be able to control the background rectangle and the text label We want to be able to control the background rectangle and the text label
that was added by the project wizard, so we will use an \uicontrol Item that was added by the project wizard, so we will use an \uicontrol Item
for that. We drag and drop the item from the \uicontrol Library to the component for that. We drag and drop the Item from \uicontrol Library to
\uicontrol {Form Editor} and change its id to \e root in the \uicontrol {Form Editor} and change its ID to \e root in
\uicontrol Properties view. \uicontrol Properties.
To make the background and text children of the item, we drag and drop them To make the background and text children of the Item, we drag and drop them
to the item in the \uicontrol Navigator view. This enables us to use the anchor to the Item in \l Navigator. This enables us to use the anchor
buttons in \uicontrol Properties > \uicontrol Layout to anchor them to their buttons in \uicontrol Properties > \uicontrol Layout to anchor them to their
parent. We anchor the background to its parent on all edges, with a 30-pixel parent. We anchor the background to its parent on all edges, with a 30-pixel
margin at the top to leave space for the text. We then anchor the text to margin at the top to leave space for the text. We then anchor the text to
the top of the item. the top of the Item.
\image progressbar-rectangle.png "Progress bar background in the Form Editor" \image progressbar-rectangle.png "Progress bar background in the Form Editor"
We now drag and drop another rectangle on top of the background rectangle in We now drag and drop another rectangle on top of the background rectangle in
the \uicontrol Navigator and change its id to \e indicator in the properties. \uicontrol Navigator and change its ID to \e indicator in
\uicontrol Properties.
We then anchor the left, top, and bottom of the indicator to its parent with We then anchor the left, top, and bottom of the indicator to its parent with
5-pixel margins. We leave the right side free, because its value needs to 5-pixel margins. We leave the right side free, because its value needs to
change for the animation. change for the animation.
@@ -78,13 +78,13 @@
The text label will indicate the progress in numbers and changing color, The text label will indicate the progress in numbers and changing color,
while the indicator rectangle will indicate it by getting wider and while the indicator rectangle will indicate it by getting wider and
changing color. To animate the label and indicator, we'll add timelines changing color. To animate the label and indicator, we'll add timelines
in the \uicontrol Timeline view. in the \l Timeline view.
For more information about using the timeline, see \l {Creating Animations}. For more information about using the timeline, see \l {Creating Animations}.
\section2 Adding Color Animation \section2 Adding Color Animation
First, we add a color animation to the \e root item. We select the First, we add a color animation to the \e root component. We select the
\inlineimage plus.png \inlineimage plus.png
button to add a 100-frame timeline to root. You can use the default button to add a 100-frame timeline to root. You can use the default
values for all other fields. values for all other fields.
@@ -99,8 +99,8 @@
We then set the color at frame 0 to green (\e {#8de98d}) in We then set the color at frame 0 to green (\e {#8de98d}) in
\uicontrol Properties > \uicontrol Text > \uicontrol {Text Color}. \uicontrol Properties > \uicontrol Text > \uicontrol {Text Color}.
We can either pick a color from the color selector or use the We can either \l{Picking Colors}{pick a color} from the color selector
\uicontrol {Set Binding} command in the \inlineimage submenu.png or use the \uicontrol {Set Binding} command in the \inlineimage submenu.png
(\uicontrol Settings) menu to open the \uicontrol {Binding Editor}. (\uicontrol Settings) menu to open the \uicontrol {Binding Editor}.
We then move the playhead to frame 50 and set the text color to red We then move the playhead to frame 50 and set the text color to red
@@ -122,9 +122,9 @@
\image progressbar-timeline-indicator.png "Indicator timeline" \image progressbar-timeline-indicator.png "Indicator timeline"
We will now copy the color animation from the text label to the indicator. We will now copy the color animation from the text label to the indicator.
First, we right-click the text item in the \uicontrol Timeline view to open First, we right-click the text component in the \uicontrol Timeline view to
a context menu and select \uicontrol {Copy All Keyframes from Item} to copy open a context menu and select \uicontrol {Copy All Keyframes from Item} to
the keyframe values we specified for the text label. copy the keyframe values we specified for the text label.
Next, we select the indicator in the \uicontrol Navigator, and then select Next, we select the indicator in the \uicontrol Navigator, and then select
\uicontrol {Insert Keyframes for Item} to paste the keyframe \uicontrol {Insert Keyframes for Item} to paste the keyframe
@@ -138,11 +138,11 @@
\section1 Creating a Reusable Component \section1 Creating a Reusable Component
We want the progress bar to be reusable, so we'll move it to a separate We want the progress bar to be reusable, so we'll move it to a separate
QML file. To make sure that the component will contain the timeline, we component file. To make sure that the component will contain the timeline,
select \uicontrol {Filter Tree} in the \uicontrol Navigator, and then we select \uicontrol {Filter Tree} in \uicontrol Navigator and then
deselect the \uicontrol {Show Only Visible Items} check box to show the deselect the \uicontrol {Show Only Visible Items} check box to show the
timeline item in the \uicontrol Navigator. We then move the timeline item timeline component in \uicontrol Navigator. We then move the timeline
to \e root to have it moved as a part of the root component. component to \e root to have it moved as a part of the root component.
Now we can right-click root to open a context menu and select Now we can right-click root to open a context menu and select
\uicontrol {Move Component into Separate File}. We can see the \uicontrol {Move Component into Separate File}. We can see the
@@ -152,28 +152,28 @@
\section1 Exporting Properties \section1 Exporting Properties
We now select the root component in the \uicontrol Navigator, and We now select the root component in \uicontrol Navigator, and
then select \uicontrol {Go into Component} in the context menu to then select \uicontrol {Go into Component} in the context menu to
open \e Root.qml in the \uicontrol {Form Editor}. open \e Root.qml in \uicontrol {Form Editor}.
We want to be able to use the keyframe value as the value of the text label, We want to be able to use the keyframe value as the value of the text label,
so we will export it as a property alias. We select \e timeline in the so we will export it as a property alias. We select \e timeline in
\uicontrol Navigator and then \uicontrol Properties > \uicontrol Timeline > \uicontrol Navigator and then \uicontrol Properties > \uicontrol Timeline >
\uicontrol {Current frame} > \uicontrol Settings > \uicontrol {Current frame} > \uicontrol Settings >
\uicontrol {Export Property as Alias}. \uicontrol {Export Property as Alias}.
\image progressbar-root-export-property.png "Export keyframe group as a property" \image progressbar-root-export-property.png "Export keyframe group as a property"
When we select \e root in the \uicontrol Navigator, we can see the When we select \e root in \uicontrol Navigator, we can see the
\e timelineCurrentFrame property in \uicontrol Connections \e timelineCurrentFrame property in \uicontrol {Connections View}
> \uicontrol Bindings. We double-click it to change its name > \uicontrol Bindings. We double-click it to change its name
to \e progress. to \e progress.
\image progressbar-bindings-progress.png "Connections view Bindings tab" \image progressbar-bindings-progress.png "Connections View Bindings tab"
We will bind some JavaScript to the value of the text label to turn We will bind some JavaScript to the value of the text label to turn
it into a running number that reflects the number of the keyframe on the it into a running number that reflects the number of the keyframe on the
timeline. We select the text label in the \uicontrol Navigator, and then timeline. We select the text label in \uicontrol Navigator and then
select \uicontrol Properties > \uicontrol Text > \uicontrol {Set Binding} select \uicontrol Properties > \uicontrol Text > \uicontrol {Set Binding}
to open the \uicontrol {Binding Editor}. We set to open the \uicontrol {Binding Editor}. We set
\c {Math.round(root.progress)} as the value of the text label. \c {Math.round(root.progress)} as the value of the text label.
@@ -190,7 +190,7 @@
We can now add timelines for each progress bar instance, with different We can now add timelines for each progress bar instance, with different
settings. We select the \inlineimage plus.png settings. We select the \inlineimage plus.png
button to add a 4000-frame timeline to the first progress bar instance button to add a 4000-frame timeline to the first progress bar instance
(\e root). We select the \uicontrol Continuous check box, so that the (\e root). We select the \uicontrol Continuous check box so that the
animation will loop. animation will loop.
In \uicontrol Properties > \uicontrol Root, we can see the In \uicontrol Properties > \uicontrol Root, we can see the

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -50,17 +50,17 @@
The button can have the following states: checked, hover, pressed, and The button can have the following states: checked, hover, pressed, and
normal. We construct the button using different images for the button normal. We construct the button using different images for the button
background, frame, and front. We then add states in the \uicontrol States background, frame, and front. We then add \l{Adding States}{states} in
view for each of the button states. In each state, we turn the visibility the \l States view for each of the button states. In each state, we turn
of the appropriate images on or off in the button properties, to change the visibility of the appropriate images on or off in the button properties,
the appearance of the button. to change the appearance of the button.
\image sidemenu-custombutton-states.png "CustomButton QML type states" \image sidemenu-custombutton-states.png "CustomButton component states"
To change the button text when the button state changes, we bind the To change the button text when the button state changes, we bind the
text property to the state of the button in the \uicontrol Properties view. text property to the state of the button in the \l Properties view.
When \e control is selected in the \uicontrol Navigator, we select the When \e control is selected in the \l Navigator, we select the
\uicontrol Settings menu for the \uicontrol Text property, and then select \uicontrol Actions menu for the \uicontrol Text property, and then select
\uicontrol {Set Binding}. In the \uicontrol {Binding Editor}, we set the \uicontrol {Set Binding}. In the \uicontrol {Binding Editor}, we set the
binding to \c control.state. binding to \c control.state.
@@ -69,7 +69,7 @@
We want the buttons to be checkable, so we set the We want the buttons to be checkable, so we set the
\l {AbstractButton::}{checkable} property to \c true. \l {AbstractButton::}{checkable} property to \c true.
We now select \uicontrol {Set when Condition} in the \uicontrol Settings menu We now select \uicontrol {Set when Condition} in the \uicontrol Actions menu
for the states to bind the properties to the states using \c when for the states to bind the properties to the states using \c when
conditions. First, we specify that a button instance enters the \e checked conditions. First, we specify that a button instance enters the \e checked
state when the \l {AbstractButton::}{checked} property is set to \c true. state when the \l {AbstractButton::}{checked} property is set to \c true.
@@ -99,11 +99,10 @@
\section1 Constructing a Menu Bar \section1 Constructing a Menu Bar
We construct the menu bar in the \e {MainFile.ui.qml} file using the We construct the menu bar in the \e {MainFile.ui.qml} file using the
\uicontrol {Form Editor}. The CustomButton type is listed in \l {Form Editor}. The CustomButton component is listed in
\uicontrol Library > \uicontrol {QML Types} > \l Library > \uicontrol Components > \uicontrol {My Components}.
\uicontrol {My QML Components}. We drag and drop several instances of We drag and drop several instances of the component to the \l {Form Editor}
the type to the \uicontrol {Form Editor} and enclose them in a RowLayout and enclose them in a RowLayout component to lay them out as a menu bar.
type to lay them out as a menu bar.
\image sidemenu-menubar.png \image sidemenu-menubar.png
@@ -126,10 +125,10 @@
click the burger menu. In the \uicontrol {Form Editor}, we use the click the burger menu. In the \uicontrol {Form Editor}, we use the
\l Text and \l {slider-control}{Slider} components to create separate \l Text and \l {slider-control}{Slider} components to create separate
submenus for each set of effects we want to apply to the images. We use submenus for each set of effects we want to apply to the images. We use
a background image for the menu background and a BurgerMenu custom QML a background image for the menu background and a BurgerMenu custom
type for the burger menu icon. component for the burger menu icon.
\image sidemenu-ui.png "SliderMenu type" \image sidemenu-ui.png "SliderMenu component"
We add states to the \e {SideMenu.qml} file in the \uicontrol {Form Editor}. We add states to the \e {SideMenu.qml} file in the \uicontrol {Form Editor}.
When the application starts, the side menu is in the \e closed state, which When the application starts, the side menu is in the \e closed state, which
@@ -148,7 +147,7 @@
\image sidemenu-states.png "Side menu states" \image sidemenu-states.png "Side menu states"
We then select the \inlineimage plus.png We then select the \inlineimage plus.png
button in the \uicontrol Timeline view to add animation button in the \l Timeline view to add animation
for transitions to the \e open and \e close states: for transitions to the \e open and \e close states:
\image sidemenu-timeline-settings.png "Side menu timeline settings" \image sidemenu-timeline-settings.png "Side menu timeline settings"
@@ -182,7 +181,7 @@
We select \inlineimage animation.png "Timeline Settings button" We select \inlineimage animation.png "Timeline Settings button"
to open the \uicontrol {Timeline Settings} dialog. In the to open the \uicontrol {Timeline Settings} dialog. In the
\uicontrol {Transitions to states} field, we select the state to \uicontrol {Transitions to states} field, we select the state to
switch to when the animation finishes. In the lower part of the apply when the animation finishes. In the lower part of the
dialog, we bind the states that don't have animations to fixed frames. dialog, we bind the states that don't have animations to fixed frames.
For more information about using the timeline, see \l {Creating Animations}. For more information about using the timeline, see \l {Creating Animations}.
@@ -192,7 +191,7 @@
In \e {SideMenu.qml}, we use connections to bind the action of clicking In \e {SideMenu.qml}, we use connections to bind the action of clicking
the burger menu to the signal handler for triggering the opening or the burger menu to the signal handler for triggering the opening or
closing animation, depending on the current state. We create the connections closing animation, depending on the current state. We create the connections
in the \uicontrol Connections view. in the \l Connections view.
\image sidemenu-connections.png \image sidemenu-connections.png
@@ -211,13 +210,14 @@
\section1 Applying Effects \section1 Applying Effects
We nest the effects in an effects stack and bind them to the We nest the effects in an effects stack and bind them to the
\l {slider-control}{Slider} type instances. The effects apply \l {slider-control}{Slider} component instances. The effects apply
to all the images in the example application, not just the to all the images in the example application, not just the
currently open one. currently open one.
We use property bindings to connect the controls in the slider menu to We use property bindings to connect the controls in the slider menu to
\l {2D Effects}{graphical effects}. To have access to the \l {2D Effects}{graphical effects}. To have access to the
properties from all the slider type instances, we export them as aliases properties from all the slider component instances, we export them as
in \e SliderMenu.ui.qml. We select \uicontrol {Export Property as Alias} in \e SliderMenu.ui.qml. We select \uicontrol {Export Property as Alias}
in the \uicontrol Settings menu of the \uicontrol Value property in in the \uicontrol Settings menu of the \uicontrol Value property in
\uicontrol Properties > \uicontrol Slider. \uicontrol Properties > \uicontrol Slider.
@@ -227,9 +227,10 @@
\image sidemenu-effects-stack.png "Effects stack in the Navigator" \image sidemenu-effects-stack.png "Effects stack in the Navigator"
We use the \l {Images}{Image} type as the last item in the stack to display We use the \l {Images}{Image} component as the last item in the stack to
images that we apply the effects to. We export the image source property as display images that we apply the effects to. We export the image source
an alias to be able to switch the image inside the stack. property as an \l{Adding Property Aliases}{alias} to be able to switch
the image inside the stack.
For more information about the available graphical effects, see For more information about the available graphical effects, see
\l {2D Effects}. \l {2D Effects}.

View File

@@ -48,26 +48,26 @@
Users select buttons to navigate between the screens. Users select buttons to navigate between the screens.
We use \l{Connecting Components to Signals}{connections} to determine which We use \l{Connecting Components to Signals}{connections} to determine which
screen to open when users select a particular button and \l{Adding States} screen to open when users select a particular button and \l{Adding States}
{States} to show the screens. We use the \l{Creating Animations}{timeline} {states} to show the screens. We use the \l{Creating Animations}{timeline}
to create progress indicators for buttons and the \e Running screen. to create progress indicators for buttons and the \e Running screen.
In addition, all screens contain a small clock component that displays In addition, all screens contain a small clock component that displays
the current time. We implement a \e TimeDate JavaScript component to the current time. We implement a \e TimeDate JavaScript object to
support this feature on \l{https://doc.qt.io/QtForMCUs/qtul-qmltypes.html} support this feature on \l{https://doc.qt.io/QtForMCUs/qtul-qmltypes.html}
{Qt for MCUs}, which does not support the \l Date QML type at the time of {Qt for MCUs}, which does not support the \l Date component at the time of
writing. writing.
\section1 Creating an Application for MCUs \section1 Creating an Application for MCUs
We use the \uicontrol {Qt for MCUs Application} project template to create We use the \uicontrol {Qt for MCUs Application} project template to create
an application for MCUs, which support only a subset of the \l{Qt QML}, an application for MCUs, which support only a subset of the preset
\l {Qt Quick}, and \l{Qt Quick Controls} types. We select \uicontrol File > \l{glossary-component}{components}. We select \uicontrol File >
\uicontrol {New File or Project} > \uicontrol {Qt for MCUs Application} > \uicontrol {New File or Project} > \uicontrol {Qt for MCUs Application} >
\uicontrol Choose, and follow the instructions of the wizard to create our \uicontrol Choose, and follow the instructions of the wizard to create our
project. project.
This way, only the components and properties supported on MCUs are visible This way, only the components and properties supported on MCUs are visible
in \uicontrol Library and \uicontrol Properties, and we won't accidentally in \l Library and \l Properties, and we won't accidentally
add unsupported components to our UI or specify unsupported properties for add unsupported components to our UI or specify unsupported properties for
supported components. For more information, see \l{Creating Projects}. supported components. For more information, see \l{Creating Projects}.
@@ -84,10 +84,10 @@
For this example, we used an external tool to design the UI and then For this example, we used an external tool to design the UI and then
exported and imported our design into \QDS as assets and components exported and imported our design into \QDS as assets and components
using \QB, as instructed in \l{Exporting from Design Tools}. While using \QB, as instructed in \l{Exporting from Design Tools}. While
exporting, we only picked QML types supported by Qt for MCUs to use exporting, we only picked components supported by Qt for MCUs to use
for our components. For the button components, we mostly use the for our components. For the button components, we mostly use the
\l {basic-image}{Image}, \l Text, and \l {Mouse Area} types. For the \l {basic-image}{Image}, \l Text, and \l {Mouse Area} components. For the
screen background, we use the \l {basic-rectangle}{Rectangle} type. screen background, we use the \l {basic-rectangle}{Rectangle} component.
The text might look different on the desktop and MCUs, because on the The text might look different on the desktop and MCUs, because on the
desktop we use dynamic font loading, whereas on MCUs fonts are compiled desktop we use dynamic font loading, whereas on MCUs fonts are compiled
@@ -128,7 +128,7 @@
We animate the rotation properties of the arc segments to rotate each of We animate the rotation properties of the arc segments to rotate each of
them into the next block, one after another. them into the next block, one after another.
We use this component instead of the \l Arc type, which is not supported We use this component instead of the \l Arc component, which is not supported
on MCUs. on MCUs.
We can now add a timeline animation to make the arc move around the button We can now add a timeline animation to make the arc move around the button
@@ -199,10 +199,10 @@
\section1 Connecting Buttons to State Changes \section1 Connecting Buttons to State Changes
In each file that defines a screen, we connect signals to the In each file that defines a screen, we connect signals to the
button objects to change to a particular state when users select button components to change to a particular state when users select
buttons. buttons.
Some signals are predefined for the \l {Mouse Area} type, some we have to Some signals are predefined for the \l {Mouse Area} component, some we have to
add ourselves. For example, let's look at the start button that we use add ourselves. For example, let's look at the start button that we use
in \e StartScreen.ui.qml. First, we use the \uicontrol {Text Editor} view in \e StartScreen.ui.qml. First, we use the \uicontrol {Text Editor} view
to create the \c startClicked signal: to create the \c startClicked signal:
@@ -231,14 +231,14 @@
which overrides \c when conditions. Otherwise, we could just select the which overrides \c when conditions. Otherwise, we could just select the
action to change to the state that we want in the \uicontrol Action field. action to change to the state that we want in the \uicontrol Action field.
We create similar connections between button objects and signals in the We create similar connections between button components and signals in the
other screens to apply other actions that move users to other screens. other screens to apply other actions that move users to other screens.
For more information, see \l {Connecting Components to Signals}. For more information, see \l {Connecting Components to Signals}.
\section1 Showing the Current Time \section1 Showing the Current Time
The \l Date QML type is not supported on Qt for MCUs, and the The \l Date component is not supported on Qt for MCUs, and the
\l{https://doc.qt.io/QtForMCUs/qtul-javascript-environment.html} \l{https://doc.qt.io/QtForMCUs/qtul-javascript-environment.html}
{implementation of the JavaScript \c Date()} object returns elapsed {implementation of the JavaScript \c Date()} object returns elapsed
time since when the application was started instead of the current time since when the application was started instead of the current

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -42,7 +42,7 @@
\section1 Exporting from Adobe Photoshop \section1 Exporting from Adobe Photoshop
We use Adobe Photoshop to design our application and \QB to export our We use Adobe Photoshop to design our application and \QB to export our
design to \QDS as PNG images and custom QML types. design to \QDS as PNG images and custom components.
Before we can begin, we must set up \QB as instructed in Before we can begin, we must set up \QB as instructed in
\l{Exporting Designs from Adobe Photoshop}. \l{Exporting Designs from Adobe Photoshop}.
@@ -63,10 +63,10 @@
will be exported as PNG files, with references to them in the component file will be exported as PNG files, with references to them in the component file
that contains them. that contains them.
We can export some components as QML types that provide the functionality We can export some components as components that provide the functionality
that we want. To use the types in \QDS, we need to add import statements that we want. To use the components in \QDS, we need to add import statements
that pull in the modules that contain the types. We can even specify that pull in the modules that contain the components. We can even specify
properties for the types to export, so that we won't have to do that in properties for the components to export, so that we won't have to do that in
\QDS. \QDS.
\section2 Creating a Reference Image \section2 Creating a Reference Image
@@ -94,12 +94,12 @@
\image webinardemo-qb-stacklayout.png "Settings for exporting stackLayout artboard" \image webinardemo-qb-stacklayout.png "Settings for exporting stackLayout artboard"
For the stackLayoutFrame layer, we want to use a \l StackLayout QML type, For the stackLayoutFrame layer, we want to use a \l StackLayout component,
which provides a stack of items where only one item is visible at a time. which provides a stack of items where only one item is visible at a time.
In the \uicontrol {QML Type} field, we enter \e StackLayout. In the \uicontrol {QML Type} field, we enter \e StackLayout.
To be able to use the type, we enter the statement that imports the To be able to use the component, we enter the statement that imports the
Qt Quick Layouts module, which contains the type, in the Qt Quick Layouts module, which contains the component, in the
\uicontrol {Add Imports} field: \c {QtQuick.Layouts 1.3}. \uicontrol {Add Imports} field: \c {QtQuick.Layouts 1.3}.
We will add content to the stack layout in \QDS. We will add content to the stack layout in \QDS.
@@ -110,10 +110,10 @@
We want to apply the \l {FastBlur} effect to the smallPopup UI control. We want to apply the \l {FastBlur} effect to the smallPopup UI control.
In the artboard, we have a blurEffect layer that we want to export as a In the artboard, we have a blurEffect layer that we want to export as a
FastBlurItem QML type. In the \uicontrol {QML Type} field, we enter FastBlurItem component. In the \uicontrol {QML Type} field, we enter
\e FastBlurItem. \e FastBlurItem.
To be able to use the type, we added the statement that imports the To be able to use the component, we added the statement that imports the
Qt Quick Studio Effects module: \c {QtQuick.Studio.Effects 1.0}. Qt Quick Studio Effects module: \c {QtQuick.Studio.Effects 1.0}.
We specify that the component to which we want to apply the effect is a We specify that the component to which we want to apply the effect is a
@@ -121,7 +121,7 @@
in the \uicontrol {QML Properties} field. We can modify the property in in the \uicontrol {QML Properties} field. We can modify the property in
the \uicontrol Radius field in the \uicontrol Properties view in \QDS. the \uicontrol Radius field in the \uicontrol Properties view in \QDS.
\image webinardemo-blureffect.png "FastBlurItem QML item in Design mode" \image webinardemo-blureffect.png "FastBlurItem component in Design mode"
\section2 Creating a Menu with Reusable Buttons \section2 Creating a Menu with Reusable Buttons
@@ -159,12 +159,12 @@
\section1 Using Imported Components \section1 Using Imported Components
The \e {LayoutReference.ui.qml} file contains a reference image of the The \e {LayoutReference.ui.qml} file contains a reference image of
UI we will create. We use the imported components to create the the UI we will create. We use the imported components to create the
UI in the \e {MainApp.ui.qml} file. The imported components are UI in the \e {MainApp.ui.qml} file. The imported components are
listed in \uicontrol Library > \uicontrol {QML Types} > listed in \uicontrol Library > \uicontrol Components >
\uicontrol {My QML Components}, and we can drag and drop them to the \uicontrol {My Components}, and we can drag and drop them to the
\uicontrol {Form Editor}. \l {Form Editor}.
\image webinardemo-mainappui.png "Main app UI in Design mode" \image webinardemo-mainappui.png "Main app UI in Design mode"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -124,7 +124,7 @@
layer into. The component that is generated during import will be layer into. The component that is generated during import will be
of this type. For example, if you drew a rectangle, you can export of this type. For example, if you drew a rectangle, you can export
it as a \l Rectangle component. You can provide the it as a \l Rectangle component. You can provide the
\l{Learn Qt Quick - QML Types}{import statement} of the component \l{Learn More - Components}{import statement} of the component
set where the component is defined in the \uicontrol {Imports} field. set where the component is defined in the \uicontrol {Imports} field.
\row \row
\li \uicontrol Properties \li \uicontrol Properties

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2018 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Design Studio documentation. ** This file is part of the Design Studio documentation.
@@ -60,7 +60,7 @@
\li In the File Explorer, create a new folder for the mock data \li In the File Explorer, create a new folder for the mock data
inside the \e imports folder in your project folder (for example, \e Data). inside the \e imports folder in your project folder (for example, \e Data).
\note Make sure to capitalize the \e Data folder name, because you \note Make sure to capitalize the \e Data folder name, because you
will need to import it as a QML type later, and QML type names must will need to import it as a component later, and component names must
be capitalized. be capitalized.
\note If you place this folder somewhere else in the project, you will \note If you place this folder somewhere else in the project, you will
need to add the path to the list of imports. To do this, in \QDS, open need to add the path to the list of imports. To do this, in \QDS, open
@@ -79,7 +79,7 @@
in the data folder. In these instructions, the file is called in the data folder. In these instructions, the file is called
\e Values.qml. \e Values.qml.
\note Make sure to capitalize the filename, because it will become \note Make sure to capitalize the filename, because it will become
a custom QML type. a custom component.
\li Select \uicontrol File > \uicontrol {New File or Project} > \li Select \uicontrol File > \uicontrol {New File or Project} >
\uicontrol {Files and Classes} > \uicontrol {JavaScript} > \uicontrol {Files and Classes} > \uicontrol {JavaScript} >
\uicontrol {JavaScript File} > \uicontrol Choose to create a \uicontrol {JavaScript File} > \uicontrol Choose to create a
@@ -120,7 +120,7 @@
} }
\endcode \endcode
\li Add the following code to use a \l Timer type to specify a range of \li Add the following code to use a \l Timer component to specify a range of
values for the property: values for the property:
\code \code
property Timer name1Timer: Timer{ property Timer name1Timer: Timer{

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -43,8 +43,8 @@
to enter the settings needed for that particular type of project and create to enter the settings needed for that particular type of project and create
the necessary files for you. the necessary files for you.
Studio projects are useful for creating UIs. You cannot use \QDS projects are useful for creating UIs. You cannot use them for
them for application development, because they do not contain: application development, because they do not contain:
\list \list
\li C++ code \li C++ code
@@ -52,7 +52,7 @@
\li Code needed for deploying applications to devices. \li Code needed for deploying applications to devices.
\endlist \endlist
Because the UIs do not contain any C++ code, you do not need Because the projects do not contain any C++ code, you do not need
to build them. To test how well your designs work, you can preview the to build them. To test how well your designs work, you can preview the
UIs on the desktop or embedded Linux devices. For more UIs on the desktop or embedded Linux devices. For more
information, see \l{Previewing}. information, see \l{Previewing}.
@@ -64,20 +64,18 @@
\list \list
\li \uicontrol {Qt for MCUs Application} creates an application that \li \uicontrol {Qt for MCUs Application} creates an application that
uses a subset of \l{Qt QML} and \l{Qt Quick Controls} types (as uses a subset of preset components (as supported by Qt for MCUs)
supported by Qt for MCUs) that you can deploy, run, and debug on that you can deploy, run, and debug on MCU boards.
MCU boards. \li \uicontrol {Qt Quick Application - Empty} creates a project that
\li \uicontrol {Qt Quick Application - Empty} creates a Qt Quick UI uses default components and can be run on all target platforms.
project that uses \l{Qt Quick} types and can be run on all target \li \uicontrol {Qt Quick 3D Application} creates a project that uses
platforms. default and 3D components.
\li \uicontrol {Qt Quick 3D Application} creates a Qt Quick UI project
that uses Qt Quick and \l{Qt Quick 3D} types.
\li \uicontrol {Qt Quick Application - Scroll} and \li \uicontrol {Qt Quick Application - Scroll} and
\uicontrol {Qt Quick Application - Stack} create a Qt Quick \uicontrol {Qt Quick Application - Stack} create an application
application that uses Qt Quick Controls to implement a scrollable that uses preset UI controls to implement a scrollable
list or a set of pages with a stack-based navigation model. list or a set of pages with a stack-based navigation model.
\li \uicontrol {Qt Quick Application - Launcher} creates a Qt Quick UI \li \uicontrol {Qt Quick Application - Launcher} creates a
project that uses Qt Quick types and defines a QML laucher project that uses default components and defines a launcher
application. application.
\endlist \endlist

View File

@@ -162,7 +162,7 @@
For example, to use a \l Text component to display the value of a For example, to use a \l Text component to display the value of a
slider, we drag-and-drop \uicontrol Text, \uicontrol Slider, and slider, we drag-and-drop \uicontrol Text, \uicontrol Slider, and
\uicontrol {String Mapper} components to the same parent item. Then \uicontrol {String Mapper} components to the same parent component. Then
we select \uicontrol {String Mapper} in \uicontrol Navigator to display we select \uicontrol {String Mapper} in \uicontrol Navigator to display
its properties in \uicontrol Properties. There we bind the value of the its properties in \uicontrol Properties. There we bind the value of the
\c input property of the string mapper to the value of the \c value \c input property of the string mapper to the value of the \c value

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -30,24 +30,23 @@
\title 2D Effects \title 2D Effects
\QDS provides a set of Qt Quick Studio effects that inherit the types in the \QDS provides a set of effects that you can apply to components by
\l {Qt Graphical Effects} module. To apply a visual effect to a component, dragging-and-dropping them from \l Library > \uicontrol Components
drag-and-drop it from \uicontrol Library > \uicontrol Effects to the > \uicontrol {Qt Quick Studio Effects} to the component in \l Navigator.
component in \uicontrol Navigator.
\image studio-2d-effects.png "Effects tab in Library" \image studio-2d-effects.png "Effects tab in Library"
Effects have one or more source properties for specifying the visual input Effects have one or more source properties for specifying the visual input
for which the effect is applied to an item. The altered visual output is for which the effect is applied to a component. The altered visual output is
then presented in the effect item itself. The source can be another, often then presented in the effect component itself. The source can be another,
hidden, item in the QML scene. More complex effects can have multiple often hidden, component in the scene. More complex effects can have multiple
sources. The source item type can be any QML type, even video or another sources. The source component can be any component, even video or another
effect. Pipelining multiple effects together is a simple way to create effect. Pipelining multiple effects together is a simple way to create
even more impressive output. even more impressive output.
Each effect has a set of properties that can be used to configure the effect Each effect has a set of properties that can be used to configure the effect
output. Properties can be animated just like any other QML properties. The output. They can be animated just like any other properties. The
QML type documentation contains property descriptions and basic usage component documentation contains property descriptions and basic usage
examples. examples.
In addition to the effects described in this topic, you can set linear, In addition to the effects described in this topic, you can set linear,
@@ -64,29 +63,29 @@
cache when the source or the effect properties are animated. cache when the source or the effect properties are animated.
The \uicontrol {Transparent border} property determines the blur behavior The \uicontrol {Transparent border} property determines the blur behavior
near the edges of the item, where the pixel blurring is affected by near the edges of the component, where the pixel blurring is affected by
the pixels outside the source edges. the pixels outside the source edges.
If the property is set to \c true, the pixels outside the source are If the property is set to \c true, the pixels outside the source are
interpreted as being transparent, which is similar to OpenGL clamp-to-border interpreted as being transparent, which is similar to OpenGL clamp-to-border
extension. The blur is expanded slightly outside the effect item area. extension. The blur is expanded slightly outside the effect component area.
If the property is set to \c false, the pixels outside the source are If the property is set to \c false, the pixels outside the source are
interpreted as containing the same color as the pixels at the edge of interpreted as containing the same color as the pixels at the edge of
the item, which is similar to OpenGL clamp-to-edge behavior. The blur the component, which is similar to OpenGL clamp-to-edge behavior. The blur
does not expand outside the effect item area. does not expand outside the effect component area.
\section1 Summary of 2D Effects \section1 Summary of 2D Effects
The following table summarizes the available effects and contains links to The following table summarizes the available effects and contains links to
the documentation of the inherited QML type. the developer documentation of the inherited component.
\note The effects are available when running with OpenGL. \note The effects are available when running with OpenGL.
\table \table
\header \header
\li Icon \li Icon
\li Qt Quick Studio Effect \li Effect
\li Description \li Description
\row \row
\li \inlineimage icons/blend-mode-16px.png \li \inlineimage icons/blend-mode-16px.png
@@ -122,13 +121,13 @@
\uicontrol Desaturation field. The value ranges from \c 0.0 \uicontrol Desaturation field. The value ranges from \c 0.0
(no change) to \c 1.0 (desaturated). Desaturated pixel values are (no change) to \c 1.0 (desaturated). Desaturated pixel values are
calculated as averages of the original RGB component values calculated as averages of the original RGB component values
of the source item. of the source component.
\row \row
\li \inlineimage icons/directional-blur-16px.png \li \inlineimage icons/directional-blur-16px.png
\li \l {DirectionalBlur}{Directional Blur} \li \l {DirectionalBlur}{Directional Blur}
\li Applies a blur effect to the specified direction. The value of the \li Applies a blur effect to the specified direction. The value of the
\uicontrol Angle field, defines the direction of the blur. This \uicontrol Angle field, defines the direction of the blur. This
effect makes the source item appear to be moving in the direction of effect makes the source component appear to be moving in the direction of
the blur. Blur is applied to both sides of each pixel, and therefore the blur. Blur is applied to both sides of each pixel, and therefore
setting the direction to \c 0 and \c 180 provides the same result. setting the direction to \c 0 and \c 180 provides the same result.
@@ -142,7 +141,7 @@
\row \row
\li \inlineimage icons/displace-16px.png \li \inlineimage icons/displace-16px.png
\li \l Displace \li \l Displace
\li Moves the pixels of the source item according to the displacement \li Moves the pixels of the source component according to the displacement
map specified in the \uicontrol {Displacement source} field. map specified in the \uicontrol {Displacement source} field.
The value of the \uicontrol Displacement field specifies the The value of the \uicontrol Displacement field specifies the
@@ -156,7 +155,7 @@
\li \l {DropShadow}{Drop Shadow} \li \l {DropShadow}{Drop Shadow}
\li Generates a soft shadow behind the source component using a \li Generates a soft shadow behind the source component using a
gaussian blur. This effect blurs the alpha channel of the input and gaussian blur. This effect blurs the alpha channel of the input and
colorizes the result, which it then places behind the source object colorizes the result, which it then places behind the source component
to create a soft shadow. You can set the shadow's color in the to create a soft shadow. You can set the shadow's color in the
\uicontrol {Drop Shadow Color} field and change its location in the \uicontrol {Drop Shadow Color} field and change its location in the
\uicontrol {Horizontal offset} and \uicontrol {Vertical offset} \uicontrol {Horizontal offset} and \uicontrol {Vertical offset}
@@ -192,7 +191,7 @@
\row \row
\li \inlineimage icons/gamma-adjust-16px.png \li \inlineimage icons/gamma-adjust-16px.png
\li \l [QML] {GammaAdjust}{Gamma Adjust} \li \l [QML] {GammaAdjust}{Gamma Adjust}
\li Alters the luminance of the source item. This effect is applied \li Alters the luminance of the source component. This effect is applied
to each pixel according to the curve that is pre-defined as a to each pixel according to the curve that is pre-defined as a
power-law expression, where the value of the \uicontrol Gamma power-law expression, where the value of the \uicontrol Gamma
field is used as the reciprocal scaling exponent. field is used as the reciprocal scaling exponent.
@@ -223,7 +222,7 @@
\li Generates a halo-like glow around the source component. This effect \li Generates a halo-like glow around the source component. This effect
blurs the alpha channel of the source and colorizes it with blurs the alpha channel of the source and colorizes it with
\uicontrol {Glow color}. It then places the alpha channel behind the \uicontrol {Glow color}. It then places the alpha channel behind the
source, resulting in a halo or glow around the object. The quality source, resulting in a halo or glow around the component. The quality
of the blurred edge can be controlled by using the values of the of the blurred edge can be controlled by using the values of the
\uicontrol Samples and \uicontrol Radius and the strength of the \uicontrol Samples and \uicontrol Radius and the strength of the
glow can be changed using the value of the \uicontrol Spread field. glow can be changed using the value of the \uicontrol Spread field.
@@ -261,8 +260,8 @@
\li \inlineimage icons/levels-16px.png \li \inlineimage icons/levels-16px.png
\li \l {LevelAdjust}{Level Adjust} \li \l {LevelAdjust}{Level Adjust}
\li Adjusts color levels in the RGBA color space. This effect adjusts \li Adjusts color levels in the RGBA color space. This effect adjusts
the source item colors separately for each color channel. Source the source component colors separately for each color channel. Source
item contrast can be adjusted and color balance altered. component contrast can be adjusted and color balance altered.
The value of the \uicontrol Gamma field specifies the change factor The value of the \uicontrol Gamma field specifies the change factor
for how the value of each pixel color channel is altered according for how the value of each pixel color channel is altered according
@@ -303,9 +302,9 @@
\li \inlineimage icons/opacity-mask-16px.png \li \inlineimage icons/opacity-mask-16px.png
\li \l {OpacityMask}{Opacity Mask} \li \l {OpacityMask}{Opacity Mask}
\li Masks the source component with another component specified in the \li Masks the source component with another component specified in the
\uicontrol {Mask source} field. The mask item gets rendered into an \uicontrol {Mask source} field. The mask component gets rendered into an
intermediate pixel buffer and the alpha values from the result are intermediate pixel buffer and the alpha values from the result are
used to determine the visibility of the source item's pixels in the used to determine the visibility of the source component's pixels in the
display. display.
Select the \uicontrol Invert check box to specify that the Select the \uicontrol Invert check box to specify that the
@@ -317,7 +316,7 @@
\li \inlineimage icons/radial-blur-16px.png \li \inlineimage icons/radial-blur-16px.png
\li \l {RadialBlur}{Radial Blur} \li \l {RadialBlur}{Radial Blur}
\li Applies a directional blur effect in a circular direction around the \li Applies a directional blur effect in a circular direction around the
component's center point. This effect makes the source item appear component's center point. This effect makes the source component appear
to be rotating into the direction of the blur. Other available to be rotating into the direction of the blur. Other available
motionblur effects are \uicontrol {Zoom Blur} and motionblur effects are \uicontrol {Zoom Blur} and
\uicontrol {Directional Blur}. \uicontrol {Directional Blur}.
@@ -345,7 +344,7 @@
\row \row
\li \inlineimage icons/threshold-16px.png \li \inlineimage icons/threshold-16px.png
\li \l {ThresholdMask}{Threshold Mask} \li \l {ThresholdMask}{Threshold Mask}
\li Masks the source item with another item specified by \li Masks the source component with another component specified by
\uicontrol {Mask source}. The value of the \uicontrol Spread \uicontrol {Mask source}. The value of the \uicontrol Spread
field determines the smoothness of the mask edges near the field determines the smoothness of the mask edges near the
\uicontrol Threshold alpha value. Setting spread to \c 0.0 uses \uicontrol Threshold alpha value. Setting spread to \c 0.0 uses
@@ -356,7 +355,7 @@
\li \inlineimage icons/zoom-blur-16px.png \li \inlineimage icons/zoom-blur-16px.png
\li \l {ZoomBlur}{Zoom Blur} \li \l {ZoomBlur}{Zoom Blur}
\li Applies a directional blur effect towards source component's \li Applies a directional blur effect towards source component's
center point. This effect makes the source item appear to be center point. This effect makes the source component appear to be
moving towards the center point in Z-direction or the camera moving towards the center point in Z-direction or the camera
appear to be zooming rapidly. appear to be zooming rapidly.

View File

@@ -163,7 +163,7 @@ Section {
Label { Label {
text: qsTr("Focus") text: qsTr("Focus")
tooltip: qsTr("Sets focus on the item within the enclosing focus scope.") tooltip: qsTr("Sets focus on the component within the enclosing focus scope.")
disabledState: !backendValues.focus.isAvailable disabledState: !backendValues.focus.isAvailable
} }
SecondColumnLayout { SecondColumnLayout {
@@ -178,7 +178,7 @@ Section {
Label { Label {
text: qsTr("Active focus on tab") text: qsTr("Active focus on tab")
tooltip: qsTr("Adds the item to the tab focus chain.") tooltip: qsTr("Adds the component to the tab focus chain.")
disabledState: !backendValues.activeFocusOnTab.isAvailable disabledState: !backendValues.activeFocusOnTab.isAvailable
} }
SecondColumnLayout { SecondColumnLayout {
@@ -193,7 +193,7 @@ Section {
Label { Label {
text: qsTr("Baseline offset") text: qsTr("Baseline offset")
tooltip: qsTr("Position of the item's baseline in local coordinates.") tooltip: qsTr("Position of the component's baseline in local coordinates.")
disabledState: !backendValues.baselineOffset.isAvailable disabledState: !backendValues.baselineOffset.isAvailable
} }
SecondColumnLayout { SecondColumnLayout {

View File

@@ -327,7 +327,7 @@ Section {
font.pixelSize: StudioTheme.Values.myFontSize font.pixelSize: StudioTheme.Values.myFontSize
color: StudioTheme.Values.themeTextColor color: StudioTheme.Values.themeTextColor
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: qsTr("- The selection contains the root item.") text: qsTr("- The selection contains the root component.")
} }
Text { Text {
id: warningNonVisual id: warningNonVisual
@@ -337,7 +337,7 @@ Section {
font.pixelSize: StudioTheme.Values.myFontSize font.pixelSize: StudioTheme.Values.myFontSize
color: StudioTheme.Values.themeTextColor color: StudioTheme.Values.themeTextColor
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: qsTr("- The selection contains a non visual item.") text: qsTr("- The selection contains a non-visual component.")
} }
Text { Text {
id: warningAnchors id: warningAnchors
@@ -347,7 +347,7 @@ Section {
font.pixelSize: StudioTheme.Values.myFontSize font.pixelSize: StudioTheme.Values.myFontSize
color: StudioTheme.Values.themeTextColor color: StudioTheme.Values.themeTextColor
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: qsTr("- An item in the selection uses anchors.") text: qsTr("- A component in the selection uses anchors.")
} }
} }
} }

View File

@@ -39,7 +39,7 @@ Column {
SectionLayout { SectionLayout {
Label { Label {
text: qsTr("Enabled") text: qsTr("Enabled")
tooltip: qsTr("Sets whether the item accepts change events.") tooltip: qsTr("Sets whether the component accepts change events.")
} }
SecondColumnLayout { SecondColumnLayout {
CheckBox { CheckBox {
@@ -65,7 +65,7 @@ Column {
Label { Label {
text: qsTr("Target") text: qsTr("Target")
tooltip: qsTr("Sets the object that sends the signal.") tooltip: qsTr("Sets the component that sends the signal.")
} }
SecondColumnLayout { SecondColumnLayout {
ItemFilterComboBox { ItemFilterComboBox {

View File

@@ -98,7 +98,7 @@ Column {
} }
Label { Label {
text: qsTr("Horizontal item alignment") text: qsTr("Horizontal component alignment")
} }
SecondColumnLayout { SecondColumnLayout {
@@ -111,7 +111,7 @@ Column {
} }
Label { Label {
text: qsTr("Vertical item alignment") text: qsTr("Vertical component alignment")
} }
SecondColumnLayout { SecondColumnLayout {

View File

@@ -51,7 +51,7 @@ Rectangle {
width: itemPane.width width: itemPane.width
Section { Section {
z: 2 z: 2
caption: qsTr("Type") caption: qsTr("Component")
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
@@ -81,7 +81,7 @@ Rectangle {
typeLineEdit.visible = ! typeLineEdit.visible typeLineEdit.visible = ! typeLineEdit.visible
typeLineEdit.forceActiveFocus() typeLineEdit.forceActiveFocus()
} }
tooltip: qsTr("Changes the type of this item.") tooltip: qsTr("Changes the type of this component.")
enabled: !modelNodeBackend.multiSelection enabled: !modelNodeBackend.multiSelection
} }
@@ -128,7 +128,7 @@ Rectangle {
} }
Label { Label {
text: qsTr("id") text: qsTr("ID")
} }
SecondColumnLayout { SecondColumnLayout {
@@ -137,7 +137,7 @@ Rectangle {
id: lineEdit id: lineEdit
backendValue: backendValues.id backendValue: backendValues.id
placeholderText: qsTr("id") placeholderText: qsTr("ID")
text: backendValues.id.value text: backendValues.id.value
Layout.fillWidth: true Layout.fillWidth: true
width: 240 width: 240
@@ -191,13 +191,13 @@ Rectangle {
enabled: !modelNodeBackend.multiSelection enabled: !modelNodeBackend.multiSelection
anchors.fill: parent anchors.fill: parent
onClicked: toogleExportAlias() onClicked: toogleExportAlias()
tooltip: qsTr("Exports this item as an alias property of the root item.") tooltip: qsTr("Exports this component as an alias property of the root component.")
} }
} }
} }
Label { Label {
text: qsTr("Custom id") text: qsTr("Custom ID")
} }
SecondColumnLayout { SecondColumnLayout {

View File

@@ -54,7 +54,7 @@ Section {
Label { Label {
text: qsTr("Enabled") text: qsTr("Enabled")
tooltip: qsTr("Whether the item is layered or not.") tooltip: qsTr("Whether the component is layered or not.")
} }
SecondColumnLayout { SecondColumnLayout {
CheckBox { CheckBox {

View File

@@ -118,7 +118,7 @@ SectionLayout {
Label { Label {
text: qsTr("Alignment") text: qsTr("Alignment")
tooltip: qsTr("Alignment of an item within the cells it occupies.") tooltip: qsTr("Alignment of a component within the cells it occupies.")
} }
SecondColumnLayout { SecondColumnLayout {
@@ -201,7 +201,7 @@ SectionLayout {
Label { Label {
text: qsTr("Fill layout") text: qsTr("Fill layout")
tooltip: qsTr("Expands the item as much as possible within the given constraints.") tooltip: qsTr("Expands the component as much as possible within the given constraints.")
} }
SecondColumnLayout { SecondColumnLayout {
@@ -220,7 +220,7 @@ SectionLayout {
Label { Label {
text: qsTr("Preferred size") text: qsTr("Preferred size")
tooltip: qsTr("Preferred size of an item in a layout. If the preferred height or width is -1, it is ignored.") tooltip: qsTr("Preferred size of a component in a layout. If the preferred height or width is -1, it is ignored.")
} }
SecondColumnLayout { SecondColumnLayout {
@@ -260,7 +260,7 @@ SectionLayout {
Label { Label {
text: qsTr("Minimum size") text: qsTr("Minimum size")
tooltip: qsTr("Minimum size of an item in a layout.") tooltip: qsTr("Minimum size of a component in a layout.")
} }
SecondColumnLayout { SecondColumnLayout {
@@ -300,7 +300,7 @@ SectionLayout {
Label { Label {
text: qsTr("Maximum size") text: qsTr("Maximum size")
tooltip: qsTr("Maximum size of an item in a layout.") tooltip: qsTr("Maximum size of a component in a layout.")
} }
SecondColumnLayout { SecondColumnLayout {
@@ -340,7 +340,7 @@ SectionLayout {
Label { Label {
text: qsTr("Row span") text: qsTr("Row span")
tooltip: qsTr("Row span of an item in a Grid Layout.") tooltip: qsTr("Row span of a component in a Grid Layout.")
} }
SecondColumnLayout { SecondColumnLayout {
@@ -362,7 +362,7 @@ SectionLayout {
Label { Label {
text: qsTr("Column span") text: qsTr("Column span")
tooltip: qsTr("Column span of an item in a Grid Layout.") tooltip: qsTr("Column span of a component in a Grid Layout.")
} }
SecondColumnLayout { SecondColumnLayout {

View File

@@ -132,7 +132,7 @@ Column {
Label { Label {
text: qsTr("Spacing") text: qsTr("Spacing")
tooltip: qsTr("Spacing between items.") tooltip: qsTr("Spacing between components.")
} }
SectionLayout { SectionLayout {

View File

@@ -195,7 +195,7 @@ Column {
SectionLayout { SectionLayout {
Label { Label {
text: qsTr("Target") text: qsTr("Target")
tooltip: qsTr("Id of the item to drag.") tooltip: qsTr("ID of the component to drag.")
} }
SecondColumnLayout { SecondColumnLayout {
ItemFilterComboBox { ItemFilterComboBox {

View File

@@ -48,7 +48,7 @@ Rectangle {
y: -1 y: -1
width: itemPane.width width: itemPane.width
Section { Section {
caption: qsTr("Type") caption: qsTr("Component")
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
@@ -78,7 +78,7 @@ Rectangle {
typeLineEdit.visible = ! typeLineEdit.visible typeLineEdit.visible = ! typeLineEdit.visible
typeLineEdit.forceActiveFocus() typeLineEdit.forceActiveFocus()
} }
tooltip: qsTr("Changes the type of this item.") tooltip: qsTr("Changes the type of this component.")
enabled: !modelNodeBackend.multiSelection enabled: !modelNodeBackend.multiSelection
} }
@@ -125,7 +125,7 @@ Rectangle {
} }
Label { Label {
text: qsTr("id") text: qsTr("ID")
} }
SecondColumnLayout { SecondColumnLayout {
@@ -134,7 +134,7 @@ Rectangle {
id: lineEdit id: lineEdit
backendValue: backendValues.id backendValue: backendValues.id
placeholderText: qsTr("id") placeholderText: qsTr("ID")
text: backendValues.id.value text: backendValues.id.value
Layout.fillWidth: true Layout.fillWidth: true
width: 240 width: 240
@@ -188,7 +188,7 @@ Rectangle {
enabled: !modelNodeBackend.multiSelection enabled: !modelNodeBackend.multiSelection
anchors.fill: parent anchors.fill: parent
onClicked: toogleExportAlias() onClicked: toogleExportAlias()
tooltip: qsTr("Exports this item as an alias property of the root item.") tooltip: qsTr("Exports this component as an alias property of the root component.")
} }
} }
} }

View File

@@ -76,7 +76,7 @@ Section {
Label { Label {
visible: textInputSection.isTextInput visible: textInputSection.isTextInput
text: qsTr("Pass. char") text: qsTr("Password character")
tooltip: qsTr("Character displayed when users enter passwords.") tooltip: qsTr("Character displayed when users enter passwords.")
} }
@@ -116,7 +116,7 @@ Section {
Label { Label {
visible: textInputSection.isTextInput visible: textInputSection.isTextInput
text: qsTr("Maximum length") text: qsTr("Maximum length")
tooltip: qsTr("Maximum permitted length of the text in the TextInput.") tooltip: qsTr("Maximum permitted length of the text in the Text Input.")
} }
SpinBox { SpinBox {
visible: textInputSection.isTextInput visible: textInputSection.isTextInput

View File

@@ -42,7 +42,7 @@ Rectangle {
Label { Label {
id: test id: test
text: qsTr("None or multiple items selected."); text: qsTr("None or multiple components selected.");
anchors.fill: parent anchors.fill: parent
} }
} }

View File

@@ -48,7 +48,7 @@ Rectangle {
y: -1 y: -1
width: itemPane.width width: itemPane.width
Section { Section {
caption: qsTr("Type") caption: qsTr("Component")
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
@@ -78,7 +78,7 @@ Rectangle {
typeLineEdit.visible = ! typeLineEdit.visible typeLineEdit.visible = ! typeLineEdit.visible
typeLineEdit.forceActiveFocus() typeLineEdit.forceActiveFocus()
} }
tooltip: qsTr("Change the type of this item.") tooltip: qsTr("Change the type of this component.")
enabled: !modelNodeBackend.multiSelection enabled: !modelNodeBackend.multiSelection
} }
@@ -125,7 +125,7 @@ Rectangle {
} }
Label { Label {
text: qsTr("id") text: qsTr("ID")
} }
SecondColumnLayout { SecondColumnLayout {
@@ -134,7 +134,7 @@ Rectangle {
id: lineEdit id: lineEdit
backendValue: backendValues.id backendValue: backendValues.id
placeholderText: qsTr("id") placeholderText: qsTr("ID")
text: backendValues.id.value text: backendValues.id.value
Layout.fillWidth: true Layout.fillWidth: true
width: 240 width: 240
@@ -188,7 +188,7 @@ Rectangle {
enabled: !modelNodeBackend.multiSelection enabled: !modelNodeBackend.multiSelection
anchors.fill: parent anchors.fill: parent
onClicked: toogleExportAlias() onClicked: toogleExportAlias()
tooltip: qsTr("Toggles whether this item is exported as an alias property of the root item.") tooltip: qsTr("Toggles whether this component is exported as an alias property of the root component.")
} }
} }
} }

View File

@@ -43,7 +43,7 @@ StudioControls.ButtonRow {
AbstractButton { AbstractButton {
checkable: true checkable: true
buttonIcon: StudioTheme.Constants.anchorTop buttonIcon: StudioTheme.Constants.anchorTop
tooltip: qsTr("Anchor item to the top.") tooltip: qsTr("Anchor component to the top.")
property bool topAnchored: anchorBackend.topAnchored property bool topAnchored: anchorBackend.topAnchored
onTopAnchoredChanged: { onTopAnchoredChanged: {
@@ -64,7 +64,7 @@ StudioControls.ButtonRow {
AbstractButton { AbstractButton {
checkable: true checkable: true
buttonIcon: StudioTheme.Constants.anchorBottom buttonIcon: StudioTheme.Constants.anchorBottom
tooltip: qsTr("Anchor item to the bottom.") tooltip: qsTr("Anchor component to the bottom.")
property bool bottomAnchored: anchorBackend.bottomAnchored property bool bottomAnchored: anchorBackend.bottomAnchored
onBottomAnchoredChanged: { onBottomAnchoredChanged: {
@@ -85,7 +85,7 @@ StudioControls.ButtonRow {
AbstractButton { AbstractButton {
checkable: true checkable: true
buttonIcon: StudioTheme.Constants.anchorLeft buttonIcon: StudioTheme.Constants.anchorLeft
tooltip: qsTr("Anchor item to the left.") tooltip: qsTr("Anchor component to the left.")
property bool leftAnchored: anchorBackend.leftAnchored property bool leftAnchored: anchorBackend.leftAnchored
onLeftAnchoredChanged: { onLeftAnchoredChanged: {
@@ -106,7 +106,7 @@ StudioControls.ButtonRow {
AbstractButton { AbstractButton {
checkable: true checkable: true
buttonIcon: StudioTheme.Constants.anchorRight buttonIcon: StudioTheme.Constants.anchorRight
tooltip: qsTr("Anchor item to the right.") tooltip: qsTr("Anchor component to the right.")
property bool rightAnchored: anchorBackend.rightAnchored property bool rightAnchored: anchorBackend.rightAnchored
onRightAnchoredChanged: { onRightAnchoredChanged: {
@@ -132,7 +132,7 @@ StudioControls.ButtonRow {
AbstractButton { AbstractButton {
checkable: true checkable: true
buttonIcon: StudioTheme.Constants.anchorFill buttonIcon: StudioTheme.Constants.anchorFill
tooltip: qsTr("Fill parent item.") tooltip: qsTr("Fill parent component.")
property bool isFilled: anchorBackend.isFilled property bool isFilled: anchorBackend.isFilled
onIsFilledChanged: { onIsFilledChanged: {
@@ -156,7 +156,7 @@ StudioControls.ButtonRow {
AbstractButton { AbstractButton {
checkable: true checkable: true
buttonIcon: StudioTheme.Constants.centerVertical buttonIcon: StudioTheme.Constants.centerVertical
tooltip: qsTr("Anchor item vertically.") tooltip: qsTr("Anchor component vertically.")
property bool verticalCentered: anchorBackend.verticalCentered property bool verticalCentered: anchorBackend.verticalCentered
onVerticalCenteredChanged: { onVerticalCenteredChanged: {
@@ -179,7 +179,7 @@ StudioControls.ButtonRow {
AbstractButton { AbstractButton {
checkable: true checkable: true
buttonIcon: StudioTheme.Constants.centerHorizontal buttonIcon: StudioTheme.Constants.centerHorizontal
tooltip: qsTr("Anchor item horizontally.") tooltip: qsTr("Anchor component horizontally.")
property bool horizontalCentered: anchorBackend.horizontalCentered property bool horizontalCentered: anchorBackend.horizontalCentered
onHorizontalCenteredChanged: { onHorizontalCenteredChanged: {

View File

@@ -34,7 +34,7 @@ Column {
padding: 10 padding: 10
Label { Label {
text: qsTr("This item is an instance of a Component") text: qsTr("This is an instance of a component")
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: 300 width: 300
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -45,7 +45,7 @@ Column {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: 180 width: 180
buttonIcon: qsTr("Edit Master Component") buttonIcon: qsTr("Edit Base Component")
iconFont: StudioTheme.Constants.font iconFont: StudioTheme.Constants.font
onClicked: goIntoComponent() onClicked: goIntoComponent()

View File

@@ -96,7 +96,7 @@ Section {
Label { Label {
text: qsTr("Interactive") text: qsTr("Interactive")
tooltip: qsTr("Allows users to drag or flick a flickable item.") tooltip: qsTr("Allows users to drag or flick a flickable component.")
} }
SecondColumnLayout { SecondColumnLayout {

View File

@@ -109,7 +109,7 @@ Section {
Label { Label {
visible: showElide visible: showElide
text: qsTr("Maximum line count") text: qsTr("Maximum line count")
tooltip: qsTr("Limits the number of lines that the text item will show.") tooltip: qsTr("Limits the number of lines that the text component will show.")
disabledState: !backendValues.maximumLineCount.isAvailable disabledState: !backendValues.maximumLineCount.isAvailable
} }
@@ -155,7 +155,7 @@ Section {
Label { Label {
text: qsTr("Render type") text: qsTr("Render type")
toolTip: qsTr("Overrides the default rendering type for this item.") toolTip: qsTr("Overrides the default rendering type for this component.")
disabledState: !backendValues.renderType.isAvailable disabledState: !backendValues.renderType.isAvailable
} }
ComboBox { ComboBox {

File diff suppressed because it is too large Load Diff

View File

@@ -123,9 +123,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()]. ** [sqlite_version()] and [sqlite_source_id()].
*/ */
#define SQLITE_VERSION "3.34.0" #define SQLITE_VERSION "3.35.0"
#define SQLITE_VERSION_NUMBER 3034000 #define SQLITE_VERSION_NUMBER 3035000
#define SQLITE_SOURCE_ID "2020-12-01 16:14:00 a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b" #define SQLITE_SOURCE_ID "2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b"
/* /*
** CAPI3REF: Run-Time Library Version Numbers ** CAPI3REF: Run-Time Library Version Numbers
@@ -2115,7 +2115,13 @@ struct sqlite3_mem_methods {
** The second parameter is a pointer to an integer into which ** The second parameter is a pointer to an integer into which
** is written 0 or 1 to indicate whether triggers are disabled or enabled ** is written 0 or 1 to indicate whether triggers are disabled or enabled
** following this call. The second parameter may be a NULL pointer, in ** following this call. The second parameter may be a NULL pointer, in
** which case the trigger setting is not reported back. </dd> ** which case the trigger setting is not reported back.
**
** <p>Originally this option disabled all triggers. ^(However, since
** SQLite version 3.35.0, TEMP triggers are still allowed even if
** this option is off. So, in other words, this option now only disables
** triggers in the main database schema or in the schemas of ATTACH-ed
** databases.)^ </dd>
** **
** [[SQLITE_DBCONFIG_ENABLE_VIEW]] ** [[SQLITE_DBCONFIG_ENABLE_VIEW]]
** <dt>SQLITE_DBCONFIG_ENABLE_VIEW</dt> ** <dt>SQLITE_DBCONFIG_ENABLE_VIEW</dt>
@@ -2126,7 +2132,13 @@ struct sqlite3_mem_methods {
** The second parameter is a pointer to an integer into which ** The second parameter is a pointer to an integer into which
** is written 0 or 1 to indicate whether views are disabled or enabled ** is written 0 or 1 to indicate whether views are disabled or enabled
** following this call. The second parameter may be a NULL pointer, in ** following this call. The second parameter may be a NULL pointer, in
** which case the view setting is not reported back. </dd> ** which case the view setting is not reported back.
**
** <p>Originally this option disabled all views. ^(However, since
** SQLite version 3.35.0, TEMP views are still allowed even if
** this option is off. So, in other words, this option now only disables
** views in the main database schema or in the schemas of ATTACH-ed
** databases.)^ </dd>
** **
** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]] ** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]]
** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt> ** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
@@ -3499,6 +3511,7 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
** that uses dot-files in place of posix advisory locking. ** that uses dot-files in place of posix advisory locking.
** <tr><td> file:data.db?mode=readonly <td> ** <tr><td> file:data.db?mode=readonly <td>
** An error. "readonly" is not a valid option for the "mode" parameter. ** An error. "readonly" is not a valid option for the "mode" parameter.
** Use "ro" instead: "file:data.db?mode=ro".
** </table> ** </table>
** **
** ^URI hexadecimal escape sequences (%HH) are supported within the path and ** ^URI hexadecimal escape sequences (%HH) are supported within the path and
@@ -3697,7 +3710,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
** If the Y parameter to sqlite3_free_filename(Y) is anything other ** If the Y parameter to sqlite3_free_filename(Y) is anything other
** than a NULL pointer or a pointer previously acquired from ** than a NULL pointer or a pointer previously acquired from
** sqlite3_create_filename(), then bad things such as heap ** sqlite3_create_filename(), then bad things such as heap
** corruption or segfaults may occur. The value Y should be ** corruption or segfaults may occur. The value Y should not be
** used again after sqlite3_free_filename(Y) has been called. This means ** used again after sqlite3_free_filename(Y) has been called. This means
** that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y, ** that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y,
** then the corresponding [sqlite3_module.xClose() method should also be ** then the corresponding [sqlite3_module.xClose() method should also be
@@ -7765,7 +7778,8 @@ SQLITE_API int sqlite3_test_control(int op, ...);
#define SQLITE_TESTCTRL_PRNG_SEED 28 #define SQLITE_TESTCTRL_PRNG_SEED 28
#define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS 29 #define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS 29
#define SQLITE_TESTCTRL_SEEK_COUNT 30 #define SQLITE_TESTCTRL_SEEK_COUNT 30
#define SQLITE_TESTCTRL_LAST 30 /* Largest TESTCTRL */ #define SQLITE_TESTCTRL_TRACEFLAGS 31
#define SQLITE_TESTCTRL_LAST 31 /* Largest TESTCTRL */
/* /*
** CAPI3REF: SQL Keyword Checking ** CAPI3REF: SQL Keyword Checking
@@ -10438,6 +10452,14 @@ SQLITE_API int sqlite3session_patchset(
*/ */
SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession); SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession);
/*
** CAPI3REF: Query for the amount of heap memory used by a session object.
**
** This API returns the total amount of heap memory in bytes currently
** used by the session object passed as the only argument.
*/
SQLITE_API sqlite3_int64 sqlite3session_memory_used(sqlite3_session *pSession);
/* /*
** CAPI3REF: Create An Iterator To Traverse A Changeset ** CAPI3REF: Create An Iterator To Traverse A Changeset
** CONSTRUCTOR: sqlite3_changeset_iter ** CONSTRUCTOR: sqlite3_changeset_iter
@@ -10540,18 +10562,23 @@ SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);
** call to [sqlite3changeset_next()] must have returned [SQLITE_ROW]. If this ** call to [sqlite3changeset_next()] must have returned [SQLITE_ROW]. If this
** is not the case, this function returns [SQLITE_MISUSE]. ** is not the case, this function returns [SQLITE_MISUSE].
** **
** If argument pzTab is not NULL, then *pzTab is set to point to a ** Arguments pOp, pnCol and pzTab may not be NULL. Upon return, three
** nul-terminated utf-8 encoded string containing the name of the table ** outputs are set through these pointers:
** affected by the current change. The buffer remains valid until either **
** sqlite3changeset_next() is called on the iterator or until the ** *pOp is set to one of [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE],
** conflict-handler function returns. If pnCol is not NULL, then *pnCol is ** depending on the type of change that the iterator currently points to;
** set to the number of columns in the table affected by the change. If **
** pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change ** *pnCol is set to the number of columns in the table affected by the change; and
**
** *pzTab is set to point to a nul-terminated utf-8 encoded string containing
** the name of the table affected by the current change. The buffer remains
** valid until either sqlite3changeset_next() is called on the iterator
** or until the conflict-handler function returns.
**
** If pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change
** is an indirect change, or false (0) otherwise. See the documentation for ** is an indirect change, or false (0) otherwise. See the documentation for
** [sqlite3session_indirect()] for a description of direct and indirect ** [sqlite3session_indirect()] for a description of direct and indirect
** changes. Finally, if pOp is not NULL, then *pOp is set to one of ** changes.
** [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE], depending on the
** type of change that the iterator currently points to.
** **
** If no error occurs, SQLITE_OK is returned. If an error does occur, an ** If no error occurs, SQLITE_OK is returned. If an error does occur, an
** SQLite error code is returned. The values of the output variables may not ** SQLite error code is returned. The values of the output variables may not

View File

@@ -0,0 +1,396 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "/opt/kde3/share/apps/katepart/syntax/language.dtd">
<!-- (c) 2008-2011 by Jürgen Heinemann http://www.hjcms.de
@see http://www.gnu.org/software/automake/manual/autoconf/
-->
<language name="Autoconf Language" version="2" kateversion="2.4" section="Other"
extensions="configure.ac;configure.in;configure.in.in;*.m4;*.M4"
mimetype="text/x-m4;text/x-autoconf"
author="Juergen Heinemann (nospam@hjcms.de)" license="LGPL">
<highlighting>
<!-- http://www.gnu.org/software/automake/manual/autoconf/Program-_0026-Function-Index.html -->
<list name="keywords">
<item> if </item>
<item> then </item>
<item> elif </item>
<item> else </item>
<item> fi </item>
<item> for </item>
<item> in </item>
<item> do </item>
<item> don </item>
<item> function </item>
<item> select </item>
<item> until </item>
<item> while </item>
<item> set </item>
<item> ifelse </item>
<item> case </item>
<item> esac </item>
</list>
<!-- http://www.gnu.org/software/automake/manual/autoconf/Limitations-of-Builtins.html -->
<list name="builtins">
<item> : </item>
<item> source </item>
<item> alias </item>
<item> bg </item>
<item> bind </item>
<item> break </item>
<item> builtin </item>
<item> cd </item>
<item> caller </item>
<item> command </item>
<item> compgen </item>
<item> complete </item>
<item> continue </item>
<item> dirs </item>
<item> disown </item>
<item> echo </item>
<item> enable </item>
<item> eval </item>
<item> exec </item>
<item> exit </item>
<item> fc </item>
<item> fg </item>
<item> getopts </item>
<item> hash </item>
<item> help </item>
<item> history </item>
<item> jobs </item>
<item> kill </item>
<item> let </item>
<item> logout </item>
<item> popd </item>
<item> printf </item>
<item> pushd </item>
<item> pwd </item>
<item> return </item>
<item> set </item>
<item> shift </item>
<item> shopt </item>
<item> suspend </item>
<item> test </item>
<item> time </item>
<item> times </item>
<item> trap </item>
<item> type </item>
<item> ulimit </item>
<item> umask </item>
<item> unalias </item>
<item> wait </item>
</list>
<list name="bools">
<item> no </item>
<item> yes </item>
<item> false </item>
<item> true </item>
</list>
<!--
This is an alphabetical list of the M4, M4sugar, and M4sh macros.
http://www.gnu.org/software/automake/manual/autoconf/M4-Macro-Index.html
-->
<list name="m4sugar">
<item> AS_BOURNE_COMPATIBLE </item>
<item> AS_BOX </item>
<item> AS_CASE </item>
<item> AS_DIRNAME </item>
<item> AS_ECHO </item>
<item> AS_ECHO_N </item>
<item> AS_ESCAPE </item>
<item> AS_EXIT </item>
<item> AS_HELP_STRING </item>
<item> AS_IF </item>
<item> AS_INIT </item>
<item> AS_INIT_GENERATED </item>
<item> AS_LINENO_PREPARE </item>
<item> AS_LITERAL_IF </item>
<item> AS_LITERAL_WORD_IF </item>
<item> AS_ME_PREPARE </item>
<item> AS_MESSAGE_FD </item>
<item> AS_MESSAGE_LOG_FD </item>
<item> AS_MKDIR_P </item>
<item> AS_ORIGINAL_STDIN_FD </item>
<item> AS_SET_CATFILE </item>
<item> AS_SET_STATUS </item>
<item> AS_SHELL_SANITIZE </item>
<item> AS_TMPDIR </item>
<item> AS_TR_CPP </item>
<item> AS_TR_SH </item>
<item> AS_UNSET </item>
<item> AS_VAR_APPEND </item>
<item> AS_VAR_ARITH </item>
<item> AS_VAR_COPY </item>
<item> AS_VAR_IF </item>
<item> AS_VAR_POPDEF </item>
<item> AS_VAR_PUSHDEF </item>
<item> AS_VAR_SET </item>
<item> AS_VAR_SET_IF </item>
<item> AS_VAR_TEST_SET </item>
<item> AS_VERSION_COMPARE </item>
<item> m4_append </item>
<item> m4_append_uniq </item>
<item> m4_append_uniq_w </item>
<item> m4_apply </item>
<item> m4_argn </item>
<item> m4_assert </item>
<item> m4_bmatch </item>
<item> m4_bpatsubst </item>
<item> m4_bpatsubsts </item>
<item> m4_bregexp </item>
<item> m4_builtin </item>
<item> m4_car </item>
<item> m4_case </item>
<item> m4_cdr </item>
<item> m4_changecom </item>
<item> m4_changequote </item>
<item> m4_chomp </item>
<item> m4_chomp_all </item>
<item> m4_cleardivert </item>
<item> m4_cmp </item>
<item> m4_combine </item>
<item> m4_cond </item>
<item> m4_copy </item>
<item> m4_copy_force </item>
<item> m4_count </item>
<item> m4_curry </item>
<item> m4_debugfile </item>
<item> m4_debugmode </item>
<item> m4_decr </item>
<item> m4_default </item>
<item> m4_default_nblank </item>
<item> m4_default_nblank_quoted </item>
<item> m4_default_quoted </item>
<item> m4_define </item>
<item> m4_define_default </item>
<item> m4_defn </item>
<item> m4_divert </item>
<item> m4_divert_once </item>
<item> m4_divert_pop </item>
<item> m4_divert_push </item>
<item> m4_divert_text </item>
<item> m4_divnum </item>
<item> m4_do </item>
<item> m4_dquote </item>
<item> m4_dquote_elt </item>
<item> m4_dumpdef </item>
<item> m4_dumpdefs </item>
<item> m4_echo </item>
<item> m4_errprint </item>
<item> m4_errprintn </item>
<item> m4_escape </item>
<item> m4_esyscmd </item>
<item> m4_esyscmd_s </item>
<item> m4_eval </item>
<item> m4_exit </item>
<item> m4_expand </item>
<item> m4_fatal </item>
<item> m4_flatten </item>
<item> m4_for </item>
<item> m4_foreach </item>
<item> m4_foreach_w </item>
<item> m4_format </item>
<item> m4_if </item>
<item> m4_ifblank </item>
<item> m4_ifdef </item>
<item> m4_ifnblank </item>
<item> m4_ifndef </item>
<item> m4_ifset </item>
<item> m4_ifval </item>
<item> m4_ifvaln </item>
<item> m4_ignore </item>
<item> m4_include </item>
<item> m4_incr </item>
<item> m4_index </item>
<item> m4_indir </item>
<item> m4_init </item>
<item> m4_join </item>
<item> m4_joinall </item>
<item> m4_len </item>
<item> m4_list_cmp </item>
<item> m4_location </item>
<item> m4_make_list </item>
<item> m4_maketemp </item>
<item> m4_map </item>
<item> m4_map_args </item>
<item> m4_map_args_pair </item>
<item> m4_map_args_sep </item>
<item> m4_map_args_w </item>
<item> m4_map_sep </item>
<item> m4_mapall </item>
<item> m4_mapall_sep </item>
<item> m4_max </item>
<item> m4_min </item>
<item> m4_mkstemp </item>
<item> m4_n </item>
<item> m4_newline </item>
<item> m4_normalize </item>
<item> m4_pattern_allow </item>
<item> m4_pattern_forbid </item>
<item> m4_popdef </item>
<item> m4_pushdef </item>
<item> m4_quote </item>
<item> m4_re_escape </item>
<item> m4_rename </item>
<item> m4_rename_force </item>
<item> m4_reverse </item>
<item> m4_set_add </item>
<item> m4_set_add_all </item>
<item> m4_set_contains </item>
<item> m4_set_contents </item>
<item> m4_set_delete </item>
<item> m4_set_difference </item>
<item> m4_set_dump </item>
<item> m4_set_empty </item>
<item> m4_set_foreach </item>
<item> m4_set_intersection </item>
<item> m4_set_list </item>
<item> m4_set_listc </item>
<item> m4_set_map </item>
<item> m4_set_map_sep </item>
<item> m4_set_remove </item>
<item> m4_set_size </item>
<item> m4_set_union </item>
<item> m4_shift </item>
<item> m4_shift2 </item>
<item> m4_shift3 </item>
<item> m4_shiftn </item>
<item> m4_sign </item>
<item> m4_sinclude </item>
<item> m4_split </item>
<item> m4_stack_foreach </item>
<item> m4_stack_foreach_lifo </item>
<item> m4_stack_foreach_sep </item>
<item> m4_stack_foreach_sep_lifo </item>
<item> m4_strip </item>
<item> m4_substr </item>
<item> m4_syscmd </item>
<item> m4_sysval </item>
<item> m4_text_box </item>
<item> m4_text_wrap </item>
<item> m4_tolower </item>
<item> m4_toupper </item>
<item> m4_traceoff </item>
<item> m4_traceon </item>
<item> m4_translit </item>
<item> m4_undefine </item>
<item> m4_undivert </item>
<item> m4_unquote </item>
<item> m4_version_compare </item>
<item> m4_version_prereq </item>
<item> m4_warn </item>
<item> m4_wrap </item>
<item> m4_wrap_lifo </item>
</list>
<!-- Autotest Macro Index -->
<list name="autotest_macro">
<item> AT_ARG_OPTION </item>
<item> AT_ARG_OPTION_ARG </item>
<item> AT_BANNER </item>
<item> AT_CAPTURE_FILE </item>
<item> AT_CHECK </item>
<item> AT_CHECK_EUNIT </item>
<item> AT_CHECK_UNQUOTED </item>
<item> AT_CLEANUP </item>
<item> AT_COLOR_TESTS </item>
<item> AT_COPYRIGHT </item>
<item> AT_DATA </item>
<item> AT_FAIL_IF </item>
<item> AT_INIT </item>
<item> AT_KEYWORDS </item>
<item> AT_PACKAGE_BUGREPORT </item>
<item> AT_PACKAGE_NAME </item>
<item> AT_PACKAGE_STRING </item>
<item> AT_PACKAGE_TARNAME </item>
<item> AT_PACKAGE_URL </item>
<item> AT_PACKAGE_VERSION </item>
<item> AT_SETUP </item>
<item> AT_SKIP_IF </item>
<item> AT_TESTED </item>
<item> AT_XFAIL_IF </item>
</list>
<list name="libtool">
<item> LT_PREREQ </item>
<item> LT_LANG </item>
<item> LT_INIT </item>
<item> LTDL_INIT </item>
<item> LT_CONFIG_LTDL_DIR </item>
</list>
<list name="pkgconfig">
<item> PKG_CHECK_MODULES </item>
<item> PKG_PROG_PKG_CONFIG </item>
<item> PKG_CHECK_EXISTS </item>
</list>
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Default">
<!-- <IncludeRules context="##Bash" /> -->
<keyword attribute="Keyword" context="#stay" String="keywords" />
<RegExpr attribute="Builtin" context="#stay" String="\.(?=\s)" />
<keyword attribute="Builtin" context="#stay" String="builtins" />
<keyword attribute="Boolean" context="#stay" String="bools" />
<!-- Autoconf Macros -->
<keyword attribute="M4 Sugar Macros" context="#stay" String="m4sugar" />
<!-- Autotest Macro Index -->
<keyword attribute="Autotest Macros" context="#stay" String="autotest_macro" />
<!-- Other Macros -->
<keyword attribute="pkg-config Macros" context="#stay" String="pkgconfig" />
<!-- libtool Macros -->
<keyword attribute="Libtool Macros" context="#stay" String="libtool" />
<!-- Autoconf Macros -->
<RegExpr attribute="Autoconf Macros" context="#stay" String="\bAC_[A-Z0-9_]+\b" insensitive="false" endRegion="BeginRegion" />
<!-- Automake Macros -->
<RegExpr attribute="Automake Macros" context="#stay" String="\bAM_[A-Z0-9_]+\b" insensitive="false" endRegion="BeginRegion" />
<!-- Script temp Defined Macros -->
<RegExpr attribute="Inline Macros" context="#stay" String="\bac_[a-z_]+\b" insensitive="false" endRegion="BeginRegion" />
<RegExpr attribute="Char" context="#stay" String="'.'"/>
<DetectChar attribute="String" context="String" char="&quot;"/>
<AnyChar attribute="Symbol" context="#stay" String=":!%&amp;()+,-/.*&lt;=&gt;|"/>
<RegExpr attribute="Variable" context="#stay" String="\$[a-z_]+" insensitive="true" endRegion="BeginRegion" />
<Float attribute="Float" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
<RegExpr attribute="Pragmas" context="#stay" String="([\s\t]+#).*$" insensitive="true" endRegion="BeginRegion" />
<RegExpr attribute="Comment" context="#stay" String="(^#).*$" insensitive="true" endRegion="BeginRegion" />
<RegExpr attribute="Comment" context="#stay" String="(\bdnl\s).*$" insensitive="true" endRegion="BeginRegion" />
</context>
<context attribute="Region Marker" lineEndContext="#pop" name="Region Marker"/>
<context attribute="String" lineEndContext="#pop" name="String">
<DetectChar attribute="String" context="#pop" char="&quot;"/>
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" />
<itemData name="Keyword" defStyleNum="dsKeyword" />
<itemData name="Builtin" defStyleNum="dsKeyword" color="#808" />
<itemData name="M4 Sugar Macros" defStyleNum="dsKeyword" />
<itemData name="Autotest Macros" defStyleNum="dsKeyword" />
<itemData name="Autoconf Macros" defStyleNum="dsKeyword" color="#0095ff" selColor="#ffffff" bold="1" />
<itemData name="Automake Macros" defStyleNum="dsKeyword" color="#6666cc" selColor="#ffffff" bold="1" />
<itemData name="Libtool Macros" defStyleNum="dsKeyword" color="#6666cc" selColor="#ffffff" bold="1" />
<itemData name="Inline Macros" defStyleNum="dsKeyword" color="#6666cc" selColor="#ffffff" />
<itemData name="pkg-config Macros" defStyleNum="dsKeyword" />
<itemData name="Boolean" defStyleNum="dsOthers" />
<itemData name="Variable" defStyleNum="dsOthers" />
<itemData name="Decimal" defStyleNum="dsDecVal" />
<itemData name="Float" defStyleNum="dsFloat" />
<itemData name="Char" defStyleNum="dsChar" />
<itemData name="String" defStyleNum="dsString" />
<itemData name="Pragmas" defStyleNum="dsOthers" color="#00C000" />
<itemData name="Comment" defStyleNum="dsComment" />
<itemData name="Symbol" defStyleNum="dsNormal"/>
<itemData name="Region Marker" defStyleNum="dsRegionMarker" />
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="dnl" />
<comment name="multiLine" start="/*" end="*/" />
</comments>
<keywords casesensitive="0" />
</general>
</language>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language
version="1"
kateversion="5.0"
name="Comments"
section="Other"
extensions=""
mimetype=""
author="Alex Turbov (i.zaufi@gmail.com)"
license="MIT"
hidden="true"
>
<highlighting>
<contexts>
<context name="Normal" attribute="Comment" lineEndContext="#pop">
<IncludeRules context="##Alerts" />
<IncludeRules context="##Modelines" />
<IncludeRules context="##SPDX-Comments" />
</context>
</contexts>
<itemDatas>
<itemData name="Comment" defStyleNum="dsComment" />
</itemDatas>
</highlighting>
</language>
<!-- kate: indent-width 2; -->

View File

@@ -0,0 +1,560 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language
version="5"
kateversion="3.1"
name="SPDX-Comments"
section="Other"
extensions=""
mimetype=""
author="Alex Turbov (i.zaufi@gmail.com)"
license="MIT"
hidden="true"
>
<highlighting>
<list name="tags">
<item>SPDX-License-Identifier:</item>
<item>SPDX-FileContributor:</item>
<item>SPDX-FileCopyrightText:</item>
<item>SPDX-LicenseInfoInFile:</item>
</list>
<list name="operators">
<item>AND</item>
<item>OR</item>
<item>WITH</item>
</list>
<list name="licenses">
<item>0BSD</item>
<item>AAL</item>
<item>ADSL</item>
<item>AFL-1.1</item>
<item>AFL-1.2</item>
<item>AFL-2.0</item>
<item>AFL-2.1</item>
<item>AFL-3.0</item>
<item>AGPL-1.0-only</item>
<item>AGPL-1.0-or-later</item>
<item>AGPL-3.0-only</item>
<item>AGPL-3.0-or-later</item>
<item>AMDPLPA</item>
<item>AML</item>
<item>AMPAS</item>
<item>ANTLR-PD</item>
<item>ANTLR-PD-fallback</item>
<item>APAFML</item>
<item>APL-1.0</item>
<item>APSL-1.0</item>
<item>APSL-1.1</item>
<item>APSL-1.2</item>
<item>APSL-2.0</item>
<item>Abstyles</item>
<item>Adobe-2006</item>
<item>Adobe-Glyph</item>
<item>Afmparse</item>
<item>Aladdin</item>
<item>Apache-1.0</item>
<item>Apache-1.1</item>
<item>Apache-2.0</item>
<item>Artistic-1.0</item>
<item>Artistic-1.0-Perl</item>
<item>Artistic-1.0-cl8</item>
<item>Artistic-2.0</item>
<item>BSD-1-Clause</item>
<item>BSD-2-Clause</item>
<item>BSD-2-Clause-Patent</item>
<item>BSD-2-Clause-Views</item>
<item>BSD-3-Clause</item>
<item>BSD-3-Clause-Attribution</item>
<item>BSD-3-Clause-Clear</item>
<item>BSD-3-Clause-LBNL</item>
<item>BSD-3-Clause-No-Nuclear-License</item>
<item>BSD-3-Clause-No-Nuclear-License-2014</item>
<item>BSD-3-Clause-No-Nuclear-Warranty</item>
<item>BSD-3-Clause-Open-MPI</item>
<item>BSD-4-Clause</item>
<item>BSD-4-Clause-UC</item>
<item>BSD-Protection</item>
<item>BSD-Source-Code</item>
<item>BSL-1.0</item>
<item>BUSL-1.1</item>
<item>Bahyph</item>
<item>Barr</item>
<item>Beerware</item>
<item>BitTorrent-1.0</item>
<item>BitTorrent-1.1</item>
<item>BlueOak-1.0.0</item>
<item>Borceux</item>
<item>CAL-1.0</item>
<item>CAL-1.0-Combined-Work-Exception</item>
<item>CATOSL-1.1</item>
<item>CC-BY-1.0</item>
<item>CC-BY-2.0</item>
<item>CC-BY-2.5</item>
<item>CC-BY-3.0</item>
<item>CC-BY-3.0-AT</item>
<item>CC-BY-3.0-US</item>
<item>CC-BY-4.0</item>
<item>CC-BY-NC-1.0</item>
<item>CC-BY-NC-2.0</item>
<item>CC-BY-NC-2.5</item>
<item>CC-BY-NC-3.0</item>
<item>CC-BY-NC-4.0</item>
<item>CC-BY-NC-ND-1.0</item>
<item>CC-BY-NC-ND-2.0</item>
<item>CC-BY-NC-ND-2.5</item>
<item>CC-BY-NC-ND-3.0</item>
<item>CC-BY-NC-ND-3.0-IGO</item>
<item>CC-BY-NC-ND-4.0</item>
<item>CC-BY-NC-SA-1.0</item>
<item>CC-BY-NC-SA-2.0</item>
<item>CC-BY-NC-SA-2.5</item>
<item>CC-BY-NC-SA-3.0</item>
<item>CC-BY-NC-SA-4.0</item>
<item>CC-BY-ND-1.0</item>
<item>CC-BY-ND-2.0</item>
<item>CC-BY-ND-2.5</item>
<item>CC-BY-ND-3.0</item>
<item>CC-BY-ND-4.0</item>
<item>CC-BY-SA-1.0</item>
<item>CC-BY-SA-2.0</item>
<item>CC-BY-SA-2.0-UK</item>
<item>CC-BY-SA-2.5</item>
<item>CC-BY-SA-3.0</item>
<item>CC-BY-SA-3.0-AT</item>
<item>CC-BY-SA-4.0</item>
<item>CC-PDDC</item>
<item>CC0-1.0</item>
<item>CDDL-1.0</item>
<item>CDDL-1.1</item>
<item>CDLA-Permissive-1.0</item>
<item>CDLA-Sharing-1.0</item>
<item>CECILL-1.0</item>
<item>CECILL-1.1</item>
<item>CECILL-2.0</item>
<item>CECILL-2.1</item>
<item>CECILL-B</item>
<item>CECILL-C</item>
<item>CERN-OHL-1.1</item>
<item>CERN-OHL-1.2</item>
<item>CERN-OHL-P-2.0</item>
<item>CERN-OHL-S-2.0</item>
<item>CERN-OHL-W-2.0</item>
<item>CNRI-Jython</item>
<item>CNRI-Python</item>
<item>CNRI-Python-GPL-Compatible</item>
<item>CPAL-1.0</item>
<item>CPL-1.0</item>
<item>CPOL-1.02</item>
<item>CUA-OPL-1.0</item>
<item>Caldera</item>
<item>ClArtistic</item>
<item>Condor-1.1</item>
<item>Crossword</item>
<item>CrystalStacker</item>
<item>Cube</item>
<item>D-FSL-1.0</item>
<item>DOC</item>
<item>DSDP</item>
<item>Dotseqn</item>
<item>ECL-1.0</item>
<item>ECL-2.0</item>
<item>EFL-1.0</item>
<item>EFL-2.0</item>
<item>EPICS</item>
<item>EPL-1.0</item>
<item>EPL-2.0</item>
<item>EUDatagrid</item>
<item>EUPL-1.0</item>
<item>EUPL-1.1</item>
<item>EUPL-1.2</item>
<item>Entessa</item>
<item>ErlPL-1.1</item>
<item>Eurosym</item>
<item>FSFAP</item>
<item>FSFUL</item>
<item>FSFULLR</item>
<item>FTL</item>
<item>Fair</item>
<item>Frameworx-1.0</item>
<item>FreeImage</item>
<item>GFDL-1.1-invariants-only</item>
<item>GFDL-1.1-invariants-or-later</item>
<item>GFDL-1.1-no-invariants-only</item>
<item>GFDL-1.1-no-invariants-or-later</item>
<item>GFDL-1.1-only</item>
<item>GFDL-1.1-or-later</item>
<item>GFDL-1.2-invariants-only</item>
<item>GFDL-1.2-invariants-or-later</item>
<item>GFDL-1.2-no-invariants-only</item>
<item>GFDL-1.2-no-invariants-or-later</item>
<item>GFDL-1.2-only</item>
<item>GFDL-1.2-or-later</item>
<item>GFDL-1.3-invariants-only</item>
<item>GFDL-1.3-invariants-or-later</item>
<item>GFDL-1.3-no-invariants-only</item>
<item>GFDL-1.3-no-invariants-or-later</item>
<item>GFDL-1.3-only</item>
<item>GFDL-1.3-or-later</item>
<item>GL2PS</item>
<item>GLWTPL</item>
<item>GPL-1.0-only</item>
<item>GPL-1.0-or-later</item>
<item>GPL-2.0-only</item>
<item>GPL-2.0-or-later</item>
<item>GPL-3.0-only</item>
<item>GPL-3.0-or-later</item>
<item>Giftware</item>
<item>Glide</item>
<item>Glulxe</item>
<item>HPND</item>
<item>HPND-sell-variant</item>
<item>HTMLTIDY</item>
<item>HaskellReport</item>
<item>Hippocratic-2.1</item>
<item>IBM-pibs</item>
<item>ICU</item>
<item>IJG</item>
<item>IPA</item>
<item>IPL-1.0</item>
<item>ISC</item>
<item>ImageMagick</item>
<item>Imlib2</item>
<item>Info-ZIP</item>
<item>Intel</item>
<item>Intel-ACPI</item>
<item>Interbase-1.0</item>
<item>JPNIC</item>
<item>JSON</item>
<item>JasPer-2.0</item>
<item>LAL-1.2</item>
<item>LAL-1.3</item>
<item>LGPL-2.0-only</item>
<item>LGPL-2.0-or-later</item>
<item>LGPL-2.1-only</item>
<item>LGPL-2.1-or-later</item>
<item>LGPL-3.0-only</item>
<item>LGPL-3.0-or-later</item>
<item>LGPLLR</item>
<item>LPL-1.0</item>
<item>LPL-1.02</item>
<item>LPPL-1.0</item>
<item>LPPL-1.1</item>
<item>LPPL-1.2</item>
<item>LPPL-1.3a</item>
<item>LPPL-1.3c</item>
<item>Latex2e</item>
<item>Leptonica</item>
<item>LiLiQ-P-1.1</item>
<item>LiLiQ-R-1.1</item>
<item>LiLiQ-Rplus-1.1</item>
<item>Libpng</item>
<item>Linux-OpenIB</item>
<item>MIT</item>
<item>MIT-0</item>
<item>MIT-CMU</item>
<item>MIT-advertising</item>
<item>MIT-enna</item>
<item>MIT-feh</item>
<item>MIT-open-group</item>
<item>MITNFA</item>
<item>MPL-1.0</item>
<item>MPL-1.1</item>
<item>MPL-2.0</item>
<item>MPL-2.0-no-copyleft-exception</item>
<item>MS-PL</item>
<item>MS-RL</item>
<item>MTLL</item>
<item>MakeIndex</item>
<item>MirOS</item>
<item>Motosoto</item>
<item>MulanPSL-1.0</item>
<item>MulanPSL-2.0</item>
<item>Multics</item>
<item>Mup</item>
<item>NASA-1.3</item>
<item>NBPL-1.0</item>
<item>NCGL-UK-2.0</item>
<item>NCSA</item>
<item>NGPL</item>
<item>NIST-PD</item>
<item>NIST-PD-fallback</item>
<item>NLOD-1.0</item>
<item>NLPL</item>
<item>NOSL</item>
<item>NPL-1.0</item>
<item>NPL-1.1</item>
<item>NPOSL-3.0</item>
<item>NRL</item>
<item>NTP</item>
<item>NTP-0</item>
<item>Naumen</item>
<item>Net-SNMP</item>
<item>NetCDF</item>
<item>Newsletr</item>
<item>Nokia</item>
<item>Noweb</item>
<item>O-UDA-1.0</item>
<item>OCCT-PL</item>
<item>OCLC-2.0</item>
<item>ODC-By-1.0</item>
<item>ODbL-1.0</item>
<item>OFL-1.0</item>
<item>OFL-1.0-RFN</item>
<item>OFL-1.0-no-RFN</item>
<item>OFL-1.1</item>
<item>OFL-1.1-RFN</item>
<item>OFL-1.1-no-RFN</item>
<item>OGC-1.0</item>
<item>OGL-Canada-2.0</item>
<item>OGL-UK-1.0</item>
<item>OGL-UK-2.0</item>
<item>OGL-UK-3.0</item>
<item>OGTSL</item>
<item>OLDAP-1.1</item>
<item>OLDAP-1.2</item>
<item>OLDAP-1.3</item>
<item>OLDAP-1.4</item>
<item>OLDAP-2.0</item>
<item>OLDAP-2.0.1</item>
<item>OLDAP-2.1</item>
<item>OLDAP-2.2</item>
<item>OLDAP-2.2.1</item>
<item>OLDAP-2.2.2</item>
<item>OLDAP-2.3</item>
<item>OLDAP-2.4</item>
<item>OLDAP-2.5</item>
<item>OLDAP-2.6</item>
<item>OLDAP-2.7</item>
<item>OLDAP-2.8</item>
<item>OML</item>
<item>OPL-1.0</item>
<item>OSET-PL-2.1</item>
<item>OSL-1.0</item>
<item>OSL-1.1</item>
<item>OSL-2.0</item>
<item>OSL-2.1</item>
<item>OSL-3.0</item>
<item>OpenSSL</item>
<item>PDDL-1.0</item>
<item>PHP-3.0</item>
<item>PHP-3.01</item>
<item>PSF-2.0</item>
<item>Parity-6.0.0</item>
<item>Parity-7.0.0</item>
<item>Plexus</item>
<item>PolyForm-Noncommercial-1.0.0</item>
<item>PolyForm-Small-Business-1.0.0</item>
<item>PostgreSQL</item>
<item>Python-2.0</item>
<item>QPL-1.0</item>
<item>Qhull</item>
<item>RHeCos-1.1</item>
<item>RPL-1.1</item>
<item>RPL-1.5</item>
<item>RPSL-1.0</item>
<item>RSA-MD</item>
<item>RSCPL</item>
<item>Rdisc</item>
<item>Ruby</item>
<item>SAX-PD</item>
<item>SCEA</item>
<item>SGI-B-1.0</item>
<item>SGI-B-1.1</item>
<item>SGI-B-2.0</item>
<item>SHL-0.5</item>
<item>SHL-0.51</item>
<item>SISSL</item>
<item>SISSL-1.2</item>
<item>SMLNJ</item>
<item>SMPPL</item>
<item>SNIA</item>
<item>SPL-1.0</item>
<item>SSH-OpenSSH</item>
<item>SSH-short</item>
<item>SSPL-1.0</item>
<item>SWL</item>
<item>Saxpath</item>
<item>Sendmail</item>
<item>Sendmail-8.23</item>
<item>SimPL-2.0</item>
<item>Sleepycat</item>
<item>Spencer-86</item>
<item>Spencer-94</item>
<item>Spencer-99</item>
<item>SugarCRM-1.1.3</item>
<item>TAPR-OHL-1.0</item>
<item>TCL</item>
<item>TCP-wrappers</item>
<item>TMate</item>
<item>TORQUE-1.1</item>
<item>TOSL</item>
<item>TU-Berlin-1.0</item>
<item>TU-Berlin-2.0</item>
<item>UCL-1.0</item>
<item>UPL-1.0</item>
<item>Unicode-DFS-2015</item>
<item>Unicode-DFS-2016</item>
<item>Unicode-TOU</item>
<item>Unlicense</item>
<item>VOSTROM</item>
<item>VSL-1.0</item>
<item>Vim</item>
<item>W3C</item>
<item>W3C-19980720</item>
<item>W3C-20150513</item>
<item>WTFPL</item>
<item>Watcom-1.0</item>
<item>Wsuipa</item>
<item>X11</item>
<item>XFree86-1.1</item>
<item>XSkat</item>
<item>Xerox</item>
<item>Xnet</item>
<item>YPL-1.0</item>
<item>YPL-1.1</item>
<item>ZPL-1.1</item>
<item>ZPL-2.0</item>
<item>ZPL-2.1</item>
<item>Zed</item>
<item>Zend-2.0</item>
<item>Zimbra-1.3</item>
<item>Zimbra-1.4</item>
<item>Zlib</item>
<item>blessing</item>
<item>bzip2-1.0.5</item>
<item>bzip2-1.0.6</item>
<item>copyleft-next-0.3.0</item>
<item>copyleft-next-0.3.1</item>
<item>curl</item>
<item>diffmark</item>
<item>dvipdfm</item>
<item>eGenix</item>
<item>etalab-2.0</item>
<item>gSOAP-1.3b</item>
<item>gnuplot</item>
<item>iMatix</item>
<item>libpng-2.0</item>
<item>libselinux-1.0</item>
<item>libtiff</item>
<item>mpich2</item>
<item>psfrag</item>
<item>psutils</item>
<item>xinetd</item>
<item>xpp</item>
<item>zlib-acknowledgement</item>
</list>
<list name="deprecated-licenses">
<item>AGPL-1.0</item>
<item>AGPL-3.0</item>
<item>BSD-2-Clause-FreeBSD</item>
<item>BSD-2-Clause-NetBSD</item>
<item>GFDL-1.1</item>
<item>GFDL-1.2</item>
<item>GFDL-1.3</item>
<item>GPL-1.0</item>
<item>GPL-2.0</item>
<item>GPL-2.0-with-GCC-exception</item>
<item>GPL-2.0-with-autoconf-exception</item>
<item>GPL-2.0-with-bison-exception</item>
<item>GPL-2.0-with-classpath-exception</item>
<item>GPL-2.0-with-font-exception</item>
<item>GPL-3.0</item>
<item>GPL-3.0-with-GCC-exception</item>
<item>GPL-3.0-with-autoconf-exception</item>
<item>LGPL-2.0</item>
<item>LGPL-2.1</item>
<item>LGPL-3.0</item>
<item>Nunit</item>
<item>StandardML-NJ</item>
<item>eCos-2.0</item>
<item>wxWindows</item>
</list>
<list name="exceptions">
<item>GCC-exception-2.0</item>
<item>openvpn-openssl-exception</item>
<item>GPL-3.0-linking-exception</item>
<item>Fawkes-Runtime-exception</item>
<item>u-boot-exception-2.0</item>
<item>PS-or-PDF-font-exception-20170817</item>
<item>gnu-javamail-exception</item>
<item>LGPL-3.0-linking-exception</item>
<item>DigiRule-FOSS-exception</item>
<item>LLVM-exception</item>
<item>Linux-syscall-note</item>
<item>GPL-3.0-linking-source-exception</item>
<item>Qwt-exception-1.0</item>
<item>389-exception</item>
<item>mif-exception</item>
<item>eCos-exception-2.0</item>
<item>CLISP-exception-2.0</item>
<item>Bison-exception-2.2</item>
<item>Libtool-exception</item>
<item>LZMA-exception</item>
<item>OpenJDK-assembly-exception-1.0</item>
<item>Font-exception-2.0</item>
<item>OCaml-LGPL-linking-exception</item>
<item>GCC-exception-3.1</item>
<item>Bootloader-exception</item>
<item>SHL-2.0</item>
<item>Classpath-exception-2.0</item>
<item>Swift-exception</item>
<item>Autoconf-exception-2.0</item>
<item>FLTK-exception</item>
<item>freertos-exception-2.0</item>
<item>Universal-FOSS-exception-1.0</item>
<item>WxWindows-exception-3.1</item>
<item>OCCT-exception-1.0</item>
<item>Autoconf-exception-3.0</item>
<item>i2p-gpl-java-exception</item>
<item>GPL-CC-1.0</item>
<item>Qt-LGPL-exception-1.1</item>
<item>SHL-2.1</item>
<item>Qt-GPL-exception-1.0</item>
</list>
<list name="deprecated-exceptions">
<item>Nokia-Qt-exception-1.1</item>
</list>
<contexts>
<context name="Normal" attribute="SPDX Tag" lineEndContext="#pop">
<WordDetect String="SPDX-License-Identifier:" attribute="SPDX Tag" context="license-expression" />
<keyword String="tags" attribute="SPDX Tag" />
</context>
<context name="license-expression" attribute="SPDX Value" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<DetectSpaces/>
<AnyChar String="()+" context="#stay" attribute="SPDX License Expression Operator" />
<keyword String="licenses" context="#stay" attribute="SPDX License" />
<keyword String="deprecated-licenses" context="#stay" attribute="SPDX Deprecated License" />
<keyword String="exceptions" context="#stay" attribute="SPDX License Exception" />
<keyword String="deprecated-exceptions" context="#stay" attribute="SPDX Deprecated License Exception" />
<keyword String="operators" context="#stay" attribute="SPDX License Expression Operator" />
<RegExpr attribute="SPDX License" context="#stay" String="\bLicenseRef-[^\s]+" />
</context>
</contexts>
<itemDatas>
<itemData name="SPDX Tag" defStyleNum="dsAnnotation" italic="true" spellChecking="false" />
<itemData name="SPDX Value" defStyleNum="dsAnnotation" italic="true" spellChecking="false" />
<itemData name="SPDX License" defStyleNum="dsAnnotation" italic="true" spellChecking="false" />
<itemData name="SPDX License Exception" defStyleNum="dsAnnotation" italic="true" spellChecking="false" />
<itemData name="SPDX Deprecated License" defStyleNum="dsAnnotation" italic="true" spellChecking="false" />
<itemData name="SPDX Deprecated License Exception" defStyleNum="dsAnnotation" italic="true" spellChecking="false" />
<itemData name="SPDX License Expression Operator" defStyleNum="dsOperator" italic="true" spellChecking="false" />
</itemDatas>
</highlighting>
<general>
<keywords casesensitive="1" weakDeliminator=":-." />
</general>
</language>
<!-- kate: indent-width 2; -->

View File

@@ -37,6 +37,9 @@ template<unsigned int TableCount = 0>
class LastChangedRowId class LastChangedRowId
{ {
public: public:
LastChangedRowId(const LastChangedRowId &) = delete;
LastChangedRowId &operator=(const LastChangedRowId &) = delete;
LastChangedRowId(DatabaseInterface &database) LastChangedRowId(DatabaseInterface &database)
: database(database) : database(database)

View File

@@ -212,10 +212,8 @@ public:
return resultValues; return resultValues;
} }
template <typename ResultType, template<typename ResultType, int ResultTypeCount = 1, typename... QueryTypes>
int ResultTypeCount = 1, auto values(std::size_t reserveSize, const QueryTypes &...queryValues)
typename... QueryTypes>
std::vector<ResultType> values(std::size_t reserveSize, const QueryTypes&... queryValues)
{ {
BaseStatement::checkColumnCount(ResultTypeCount); BaseStatement::checkColumnCount(ResultTypeCount);
@@ -235,11 +233,8 @@ public:
return resultValues; return resultValues;
} }
template <typename ResultType, template<typename ResultType, int ResultTypeCount = 1, typename QueryElementType>
int ResultTypeCount = 1, auto values(std::size_t reserveSize, const std::vector<QueryElementType> &queryValues)
typename QueryElementType>
std::vector<ResultType> values(std::size_t reserveSize,
const std::vector<QueryElementType> &queryValues)
{ {
BaseStatement::checkColumnCount(ResultTypeCount); BaseStatement::checkColumnCount(ResultTypeCount);
@@ -261,11 +256,9 @@ public:
return resultValues; return resultValues;
} }
template <typename ResultType, template<typename ResultType, int ResultTypeCount = 1, typename... QueryElementTypes>
int ResultTypeCount = 1, auto values(std::size_t reserveSize,
typename... QueryElementTypes> const std::vector<std::tuple<QueryElementTypes...>> &queryTuples)
std::vector<ResultType> values(std::size_t reserveSize,
const std::vector<std::tuple<QueryElementTypes...>> &queryTuples)
{ {
BaseStatement::checkColumnCount(ResultTypeCount); BaseStatement::checkColumnCount(ResultTypeCount);
@@ -288,10 +281,8 @@ public:
return resultValues; return resultValues;
} }
template <typename ResultType, template<typename ResultType, int ResultTypeCount = 1, typename... QueryTypes>
int ResultTypeCount = 1, auto value(const QueryTypes &...queryValues)
typename... QueryTypes>
Utils::optional<ResultType> value(const QueryTypes&... queryValues)
{ {
BaseStatement::checkColumnCount(ResultTypeCount); BaseStatement::checkColumnCount(ResultTypeCount);
@@ -308,8 +299,8 @@ public:
return resultValue; return resultValue;
} }
template <typename Type> template<typename Type>
static Type toValue(Utils::SmallStringView sqlStatement, Database &database) static auto toValue(Utils::SmallStringView sqlStatement, Database &database)
{ {
StatementImplementation statement(sqlStatement, database); StatementImplementation statement(sqlStatement, database);

View File

@@ -61,7 +61,7 @@ Database::Database()
} }
Database::Database(Utils::PathString &&databaseFilePath, JournalMode journalMode) Database::Database(Utils::PathString &&databaseFilePath, JournalMode journalMode)
: Database(std::move(databaseFilePath), 1000ms, journalMode) : Database{std::move(databaseFilePath), 0ms, journalMode}
{} {}
Database::Database(Utils::PathString &&databaseFilePath, Database::Database(Utils::PathString &&databaseFilePath,
@@ -89,7 +89,10 @@ void Database::open()
{ {
m_databaseBackend.open(m_databaseFilePath, m_openMode); m_databaseBackend.open(m_databaseFilePath, m_openMode);
m_databaseBackend.setJournalMode(m_journalMode); m_databaseBackend.setJournalMode(m_journalMode);
m_databaseBackend.setBusyTimeout(m_busyTimeout); if (m_busyTimeout > 0ms)
m_databaseBackend.setBusyTimeout(m_busyTimeout);
else
m_databaseBackend.registerBusyHandler();
registerTransactionStatements(); registerTransactionStatements();
initializeTables(); initializeTables();
m_isOpen = true; m_isOpen = true;

View File

@@ -44,6 +44,7 @@ using namespace std::chrono_literals;
class ReadStatement; class ReadStatement;
class WriteStatement; class WriteStatement;
class ReadWriteStatement;
class SQLITE_EXPORT Database final : public TransactionInterface, public DatabaseInterface class SQLITE_EXPORT Database final : public TransactionInterface, public DatabaseInterface
{ {
@@ -55,13 +56,14 @@ public:
using MutexType = std::mutex; using MutexType = std::mutex;
using ReadStatement = Sqlite::ReadStatement; using ReadStatement = Sqlite::ReadStatement;
using WriteStatement = Sqlite::WriteStatement; using WriteStatement = Sqlite::WriteStatement;
using ReadWriteStatement = Sqlite::ReadWriteStatement;
using BusyHandler = DatabaseBackend::BusyHandler;
Database(); Database();
Database(Utils::PathString &&databaseFilePath, JournalMode journalMode = JournalMode::Wal);
Database(Utils::PathString &&databaseFilePath, Database(Utils::PathString &&databaseFilePath,
JournalMode journalMode); std::chrono::milliseconds busyTimeout,
Database(Utils::PathString &&databaseFilePath, JournalMode journalMode = JournalMode::Wal);
std::chrono::milliseconds busyTimeout = 1000ms,
JournalMode journalMode=JournalMode::Wal);
~Database(); ~Database();
Database(const Database &) = delete; Database(const Database &) = delete;
@@ -132,6 +134,11 @@ public:
void setAttachedTables(const Utils::SmallStringVector &tables) override; void setAttachedTables(const Utils::SmallStringVector &tables) override;
void applyAndUpdateSessions() override; void applyAndUpdateSessions() override;
void setBusyHandler(BusyHandler busyHandler)
{
m_databaseBackend.setBusyHandler(std::move(busyHandler));
}
SessionChangeSets changeSets() const; SessionChangeSets changeSets() const;
private: private:

View File

@@ -37,15 +37,24 @@
#include "sqlite3.h" #include "sqlite3.h"
#include <chrono>
#include <thread>
extern "C" { extern "C" {
int sqlite3_carray_init(sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi); int sqlite3_carray_init(sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi);
} }
namespace Sqlite { namespace Sqlite {
using namespace std::literals;
DatabaseBackend::DatabaseBackend(Database &database) DatabaseBackend::DatabaseBackend(Database &database)
: m_database(database) : m_database(database)
, m_databaseHandle(nullptr) , m_databaseHandle(nullptr)
, m_busyHandler([](int) {
std::this_thread::sleep_for(10ms);
return true;
})
{ {
} }
@@ -197,28 +206,24 @@ void DatabaseBackend::closeWithoutException()
} }
} }
namespace {
int busyHandlerCallback(void *userData, int counter)
{
auto &&busyHandler = *static_cast<DatabaseBackend::BusyHandler *>(userData);
return busyHandler(counter);
}
} // namespace
void DatabaseBackend::registerBusyHandler() void DatabaseBackend::registerBusyHandler()
{ {
int resultCode = sqlite3_busy_handler(sqliteDatabaseHandle(), &busyHandlerCallback, nullptr); int resultCode = sqlite3_busy_handler(sqliteDatabaseHandle(), &busyHandlerCallback, &m_busyHandler);
checkIfBusyTimeoutWasSet(resultCode); checkIfBusyTimeoutWasSet(resultCode);
} }
void DatabaseBackend::registerRankingFunction()
{
}
int DatabaseBackend::busyHandlerCallback(void *, int counter)
{
Q_UNUSED(counter)
#ifdef QT_DEBUG
//qWarning() << "Busy handler invoked" << counter << "times!";
#endif
QThread::msleep(10);
return true;
}
void DatabaseBackend::checkForOpenDatabaseWhichCanBeClosed() void DatabaseBackend::checkForOpenDatabaseWhichCanBeClosed()
{ {
if (m_databaseHandle == nullptr) if (m_databaseHandle == nullptr)
@@ -416,6 +421,12 @@ void DatabaseBackend::resetUpdateHook()
sqlite3_update_hook(m_databaseHandle, nullptr, nullptr); sqlite3_update_hook(m_databaseHandle, nullptr, nullptr);
} }
void DatabaseBackend::setBusyHandler(DatabaseBackend::BusyHandler &&busyHandler)
{
m_busyHandler = std::move(busyHandler);
registerBusyHandler();
}
void DatabaseBackend::throwExceptionStatic(const char *whatHasHappens) void DatabaseBackend::throwExceptionStatic(const char *whatHasHappens)
{ {
throw Exception(whatHasHappens); throw Exception(whatHasHappens);

View File

@@ -41,6 +41,8 @@ class Database;
class SQLITE_EXPORT DatabaseBackend class SQLITE_EXPORT DatabaseBackend
{ {
public: public:
using BusyHandler = std::function<bool(int count)>;
DatabaseBackend(Database &database); DatabaseBackend(Database &database);
~DatabaseBackend(); ~DatabaseBackend();
@@ -90,15 +92,16 @@ public:
void (*callback)(void *object, int, char const *database, char const *, long long rowId)); void (*callback)(void *object, int, char const *database, char const *, long long rowId));
void resetUpdateHook(); void resetUpdateHook();
void setBusyHandler(BusyHandler &&busyHandler);
void registerBusyHandler();
protected: protected:
bool databaseIsOpen() const; bool databaseIsOpen() const;
void setPragmaValue(Utils::SmallStringView pragma, Utils::SmallStringView value); void setPragmaValue(Utils::SmallStringView pragma, Utils::SmallStringView value);
Utils::SmallString pragmaValue(Utils::SmallStringView pragma); Utils::SmallString pragmaValue(Utils::SmallStringView pragma);
void registerBusyHandler();
void registerRankingFunction();
static int busyHandlerCallback(void*, int counter);
void checkForOpenDatabaseWhichCanBeClosed(); void checkForOpenDatabaseWhichCanBeClosed();
void checkDatabaseClosing(int resultCode); void checkDatabaseClosing(int resultCode);
@@ -126,6 +129,7 @@ protected:
private: private:
Database &m_database; Database &m_database;
sqlite3 *m_databaseHandle; sqlite3 *m_databaseHandle;
BusyHandler m_busyHandler;
}; };
} // namespace Sqlite } // namespace Sqlite

View File

@@ -800,7 +800,7 @@ void StringAspect::setDefaultValue(const QString &val)
void StringAspect::fromMap(const QVariantMap &map) void StringAspect::fromMap(const QVariantMap &map)
{ {
if (!settingsKey().isEmpty()) if (!settingsKey().isEmpty())
BaseAspect::setValueQuietly(map.value(settingsKey())); BaseAspect::setValueQuietly(map.value(settingsKey(), defaultValue()));
if (d->m_checker) if (d->m_checker)
d->m_checker->fromMap(map); d->m_checker->fromMap(map);
} }

View File

@@ -343,7 +343,7 @@ public:
signals: signals:
void checkedChanged(); void checkedChanged();
private: protected:
void update(); void update();
std::unique_ptr<Internal::StringAspectPrivate> d; std::unique_ptr<Internal::StringAspectPrivate> d;

View File

@@ -564,7 +564,7 @@ void AndroidDeployQtStep::stdError(const QString &line)
if (newOutput.startsWith("warning", Qt::CaseInsensitive) if (newOutput.startsWith("warning", Qt::CaseInsensitive)
|| newOutput.startsWith("note", Qt::CaseInsensitive)) || newOutput.startsWith("note", Qt::CaseInsensitive))
TaskHub::addTask(DeploymentTask(Task::Warning, newOutput)); TaskHub::addTask(DeploymentTask(Task::Warning, newOutput));
else else if (newOutput != QLatin1String("All files should be loaded. Notifying the device."))
TaskHub::addTask(DeploymentTask(Task::Error, newOutput)); TaskHub::addTask(DeploymentTask(Task::Error, newOutput));
} }

View File

@@ -185,8 +185,8 @@ void TestSettingsWidget::onFrameworkItemChanged()
} else { } else {
m_ui.frameworksWarn->setText(tr("Mixing test frameworks and test tools.")); m_ui.frameworksWarn->setText(tr("Mixing test frameworks and test tools."));
m_ui.frameworksWarn->setToolTip(tr("Mixing test frameworks and test tools can lead " m_ui.frameworksWarn->setToolTip(tr("Mixing test frameworks and test tools can lead "
"to duplicating run information when using e.g. " "to duplicating run information when using "
"'Run All Tests'.")); "\"Run All Tests\", for example."));
} }
} }
m_ui.frameworksWarn->setVisible(!atLeastOneEnabled m_ui.frameworksWarn->setVisible(!atLeastOneEnabled

View File

@@ -35,6 +35,7 @@ namespace Internal {
class DiagnosticMark : public TextEditor::TextMark class DiagnosticMark : public TextEditor::TextMark
{ {
Q_DECLARE_TR_FUNCTIONS(ClangTools::Internal::DiagnosticMark)
public: public:
explicit DiagnosticMark(const Diagnostic &diagnostic); explicit DiagnosticMark(const Diagnostic &diagnostic);

View File

@@ -66,7 +66,7 @@ class ParserPrivate
{ {
public: public:
//! Get document from documentList //! Get document from documentList
CPlusPlus::Document::Ptr document(const Utils::FilePath &fileName) const; CPlusPlus::Document::Ptr document(const FilePath &fileName) const;
struct DocumentCache { struct DocumentCache {
unsigned treeRevision = 0; unsigned treeRevision = 0;
@@ -284,7 +284,7 @@ void Parser::updateDocuments(const QSet<FilePath> &documentPaths)
updateDocumentsFromSnapshot(documentPaths, CppTools::CppModelManager::instance()->snapshot()); updateDocumentsFromSnapshot(documentPaths, CppTools::CppModelManager::instance()->snapshot());
} }
void Parser::updateDocumentsFromSnapshot(const QSet<Utils::FilePath> &documentPaths, void Parser::updateDocumentsFromSnapshot(const QSet<FilePath> &documentPaths,
const CPlusPlus::Snapshot &snapshot) const CPlusPlus::Snapshot &snapshot)
{ {
for (const FilePath &documentPath : documentPaths) { for (const FilePath &documentPath : documentPaths) {

View File

@@ -76,16 +76,6 @@ BuildDirParameters::BuildDirParameters(CMakeBuildConfiguration *bc)
buildDirectory = bc->buildDirectory(); buildDirectory = bc->buildDirectory();
cmakeBuildType = bc->cmakeBuildType(); cmakeBuildType = bc->cmakeBuildType();
if (cmakeBuildType.isEmpty()) {
// The empty build type might be just a case of loading of an existing project
// that doesn't have the "CMake.Build.Type" aspect saved
const CMakeConfig config = CMakeConfigItem::itemsFromArguments(initialCMakeArguments);
if (!config.isEmpty()) {
cmakeBuildType = QString::fromLatin1(CMakeConfigItem::valueOf("CMAKE_BUILD_TYPE", config));
if (!cmakeBuildType.isEmpty())
bc->setCMakeBuildType(cmakeBuildType);
}
}
environment = bc->environment(); environment = bc->environment();
// Disable distributed building for configuration runs. CMake does not do those in parallel, // Disable distributed building for configuration runs. CMake does not do those in parallel,

View File

@@ -178,6 +178,16 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
m_configModel->flush(); // clear out config cache...; m_configModel->flush(); // clear out config cache...;
}); });
auto buildTypeAspect = bc->aspect<BuildTypeAspect>();
connect(buildTypeAspect, &BaseAspect::changed, this, [this, buildTypeAspect]() {
if (!m_buildConfiguration->isMultiConfig()) {
CMakeConfig config;
config << CMakeConfigItem("CMAKE_BUILD_TYPE", buildTypeAspect->value().toUtf8());
m_configModel->setBatchEditConfiguration(config);
}
});
auto qmlDebugAspect = bc->aspect<QtSupport::QmlDebuggingAspect>(); auto qmlDebugAspect = bc->aspect<QtSupport::QmlDebuggingAspect>();
connect(qmlDebugAspect, &QtSupport::QmlDebuggingAspect::changed, this, [this]() { connect(qmlDebugAspect, &QtSupport::QmlDebuggingAspect::changed, this, [this]() {
updateButtonState(); updateButtonState();
@@ -298,6 +308,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
Form { Form {
buildDirAspect, Break(), buildDirAspect, Break(),
bc->aspect<InitialCMakeArgumentsAspect>(), Break(), bc->aspect<InitialCMakeArgumentsAspect>(), Break(),
bc->aspect<BuildTypeAspect>(), Break(),
qmlDebugAspect qmlDebugAspect
}, },
Space(10), Space(10),
@@ -740,7 +751,7 @@ static QStringList defaultInitialCMakeArguments(const Kit *k, const QString buil
// CMAKE_BUILD_TYPE: // CMAKE_BUILD_TYPE:
if (!buildType.isEmpty() && !CMakeGeneratorKitAspect::isMultiConfigGenerator(k)) { if (!buildType.isEmpty() && !CMakeGeneratorKitAspect::isMultiConfigGenerator(k)) {
initialArgs.append(QString::fromLatin1("-DCMAKE_BUILD_TYPE:String=%1").arg(buildType)); initialArgs.append(QString::fromLatin1("-DCMAKE_BUILD_TYPE:STRING=%1").arg(buildType));
} }
Internal::CMakeSpecificSettings *settings Internal::CMakeSpecificSettings *settings
@@ -1246,12 +1257,56 @@ FilePath CMakeBuildConfiguration::sourceDirectory() const
QString CMakeBuildConfiguration::cmakeBuildType() const QString CMakeBuildConfiguration::cmakeBuildType() const
{ {
return aspect<BuildTypeAspect>()->value(); if (!isMultiConfig()) {
auto configChanges = configurationChanges();
auto it = std::find_if(configChanges.begin(), configChanges.end(),
[](const CMakeConfigItem &item) { return item.key == "CMAKE_BUILD_TYPE";});
if (it != configChanges.end())
const_cast<CMakeBuildConfiguration*>(this)
->setCMakeBuildType(QString::fromUtf8(it->value));
}
QString cmakeBuildType = aspect<BuildTypeAspect>()->value();
const Utils::FilePath cmakeCacheTxt = buildDirectory().pathAppended("CMakeCache.txt");
const bool hasCMakeCache = QFile::exists(cmakeCacheTxt.toString());
CMakeConfig config;
if (cmakeBuildType == "Unknown") {
// The "Unknown" type is the case of loading of an existing project
// that doesn't have the "CMake.Build.Type" aspect saved
if (hasCMakeCache) {
QString errorMessage;
config = CMakeBuildSystem::parseCMakeCacheDotTxt(cmakeCacheTxt, &errorMessage);
} else {
config = CMakeConfigItem::itemsFromArguments(initialCMakeArguments());
}
} else if (!hasCMakeCache) {
config = CMakeConfigItem::itemsFromArguments(initialCMakeArguments());
}
if (!config.isEmpty()) {
cmakeBuildType = QString::fromUtf8(CMakeConfigItem::valueOf("CMAKE_BUILD_TYPE", config));
const_cast<CMakeBuildConfiguration*>(this)
->setCMakeBuildType(cmakeBuildType);
}
return cmakeBuildType;
} }
void CMakeBuildConfiguration::setCMakeBuildType(const QString &cmakeBuildType) void CMakeBuildConfiguration::setCMakeBuildType(const QString &cmakeBuildType, bool quiet)
{ {
aspect<BuildTypeAspect>()->setValue(cmakeBuildType); if (quiet) {
aspect<BuildTypeAspect>()->setValueQuietly(cmakeBuildType);
aspect<BuildTypeAspect>()->update();
} else {
aspect<BuildTypeAspect>()->setValue(cmakeBuildType);
}
}
bool CMakeBuildConfiguration::isMultiConfig() const
{
return m_buildSystem->isMultiConfig();
} }
namespace Internal { namespace Internal {
@@ -1282,6 +1337,9 @@ SourceDirectoryAspect::SourceDirectoryAspect()
BuildTypeAspect::BuildTypeAspect() BuildTypeAspect::BuildTypeAspect()
{ {
setSettingsKey("CMake.Build.Type"); setSettingsKey("CMake.Build.Type");
setLabelText(tr("Build type:"));
setDisplayStyle(LineEditDisplay);
setDefaultValue("Unknown");
} }
} // namespace Internal } // namespace Internal

View File

@@ -75,7 +75,9 @@ public:
Utils::FilePath sourceDirectory() const; Utils::FilePath sourceDirectory() const;
QString cmakeBuildType() const; QString cmakeBuildType() const;
void setCMakeBuildType(const QString &cmakeBuildType); void setCMakeBuildType(const QString &cmakeBuildType, bool quiet = false);
bool isMultiConfig() const;
signals: signals:
void errorOccurred(const QString &message); void errorOccurred(const QString &message);
@@ -163,6 +165,7 @@ class BuildTypeAspect final : public Utils::StringAspect
public: public:
BuildTypeAspect(); BuildTypeAspect();
using Utils::StringAspect::update;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -846,12 +846,20 @@ void CMakeBuildSystem::wireUpConnections()
// No CMakeCache? Run with initial arguments! // No CMakeCache? Run with initial arguments!
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to build directory change"; qCDebug(cmakeBuildSystemLog) << "Requesting parse due to build directory change";
const BuildDirParameters parameters(cmakeBuildConfiguration()); const BuildDirParameters parameters(cmakeBuildConfiguration());
const bool hasCMakeCache = QFile::exists( const FilePath cmakeCacheTxt = parameters.buildDirectory.pathAppended("CMakeCache.txt");
(parameters.buildDirectory / "CMakeCache.txt").toString()); const bool hasCMakeCache = QFile::exists(cmakeCacheTxt.toString());
const auto options = ReparseParameters( const auto options = ReparseParameters(
hasCMakeCache hasCMakeCache
? REPARSE_DEFAULT ? REPARSE_DEFAULT
: (REPARSE_FORCE_INITIAL_CONFIGURATION | REPARSE_FORCE_CMAKE_RUN)); : (REPARSE_FORCE_INITIAL_CONFIGURATION | REPARSE_FORCE_CMAKE_RUN));
if (hasCMakeCache) {
QString errorMessage;
const CMakeConfig config = CMakeBuildSystem::parseCMakeCacheDotTxt(cmakeCacheTxt, &errorMessage);
if (!config.isEmpty() && errorMessage.isEmpty()) {
QByteArray cmakeBuildTypeName = CMakeConfigItem::valueOf("CMAKE_BUILD_TYPE", config);
cmakeBuildConfiguration()->setCMakeBuildType(QString::fromUtf8(cmakeBuildTypeName), true);
}
}
setParametersAndRequestParse(BuildDirParameters(cmakeBuildConfiguration()), options); setParametersAndRequestParse(BuildDirParameters(cmakeBuildConfiguration()), options);
}); });

View File

@@ -396,7 +396,7 @@ void CorePlugin::warnAboutCrashReporing()
? tr("%1 collects crash reports for the sole purpose of fixing bugs. " ? tr("%1 collects crash reports for the sole purpose of fixing bugs. "
"To disable this feature go to %2.") "To disable this feature go to %2.")
: tr("%1 can collect crash reports for the sole purpose of fixing bugs. " : tr("%1 can collect crash reports for the sole purpose of fixing bugs. "
"to enable this feature go to %2."); "To enable this feature go to %2.");
if (Utils::HostOsInfo::isMacHost()) { if (Utils::HostOsInfo::isMacHost()) {
warnStr = warnStr.arg(Core::Constants::IDE_DISPLAY_NAME) warnStr = warnStr.arg(Core::Constants::IDE_DISPLAY_NAME)

View File

@@ -188,7 +188,7 @@ void FileUtils::removeFiles(const FilePaths &filePaths, bool deleteFromFS)
continue; continue;
if (!file.remove()) { if (!file.remove()) {
MessageManager::writeDisrupting( MessageManager::writeDisrupting(
QCoreApplication::translate("Core::Internal", "Failed to remove file \"%1\")1.") QCoreApplication::translate("Core::Internal", "Failed to remove file \"%1\".")
.arg(fp.toUserOutput())); .arg(fp.toUserOutput()));
} }
} }

View File

@@ -314,7 +314,7 @@
<item> <item>
<widget class="QPushButton" name="clearCrashReportsButton"> <widget class="QPushButton" name="clearCrashReportsButton">
<property name="text"> <property name="text">
<string>Clear local crash reports</string> <string>Clear Local Crash Reports</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@@ -376,7 +376,7 @@ FilePaths VcsManager::promptToDelete(IVersionControl *vc, const FilePaths &fileP
return fp.toUserOutput(); return fp.toUserOutput();
}).join("</li><li>") + "</li></ul>"; }).join("</li><li>") + "</li></ul>";
const QString title = tr("Version Control"); const QString title = tr("Version Control");
const QString msg = tr("Remove the following files from from the version control system (%2)?" const QString msg = tr("Remove the following files from the version control system (%2)?"
"%1Note: This might remove the local file.").arg(fileListForUi, vc->displayName()); "%1Note: This might remove the local file.").arg(fileListForUi, vc->displayName());
const QMessageBox::StandardButton button = const QMessageBox::StandardButton button =
QMessageBox::question(ICore::dialogParent(), title, msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); QMessageBox::question(ICore::dialogParent(), title, msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);

View File

@@ -4556,7 +4556,7 @@ public:
}); });
const auto mainLayout = new QVBoxLayout(this); const auto mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(new QLabel(tr("Please select the getters and/or setters " mainLayout->addWidget(new QLabel(tr("Select the getters and setters "
"to be created."))); "to be created.")));
for (auto checkBox : checkBoxes) { for (auto checkBox : checkBoxes) {
if (checkBox) if (checkBox)

View File

@@ -126,7 +126,7 @@ bool CppQuickFixProjectsSettings::useCustomSettings()
} else if (m_settingsFile != defaultLocation) { } else if (m_settingsFile != defaultLocation) {
QMessageBox msgBox(Core::ICore::dialogParent()); QMessageBox msgBox(Core::ICore::dialogParent());
msgBox.setText(tr("Quick Fix settings are saved in a file. Existing settings file " msgBox.setText(tr("Quick Fix settings are saved in a file. Existing settings file "
"'%1' found. Should this file be used or a " "\"%1\" found. Should this file be used or a "
"new one be created?") "new one be created?")
.arg(m_settingsFile.toString())); .arg(m_settingsFile.toString()));
QPushButton *cancel = msgBox.addButton(QMessageBox::Cancel); QPushButton *cancel = msgBox.addButton(QMessageBox::Cancel);

View File

@@ -427,8 +427,8 @@ DebuggerSettings::DebuggerSettings()
usePseudoTracepoints.setSettingsKey(debugModeGroup, "UsePseudoTracepoints"); usePseudoTracepoints.setSettingsKey(debugModeGroup, "UsePseudoTracepoints");
usePseudoTracepoints.setLabelText(/*GdbOptionsPage::*/tr("Use pseudo message tracepoints")); usePseudoTracepoints.setLabelText(/*GdbOptionsPage::*/tr("Use pseudo message tracepoints"));
usePseudoTracepoints.setToolTip(/*GdbOptionsPage::*/tr( usePseudoTracepoints.setToolTip(
"Uses python to extend the ordinary GDB breakpoint class.")); /*GdbOptionsPage::*/ tr("Uses Python to extend the ordinary GDB breakpoint class."));
usePseudoTracepoints.setDefaultValue(true); usePseudoTracepoints.setDefaultValue(true);
useToolTipsInMainEditor.setSettingsKey(debugModeGroup, "UseToolTips"); useToolTipsInMainEditor.setSettingsKey(debugModeGroup, "UseToolTips");

View File

@@ -643,7 +643,7 @@ QVariant RegisterGroup::data(int column, int role) const
break; break;
case Qt::ToolTipRole: case Qt::ToolTipRole:
return RegisterHandler::tr("Registers group"); return RegisterHandler::tr("A group of registers.");
default: default:
break; break;

View File

@@ -34,6 +34,9 @@
#include <texteditor/textstyles.h> #include <texteditor/textstyles.h>
#include <utils/utilsicons.h> #include <utils/utilsicons.h>
#include <QAction>
#include <QApplication>
#include <QClipboard>
#include <QTextEdit> #include <QTextEdit>
using namespace LanguageServerProtocol; using namespace LanguageServerProtocol;
@@ -122,8 +125,19 @@ void DiagnosticManager::showDiagnostics(const DocumentUri &uri)
const VersionedDiagnostics &versionedDiagnostics = m_diagnostics.value(uri); const VersionedDiagnostics &versionedDiagnostics = m_diagnostics.value(uri);
const int docRevision = doc->document()->revision(); const int docRevision = doc->document()->revision();
if (versionedDiagnostics.version.value_or(docRevision) == docRevision) { if (versionedDiagnostics.version.value_or(docRevision) == docRevision) {
const auto icon = QIcon::fromTheme("edit-copy", Utils::Icons::COPY.icon());
const QString tooltip = tr("Copy to Clipboard");
for (const Diagnostic &diagnostic : versionedDiagnostics.diagnostics) { for (const Diagnostic &diagnostic : versionedDiagnostics.diagnostics) {
doc->addMark(new TextMark(filePath, diagnostic, m_clientId)); QAction *action = new QAction();
action->setIcon(icon);
action->setToolTip(tooltip);
QObject::connect(action, &QAction::triggered, [text = diagnostic.message()]() {
QApplication::clipboard()->setText(text);
});
auto mark = new TextMark(filePath, diagnostic, m_clientId);
mark->setActions({action});
doc->addMark(mark);
extraSelections << toDiagnosticsSelections(diagnostic, doc->document()); extraSelections << toDiagnosticsSelections(diagnostic, doc->document());
} }
} }

View File

@@ -37,6 +37,7 @@ namespace LanguageClient {
class DiagnosticManager class DiagnosticManager
{ {
Q_DECLARE_TR_FUNCTIONS(LanguageClient::DiagnosticManager)
public: public:
explicit DiagnosticManager(const Utils::Id &clientId); explicit DiagnosticManager(const Utils::Id &clientId);
~DiagnosticManager(); ~DiagnosticManager();

View File

@@ -84,10 +84,10 @@
<item> <item>
<widget class="QCheckBox" name="useIndenter"> <widget class="QCheckBox" name="useIndenter">
<property name="toolTip"> <property name="toolTip">
<string>If available, use a different margin. For example, the ColumnLimit from the clang-format plugin.</string> <string>If available, use a different margin. For example, the ColumnLimit from the ClangFormat plugin.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Use context specific margin</string> <string>Use context-specific margin</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Export QML</string> <string>Export Components</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">

View File

@@ -158,7 +158,7 @@ void AssetExporter::beginExport()
void AssetExporter::cancel() void AssetExporter::cancel()
{ {
if (!m_cancelled) { if (!m_cancelled) {
ExportNotification::addInfo(tr("Cancelling export.")); ExportNotification::addInfo(tr("Canceling export."));
m_assetDumper.reset(); m_assetDumper.reset();
m_cancelled = true; m_cancelled = true;
} }
@@ -227,13 +227,13 @@ void AssetExporter::notifyLoadError(AssetExporterView::LoadState state)
errorStr = tr("Loading file is taking too long."); errorStr = tr("Loading file is taking too long.");
break; break;
case AssetExporterView::LoadState::QmlErrorState: case AssetExporterView::LoadState::QmlErrorState:
errorStr = tr("Cannot parse. QML file has errors."); errorStr = tr("Cannot parse. The file contains coding errors.");
break; break;
default: default:
return; return;
} }
qCDebug(loggerError) << "QML load error:" << errorStr; qCDebug(loggerError) << "QML load error:" << errorStr;
ExportNotification::addError(tr("Loading QML failed. %1").arg(errorStr)); ExportNotification::addError(tr("Loading components failed. %1").arg(errorStr));
} }
void AssetExporter::notifyProgress(double value) const void AssetExporter::notifyProgress(double value) const
@@ -250,13 +250,13 @@ void AssetExporter::onQmlFileLoaded()
->documentManager() ->documentManager()
.currentDesignDocument(); .currentDesignDocument();
if (designDocument->hasQmlParseErrors()) { if (designDocument->hasQmlParseErrors()) {
ExportNotification::addError(tr("Cannot export QML. Document \"%1\" have parsing errors.") ExportNotification::addError(tr("Cannot export component. Document \"%1\" has parsing errors.")
.arg(designDocument->displayName())); .arg(designDocument->displayName()));
} else { } else {
exportComponent(m_view->rootModelNode()); exportComponent(m_view->rootModelNode());
QString error; QString error;
if (!m_view->saveQmlFile(&error)) { if (!m_view->saveQmlFile(&error)) {
ExportNotification::addError(tr("Error saving QML file. %1") ExportNotification::addError(tr("Error saving component file. %1")
.arg(error.isEmpty()? tr("Unknown") : error)); .arg(error.isEmpty()? tr("Unknown") : error));
} }
} }

View File

@@ -106,8 +106,8 @@ void AssetExporterPlugin::onExport()
void AssetExporterPlugin::addActions() void AssetExporterPlugin::addActions()
{ {
auto exportAction = new QAction(tr("Export QML")); auto exportAction = new QAction(tr("Export Components"));
exportAction->setToolTip(tr("Export QML code of the current project.")); exportAction->setToolTip(tr("Export components in the current project."));
connect(exportAction, &QAction::triggered, this, &AssetExporterPlugin::onExport); connect(exportAction, &QAction::triggered, this, &AssetExporterPlugin::onExport);
Core::Command *cmd = Core::ActionManager::registerAction(exportAction, Constants::EXPORT_QML); Core::Command *cmd = Core::ActionManager::registerAction(exportAction, Constants::EXPORT_QML);

View File

@@ -70,10 +70,10 @@ FilePathModel::~FilePathModel()
{ {
if (m_preprocessWatcher && !m_preprocessWatcher->isCanceled() && if (m_preprocessWatcher && !m_preprocessWatcher->isCanceled() &&
!m_preprocessWatcher->isFinished()) { !m_preprocessWatcher->isFinished()) {
ExportNotification::addInfo(tr("Canceling QML files preparation.")); ExportNotification::addInfo(tr("Canceling file preparation."));
m_preprocessWatcher->cancel(); m_preprocessWatcher->cancel();
m_preprocessWatcher->waitForFinished(); m_preprocessWatcher->waitForFinished();
qCDebug(loggerInfo) << "Canceling QML files preparation done."; qCDebug(loggerInfo) << "Canceled file preparation.";
} }
} }

View File

@@ -22,7 +22,7 @@
<item> <item>
<widget class="QLabel" name="targetIdLabel"> <widget class="QLabel" name="targetIdLabel">
<property name="text"> <property name="text">
<string>Selected item</string> <string>Selected component</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@@ -156,7 +156,7 @@ const char addToGroupItemDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMe
const char removeGroupItemDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", const char removeGroupItemDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu",
"Remove GroupItem"); "Remove GroupItem");
const char addItemToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add Item"); const char addItemToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add Component");
const char addTabBarToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add Tab Bar"); const char addTabBarToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add Tab Bar");
const char increaseIndexToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Increase Index"); const char increaseIndexToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Increase Index");
const char decreaseIndexToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Decrease Index"); const char decreaseIndexToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Decrease Index");
@@ -171,22 +171,22 @@ const char layoutFillHeightDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContext
const char flowAssignEffectDisplayName[] = "Assign FlowEffect "; const char flowAssignEffectDisplayName[] = "Assign FlowEffect ";
const char flowAssignCustomEffectDisplayName[] = "Assign Custom FlowEffect "; const char flowAssignCustomEffectDisplayName[] = "Assign Custom FlowEffect ";
const char raiseToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Raise selected item."); const char raiseToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Raise selected component.");
const char lowerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Lower selected item."); const char lowerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Lower selected component.");
const char resetSizeToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Reset size and use implicit size."); const char resetSizeToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Reset size and use implicit size.");
const char resetPositionTooltip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Reset position and use implicit position."); const char resetPositionTooltip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Reset position and use implicit position.");
const char anchorsFillToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Fill selected item to parent."); const char anchorsFillToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Fill selected component to parent.");
const char anchorsResetToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Reset anchors for selected item."); const char anchorsResetToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Reset anchors for selected component.");
const char layoutColumnLayoutToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout selected items in column layout."); const char layoutColumnLayoutToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout selected components in column layout.");
const char layoutRowLayoutToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout selected items in row layout."); const char layoutRowLayoutToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout selected components in row layout.");
const char layoutGridLayoutToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout selected items in grid layout."); const char layoutGridLayoutToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout selected components in grid layout.");
const char increaseIndexOfStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Increase index of stacked container."); const char increaseIndexOfStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Increase index of stacked container.");
const char decreaseIndexOfStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Decrease index of stacked container."); const char decreaseIndexOfStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Decrease index of stacked container.");
const char addItemToStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add item to stacked container."); const char addItemToStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add component to stacked container.");
const char addFlowActionToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add flow action."); const char addFlowActionToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add flow action.");
const char editListModelDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", const char editListModelDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu",

View File

@@ -633,7 +633,7 @@ void addSignalHandlerOrGotoImplementation(const SelectionContext &selectionState
if (!qmlObjectNode.isValid()) { if (!qmlObjectNode.isValid()) {
QString title = QCoreApplication::translate("ModelNodeOperations", "Go to Implementation"); QString title = QCoreApplication::translate("ModelNodeOperations", "Go to Implementation");
QString description = QCoreApplication::translate("ModelNodeOperations", "Invalid item."); QString description = QCoreApplication::translate("ModelNodeOperations", "Invalid component.");
Core::AsynchronousMessageBox::warning(title, description); Core::AsynchronousMessageBox::warning(title, description);
return; return;
} }

View File

@@ -87,13 +87,13 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
m_noSnappingAction->setIcon(Icons::NO_SNAPPING.icon()); m_noSnappingAction->setIcon(Icons::NO_SNAPPING.icon());
registerActionAsCommand(m_noSnappingAction, Constants::FORMEDITOR_NO_SNAPPING, QKeySequence(Qt::Key_T)); registerActionAsCommand(m_noSnappingAction, Constants::FORMEDITOR_NO_SNAPPING, QKeySequence(Qt::Key_T));
m_snappingAndAnchoringAction = layoutActionGroup->addAction(tr("Snap to parent or sibling items and generate anchors.")); m_snappingAndAnchoringAction = layoutActionGroup->addAction(tr("Snap to parent or sibling components and generate anchors."));
m_snappingAndAnchoringAction->setCheckable(true); m_snappingAndAnchoringAction->setCheckable(true);
m_snappingAndAnchoringAction->setChecked(true); m_snappingAndAnchoringAction->setChecked(true);
m_snappingAndAnchoringAction->setIcon(Icons::NO_SNAPPING_AND_ANCHORING.icon()); m_snappingAndAnchoringAction->setIcon(Icons::NO_SNAPPING_AND_ANCHORING.icon());
registerActionAsCommand(m_snappingAndAnchoringAction, Constants::FORMEDITOR_NO_SNAPPING_AND_ANCHORING, QKeySequence(Qt::Key_W)); registerActionAsCommand(m_snappingAndAnchoringAction, Constants::FORMEDITOR_NO_SNAPPING_AND_ANCHORING, QKeySequence(Qt::Key_W));
m_snappingAction = layoutActionGroup->addAction(tr("Snap to parent or sibling items but do not generate anchors.")); m_snappingAction = layoutActionGroup->addAction(tr("Snap to parent or sibling components but do not generate anchors."));
m_snappingAction->setCheckable(true); m_snappingAction->setCheckable(true);
m_snappingAction->setChecked(true); m_snappingAction->setChecked(true);
m_snappingAction->setIcon(Icons::SNAPPING.icon()); m_snappingAction->setIcon(Icons::SNAPPING.icon());
@@ -108,7 +108,7 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
upperActions.append(separatorAction); upperActions.append(separatorAction);
m_showBoundingRectAction = new QAction(Utils::Icons::BOUNDING_RECT.icon(), m_showBoundingRectAction = new QAction(Utils::Icons::BOUNDING_RECT.icon(),
tr("Show bounding rectangles and stripes for empty items."), tr("Show bounding rectangles and stripes for empty components."),
this); this);
m_showBoundingRectAction->setCheckable(true); m_showBoundingRectAction->setCheckable(true);
m_showBoundingRectAction->setChecked(false); m_showBoundingRectAction->setChecked(false);
@@ -123,14 +123,14 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
upperActions.append(separatorAction); upperActions.append(separatorAction);
m_rootWidthAction = new LineEditAction(tr("Override Width"), this); m_rootWidthAction = new LineEditAction(tr("Override Width"), this);
m_rootWidthAction->setToolTip(tr("Override width of root item.")); m_rootWidthAction->setToolTip(tr("Override width of root component."));
connect(m_rootWidthAction.data(), &LineEditAction::textChanged, connect(m_rootWidthAction.data(), &LineEditAction::textChanged,
this, &FormEditorWidget::changeRootItemWidth); this, &FormEditorWidget::changeRootItemWidth);
addAction(m_rootWidthAction.data()); addAction(m_rootWidthAction.data());
upperActions.append(m_rootWidthAction.data()); upperActions.append(m_rootWidthAction.data());
m_rootHeightAction = new LineEditAction(tr("Override Height"), this); m_rootHeightAction = new LineEditAction(tr("Override Height"), this);
m_rootHeightAction->setToolTip(tr("Override height of root item.")); m_rootHeightAction->setToolTip(tr("Override height of root component."));
connect(m_rootHeightAction.data(), &LineEditAction::textChanged, connect(m_rootHeightAction.data(), &LineEditAction::textChanged,
this, &FormEditorWidget::changeRootItemHeight); this, &FormEditorWidget::changeRootItemHeight);
addAction(m_rootHeightAction.data()); addAction(m_rootHeightAction.data());

View File

@@ -58,16 +58,15 @@ QVariant ItemLibraryAddImportModel::data(const QModelIndex &index, int role) con
if (!index.isValid() || index.row() >= m_importList.count()) if (!index.isValid() || index.row() >= m_importList.count())
return {}; return {};
QString importUrl = m_importList[index.row()].url(); Import import = m_importList[index.row()];
if (m_roleNames[role] == "importUrl") if (m_roleNames[role] == "importUrl")
return importUrl; return m_importList[index.row()].toString(true, true);
if (m_roleNames[role] == "importVisible") if (m_roleNames[role] == "importVisible")
return m_searchText.isEmpty() || importUrl.isEmpty() || m_importFilterList.contains(importUrl); return m_searchText.isEmpty() || import.url().isEmpty() || m_importFilterList.contains(import.url());
if (m_roleNames[role] == "isSeparator") if (m_roleNames[role] == "isSeparator")
return importUrl.isEmpty(); return import.isEmpty();
qWarning() << Q_FUNC_INFO << "invalid role requested"; qWarning() << Q_FUNC_INFO << "invalid role requested";
@@ -132,13 +131,11 @@ void ItemLibraryAddImportModel::update(const QList<Import> &possibleImports)
// create import sections // create import sections
bool previousIsPriority = false; bool previousIsPriority = false;
for (const Import &import : std::as_const(filteredImports)) { for (const Import &import : std::as_const(filteredImports)) {
if (import.isLibraryImport()) {
bool currentIsPriority = m_priorityImports.contains(import.url()); bool currentIsPriority = m_priorityImports.contains(import.url());
if (previousIsPriority && !currentIsPriority) if (previousIsPriority && !currentIsPriority)
m_importList.append(Import::empty()); // empty import acts as a separator m_importList.append(Import::empty()); // empty import acts as a separator
m_importList.append(import); m_importList.append(import);
previousIsPriority = currentIsPriority; previousIsPriority = currentIsPriority;
}
} }
endResetModel(); endResetModel();

View File

@@ -319,7 +319,7 @@ void ItemLibraryAssetImportDialog::updateImport(const ModelNode &updateNode,
if (options.isEmpty() || sourcePath.isEmpty()) { if (options.isEmpty() || sourcePath.isEmpty()) {
errorMsg = QCoreApplication::translate( errorMsg = QCoreApplication::translate(
"ModelNodeOperations", "ModelNodeOperations",
"Asset import data file '%1' is invalid.").arg(jsonFileName); "Asset import data file \"%1\" is invalid.").arg(jsonFileName);
} else { } else {
QFileInfo sourceInfo{sourcePath}; QFileInfo sourceInfo{sourcePath};
if (!sourceInfo.exists()) { if (!sourceInfo.exists()) {
@@ -334,7 +334,7 @@ void ItemLibraryAssetImportDialog::updateImport(const ModelNode &updateNode,
initialPath = compFileInfo.absolutePath(); initialPath = compFileInfo.absolutePath();
QStringList selectedFiles = QFileDialog::getOpenFileNames( QStringList selectedFiles = QFileDialog::getOpenFileNames(
Core::ICore::dialogParent(), Core::ICore::dialogParent(),
tr("Locate 3D Asset '%1'").arg(sourceInfo.fileName()), tr("Locate 3D Asset \"%1\"").arg(sourceInfo.fileName()),
initialPath, sourceInfo.fileName()); initialPath, sourceInfo.fileName());
if (!selectedFiles.isEmpty() if (!selectedFiles.isEmpty()
&& QFileInfo{selectedFiles[0]}.fileName() == sourceInfo.fileName()) { && QFileInfo{selectedFiles[0]}.fileName() == sourceInfo.fileName()) {
@@ -361,7 +361,7 @@ void ItemLibraryAssetImportDialog::updateImport(const ModelNode &updateNode,
} else { } else {
errorMsg = QCoreApplication::translate( errorMsg = QCoreApplication::translate(
"ModelNodeOperations", "Unable to locate source scene '%1'.") "ModelNodeOperations", "Unable to locate source scene \"%1\".")
.arg(sourceInfo.fileName()); .arg(sourceInfo.fileName());
} }
} }
@@ -370,7 +370,7 @@ void ItemLibraryAssetImportDialog::updateImport(const ModelNode &updateNode,
} }
} else { } else {
errorMsg = QCoreApplication::translate("ModelNodeOperations", errorMsg = QCoreApplication::translate("ModelNodeOperations",
"Opening asset import data file '%1' failed.") "Opening asset import data file \"%1\" failed.")
.arg(jsonFileName); .arg(jsonFileName);
} }
} else { } else {

View File

@@ -50,6 +50,9 @@ QString ItemLibraryImport::importName() const
if (importUrl() == "QtQuick") if (importUrl() == "QtQuick")
return tr("Default Components"); return tr("Default Components");
if (m_import.isFileImport())
return m_import.toString(true, true);
return importUrl().replace('.', ' '); return importUrl().replace('.', ' ');
} }
@@ -64,6 +67,9 @@ QString ItemLibraryImport::importUrl() const
if (m_sectionType == SectionType::Unimported) if (m_sectionType == SectionType::Unimported)
return unimportedComponentsTitle(); return unimportedComponentsTitle();
if (m_import.isFileImport())
return m_import.file();
return m_import.url(); return m_import.url();
} }
@@ -168,6 +174,11 @@ bool ItemLibraryImport::hasCategories() const
return m_categoryModel.rowCount() > 0; return m_categoryModel.rowCount() > 0;
} }
bool ItemLibraryImport::hasSingleCategory() const
{
return m_categoryModel.rowCount() == 1;
}
void ItemLibraryImport::sortCategorySections() void ItemLibraryImport::sortCategorySections()
{ {
m_categoryModel.sortCategorySections(); m_categoryModel.sortCategorySections();

View File

@@ -65,6 +65,7 @@ public:
bool importUsed() const; bool importUsed() const;
bool importRemovable() const; bool importRemovable() const;
bool hasCategories() const; bool hasCategories() const;
bool hasSingleCategory() const;
ItemLibraryCategory *getCategorySection(const QString &categoryName) const; ItemLibraryCategory *getCategorySection(const QString &categoryName) const;
void addCategory(ItemLibraryCategory *category); void addCategory(ItemLibraryCategory *category);

View File

@@ -214,10 +214,15 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
// create import sections // create import sections
QHash<QString, ItemLibraryImport *> importHash; QHash<QString, ItemLibraryImport *> importHash;
for (const Import &import : model->imports()) { for (const Import &import : model->imports()) {
if (import.isLibraryImport() && import.url() != projectName) { if (import.url() != projectName) {
bool addNew = true; bool addNew = true;
bool isQuick3DAsset = import.url().startsWith("Quick3DAssets."); bool isQuick3DAsset = import.url().startsWith("Quick3DAssets.");
QString importUrl = isQuick3DAsset ? ItemLibraryImport::quick3DAssetsTitle() : import.url(); QString importUrl = import.url();
if (isQuick3DAsset)
importUrl = ItemLibraryImport::quick3DAssetsTitle();
else if (import.isFileImport())
importUrl = import.toString(true, true).remove("\"");
ItemLibraryImport *oldImport = importHash.value(importUrl); ItemLibraryImport *oldImport = importHash.value(importUrl);
if (oldImport && oldImport->sectionType() == ItemLibraryImport::SectionType::Quick3DAssets if (oldImport && oldImport->sectionType() == ItemLibraryImport::SectionType::Quick3DAssets
&& isQuick3DAsset) { && isQuick3DAsset) {
@@ -280,28 +285,36 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
QString catName = entry.category(); QString catName = entry.category();
if (isUsable) { if (isUsable) {
if (catName == ItemLibraryImport::userComponentsTitle()) { if (catName == ItemLibraryImport::userComponentsTitle()) {
// create an import section for user components if (entry.requiredImport().isEmpty()) { // user components
importSection = importByUrl(ItemLibraryImport::userComponentsTitle()); importSection = importHash[ItemLibraryImport::userComponentsTitle()];
if (!importSection) { if (!importSection) {
importSection = new ItemLibraryImport( importSection = new ItemLibraryImport(
{}, this, ItemLibraryImport::SectionType::User); {}, this, ItemLibraryImport::SectionType::User);
m_importList.append(importSection); m_importList.append(importSection);
importSection->setImportExpanded(loadExpandedState(catName)); importHash.insert(ItemLibraryImport::userComponentsTitle(), importSection);
importSection->setImportExpanded(loadExpandedState(catName));
}
} else { // directory import
importSection = importHash[entry.requiredImport()];
} }
} else if (catName == "My Quick3D Components") { } else if (catName == "My Quick3D Components") {
importSection = importByUrl(ItemLibraryImport::quick3DAssetsTitle()); importSection = importHash[ItemLibraryImport::quick3DAssetsTitle()];
} else { } else {
if (catName.startsWith("Qt Quick - ")) if (catName.startsWith("Qt Quick - "))
catName = catName.mid(11); // remove "Qt Quick - " catName = catName.mid(11); // remove "Qt Quick - "
importSection = importByUrl(entry.requiredImport());
importSection = importHash[entry.requiredImport().isEmpty() ? "QtQuick"
: entry.requiredImport()];
} }
} else { } else {
catName = ItemLibraryImport::unimportedComponentsTitle(); catName = ItemLibraryImport::unimportedComponentsTitle();
importSection = importByUrl(catName); importSection = importHash[catName];
if (!importSection) { if (!importSection) {
importSection = new ItemLibraryImport( importSection = new ItemLibraryImport(
{}, this, ItemLibraryImport::SectionType::Unimported); {}, this, ItemLibraryImport::SectionType::Unimported);
m_importList.append(importSection); m_importList.append(importSection);
importHash.insert(ItemLibraryImport::unimportedComponentsTitle(), importSection);
importSection->setImportExpanded(loadExpandedState(catName)); importSection->setImportExpanded(loadExpandedState(catName));
} }
} }
@@ -316,8 +329,10 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
if (!categorySection) { if (!categorySection) {
categorySection = new ItemLibraryCategory(catName, importSection); categorySection = new ItemLibraryCategory(catName, importSection);
importSection->addCategory(categorySection); importSection->addCategory(categorySection);
if (importSection->sectionType() == ItemLibraryImport::SectionType::Default) if (importSection->sectionType() == ItemLibraryImport::SectionType::Default
&& !importSection->hasSingleCategory()) {
categorySection->setExpanded(loadExpandedState(categorySection->categoryName())); categorySection->setExpanded(loadExpandedState(categorySection->categoryName()));
}
} }
// create item // create item

View File

@@ -91,7 +91,7 @@ bool fitsToTargetProperty(const NodeAbstractProperty &targetProperty,
static inline QString msgUnknownItem(const QString &t) static inline QString msgUnknownItem(const QString &t)
{ {
return NavigatorTreeModel::tr("Unknown item: %1").arg(t); return NavigatorTreeModel::tr("Unknown component: %1").arg(t);
} }
static void removePosition(const ModelNode &node) static void removePosition(const ModelNode &node)
@@ -250,20 +250,20 @@ QVariant NavigatorTreeModel::data(const QModelIndex &index, int role) const
if (role == Qt::CheckStateRole) if (role == Qt::CheckStateRole)
return currentQmlObjectNode.isAliasExported() ? Qt::Checked : Qt::Unchecked; return currentQmlObjectNode.isAliasExported() ? Qt::Checked : Qt::Unchecked;
else if (role == Qt::ToolTipRole && !modelNodeForIndex(index).isRootNode()) else if (role == Qt::ToolTipRole && !modelNodeForIndex(index).isRootNode())
return tr("Toggles whether this item is exported as an " return tr("Toggles whether this component is exported as an "
"alias property of the root item."); "alias property of the root component.");
} else if (index.column() == ColumnType::Visibility) { // visible } else if (index.column() == ColumnType::Visibility) { // visible
if (role == Qt::CheckStateRole) if (role == Qt::CheckStateRole)
return m_view->isNodeInvisible(modelNode) ? Qt::Unchecked : Qt::Checked; return m_view->isNodeInvisible(modelNode) ? Qt::Unchecked : Qt::Checked;
else if (role == Qt::ToolTipRole && !modelNodeForIndex(index).isRootNode()) else if (role == Qt::ToolTipRole && !modelNodeForIndex(index).isRootNode())
return tr("Toggles the visibility of this item in the form editor.\n" return tr("Toggles the visibility of this component in the form editor.\n"
"This is independent of the visibility property in QML."); "This is independent of the visibility property.");
} else if (index.column() == ColumnType::Lock) { // lock } else if (index.column() == ColumnType::Lock) { // lock
if (role == Qt::CheckStateRole) if (role == Qt::CheckStateRole)
return modelNode.locked() ? Qt::Checked : Qt::Unchecked; return modelNode.locked() ? Qt::Checked : Qt::Unchecked;
else if (role == Qt::ToolTipRole && !modelNodeForIndex(index).isRootNode()) else if (role == Qt::ToolTipRole && !modelNodeForIndex(index).isRootNode())
return tr("Toggles whether this item is locked.\n" return tr("Toggles whether this component is locked.\n"
"Locked items cannot be modified or selected."); "Locked components cannot be modified or selected.");
} }
return QVariant(); return QVariant();

View File

@@ -126,7 +126,7 @@ QList<QToolButton *> NavigatorWidget::createToolBarWidgets()
filter->setPopupMode(QToolButton::InstantPopup); filter->setPopupMode(QToolButton::InstantPopup);
filter->setProperty("noArrow", true); filter->setProperty("noArrow", true);
auto filterMenu = new QMenu(filter); auto filterMenu = new QMenu(filter);
auto filterAction = new QAction(tr("Show only visible items."), nullptr); auto filterAction = new QAction(tr("Show Only Visible Components"), nullptr);
filterAction->setCheckable(true); filterAction->setCheckable(true);
bool filterFlag = DesignerSettings::getValue(DesignerSettingsKey::NAVIGATOR_SHOW_ONLY_VISIBLE_ITEMS).toBool(); bool filterFlag = DesignerSettings::getValue(DesignerSettingsKey::NAVIGATOR_SHOW_ONLY_VISIBLE_ITEMS).toBool();
@@ -135,7 +135,7 @@ QList<QToolButton *> NavigatorWidget::createToolBarWidgets()
connect(filterAction, &QAction::toggled, this, &NavigatorWidget::filterToggled); connect(filterAction, &QAction::toggled, this, &NavigatorWidget::filterToggled);
filterMenu->addAction(filterAction); filterMenu->addAction(filterAction);
auto reverseAction = new QAction(tr("Reverse item order."), nullptr); auto reverseAction = new QAction(tr("Reverse Component Order"), nullptr);
reverseAction->setCheckable(true); reverseAction->setCheckable(true);
bool reverseFlag = DesignerSettings::getValue(DesignerSettingsKey::NAVIGATOR_REVERSE_ITEM_ORDER).toBool(); bool reverseFlag = DesignerSettings::getValue(DesignerSettingsKey::NAVIGATOR_REVERSE_ITEM_ORDER).toBool();

View File

@@ -163,9 +163,9 @@ void PropertyEditorView::changeValue(const QString &name)
value->setValue(m_selectedNode.id()); value->setValue(m_selectedNode.id());
m_locked = false; m_locked = false;
if (!QmlDesigner::ModelNode::isValidId(newId)) if (!QmlDesigner::ModelNode::isValidId(newId))
Core::AsynchronousMessageBox::warning(tr("Invalid Id"), tr("%1 is an invalid id.").arg(newId)); Core::AsynchronousMessageBox::warning(tr("Invalid ID"), tr("%1 is an invalid ID.").arg(newId));
else else
Core::AsynchronousMessageBox::warning(tr("Invalid Id"), tr("%1 already exists.").arg(newId)); Core::AsynchronousMessageBox::warning(tr("Invalid ID"), tr("%1 already exists.").arg(newId));
} }
return; return;
} }
@@ -323,7 +323,7 @@ void PropertyEditorView::exportPopertyAsAlias(const QString &name)
PropertyName propertyName = aliasName.toUtf8(); PropertyName propertyName = aliasName.toUtf8();
if (rootModelNode().hasProperty(propertyName)) { if (rootModelNode().hasProperty(propertyName)) {
Core::AsynchronousMessageBox::warning(tr("Cannot Export Property as Alias"), Core::AsynchronousMessageBox::warning(tr("Cannot Export Property as Alias"),
tr("Property %1 does already exist for root item.").arg(aliasName)); tr("Property %1 does already exist for root component.").arg(aliasName));
return; return;
} }
rootModelNode().bindingProperty(propertyName).setDynamicTypeNameAndExpression("alias", id + "." + name); rootModelNode().bindingProperty(propertyName).setDynamicTypeNameAndExpression("alias", id + "." + name);

View File

@@ -109,7 +109,7 @@ void StatesEditorView::removeState(int nodeId)
if (!lockedTargets.empty()) { if (!lockedTargets.empty()) {
Utils::sort(lockedTargets); Utils::sort(lockedTargets);
QString detailedText = QString("<b>" + tr("Locked items:") + "</b><br>"); QString detailedText = QString("<b>" + tr("Locked components:") + "</b><br>");
for (const auto &id : qAsConst(lockedTargets)) for (const auto &id : qAsConst(lockedTargets))
detailedText.append("- " + id + "<br>"); detailedText.append("- " + id + "<br>");
@@ -120,7 +120,7 @@ void StatesEditorView::removeState(int nodeId)
msgBox.setTextFormat(Qt::RichText); msgBox.setTextFormat(Qt::RichText);
msgBox.setIcon(QMessageBox::Question); msgBox.setIcon(QMessageBox::Question);
msgBox.setWindowTitle(tr("Remove State")); msgBox.setWindowTitle(tr("Remove State"));
msgBox.setText(QString(tr("Removing this state will modify locked items.") + "<br><br>%1") msgBox.setText(QString(tr("Removing this state will modify locked components.") + "<br><br>%1")
.arg(detailedText)); .arg(detailedText));
msgBox.setInformativeText(tr("Continue by removing the state?")); msgBox.setInformativeText(tr("Continue by removing the state?"));
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);

View File

@@ -54,7 +54,7 @@ public:
QString alias() const { return m_alias; } QString alias() const { return m_alias; }
QStringList importPaths() const { return m_importPathList; } QStringList importPaths() const { return m_importPathList; }
QString toString(bool skipAlias = false) const; QString toString(bool skipAlias = false, bool skipVersion = false) const;
QString toImportString() const; QString toImportString() const;
bool operator==(const Import &other) const; bool operator==(const Import &other) const;

View File

@@ -366,7 +366,7 @@ void MetaInfoReader::syncItemLibraryEntries()
try { try {
m_metaInfo.itemLibraryInfo()->addEntries(m_bufferedEntries, m_overwriteDuplicates); m_metaInfo.itemLibraryInfo()->addEntries(m_bufferedEntries, m_overwriteDuplicates);
} catch (const InvalidMetaInfoException &) { } catch (const InvalidMetaInfoException &) {
addError(tr("Invalid or duplicate item library entry %1").arg(m_currentEntry.name()), currentSourceLocation()); addError(tr("Invalid or duplicate library entry %1").arg(m_currentEntry.name()), currentSourceLocation());
} }
m_bufferedEntries.clear(); m_bufferedEntries.clear();
} }

Some files were not shown because too many files have changed in this diff Show More