diff --git a/doc/qtcreator/images/qtquick-text-editor.png b/doc/qtcreator/images/qtquick-text-editor.png new file mode 100644 index 00000000000..ad1cb7a9ae6 Binary files /dev/null and b/doc/qtcreator/images/qtquick-text-editor.png differ diff --git a/doc/qtcreator/src/qtcreator-toc.qdoc b/doc/qtcreator/src/qtcreator-toc.qdoc index bc1f5567d5b..b0be2343dcf 100644 --- a/doc/qtcreator/src/qtcreator-toc.qdoc +++ b/doc/qtcreator/src/qtcreator-toc.qdoc @@ -115,6 +115,7 @@ \li \l{Transition Editor} \li \l{Timeline} \li \l{Curve Editor} + \li \l{Text Editor} \endlist \li \l {Creating UIs} \list diff --git a/doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc b/doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc index 7b2fd1e9d75..5c5eed5b9e2 100644 --- a/doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc +++ b/doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc @@ -190,8 +190,8 @@ \endlist We now want to add code to move the bubble based on Accelerometer sensor - values. This is not supported by \uicontrol {Form Editor}, so we will do - it in \uicontrol {Text Editor}: + values. This is not supported by \l {Form Editor}, so we will do + it in \l {Text Editor}: \list 1 \li Add the following import statement to \e main.qml: diff --git a/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc b/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc index c1a76565a6a..988c1517754 100644 --- a/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc +++ b/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc @@ -48,7 +48,7 @@ \include qtquick-tutorial-create-empty-project.qdocinc qtquick empty application \QC generates a component file, \e main.qml, and opens it in - \uicontrol {Text Editor}. The wizard template uses the \l Window component, + \l {Text Editor}. The wizard template uses the \l Window component, which does not support adding states. Because we want to use states in this example, we first replace the Window component with a \l {basic-rectangle} {Rectangle} component. We must also remove the line that sets the \c title diff --git a/doc/qtcreator/src/qtquick/library/qtquick-data-models.qdoc b/doc/qtcreator/src/qtquick/library/qtquick-data-models.qdoc index 025320416ec..056c06ec612 100644 --- a/doc/qtcreator/src/qtquick/library/qtquick-data-models.qdoc +++ b/doc/qtcreator/src/qtquick/library/qtquick-data-models.qdoc @@ -172,7 +172,7 @@ \endlist 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 \l {Text Editor}. \l{ItemDelegate}{Item Delegate} and \l{SwipeDelegate}{Swipe Delegate} components are also available in \uicontrol Library. diff --git a/doc/qtcreator/src/qtquick/qtdesignstudio-optimized-3d-scenes.qdoc b/doc/qtcreator/src/qtquick/qtdesignstudio-optimized-3d-scenes.qdoc index 01a8883189b..b2b55c8188f 100644 --- a/doc/qtcreator/src/qtquick/qtdesignstudio-optimized-3d-scenes.qdoc +++ b/doc/qtcreator/src/qtquick/qtdesignstudio-optimized-3d-scenes.qdoc @@ -50,8 +50,8 @@ objects compared to the other versions of the scene. The Low, Combined and Vertex scenes include less objects since they have been optimized by, for example, combining geometry and baking materials into textures. The - following image displays the components in each scene in \uicontrol - Navigator to illustrate the structural differences between the scenes. + following image displays the components in each scene in \l Navigator to + illustrate the structural differences between the scenes. \image studio-kitchen-navigators.png "Navigators for the four scenes in the Optimal 3D Scene." @@ -107,7 +107,7 @@ In \QC, the scene graph is represented by the tree-like view in \uicontrol Navigator. You can also view the hierarchy of nodes in the - \uicontrol {Text Editor} view. By minimizing the size of the scene graph, + \l {Text Editor} view. By minimizing the size of the scene graph, you can minimize the effort needed when running the scene. In terms of optimization, you should avoid unnecessary groups and complex hierarchy when possible. Deep hierarchies with complex parenting increase the performance diff --git a/doc/qtcreator/src/qtquick/qtquick-curve-editor.qdoc b/doc/qtcreator/src/qtquick/qtquick-curve-editor.qdoc index 8bbdc4f0f0a..7b34c33436f 100644 --- a/doc/qtcreator/src/qtquick/qtquick-curve-editor.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-curve-editor.qdoc @@ -26,7 +26,7 @@ /*! \page qtquick-curve-editor.html \previouspage qtquick-timeline-view.html - \nextpage creator-projects-view.html + \nextpage qtquick-text-editor.html \title Curve Editor diff --git a/doc/qtcreator/src/qtquick/qtquick-designer.qdoc b/doc/qtcreator/src/qtquick/qtquick-designer.qdoc index 3f51b99eaa6..6fb9b8ad63f 100644 --- a/doc/qtcreator/src/qtquick/qtquick-designer.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-designer.qdoc @@ -118,7 +118,7 @@ handlers to modify the curve. \li \l {Editing Animation Curves} \row - \li \l{Working in Edit Mode}{Text Editor} + \li \l{Text Editor} \li Provides a code editor for viewing and modifying the code generated by the visual editors. \li \l {Working in Edit Mode} diff --git a/doc/qtcreator/src/qtquick/qtquick-library.qdoc b/doc/qtcreator/src/qtquick/qtquick-library.qdoc index a45bc18cf61..b83e3b3e816 100644 --- a/doc/qtcreator/src/qtquick/qtquick-library.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-library.qdoc @@ -90,7 +90,7 @@ \image qtquick-components-tab-add.png "Select Modules to Add" This adds an \e {import statement} to the component code that you - can see in \uicontrol {Text Editor}. For example, if you add the + can see in \l {Text Editor}. For example, if you add the \uicontrol QtQuick.Controls module, the following import statement is added to the code: \c {import QtQuick.Controls}. diff --git a/doc/qtcreator/src/qtquick/qtquick-navigator.qdoc b/doc/qtcreator/src/qtquick/qtquick-navigator.qdoc index 6bd59ce6834..bec50374570 100644 --- a/doc/qtcreator/src/qtquick/qtquick-navigator.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-navigator.qdoc @@ -158,7 +158,7 @@ \section1 Arranging Components You can view the order of components in a component file in \uicontrol Navigator - and \uicontrol {Text Editor}. The order of components in the file also + and \l {Text Editor}. The order of components in the file also determines the order in which they are drawn in \uicontrol {Form Editor}. By default, components that are located at the top of the file are listed at the bottom of the \uicontrol Navigator tree and behind overlapping diff --git a/doc/qtcreator/src/qtquick/qtquick-positioning.qdoc b/doc/qtcreator/src/qtquick/qtquick-positioning.qdoc index 3a65526fef2..46a8756827c 100644 --- a/doc/qtcreator/src/qtquick/qtquick-positioning.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-positioning.qdoc @@ -116,7 +116,7 @@ (\uicontrol {Reset Anchors}) button to reset the anchors to their saved state. - You can specify the baseline anchor in \uicontrol {Text Editor}. + You can specify the baseline anchor in \l{Text Editor}. For performance reasons, you can only anchor a component to its siblings and direct parent. By default, a component is anchored to its parent when diff --git a/doc/qtcreator/src/qtquick/qtquick-states.qdoc b/doc/qtcreator/src/qtquick/qtquick-states.qdoc index a79cda9becc..6431092cf7c 100644 --- a/doc/qtcreator/src/qtquick/qtquick-states.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-states.qdoc @@ -79,7 +79,7 @@ and then add animation to the change between the states. The properties that you change in a state are highlighted with blue color. - In \uicontrol {Text Editor}, you can see the changes recorded as changes + In \l{Text Editor}, you can see the changes recorded as changes to the base state. \image qmldesigner-states.png "States and Properties views" diff --git a/doc/qtcreator/src/qtquick/qtquick-text-editor.qdoc b/doc/qtcreator/src/qtquick/qtquick-text-editor.qdoc new file mode 100644 index 00000000000..f60821ca9aa --- /dev/null +++ b/doc/qtcreator/src/qtquick/qtquick-text-editor.qdoc @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Creator documentation. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** +****************************************************************************/ + +/*! + \page qtquick-text-editor.html + \previouspage qtquick-curve-editor.html + \if defined(qtdesignstudio) + \nextpage creator-projects-view.html + \else + \nextpage quick-uis.html + \endif + + \title Text Editor + + In the \uicontrol {Text Editor} view, you can view and modify the code in a + \l{UI Files}{UI file} (.ui.qml) or component file (.qml) that is generated + when you create components in \l{Form Editor} or \l{3D Editor} and specify + their properties in \l Properties. + + \image qtquick-text-editor.png "Text Editor" + + You can also view and modify other types of text files. + + You can use a subset of the functions available in the + \l{Writing Code}{Edit mode}: + + \list + \li \l{Semantic Highlighting} + \li \l{Checking Code Syntax} + \li \l{Completing Code} + \li \l{Indenting Text or Code} + \li \l{Using Qt Quick Toolbars} + \endlist +*/ diff --git a/doc/qtcreator/src/qtquick/qtquick-ui-forms.qdoc b/doc/qtcreator/src/qtquick/qtquick-ui-forms.qdoc index db6f67fe9d0..6481f6bb022 100644 --- a/doc/qtcreator/src/qtquick/qtquick-ui-forms.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-ui-forms.qdoc @@ -42,7 +42,7 @@ You can use \QC wizards to create UI files that have the filename extension \e .ui.qml. The UI files can be edited in \l {Form Editor}. - If you use \uicontrol {Text Editor} to add code that is not supported + If you use \l {Text Editor} to add code that is not supported by \uicontrol {Form Editor}, \QC displays error messages. The following features are not supported: diff --git a/doc/qtcreator/src/qtquick/qtquick-uis.qdoc b/doc/qtcreator/src/qtquick/qtquick-uis.qdoc index 71e581511fe..c29bf21b539 100644 --- a/doc/qtcreator/src/qtquick/qtquick-uis.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-uis.qdoc @@ -29,7 +29,7 @@ \previouspage creator-exporting-qml.html \nextpage studio-app-flows.html \else - \previouspage creator-using-qt-quick-designer.html + \previouspage qtquick-text-editor.html \nextpage quick-components.html \endif diff --git a/doc/qtdesignstudio/examples/doc/loginui1.qdoc b/doc/qtdesignstudio/examples/doc/loginui1.qdoc index 06f73a73a20..610179d91b6 100644 --- a/doc/qtdesignstudio/examples/doc/loginui1.qdoc +++ b/doc/qtdesignstudio/examples/doc/loginui1.qdoc @@ -119,7 +119,7 @@ layout. Every UI file consists of two parts: an imports section and an component declaration section. The components and functionality most common to UIs are provided in the QtQuick import. You can view the code of an - .ui.qml file in the \uicontrol {Text Editor} view. + .ui.qml file in the \l{Text Editor} view. For more information about creating a component file from scratch, see \l{First Steps with QML}. diff --git a/doc/qtdesignstudio/examples/doc/sidemenu.qdoc b/doc/qtdesignstudio/examples/doc/sidemenu.qdoc index ac50e5cfde6..ad8d1347a6b 100644 --- a/doc/qtdesignstudio/examples/doc/sidemenu.qdoc +++ b/doc/qtdesignstudio/examples/doc/sidemenu.qdoc @@ -73,7 +73,7 @@ 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 state when the \l {AbstractButton::}{checked} property is set to \c true. - This is how the code will look in the \uicontrol {Text Editor}: + This is how the code will look in \l{Text Editor}: \quotefromfile SideMenu/CustomButton.qml \skipto states: [ diff --git a/doc/qtdesignstudio/examples/doc/washingMachineUI.qdoc b/doc/qtdesignstudio/examples/doc/washingMachineUI.qdoc index 2d665624427..630567f8ef5 100644 --- a/doc/qtdesignstudio/examples/doc/washingMachineUI.qdoc +++ b/doc/qtdesignstudio/examples/doc/washingMachineUI.qdoc @@ -204,7 +204,7 @@ 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 - in \e StartScreen.ui.qml. First, we use the \uicontrol {Text Editor} view + in \e StartScreen.ui.qml. First, we use the \l{Text Editor} view to create the \c startClicked signal: \quotefromfile washingMachineUI/StartScreen.ui.qml diff --git a/doc/qtdesignstudio/examples/doc/webinardemo.qdoc b/doc/qtdesignstudio/examples/doc/webinardemo.qdoc index ae71dbcfc01..fde42c82402 100644 --- a/doc/qtdesignstudio/examples/doc/webinardemo.qdoc +++ b/doc/qtdesignstudio/examples/doc/webinardemo.qdoc @@ -173,7 +173,7 @@ context menu. Any changes we make to a component are immediately visible in all the other components where it appears. - We can view the QML code for each component in the \uicontrol {Text Editor}. + We can view the QML code for each component in \l{Text Editor}. We can now use states and the timeline to animate the components in the UI. diff --git a/doc/qtdesignstudio/src/qtdesignstudio-advanced.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-advanced.qdoc index 403a69229c4..f48f28568a6 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-advanced.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-advanced.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Design Studio documentation. @@ -31,14 +31,13 @@ \title Advanced Topics \QDS attempts to meet your needs, whether you have previous experience with - QML, and coding or not. When you install \QDS, the default configuration + QML and coding or not. When you install \QDS, the default configuration allows you to start designing and previewing UIs with very little effort. - However, you might want to use the \uicontrol {Text Editor} in the Design - mode sometimes to edit your QML files or write some JavaScript to simulate - application logic and bring your UI to life. If you use JavaScript, you - might also want to debug and profile you UIs to find and fix problems in - them. + However, you might want to use the \l{Text Editor} view sometimes to edit + your component files (.qml) or write some JavaScript to simulate application + logic and bring your UI to life. If you use JavaScript, you might also want + to debug and profile you UIs to find and fix problems in them. You can also use special options to start \QC from the command line and use it mainly from the keyboard. @@ -55,12 +54,11 @@ as well as import and export keyboard shortcut mapping schemes. \li \l{Coding} - You can use the code editor in the Design mode - \uicontrol {Text Editor} view or in the Edit mode to modify QML - code. The code editor understands the QML language as code, not - just as plain text. This enables it to provide you with useful - features, such as semantic highlighting, checking code syntax, - code completion, and refactoring actions. + You can use the code editor in the \uicontrol {Text Editor} view or + in the Edit mode to modify QML code. The code editor understands + the QML language as code, not just as plain text. This enables it + to provide you with useful features, such as semantic highlighting, + checking code syntax, code completion, and refactoring actions. \li \l{Simulating Data Input} \QDS enables you to connect UIs to different forms of data from various diff --git a/doc/qtdesignstudio/src/qtdesignstudio-importing-2d.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-importing-2d.qdoc index 878d5cc9f81..fd3700c832a 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-importing-2d.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-importing-2d.qdoc @@ -94,7 +94,7 @@ \note The layer that was the bottom layer in the design tool becames the top layer in \uicontrol Navigator to reflect the QML code model. You - can view the QML code in \uicontrol {Text Editor}. + can view the QML code in \l{Text Editor}. After importing the metadata files, wait a few moments to allow all imported assets to appear in your project files before selecting your diff --git a/doc/qtdesignstudio/src/qtdesignstudio-javascript.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-javascript.qdoc index 918b852a1e9..98a92dacd23 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-javascript.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-javascript.qdoc @@ -94,7 +94,7 @@ \code singleton Values 1.0 Values.qml \endcode - \li Open \e Values.qml in the \uicontrol {Text Editor} for editing. + \li Open \e Values.qml in \l{Text Editor} for editing. \li Add the following code to the top of the file to register the QObject-derived class that you will use to expose the global properties as a singleton type: diff --git a/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc index 27c7f4b5796..20f600e79e6 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc @@ -68,6 +68,7 @@ \li \l{Transition Editor} \li \l{Timeline} \li \l{Curve Editor} + \li \l{Text Editor} \li \l{Projects} \li \l{File System} \li \l{Open Documents} diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/exporting-3d/exporting-from-qt3ds.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/exporting-3d/exporting-from-qt3ds.qdoc index b58052e603f..02dc475c5b2 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/exporting-3d/exporting-from-qt3ds.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/exporting-3d/exporting-from-qt3ds.qdoc @@ -143,7 +143,7 @@ \li Adjust the canvas size of your project in \QDS according to the screen size in \Q3DS presentation by editing the \c Constants.qml file in - \uicontrol {Text Editor}. If you cannot see the \uicontrol {Text Editor} + \l{Text Editor}. If you cannot see the \uicontrol {Text Editor} view, select \uicontrol Window > \uicontrol {Views}, and then select the \uicontrol {Text Editor} checkbox. In the \uicontrol Projects view, open the imports subfolder, then the subfolder named after your project, and diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-scene-environment.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-scene-environment.qdoc index 8a54021a193..086c9915164 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-scene-environment.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-scene-environment.qdoc @@ -83,7 +83,7 @@ To render a Skybox or Skydome instead of clearing the scene, select \uicontrol SkyBox. You can specify the image to use as a value of the \l{SceneEnvironment::lightProbe}{lightProbe} - property in \uicontrol {Text Editor}. + property in \l{Text Editor}. To leave the scene uncleared, select \uicontrol {Unspecified}.