Merge remote-tracking branch 'origin/4.15'
Change-Id: I1d13f3543ab4bb17f0cbfe26bbea3f154f856ca6
@@ -2,6 +2,9 @@ type: Group
|
||||
instructions:
|
||||
- type: Group
|
||||
instructions:
|
||||
- type: EnvironmentVariable
|
||||
variableName: QTC_BUILD_TYPE
|
||||
variableValue: "Release"
|
||||
- type: EnvironmentVariable
|
||||
variableName: QTC_QT_BASE_URL
|
||||
variableValue: "http://ci-files02-hki-infra.intra.qt.io/packages/jenkins/archive/qt/6.1/6.1.0-beta3-released"
|
||||
|
@@ -3,32 +3,17 @@ instructions:
|
||||
- type: Group
|
||||
instructions:
|
||||
- type: ExecuteCommand
|
||||
command: "mkdir {{.AgentWorkingDir}}/qt_temp"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to create folder qt_temp, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}/qt_temp/icu-linux-g++-Rhel7.2-x64.7z http://master.qt.io/development_releases/prebuilt/icu/prebuilt/56.1/icu-linux-g++-Rhel7.2-x64.7z"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to download icu package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "/usr/bin/7z x -y {{.AgentWorkingDir}}/qt_temp/icu-linux-g++-Rhel7.2-x64.7z -o{{.InstallDir}}/lib"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to extract icu package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}/qt_temp/elfutils-release_0.175qt-linux-x86_64.7z http://master.qt.io/development_releases/prebuilt/elfutils/elfutils-release_0.175qt-linux-x86_64.7z"
|
||||
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}/build/qt_temp/elfutils-release_0.175qt-linux-x86_64.7z http://master.qt.io/development_releases/prebuilt/elfutils/elfutils-release_0.175qt-linux-x86_64.7z"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to download elfutils package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "/usr/bin/7z x -y {{.AgentWorkingDir}}/qt_temp/elfutils-release_0.175qt-linux-x86_64.7z -o{{.AgentWorkingDir}}/qt_temp/elfutils"
|
||||
command: "/usr/bin/7z x -y {{.AgentWorkingDir}}/build/qt_temp/elfutils-release_0.175qt-linux-x86_64.7z -o{{.AgentWorkingDir}}/build/qt_temp/elfutils"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to extract elfutils package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "python {{.AgentWorkingDir}}/qt-creator/qt-creator/scripts/build.py --src {{.AgentWorkingDir}}/qt-creator/qt-creator --build {{.AgentWorkingDir}}/qt-creator/qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt5_install_dir --elfutils-path {{.AgentWorkingDir}}/qt_temp/elfutils"
|
||||
command: "python {{.AgentWorkingDir}}/qt-creator/qt-creator/scripts/build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}/qt-creator/qt-creator --build {{.AgentWorkingDir}}/qt-creator/qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt5_install_dir --elfutils-path {{.AgentWorkingDir}}/build/qt_temp/elfutils --add-config=-DCMAKE_C_COMPILER_LAUNCHER=sccache --add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
|
||||
maxTimeInSeconds: 36000
|
||||
maxTimeBetweenOutput: 3600
|
||||
userMessageOnFailure: "Failed to run build.py, check logs."
|
||||
@@ -45,7 +30,7 @@ instructions:
|
||||
- type: Group
|
||||
instructions:
|
||||
- type: ExecuteCommand
|
||||
command: "python {{.AgentWorkingDir}}/qt-creator/qt-creator/scripts/build.py --src {{.AgentWorkingDir}}/qt-creator/qt-creator --build {{.AgentWorkingDir}}/qt-creator/qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt5_install_dir --keychain-unlock-script /Users/qt/unlock-keychain.sh"
|
||||
command: "python {{.AgentWorkingDir}}/qt-creator/qt-creator/scripts/build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}/qt-creator/qt-creator --build {{.AgentWorkingDir}}/qt-creator/qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt5_install_dir --keychain-unlock-script /Users/qt/unlock-keychain.sh --add-config=-DCMAKE_C_COMPILER_LAUNCHER=sccache --add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
|
||||
maxTimeInSeconds: 36000
|
||||
maxTimeBetweenOutput: 3600
|
||||
userMessageOnFailure: "Failed to run build.py, check logs."
|
||||
@@ -56,73 +41,28 @@ instructions:
|
||||
|
||||
- type: Group
|
||||
instructions:
|
||||
- type: MakeDirectory
|
||||
directory: "{{.AgentWorkingDir}}/qt_temp"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to create folder qt_temp, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\qt_temp\\elfutils-release_0.175qt-windows-x86_64.7z http://master.qt.io/development_releases/prebuilt/elfutils/elfutils-release_0.175qt-windows-x86_64.7z"
|
||||
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\elfutils-release_0.175qt-windows-x86_64.7z http://master.qt.io/development_releases/prebuilt/elfutils/elfutils-release_0.175qt-windows-x86_64.7z"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to download elfutils package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\qt_temp\\elfutils-release_0.175qt-windows-x86_64.7z -o{{.AgentWorkingDir}}\\qt_temp\\elfutils"
|
||||
command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\build\\qt_temp\\elfutils-release_0.175qt-windows-x86_64.7z -o{{.AgentWorkingDir}}\\build\\qt_temp\\elfutils"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to extract elfutils package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\qt_temp\\Python38-win-x64.7z http://master.qt.io/development_releases/prebuilt/python/Python38-win-x64.7z"
|
||||
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\Python38-win-x64.7z http://master.qt.io/development_releases/prebuilt/python/Python38-win-x64.7z"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to download python package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\qt_temp\\Python38-win-x64.7z -o{{.AgentWorkingDir}}\\qt_temp\\python"
|
||||
command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\build\\qt_temp\\Python38-win-x64.7z -o{{.AgentWorkingDir}}\\build\\qt_temp\\python"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to extract python package, check logs."
|
||||
- type: MakeDirectory
|
||||
directory: "{{.AgentWorkingDir}}/qt_temp/openssl"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to create folder openssl, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\qt_temp\\openssl\\openssl_1.1.1d_prebuild_x64.7z http://ci-files02-hki.intra.qt.io/packages/jenkins/openssl/openssl_1.1.1d_prebuild_x64.7z"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to download openssl package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\qt_temp\\openssl\\openssl_1.1.1d_prebuild_x64.7z"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to extract openssl package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "cmd copy {{.AgentWorkingDir}}\\qt_temp\\openssl\\openssl_1.1.1d_prebuild_x64\\Win_x64\\bin\\*.dll {{.InstallDir}}\\bin\\"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to copy openssl ddl's, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\qt_temp\\opengl32sw-64.7z http://master.qt.io/development_releases/prebuilt/llvmpipe/windows/opengl32sw-64.7z"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to download opengl package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\qt_temp\\opengl32sw-64.7z -o{{.InstallDir}}\\bin"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to extract opengl package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\qt_temp\\d3dcompiler_47-x64.7z http://master.qt.io/development_releases/prebuilt/d3dcompiler/msvc2013/d3dcompiler_47-x64.7z"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to download d3dcompiler package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\qt_temp\\d3dcompiler_47-x64.7z -o{{.InstallDir}}\\bin"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to extract d3dcompiler package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "python -u {{.AgentWorkingDir}}\\qt-creator\\qt-creator\\scripts\\build.py --src {{.AgentWorkingDir}}\\qt-creator\\qt-creator --build {{.AgentWorkingDir}}\\qt-creator\\qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt5_install_dir --python-path {{.AgentWorkingDir}}\\qt_temp\\python --elfutils-path {{.AgentWorkingDir}}\\qt_temp\\elfutils"
|
||||
command: "python -u {{.AgentWorkingDir}}\\qt-creator\\qt-creator\\scripts\\build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}\\qt-creator\\qt-creator --build {{.AgentWorkingDir}}\\qt-creator\\qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt5_install_dir --python-path {{.AgentWorkingDir}}\\build\\qt_temp\\python --elfutils-path {{.AgentWorkingDir}}\\buid\\qt_temp\\elfutils --add-config=-DCMAKE_C_COMPILER_LAUNCHER=sccache --add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
|
||||
maxTimeInSeconds: 36000
|
||||
maxTimeBetweenOutput: 3600
|
||||
userMessageOnFailure: "Failed to run build.py, check logs."
|
||||
@@ -139,22 +79,22 @@ instructions:
|
||||
- type: Group
|
||||
instructions:
|
||||
- type: MakeDirectory
|
||||
directory: "{{.AgentWorkingDir}}/qt_temp"
|
||||
directory: "{{.AgentWorkingDir}}/build/qt_temp"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to create folder qt_temp, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\qt_temp\\Python38-win-x86.7z http://master.qt.io/development_releases/prebuilt/python/Python38-win-x86.7z"
|
||||
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\Python38-win-x86.7z http://master.qt.io/development_releases/prebuilt/python/Python38-win-x86.7z"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to download python package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\qt_temp\\Python38-win-x86.7z -o{{.AgentWorkingDir}}\\qt_temp\\python"
|
||||
command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\build\\qt_temp\\Python38-win-x86.7z -o{{.AgentWorkingDir}}\\build\\qt_temp\\python"
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
userMessageOnFailure: "Failed to extract python package, check logs."
|
||||
- type: ExecuteCommand
|
||||
command: "python -u {{.AgentWorkingDir}}\\qt-creator\\qt-creator\\scripts\\build.py --src {{.AgentWorkingDir}}\\qt-creator\\qt-creator --build {{.AgentWorkingDir}}\\qt-creator\\qt-creator_build --python-path {{.AgentWorkingDir}}\\qt_temp\\python --no-qtcreator"
|
||||
command: "python -u {{.AgentWorkingDir}}\\qt-creator\\qt-creator\\scripts\\build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}\\qt-creator\\qt-creator --build {{.AgentWorkingDir}}\\qt-creator\\qt-creator_build --python-path {{.AgentWorkingDir}}\\buid\\qt_temp\\python --no-qtcreator"
|
||||
maxTimeInSeconds: 36000
|
||||
maxTimeBetweenOutput: 3600
|
||||
userMessageOnFailure: "Failed to run build.py, check logs."
|
||||
|
@@ -61,7 +61,7 @@ instructions:
|
||||
property: host.os
|
||||
equals_value: Windows
|
||||
- type: ExecuteCommand
|
||||
command: "python -u {{.AgentWorkingDir}}/build/qtsdk/packaging-tools/install_qt.py --qt-path {{.AgentWorkingDir}}/build/qt5_install_dir --temp-path {{.AgentWorkingDir}}/build/qt_temp --base-url {{.Env.QTC_QT_BASE_URL}} --base-url-postfix=-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86_64.7z {{.Env.QTC_QT_MODULES}}"
|
||||
command: "python -u {{.AgentWorkingDir}}/build/qtsdk/packaging-tools/install_qt.py --qt-path {{.AgentWorkingDir}}/build/qt5_install_dir --temp-path {{.AgentWorkingDir}}/build/qt_temp --base-url {{.Env.QTC_QT_BASE_URL}} --base-url-postfix=-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86_64.7z --opengl32sw7z http://master.qt.io/development_releases/prebuilt/llvmpipe/windows/opengl32sw-64.7z --d3dcompiler7z http://master.qt.io/development_releases/prebuilt/d3dcompiler/msvc2013/d3dcompiler_47-x64.7z --openssl7z http://ci-files02-hki.intra.qt.io/packages/jenkins/openssl/openssl_1.1.1d_prebuild_x64.7z {{.Env.QTC_QT_MODULES}}"
|
||||
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
|
||||
maxTimeInSeconds: 3600
|
||||
maxTimeBetweenOutput: 360
|
||||
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 45 KiB |
BIN
doc/qtcreator/images/qtcreator-class-view.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
doc/qtcreator/images/qtcreator-include-hierarchy-view.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
doc/qtcreator/images/qtcreator-outline-view.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 4.1 KiB |
BIN
doc/qtcreator/images/qtcreator-refactoring-options-locations.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 2.3 KiB |
BIN
doc/qtcreator/images/qtcreator-refactoring-options-templates.png
Normal file
After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 443 B After Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 15 KiB |
@@ -43,6 +43,22 @@
|
||||
common prefix (up to the first underscore character) are grouped under
|
||||
the prefix.
|
||||
|
||||
\section1 Multi-Config Support
|
||||
|
||||
\QC supports
|
||||
\l{https://cmake.org/cmake/help/latest/prop_gbl/GENERATOR_IS_MULTI_CONFIG.html}
|
||||
{Multi-config generators}, such as Xcode, Visual Studio, and Ninja
|
||||
Multi-Config. This means that you need to configure CMake only once, have
|
||||
only one build directory, and can switch between build types faster.
|
||||
|
||||
However, this means that \QC can no longer simply parse the first CMake
|
||||
file-api JSON export. Therefore, the value of the \uicontrol {Build type}
|
||||
field must match that of the \c CMAKE_BUILD_TYPE variable for the single
|
||||
configuration generators (Ninja, Makefile) to determine, which generator
|
||||
to use.
|
||||
|
||||
When developing with Qt 6 for iOS, only the Xcode generator is supported.
|
||||
|
||||
\section1 Modifying Initial Parameters
|
||||
|
||||
In the \uicontrol Value column, you can view and edit the actual values
|
||||
|
@@ -26,11 +26,7 @@
|
||||
/*!
|
||||
\page creator-editor-refactoring.html
|
||||
\previouspage creator-editor-locator.html
|
||||
\if defined(qtdesignstudio)
|
||||
\nextpage creator-editor-options.html
|
||||
\else
|
||||
\nextpage creator-beautifier.html
|
||||
\endif
|
||||
\nextpage creator-editor-quick-fixes.html
|
||||
|
||||
\title Refactoring
|
||||
|
||||
@@ -43,6 +39,10 @@
|
||||
\li Simplify code structure
|
||||
\endlist
|
||||
|
||||
\QC allows you to quickly and conveniently apply actions to refactor your
|
||||
code by selecting them in a context menu. For more information, see
|
||||
\l{Applying Refactoring Actions}.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\section1 Finding Symbols
|
||||
|
||||
@@ -167,780 +167,4 @@
|
||||
On Windows and Linux, you can also hold \key {Alt+Shift} and select
|
||||
the rows using the arrow keys and the \key PageUp, \key PageDown,
|
||||
\key Home, \key End keys.
|
||||
|
||||
\section1 Applying Refactoring Actions
|
||||
|
||||
\QC allows you to quickly and conveniently apply actions to refactor your
|
||||
code by selecting them in a context menu. The actions available depend on
|
||||
the position of the cursor in the code editor.
|
||||
|
||||
\if defined(qtcreator)
|
||||
To apply refactoring actions to C++ code, right-click an operand,
|
||||
conditional statement, string, or name to open a context menu.
|
||||
\endif
|
||||
To apply refactoring actions to QML code, right-click an item ID or name.
|
||||
|
||||
In the context menu, select \uicontrol {Refactoring} and then select a
|
||||
refactoring action.
|
||||
|
||||
You can also press \key {Alt+Enter} to open a context menu that contains
|
||||
refactoring actions available in the current cursor position.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\section1 Creating Functions
|
||||
|
||||
You can apply refactoring actions to implement member functions, insert
|
||||
virtual functions of base classes, create getter and setter functions,
|
||||
and generate constructors.
|
||||
|
||||
\section2 Implementing Member Functions
|
||||
|
||||
You can apply the \uicontrol {Create Implementations for Member Functions}
|
||||
refactoring action to create implementations for all member functions in
|
||||
one go. In the \uicontrol {Member Function Implementations} dialog, you can
|
||||
specify whether the member functions are generated inline or outside the
|
||||
class.
|
||||
|
||||
\image qtcreator-refactoring-member-function-implementations.png "Implement Member Functions dialog"
|
||||
|
||||
\section2 Inserting Virtual Functions
|
||||
|
||||
You can apply the \uicontrol {Insert Virtual Functions of Base Classes}
|
||||
refactoring action to insert declarations and the corresponding definitions
|
||||
inside or outside the class or in an implementation file (if it exists).
|
||||
|
||||
\image qtcreator-refactoring-virtual-function-dialog.png "Insert Virtual Functions dialog"
|
||||
|
||||
Select the functions to insert in the list of available functions. You can
|
||||
filter the list and hide reimplemented functions from it.
|
||||
|
||||
You can add \e virtual or the \e override equivalent to the function
|
||||
declaration.
|
||||
|
||||
\section2 Creating Getters and Setters
|
||||
|
||||
You can apply the \uicontrol {Create Getter and Setter Member Functions}
|
||||
refactoring action to create either both getter and setter member functions
|
||||
for member variables or only a getter or setter.
|
||||
|
||||
\image qtcreator-refactoring-getters-and-setters.png "Getters and Setters dialog"
|
||||
|
||||
\section2 Generating Constructors
|
||||
|
||||
You can apply the \uicontrol {Generate Constructor} refactoring action to
|
||||
create a public, protected, or private constructor for a class. Select the
|
||||
class members to initialize in the constructor. Drag and drop the parameters
|
||||
to specify their order in the constructor.
|
||||
|
||||
\image qtcreator-refactoring-constructor.png "Constructor dialog"
|
||||
|
||||
\endif
|
||||
|
||||
\section1 Summary of Refactoring Actions
|
||||
|
||||
\if defined(qtcreator)
|
||||
If you use the \l{Parsing C++ Files with the Clang Code Model}
|
||||
{Clang code model} to parse the C++ files, the
|
||||
\l{http://clang.llvm.org/diagnostics.html}{Clang fix-it hints}
|
||||
that have been integrated into \QC are also available to you. In addition to
|
||||
the standard ways of activating refactoring actions, you can select the
|
||||
actions that are applicable on a line in the context menu in the left margin
|
||||
of the code editor.
|
||||
|
||||
\section2 Refactoring C++ Code
|
||||
|
||||
You can apply the following types of refactoring actions to C++ code:
|
||||
|
||||
\list
|
||||
\li Change binary operands
|
||||
\li Simplify if and while conditions (for example, move declarations out
|
||||
of if conditions)
|
||||
\li Modify strings (for example, set the encoding for a string to
|
||||
Latin-1, mark strings translatable, and convert symbol names to
|
||||
camel case)
|
||||
\li Create variable declarations
|
||||
\li Create function declarations and definitions
|
||||
\endlist
|
||||
|
||||
The following table summarizes the refactoring actions for C++ code. The
|
||||
action is available when the cursor is in the position described in the
|
||||
Activation column.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Refactoring Action
|
||||
\li Description
|
||||
\li Activation
|
||||
\row
|
||||
\li Add Curly Braces
|
||||
\li Adds curly braces to an if statement that does not contain a
|
||||
compound statement. For example, rewrites
|
||||
|
||||
\code
|
||||
if (a)
|
||||
b;
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
if (a) {
|
||||
b;
|
||||
}
|
||||
\endcode
|
||||
\li \c if
|
||||
\row
|
||||
\li Move Declaration out of Condition
|
||||
\li Moves a declaration out of an if or while condition to simplify
|
||||
the condition. For example, rewrites
|
||||
|
||||
\code
|
||||
if (Type name = foo()) {}
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
Type name = foo;
|
||||
if (name) {}
|
||||
\endcode
|
||||
\li Name of the introduced variable
|
||||
\row
|
||||
\li Rewrite Condition Using ||
|
||||
\li Rewrites the expression according to De Morgan's laws. For
|
||||
example, rewrites:
|
||||
\code
|
||||
!a && !b
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
!(a || b)
|
||||
\endcode
|
||||
\li \c &&
|
||||
\row
|
||||
\li Rewrite Using \e operator
|
||||
\li Rewrites an expression negating it and using the inverse
|
||||
operator. For example, rewrites:
|
||||
|
||||
\list
|
||||
|
||||
\li \code
|
||||
a op b
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
!(a invop b)
|
||||
\endcode
|
||||
|
||||
\li \code
|
||||
(a op b)
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
!(a invop b)
|
||||
\endcode
|
||||
|
||||
\li \code
|
||||
!(a op b)
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
(a invob b)
|
||||
\endcode
|
||||
|
||||
\endlist
|
||||
|
||||
\li \c {<=}, \c {<}, \c {>}, \c {>=}, \c {==} or \c {!=}
|
||||
\row
|
||||
\li Split Declaration
|
||||
\li Splits a simple declaration into several declarations. For
|
||||
example, rewrites:
|
||||
\code
|
||||
int *a, b;
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
int *a;
|
||||
int b;
|
||||
\endcode
|
||||
\li Type name or variable name
|
||||
\row
|
||||
\li Split if Statement
|
||||
\li Splits an if statement into several statements. For example,
|
||||
rewrites:
|
||||
|
||||
\code
|
||||
if (something && something_else) {
|
||||
}
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
if (something) {
|
||||
if (something_else) {
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
and
|
||||
|
||||
\code
|
||||
if (something || something_else)
|
||||
x;
|
||||
\endcode
|
||||
|
||||
with
|
||||
|
||||
\code
|
||||
if (something)
|
||||
x;
|
||||
else if (something_else)
|
||||
x;
|
||||
\endcode
|
||||
|
||||
\li \c && or \c ||
|
||||
\row
|
||||
\li Swap Operands
|
||||
\li Rewrites an expression in the inverse order using the inverse
|
||||
operator. For example, rewrites:
|
||||
\code
|
||||
a op b
|
||||
\endcode
|
||||
|
||||
as
|
||||
\code
|
||||
b flipop a
|
||||
\endcode
|
||||
\li \c {<=}, \c {<}, \c {>}, \c {>=}, \c {==}, \c {!=}, \c {&&}
|
||||
or \c {||}
|
||||
\row
|
||||
\li Convert to Decimal
|
||||
\li Converts an integer literal to decimal representation
|
||||
\li Numeric literal
|
||||
\row
|
||||
\li Convert to Hexadecimal
|
||||
\li Converts an integer literal to hexadecimal representation
|
||||
\li Numeric literal
|
||||
\row
|
||||
\li Convert to Octal
|
||||
\li Converts an integer literal to octal representation
|
||||
\li Numeric literal
|
||||
\row
|
||||
\li Convert to Objective-C String Literal
|
||||
\li Converts a string literal to an Objective-C string literal if
|
||||
the file type is Objective-C(++). For example, rewrites the
|
||||
following strings
|
||||
|
||||
\code
|
||||
"abcd"
|
||||
QLatin1String("abcd")
|
||||
QLatin1Literal("abcd")
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
@"abcd"
|
||||
\endcode
|
||||
\li String literal
|
||||
\row
|
||||
\li Enclose in QLatin1Char()
|
||||
\li Sets the encoding for a character to Latin-1, unless the
|
||||
character is already enclosed in QLatin1Char, QT_TRANSLATE_NOOP,
|
||||
tr, trUtf8, QLatin1Literal, or QLatin1String. For example,
|
||||
rewrites
|
||||
|
||||
\code
|
||||
'a'
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QLatin1Char('a')
|
||||
\endcode
|
||||
\li String literal
|
||||
\row
|
||||
\li Enclose in QLatin1String()
|
||||
\li Sets the encoding for a string to Latin-1, unless the string is
|
||||
already enclosed in QLatin1Char, QT_TRANSLATE_NOOP, tr, trUtf8,
|
||||
QLatin1Literal, or QLatin1String. For example, rewrites
|
||||
\code
|
||||
"abcd"
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QLatin1String("abcd")
|
||||
\endcode
|
||||
|
||||
\li String literal
|
||||
|
||||
\row
|
||||
\li Mark as Translatable
|
||||
\li Marks a string translatable. For example, rewrites \c "abcd"
|
||||
with one of the following options, depending on which of them is
|
||||
available:
|
||||
|
||||
\code
|
||||
tr("abcd")
|
||||
QCoreApplication::translate("CONTEXT", "abcd")
|
||||
QT_TRANSLATE_NOOP("GLOBAL", "abcd")
|
||||
\endcode
|
||||
|
||||
\li String literal
|
||||
|
||||
\row
|
||||
\li Add Definition in ...
|
||||
\li Inserts a definition stub for a function declaration either in
|
||||
the header file (inside or outside the class) or in the
|
||||
implementation file. For free functions, inserts the definition
|
||||
after the declaration of the function or in the implementation
|
||||
file. Qualified names are minimized when possible, instead of
|
||||
always being fully expanded.
|
||||
|
||||
For example, rewrites
|
||||
|
||||
\code
|
||||
Class Foo {
|
||||
void bar();
|
||||
};
|
||||
\endcode
|
||||
|
||||
as (inside class)
|
||||
|
||||
\code
|
||||
Class Foo {
|
||||
void bar() {
|
||||
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
as (outside class)
|
||||
|
||||
\code
|
||||
Class Foo {
|
||||
void bar();
|
||||
};
|
||||
|
||||
void Foo::bar()
|
||||
{
|
||||
|
||||
}
|
||||
\endcode
|
||||
|
||||
as (in implementation file)
|
||||
|
||||
\code
|
||||
// Header file
|
||||
Class Foo {
|
||||
void bar();
|
||||
};
|
||||
|
||||
// Implementation file
|
||||
void Foo::bar()
|
||||
{
|
||||
|
||||
}
|
||||
\endcode
|
||||
|
||||
\li Function name
|
||||
\row
|
||||
\li Add \c Function Declaration
|
||||
\li Inserts the member function declaration that matches the member
|
||||
function definition into the class declaration. The function can
|
||||
be \c {public}, \c {protected}, \c {private}, \c {public slot},
|
||||
\c {protected slot}, or \c {private slot}.
|
||||
\li Function name
|
||||
\row
|
||||
\li Add Class Member
|
||||
\li Adds a member declaration for the class member being
|
||||
initialized if it is not yet declared. You must enter
|
||||
the data type of the member.
|
||||
\li Identifier
|
||||
\row
|
||||
\li Create Implementations for Member Functions
|
||||
\li Creates implementations for all member functions in one go.
|
||||
In the \uicontrol {Member Function Implementations} dialog,
|
||||
you can specify whether the member functions are generated
|
||||
inline or outside the class.
|
||||
\li Function name
|
||||
\row
|
||||
\li Switch with Next/Previous Parameter
|
||||
\li Moves a parameter down or up one position in a parameter list.
|
||||
\li Parameter in the declaration or definition of a function
|
||||
\row
|
||||
\li Extract Function
|
||||
\li Moves the selected code to a new function and replaces the block
|
||||
of code with a call to the new function. Enter a name for the
|
||||
function in the \uicontrol {Extract Function Refactoring}
|
||||
dialog.
|
||||
\li Block of code selected
|
||||
\row
|
||||
\li Extract Constant as Function Parameter
|
||||
\li Replaces the selected literal and all its occurrences with the
|
||||
function parameter \c{newParameter}. The parameter
|
||||
\c{newParameter} will have the original literal as the default
|
||||
value.
|
||||
\li Block of code selected
|
||||
\row
|
||||
\li Add Local Declaration
|
||||
\li Adds the type of an assignee, if the type of the right-hand
|
||||
side of the assignment is known. For example, rewrites
|
||||
|
||||
\code
|
||||
a = foo();
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
Type a = foo();
|
||||
\endcode
|
||||
|
||||
where Type is the return type of \c {foo()}
|
||||
|
||||
\li Assignee
|
||||
|
||||
\row
|
||||
\li Convert to Camel Case
|
||||
\li Converts a symbol name to camel case, where elements of the name
|
||||
are joined without delimiter characters and the initial
|
||||
character of each element is capitalized. For example, rewrites
|
||||
\c an_example_symbol as \c anExampleSymbol and
|
||||
\c AN_EXAMPLE_SYMBOL as \c AnExampleSymbol
|
||||
\li Identifier
|
||||
\row
|
||||
\li Complete Switch Statement
|
||||
\li Adds all possible cases to a switch statement of the type
|
||||
\c enum
|
||||
\li \c switch
|
||||
\row
|
||||
\li Generate Missing Q_PROPERTY Members
|
||||
\li Adds missing members to a \c Q_PROPERTY:
|
||||
\list
|
||||
\li \c read function
|
||||
\li \c write function, if there is a WRITE
|
||||
\li \c {onChanged} signal, if there is a NOTIFY
|
||||
\li data member with the name \c {m_<propertyName>}
|
||||
\endlist
|
||||
\li \c Q_PROPERTY
|
||||
\row
|
||||
\li Apply Changes
|
||||
\li Keeps function declarations and definitions synchronized by
|
||||
checking for the matching declaration or definition when you
|
||||
edit a function signature and by applying the changes to the
|
||||
matching code.
|
||||
\li Function signature. When this action is available, a light bulb
|
||||
icon appears: \inlineimage refactormarker.png
|
||||
\row
|
||||
\li Add #include for undeclared or forward declared identifier
|
||||
\li Adds an \c {#include} directive to the current file to make the
|
||||
definition of a symbol available.
|
||||
\li Undeclared identifier
|
||||
\row
|
||||
\li Add Forward Declaration
|
||||
\li Adds a forward declaration for an undeclared identifier
|
||||
operation.
|
||||
\li Undeclared identifier
|
||||
\row
|
||||
\li Reformat Pointers or References
|
||||
\li Reformats declarations with pointers or references according
|
||||
to the code style settings for the current project. In case no
|
||||
project is open, the current global code style settings are
|
||||
used.
|
||||
|
||||
For example, rewrites:
|
||||
|
||||
\code
|
||||
char*s;
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
char *s;
|
||||
\endcode
|
||||
|
||||
When applied to selections, all suitable declarations in the
|
||||
selection are rewritten.
|
||||
|
||||
\li Declarations with pointers or references and selections
|
||||
containing such declarations
|
||||
\row
|
||||
\li Create Getter and Setter Member Functions
|
||||
\li Creates either both getter and setter member functions for
|
||||
member variables or only a getter or setter.
|
||||
\li Member variable in class definition
|
||||
\row
|
||||
\li Generate Constructor
|
||||
\li Creates a constructor for a class.
|
||||
\li Class definition
|
||||
\row
|
||||
\li Move Function Definition
|
||||
\li Moves a function definition to the implementation file, outside
|
||||
the class or back to its declaration. For example, rewrites:
|
||||
\code
|
||||
class Foo
|
||||
{
|
||||
void bar()
|
||||
{
|
||||
// do stuff here
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
as
|
||||
\code
|
||||
class Foo
|
||||
{
|
||||
void bar();
|
||||
};
|
||||
|
||||
void Foo::bar() {
|
||||
// do stuff here
|
||||
}
|
||||
\endcode
|
||||
|
||||
\li Function signature
|
||||
\row
|
||||
\li Move All Function Definitions
|
||||
\li Moves all function definitions to the implementation file or
|
||||
outside the class. For example, rewrites:
|
||||
\code
|
||||
class Foo
|
||||
{
|
||||
void bar()
|
||||
{
|
||||
// do stuff here
|
||||
}
|
||||
void baz()
|
||||
{
|
||||
// do stuff here
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
class Foo
|
||||
{
|
||||
void bar();
|
||||
void baz();
|
||||
};
|
||||
|
||||
void Foo::bar() {
|
||||
// do stuff here
|
||||
}
|
||||
|
||||
void Foo::baz() {
|
||||
// do stuff here
|
||||
}
|
||||
\endcode
|
||||
|
||||
\li Class name
|
||||
\row
|
||||
\li Assign to Local Variable
|
||||
\li Adds a local variable which stores the return value of a
|
||||
function call or a new expression. For example, rewrites:
|
||||
|
||||
\code
|
||||
QString s;
|
||||
s.toLatin1();
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QString s;
|
||||
QByteArray latin1 = s.toLatin1();
|
||||
\endcode
|
||||
|
||||
and
|
||||
|
||||
\code
|
||||
new Foo;
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
Foo * localFoo = new Foo;
|
||||
\endcode
|
||||
|
||||
\li Function call or class name
|
||||
\row
|
||||
\li Insert Virtual Functions of Base Classes
|
||||
\li Inserts declarations and the corresponding definitions inside or
|
||||
outside the class or in an implementation file (if it exists).
|
||||
For more information, see \l{Inserting Virtual Functions}.
|
||||
\li Class or base class name
|
||||
\row
|
||||
\li Optimize for-Loop
|
||||
\li Rewrites post increment operators as pre increment operators and
|
||||
post decrement operators as pre decrement operators. It also
|
||||
moves other than string or numeric literals and id expressions
|
||||
from the condition of a for loop to its initializer. For
|
||||
example, rewrites:
|
||||
|
||||
\code
|
||||
for (int i = 0; i < 3 * 2; i++)
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
for (int i = 0, total = 3 * 2; i < total; ++i)
|
||||
\endcode
|
||||
\li \c for
|
||||
|
||||
\row
|
||||
\li Escape String Literal as UTF-8
|
||||
\li Escapes non-ASCII characters in a string literal to hexadecimal
|
||||
escape sequences. String Literals are handled as UTF-8.
|
||||
\li String literal
|
||||
|
||||
\row
|
||||
\li Unescape String Literal as UTF-8
|
||||
\li Unescapes octal or hexadecimal escape sequences in a string
|
||||
literal. String Literals are handled as UTF-8.
|
||||
\li String literal
|
||||
|
||||
\row
|
||||
\li Convert to Stack Variable
|
||||
\li Converts the selected pointer to a stack variable. For example,
|
||||
rewrites:
|
||||
|
||||
\code
|
||||
QByteArray *foo = new QByteArray("foo");
|
||||
foo->append("bar");
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QByteArray foo("foo");
|
||||
foo.append("bar");
|
||||
\endcode
|
||||
|
||||
This operation is limited to work only within function scope.
|
||||
Also, the coding style for pointers and references is not
|
||||
respected yet.
|
||||
\li Pointer Variable
|
||||
|
||||
\row
|
||||
\li Convert to Pointer
|
||||
\li Converts the selected stack variable to a pointer. For example,
|
||||
rewrites:
|
||||
|
||||
\code
|
||||
QByteArray foo = "foo";
|
||||
foo.append("bar");
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QByteArray *foo = new QByteArray("foo");
|
||||
foo->append("bar");
|
||||
\endcode
|
||||
|
||||
This operation is limited to work only within function scope.
|
||||
Also, the coding style for pointers and references is not
|
||||
respected yet.
|
||||
\li Stack Variable
|
||||
\row
|
||||
\li Remove \c {using namespace} and Adjust Type Names Accordingly
|
||||
\li Remove occurrences of \c {using namespace} in the local scope
|
||||
and adjust type names accordingly.
|
||||
\li \c using directive
|
||||
\row
|
||||
\li Remove All Occurrences of \c {using namespace} in Global Scope
|
||||
and Adjust Type Names Accordingly
|
||||
\li Remove all occurrences of \c {using namespace} in the global
|
||||
scope and adjust type names accordingly.
|
||||
\li \c using directive
|
||||
\row
|
||||
\li Convert connect() to Qt 5 Style
|
||||
\li Converts a Qt 4 QObject::connect() to Qt 5 style.
|
||||
\li QObject::connect() (Qt 4 style)
|
||||
\endtable
|
||||
|
||||
\section2 Refactoring QML Code
|
||||
\endif
|
||||
|
||||
You can apply the following types of refactoring actions to QML code:
|
||||
|
||||
\list
|
||||
\li Rename IDs
|
||||
\li Split initializers
|
||||
\li Move a QML type into a separate file to reuse it in other .qml files
|
||||
\endlist
|
||||
|
||||
The following table summarizes the refactoring actions for QML code. The
|
||||
action is available when the cursor is in the position described in the
|
||||
Activation column.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Refactoring Action
|
||||
\li Description
|
||||
\li Activation
|
||||
|
||||
\row
|
||||
\li Move Component into Separate File
|
||||
\li Moves a QML type into a separate file. Give the new component a
|
||||
name and select whether properties are set for the new component
|
||||
or for the original one.
|
||||
|
||||
\image qtcreator-move-component-into-separate-file.png
|
||||
|
||||
\li QML type name. This action is also available in the
|
||||
\uicontrol {Form Editor} in the Design mode.
|
||||
\row
|
||||
\li Split Initializer
|
||||
\li Reformats a one-line type into a multi-line type. For example,
|
||||
rewrites
|
||||
|
||||
\code
|
||||
Item { x: 10; y: 20; width: 10 }
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
Item {
|
||||
x: 10;
|
||||
y: 20;
|
||||
width: 10
|
||||
}
|
||||
\endcode
|
||||
|
||||
\li QML type property
|
||||
\row
|
||||
\li Wrap Component in Loader
|
||||
\li Wraps the type in a Component type and loads it dynamically in a
|
||||
Loader type. This is usually done to improve startup time.
|
||||
\li QML type name
|
||||
\row
|
||||
\li Add a message suppression comment
|
||||
\li Prepends the line with an annotation comment that stops the
|
||||
message from being generated.
|
||||
\li Error, warning or hint from static analysis
|
||||
|
||||
\endtable
|
||||
*/
|
||||
|
@@ -32,7 +32,7 @@
|
||||
/*!
|
||||
\page creator-editor-options.html
|
||||
\if defined(qtdesignstudio)
|
||||
\previouspage creator-editor-refactoring.html
|
||||
\previouspage creator-editor-quick-fixes.html
|
||||
\else
|
||||
\previouspage creator-beautifier.html
|
||||
\endif
|
||||
|
@@ -30,7 +30,7 @@
|
||||
// **********************************************************************
|
||||
|
||||
/*!
|
||||
\previouspage creator-editor-refactoring.html
|
||||
\previouspage creator-editor-quick-fixes.html
|
||||
\page creator-beautifier.html
|
||||
\nextpage creator-editor-options.html
|
||||
|
||||
|
878
doc/qtcreator/src/editors/creator-quick-fixes.qdoc
Normal file
@@ -0,0 +1,878 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** 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 creator-editor-quick-fixes.html
|
||||
\previouspage creator-editor-refactoring.html
|
||||
\if defined(qtdesignstudio)
|
||||
\nextpage creator-editor-options.html
|
||||
\else
|
||||
\nextpage creator-beautifier.html
|
||||
\endif
|
||||
|
||||
\title Applying Refactoring Actions
|
||||
|
||||
\QC allows you to quickly and conveniently apply actions (quick fixes)
|
||||
to refactor your code by selecting them in a context menu. The actions
|
||||
available depend on the position of the cursor in the code editor.
|
||||
|
||||
\if defined(qtcreator)
|
||||
To apply refactoring actions to C++ code, right-click an operand,
|
||||
conditional statement, string, or name to open a context menu.
|
||||
\endif
|
||||
To apply refactoring actions to QML code, right-click an item ID or name.
|
||||
|
||||
In the context menu, select \uicontrol {Refactoring} and then select a
|
||||
refactoring action.
|
||||
|
||||
You can also press \key {Alt+Enter} to open a context menu that contains
|
||||
refactoring actions available in the current cursor position.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\section1 Creating Functions
|
||||
|
||||
You can apply refactoring actions to implement member functions, insert
|
||||
virtual functions of base classes, create getter and setter functions,
|
||||
and generate constructors. You can specify settings for generating the
|
||||
functions either globally for all projects or separately for each project
|
||||
in the \l{Specifying Settings}{build and run} settings of the project.
|
||||
|
||||
\section2 Implementing Member Functions
|
||||
|
||||
You can apply the \uicontrol {Create Implementations for Member Functions}
|
||||
refactoring action to create implementations for all member functions in
|
||||
one go. In the \uicontrol {Member Function Implementations} dialog, you can
|
||||
specify whether the member functions are generated inline or outside the
|
||||
class.
|
||||
|
||||
\image qtcreator-refactoring-member-function-implementations.png "Implement Member Functions dialog"
|
||||
|
||||
\section2 Inserting Virtual Functions
|
||||
|
||||
You can apply the \uicontrol {Insert Virtual Functions of Base Classes}
|
||||
refactoring action to insert declarations and the corresponding definitions
|
||||
inside or outside the class or in an implementation file (if it exists).
|
||||
|
||||
\image qtcreator-refactoring-virtual-function-dialog.png "Insert Virtual Functions dialog"
|
||||
|
||||
Select the functions to insert in the list of available functions. You can
|
||||
filter the list and hide reimplemented functions from it.
|
||||
|
||||
You can add \e virtual or the \e override equivalent to the function
|
||||
declaration.
|
||||
|
||||
\section2 Creating Getters and Setters
|
||||
|
||||
You can apply the \uicontrol {Create Getter and Setter Member Functions}
|
||||
refactoring action to create either both getter and setter member functions
|
||||
for member variables or only a getter or setter.
|
||||
|
||||
\image qtcreator-refactoring-getters-and-setters.png "Getters and Setters dialog"
|
||||
|
||||
\section2 Generating Constructors
|
||||
|
||||
You can apply the \uicontrol {Generate Constructor} refactoring action to
|
||||
create a public, protected, or private constructor for a class. Select the
|
||||
class members to initialize in the constructor. Drag and drop the parameters
|
||||
to specify their order in the constructor.
|
||||
|
||||
\image qtcreator-refactoring-constructor.png "Constructor dialog"
|
||||
|
||||
\section1 Specifying Settings for Refactoring Actions
|
||||
|
||||
You can specify settings for the refactoring actions either globally for
|
||||
all projects or separately for each project. To specify global options,
|
||||
select \uicontrol Tools > \uicontrol Options > \uicontrol C++ >
|
||||
\uicontrol {Quick Fixes}.
|
||||
|
||||
To specify custom settings for a particular project, select
|
||||
\uicontrol Projects > \uicontrol {Project Settings} >
|
||||
\uicontrol {Quick Fixes} > \uicontrol {Custom Settings}.
|
||||
|
||||
\image qtcreator-refactoring-options-locations.png "Quick Fixes settings"
|
||||
|
||||
To revert to global settings, select \uicontrol {Reset to Global}. To
|
||||
delete the custom settings, select \uicontrol {Delete Custom Settings File}.
|
||||
|
||||
\section2 Function Locations
|
||||
|
||||
In the \uicontrol {Generated Function Locations} group, you can determine
|
||||
whether refactoring actions should generate getter and setter functions
|
||||
in the header file (inside or outside the class) or in the implementation
|
||||
file.
|
||||
|
||||
\section2 Function Names and Attributes
|
||||
|
||||
In the \uicontrol {Getter Setter Generation Properties} group, you can
|
||||
specify additional settings for getter and setter names, attributes, and
|
||||
parameters. You can specify that setter functions should be created as
|
||||
\e slots and that signals should be generated with the new value as a
|
||||
parameter.
|
||||
|
||||
\image qtcreator-refactoring-options-generation.png "Getter and Setter generation settings"
|
||||
|
||||
\section2 Namespace Handling
|
||||
|
||||
In the \uicontrol {Missing Namespace Handling} group, select whether to
|
||||
generate missing namespaces, add \c {using namespace} where necessary, or
|
||||
rewrite types to match the existing namespaces.
|
||||
|
||||
\image qtcreator-refactoring-options-namespaces.png "Namespace handling settings"
|
||||
|
||||
\section2 Custom Parameter Types
|
||||
|
||||
In the \uicontrol {Custom Getter Setter Templates} group, specify how the
|
||||
code of a getter or setter function for a certain data type should look
|
||||
like. This is necessary for types where assignment cannot use \c operator=,
|
||||
as in the pre-defined settings for \c unique_ptr or where \c operator== is
|
||||
not suitable for comparison, as in the pre-defined settings for
|
||||
floating-point types. For example, if you have a special type \c MyClass,
|
||||
you can specify that a function, \c myCompare, should be used for comparison
|
||||
rather than the default of \c ==.
|
||||
|
||||
To specify special handling for a custom parameter type, select
|
||||
\uicontrol Add and set the parameter type, comparison, return expression,
|
||||
and return type. In the \uicontrol {Return type} field, you can use \c <new>
|
||||
and \c <cur> to access the parameter and current value. Use \c <type> to
|
||||
access the type and \c <T> for the template parameter.
|
||||
|
||||
\image qtcreator-refactoring-options-templates.png "Settings for handling custom parameter types"
|
||||
|
||||
Usually, arguments are passed by using a \c const reference. To pass
|
||||
arguments of a particular type as values, list them in the
|
||||
\uicontrol {Value types} field. Namespaces and template arguments are
|
||||
removed. The real Type must contain the given Type. For example, \c int
|
||||
matches \c int32_t but not \c vector<int>, and \c vector matches
|
||||
\c {std::pmr::vector<int>} but not \c {std::optional<vector<int>>}.
|
||||
\endif
|
||||
|
||||
\section1 Summary of Refactoring Actions
|
||||
|
||||
\if defined(qtcreator)
|
||||
If you use the \l{Parsing C++ Files with the Clang Code Model}
|
||||
{Clang code model} to parse the C++ files, the
|
||||
\l{http://clang.llvm.org/diagnostics.html}{Clang fix-it hints}
|
||||
that have been integrated into \QC are also available to you. In addition to
|
||||
the standard ways of activating refactoring actions, you can select the
|
||||
actions that are applicable on a line in the context menu in the left margin
|
||||
of the code editor.
|
||||
|
||||
\section2 Refactoring C++ Code
|
||||
|
||||
You can apply the following types of refactoring actions to C++ code:
|
||||
|
||||
\list
|
||||
\li Change binary operands
|
||||
\li Simplify if and while conditions (for example, move declarations out
|
||||
of if conditions)
|
||||
\li Modify strings (for example, set the encoding for a string to
|
||||
Latin-1, mark strings translatable, and convert symbol names to
|
||||
camel case)
|
||||
\li Create variable declarations
|
||||
\li Create function declarations and definitions
|
||||
\endlist
|
||||
|
||||
The following table summarizes the refactoring actions for C++ code. The
|
||||
action is available when the cursor is in the position described in the
|
||||
Activation column.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Refactoring Action
|
||||
\li Description
|
||||
\li Activation
|
||||
\row
|
||||
\li Add Curly Braces
|
||||
\li Adds curly braces to an if statement that does not contain a
|
||||
compound statement. For example, rewrites
|
||||
|
||||
\code
|
||||
if (a)
|
||||
b;
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
if (a) {
|
||||
b;
|
||||
}
|
||||
\endcode
|
||||
\li \c if
|
||||
\row
|
||||
\li Move Declaration out of Condition
|
||||
\li Moves a declaration out of an if or while condition to simplify
|
||||
the condition. For example, rewrites
|
||||
|
||||
\code
|
||||
if (Type name = foo()) {}
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
Type name = foo;
|
||||
if (name) {}
|
||||
\endcode
|
||||
\li Name of the introduced variable
|
||||
\row
|
||||
\li Rewrite Condition Using ||
|
||||
\li Rewrites the expression according to De Morgan's laws. For
|
||||
example, rewrites:
|
||||
\code
|
||||
!a && !b
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
!(a || b)
|
||||
\endcode
|
||||
\li \c &&
|
||||
\row
|
||||
\li Rewrite Using \e operator
|
||||
\li Rewrites an expression negating it and using the inverse
|
||||
operator. For example, rewrites:
|
||||
|
||||
\list
|
||||
|
||||
\li \code
|
||||
a op b
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
!(a invop b)
|
||||
\endcode
|
||||
|
||||
\li \code
|
||||
(a op b)
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
!(a invop b)
|
||||
\endcode
|
||||
|
||||
\li \code
|
||||
!(a op b)
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
(a invob b)
|
||||
\endcode
|
||||
|
||||
\endlist
|
||||
|
||||
\li \c {<=}, \c {<}, \c {>}, \c {>=}, \c {==} or \c {!=}
|
||||
\row
|
||||
\li Split Declaration
|
||||
\li Splits a simple declaration into several declarations. For
|
||||
example, rewrites:
|
||||
\code
|
||||
int *a, b;
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
int *a;
|
||||
int b;
|
||||
\endcode
|
||||
\li Type name or variable name
|
||||
\row
|
||||
\li Split if Statement
|
||||
\li Splits an if statement into several statements. For example,
|
||||
rewrites:
|
||||
|
||||
\code
|
||||
if (something && something_else) {
|
||||
}
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
if (something) {
|
||||
if (something_else) {
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
and
|
||||
|
||||
\code
|
||||
if (something || something_else)
|
||||
x;
|
||||
\endcode
|
||||
|
||||
with
|
||||
|
||||
\code
|
||||
if (something)
|
||||
x;
|
||||
else if (something_else)
|
||||
x;
|
||||
\endcode
|
||||
|
||||
\li \c && or \c ||
|
||||
\row
|
||||
\li Swap Operands
|
||||
\li Rewrites an expression in the inverse order using the inverse
|
||||
operator. For example, rewrites:
|
||||
\code
|
||||
a op b
|
||||
\endcode
|
||||
|
||||
as
|
||||
\code
|
||||
b flipop a
|
||||
\endcode
|
||||
\li \c {<=}, \c {<}, \c {>}, \c {>=}, \c {==}, \c {!=}, \c {&&}
|
||||
or \c {||}
|
||||
\row
|
||||
\li Convert to Decimal
|
||||
\li Converts an integer literal to decimal representation
|
||||
\li Numeric literal
|
||||
\row
|
||||
\li Convert to Hexadecimal
|
||||
\li Converts an integer literal to hexadecimal representation
|
||||
\li Numeric literal
|
||||
\row
|
||||
\li Convert to Octal
|
||||
\li Converts an integer literal to octal representation
|
||||
\li Numeric literal
|
||||
\row
|
||||
\li Convert to Objective-C String Literal
|
||||
\li Converts a string literal to an Objective-C string literal if
|
||||
the file type is Objective-C(++). For example, rewrites the
|
||||
following strings
|
||||
|
||||
\code
|
||||
"abcd"
|
||||
QLatin1String("abcd")
|
||||
QLatin1Literal("abcd")
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
@"abcd"
|
||||
\endcode
|
||||
\li String literal
|
||||
\row
|
||||
\li Enclose in QLatin1Char()
|
||||
\li Sets the encoding for a character to Latin-1, unless the
|
||||
character is already enclosed in QLatin1Char, QT_TRANSLATE_NOOP,
|
||||
tr, trUtf8, QLatin1Literal, or QLatin1String. For example,
|
||||
rewrites
|
||||
|
||||
\code
|
||||
'a'
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QLatin1Char('a')
|
||||
\endcode
|
||||
\li String literal
|
||||
\row
|
||||
\li Enclose in QLatin1String()
|
||||
\li Sets the encoding for a string to Latin-1, unless the string is
|
||||
already enclosed in QLatin1Char, QT_TRANSLATE_NOOP, tr, trUtf8,
|
||||
QLatin1Literal, or QLatin1String. For example, rewrites
|
||||
\code
|
||||
"abcd"
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QLatin1String("abcd")
|
||||
\endcode
|
||||
|
||||
\li String literal
|
||||
|
||||
\row
|
||||
\li Mark as Translatable
|
||||
\li Marks a string translatable. For example, rewrites \c "abcd"
|
||||
with one of the following options, depending on which of them is
|
||||
available:
|
||||
|
||||
\code
|
||||
tr("abcd")
|
||||
QCoreApplication::translate("CONTEXT", "abcd")
|
||||
QT_TRANSLATE_NOOP("GLOBAL", "abcd")
|
||||
\endcode
|
||||
|
||||
\li String literal
|
||||
|
||||
\row
|
||||
\li Add Definition in ...
|
||||
\li Inserts a definition stub for a function declaration either in
|
||||
the header file (inside or outside the class) or in the
|
||||
implementation file. For free functions, inserts the definition
|
||||
after the declaration of the function or in the implementation
|
||||
file. Qualified names are minimized when possible, instead of
|
||||
always being fully expanded.
|
||||
|
||||
For example, rewrites
|
||||
|
||||
\code
|
||||
Class Foo {
|
||||
void bar();
|
||||
};
|
||||
\endcode
|
||||
|
||||
as (inside class)
|
||||
|
||||
\code
|
||||
Class Foo {
|
||||
void bar() {
|
||||
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
as (outside class)
|
||||
|
||||
\code
|
||||
Class Foo {
|
||||
void bar();
|
||||
};
|
||||
|
||||
void Foo::bar()
|
||||
{
|
||||
|
||||
}
|
||||
\endcode
|
||||
|
||||
as (in implementation file)
|
||||
|
||||
\code
|
||||
// Header file
|
||||
Class Foo {
|
||||
void bar();
|
||||
};
|
||||
|
||||
// Implementation file
|
||||
void Foo::bar()
|
||||
{
|
||||
|
||||
}
|
||||
\endcode
|
||||
|
||||
\li Function name
|
||||
\row
|
||||
\li Add \c Function Declaration
|
||||
\li Inserts the member function declaration that matches the member
|
||||
function definition into the class declaration. The function can
|
||||
be \c {public}, \c {protected}, \c {private}, \c {public slot},
|
||||
\c {protected slot}, or \c {private slot}.
|
||||
\li Function name
|
||||
\row
|
||||
\li Add Class Member
|
||||
\li Adds a member declaration for the class member being
|
||||
initialized if it is not yet declared. You must enter
|
||||
the data type of the member.
|
||||
\li Identifier
|
||||
\row
|
||||
\li Create Implementations for Member Functions
|
||||
\li Creates implementations for all member functions in one go.
|
||||
In the \uicontrol {Member Function Implementations} dialog,
|
||||
you can specify whether the member functions are generated
|
||||
inline or outside the class.
|
||||
\li Function name
|
||||
\row
|
||||
\li Switch with Next/Previous Parameter
|
||||
\li Moves a parameter down or up one position in a parameter list.
|
||||
\li Parameter in the declaration or definition of a function
|
||||
\row
|
||||
\li Extract Function
|
||||
\li Moves the selected code to a new function and replaces the block
|
||||
of code with a call to the new function. Enter a name for the
|
||||
function in the \uicontrol {Extract Function Refactoring}
|
||||
dialog.
|
||||
\li Block of code selected
|
||||
\row
|
||||
\li Extract Constant as Function Parameter
|
||||
\li Replaces the selected literal and all its occurrences with the
|
||||
function parameter \c{newParameter}. The parameter
|
||||
\c{newParameter} will have the original literal as the default
|
||||
value.
|
||||
\li Block of code selected
|
||||
\row
|
||||
\li Add Local Declaration
|
||||
\li Adds the type of an assignee, if the type of the right-hand
|
||||
side of the assignment is known. For example, rewrites
|
||||
|
||||
\code
|
||||
a = foo();
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
Type a = foo();
|
||||
\endcode
|
||||
|
||||
where Type is the return type of \c {foo()}
|
||||
|
||||
\li Assignee
|
||||
|
||||
\row
|
||||
\li Convert to Camel Case
|
||||
\li Converts a symbol name to camel case, where elements of the name
|
||||
are joined without delimiter characters and the initial
|
||||
character of each element is capitalized. For example, rewrites
|
||||
\c an_example_symbol as \c anExampleSymbol and
|
||||
\c AN_EXAMPLE_SYMBOL as \c AnExampleSymbol
|
||||
\li Identifier
|
||||
\row
|
||||
\li Complete Switch Statement
|
||||
\li Adds all possible cases to a switch statement of the type
|
||||
\c enum
|
||||
\li \c switch
|
||||
\row
|
||||
\li Generate Missing Q_PROPERTY Members
|
||||
\li Adds missing members to a \c Q_PROPERTY:
|
||||
\list
|
||||
\li \c read function
|
||||
\li \c write function, if there is a WRITE
|
||||
\li \c {onChanged} signal, if there is a NOTIFY
|
||||
\li data member with the name \c {m_<propertyName>}
|
||||
\endlist
|
||||
\li \c Q_PROPERTY
|
||||
\row
|
||||
\li Apply Changes
|
||||
\li Keeps function declarations and definitions synchronized by
|
||||
checking for the matching declaration or definition when you
|
||||
edit a function signature and by applying the changes to the
|
||||
matching code.
|
||||
\li Function signature. When this action is available, a light bulb
|
||||
icon appears: \inlineimage refactormarker.png
|
||||
\row
|
||||
\li Add #include for undeclared or forward declared identifier
|
||||
\li Adds an \c {#include} directive to the current file to make the
|
||||
definition of a symbol available.
|
||||
\li Undeclared identifier
|
||||
\row
|
||||
\li Add Forward Declaration
|
||||
\li Adds a forward declaration for an undeclared identifier
|
||||
operation.
|
||||
\li Undeclared identifier
|
||||
\row
|
||||
\li Reformat Pointers or References
|
||||
\li Reformats declarations with pointers or references according
|
||||
to the code style settings for the current project. In case no
|
||||
project is open, the current global code style settings are
|
||||
used.
|
||||
|
||||
For example, rewrites:
|
||||
|
||||
\code
|
||||
char*s;
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
char *s;
|
||||
\endcode
|
||||
|
||||
When applied to selections, all suitable declarations in the
|
||||
selection are rewritten.
|
||||
|
||||
\li Declarations with pointers or references and selections
|
||||
containing such declarations
|
||||
\row
|
||||
\li Create Getter and Setter Member Functions
|
||||
\li Creates either both getter and setter member functions for
|
||||
member variables or only a getter or setter.
|
||||
\li Member variable in class definition
|
||||
\row
|
||||
\li Generate Constructor
|
||||
\li Creates a constructor for a class.
|
||||
\li Class definition
|
||||
\row
|
||||
\li Move Function Definition
|
||||
\li Moves a function definition to the implementation file, outside
|
||||
the class or back to its declaration. For example, rewrites:
|
||||
\code
|
||||
class Foo
|
||||
{
|
||||
void bar()
|
||||
{
|
||||
// do stuff here
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
as
|
||||
\code
|
||||
class Foo
|
||||
{
|
||||
void bar();
|
||||
};
|
||||
|
||||
void Foo::bar() {
|
||||
// do stuff here
|
||||
}
|
||||
\endcode
|
||||
|
||||
\li Function signature
|
||||
\row
|
||||
\li Move All Function Definitions
|
||||
\li Moves all function definitions to the implementation file or
|
||||
outside the class. For example, rewrites:
|
||||
\code
|
||||
class Foo
|
||||
{
|
||||
void bar()
|
||||
{
|
||||
// do stuff here
|
||||
}
|
||||
void baz()
|
||||
{
|
||||
// do stuff here
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
class Foo
|
||||
{
|
||||
void bar();
|
||||
void baz();
|
||||
};
|
||||
|
||||
void Foo::bar() {
|
||||
// do stuff here
|
||||
}
|
||||
|
||||
void Foo::baz() {
|
||||
// do stuff here
|
||||
}
|
||||
\endcode
|
||||
|
||||
\li Class name
|
||||
\row
|
||||
\li Assign to Local Variable
|
||||
\li Adds a local variable which stores the return value of a
|
||||
function call or a new expression. For example, rewrites:
|
||||
|
||||
\code
|
||||
QString s;
|
||||
s.toLatin1();
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QString s;
|
||||
QByteArray latin1 = s.toLatin1();
|
||||
\endcode
|
||||
|
||||
and
|
||||
|
||||
\code
|
||||
new Foo;
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
Foo * localFoo = new Foo;
|
||||
\endcode
|
||||
|
||||
\li Function call or class name
|
||||
\row
|
||||
\li Insert Virtual Functions of Base Classes
|
||||
\li Inserts declarations and the corresponding definitions inside or
|
||||
outside the class or in an implementation file (if it exists).
|
||||
For more information, see \l{Inserting Virtual Functions}.
|
||||
\li Class or base class name
|
||||
\row
|
||||
\li Optimize for-Loop
|
||||
\li Rewrites post increment operators as pre increment operators and
|
||||
post decrement operators as pre decrement operators. It also
|
||||
moves other than string or numeric literals and id expressions
|
||||
from the condition of a for loop to its initializer. For
|
||||
example, rewrites:
|
||||
|
||||
\code
|
||||
for (int i = 0; i < 3 * 2; i++)
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
for (int i = 0, total = 3 * 2; i < total; ++i)
|
||||
\endcode
|
||||
\li \c for
|
||||
|
||||
\row
|
||||
\li Escape String Literal as UTF-8
|
||||
\li Escapes non-ASCII characters in a string literal to hexadecimal
|
||||
escape sequences. String Literals are handled as UTF-8.
|
||||
\li String literal
|
||||
|
||||
\row
|
||||
\li Unescape String Literal as UTF-8
|
||||
\li Unescapes octal or hexadecimal escape sequences in a string
|
||||
literal. String Literals are handled as UTF-8.
|
||||
\li String literal
|
||||
|
||||
\row
|
||||
\li Convert to Stack Variable
|
||||
\li Converts the selected pointer to a stack variable. For example,
|
||||
rewrites:
|
||||
|
||||
\code
|
||||
QByteArray *foo = new QByteArray("foo");
|
||||
foo->append("bar");
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QByteArray foo("foo");
|
||||
foo.append("bar");
|
||||
\endcode
|
||||
|
||||
This operation is limited to work only within function scope.
|
||||
Also, the coding style for pointers and references is not
|
||||
respected yet.
|
||||
\li Pointer Variable
|
||||
|
||||
\row
|
||||
\li Convert to Pointer
|
||||
\li Converts the selected stack variable to a pointer. For example,
|
||||
rewrites:
|
||||
|
||||
\code
|
||||
QByteArray foo = "foo";
|
||||
foo.append("bar");
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QByteArray *foo = new QByteArray("foo");
|
||||
foo->append("bar");
|
||||
\endcode
|
||||
|
||||
This operation is limited to work only within function scope.
|
||||
Also, the coding style for pointers and references is not
|
||||
respected yet.
|
||||
\li Stack Variable
|
||||
\row
|
||||
\li Remove \c {using namespace} and Adjust Type Names Accordingly
|
||||
\li Remove occurrences of \c {using namespace} in the local scope
|
||||
and adjust type names accordingly.
|
||||
\li \c using directive
|
||||
\row
|
||||
\li Remove All Occurrences of \c {using namespace} in Global Scope
|
||||
and Adjust Type Names Accordingly
|
||||
\li Remove all occurrences of \c {using namespace} in the global
|
||||
scope and adjust type names accordingly.
|
||||
\li \c using directive
|
||||
\row
|
||||
\li Convert connect() to Qt 5 Style
|
||||
\li Converts a Qt 4 QObject::connect() to Qt 5 style.
|
||||
\li QObject::connect() (Qt 4 style)
|
||||
\endtable
|
||||
|
||||
\section2 Refactoring QML Code
|
||||
\endif
|
||||
|
||||
You can apply the following types of refactoring actions to QML code:
|
||||
|
||||
\list
|
||||
\li Rename IDs
|
||||
\li Split initializers
|
||||
\li Move a QML type into a separate file to reuse it in other .qml files
|
||||
\endlist
|
||||
|
||||
The following table summarizes the refactoring actions for QML code. The
|
||||
action is available when the cursor is in the position described in the
|
||||
Activation column.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Refactoring Action
|
||||
\li Description
|
||||
\li Activation
|
||||
|
||||
\row
|
||||
\li Move Component into Separate File
|
||||
\li Moves a QML type into a separate file. Give the new component a
|
||||
name and select whether properties are set for the new component
|
||||
or for the original one.
|
||||
|
||||
\image qtcreator-move-component-into-separate-file.png
|
||||
|
||||
\li QML type name. This action is also available in the
|
||||
\uicontrol {Form Editor} in the Design mode.
|
||||
\row
|
||||
\li Split Initializer
|
||||
\li Reformats a one-line type into a multi-line type. For example,
|
||||
rewrites
|
||||
|
||||
\code
|
||||
Item { x: 10; y: 20; width: 10 }
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
Item {
|
||||
x: 10;
|
||||
y: 20;
|
||||
width: 10
|
||||
}
|
||||
\endcode
|
||||
|
||||
\li QML type property
|
||||
\row
|
||||
\li Wrap Component in Loader
|
||||
\li Wraps the type in a Component type and loads it dynamically in a
|
||||
Loader type. This is usually done to improve startup time.
|
||||
\li QML type name
|
||||
\row
|
||||
\li Add a message suppression comment
|
||||
\li Prepends the line with an annotation comment that stops the
|
||||
message from being generated.
|
||||
\li Error, warning or hint from static analysis
|
||||
|
||||
\endtable
|
||||
*/
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -27,13 +27,13 @@
|
||||
\page creator-telemetry.html
|
||||
\if defined(qtdesignstudio)
|
||||
\previouspage creator-editor-external.html
|
||||
\nextpage studio-help.html
|
||||
\else
|
||||
\previouspage creator-task-lists.html
|
||||
\nextpage creator-help-overview.html
|
||||
\endif
|
||||
\nextpage collecting-usage-statistics.html
|
||||
|
||||
\title Managing Data Collection
|
||||
|
||||
\title Managing Data Collection Settings
|
||||
\if defined (qtcreator)
|
||||
When you install \QC as a part of Qt installation, you are asked whether
|
||||
you allow it to collect pseudonymous information about your system and \QC
|
||||
@@ -44,6 +44,11 @@
|
||||
you. You can change the settings for collecting and transmitting data any
|
||||
time. By default, no data is collected and you have to select a telemetry
|
||||
mode for data collection to begin.
|
||||
|
||||
|
||||
See \l {Collecting Usage Statistics} for more information about the data
|
||||
transmitted by the telemetry plugin and \l {Specifying Telemetry Settings}
|
||||
{specifying telemetry settings}.
|
||||
\else
|
||||
To enable the use of the telemetry plugin, you need to select \uicontrol
|
||||
{Enable Usage Statistics} in the splash screen that appears when you first
|
||||
@@ -53,6 +58,16 @@
|
||||
\image studio-usage-statistics.png "Enabling Usage Statistics"
|
||||
\endif
|
||||
|
||||
\if defined(qtdesignstudio)
|
||||
See below for more information about the collected data:
|
||||
|
||||
\list
|
||||
\li \l {Collecting Usage Statistics}
|
||||
\li \l {Collecting User Feedback}
|
||||
\li \l {Reporting Crashes}
|
||||
\endlist
|
||||
\endif
|
||||
|
||||
\section1 Principles of Data Collection
|
||||
|
||||
No personal data, such as names, IP addresses, MAC addresses, or project
|
||||
@@ -63,8 +78,18 @@
|
||||
For more information about Qt privacy policy, select
|
||||
\l{https://www.qt.io/terms-conditions/#privacy}
|
||||
{Legal Notice and Privacy Policy}.
|
||||
*/
|
||||
|
||||
\section1 Collecting Usage Statistics
|
||||
/*!
|
||||
\page collecting-usage-statistics.html
|
||||
\previouspage creator-telemetry.html
|
||||
\if defined(qtdesignstudio)
|
||||
\nextpage collecting-user-feedback.html
|
||||
\else
|
||||
\nextpage creator-help-overview.html
|
||||
\endif
|
||||
|
||||
\title Collecting Usage Statistics
|
||||
|
||||
The telemetry plugin uses the
|
||||
\l{https://api.kde.org/frameworks/kuserfeedback/html/index.html}
|
||||
@@ -76,7 +101,7 @@
|
||||
connection. The storage is located in the same Heroku backend as the
|
||||
Qt installer backend. Physically, data is stored in the Amazon cloud.
|
||||
|
||||
\section2 Specifying Telemetry Settings
|
||||
\section1 Specifying Telemetry Settings
|
||||
|
||||
To determine what data is transmitted to the backend storage:
|
||||
|
||||
@@ -90,9 +115,42 @@
|
||||
exactly what data is collected. Deselect check boxes for data
|
||||
that you do not want to transmit to the backend storage.
|
||||
\endlist
|
||||
*/
|
||||
|
||||
\if defined(qtdesignstudio)
|
||||
\section1 Reporting Crashes
|
||||
/*!
|
||||
\page collecting-user-feedback.html
|
||||
\previouspage collecting-usage-statistics.html
|
||||
\nextpage creator-crashpad.html
|
||||
|
||||
\title Collecting User Feedback
|
||||
|
||||
A pop-up survey asking for your feedback will appear for some of the features
|
||||
after you have been using them for some time. You will be asked to to rate
|
||||
the usefulness of the feature on a scale of one to five stars. You must rate
|
||||
the feature with at least one star if you wish to submit your rating. You
|
||||
are also encouraged to give additional written feedback. After you select
|
||||
\uicontrol Skip or \uicontrol Submit, the pop-up survey will not appear for
|
||||
the same feature again.
|
||||
|
||||
\image studio-feedback-popup.png "User feedback pop-up survey for Flow Editor"
|
||||
|
||||
For the pop-up survey to appear, you must enable collecting statistics, and
|
||||
also allow collecting \uicontrol {4 - Detailed usage statistics} in
|
||||
\uicontrol Tools > \uicontrol Options > \uicontrol Telemetry >
|
||||
\uicontrol {Usage Statistics} > \uicontrol {Telemetry mode}.
|
||||
You can review the submitted user feedback in
|
||||
\uicontrol Tools > \uicontrol Options > \uicontrol Telemetry >
|
||||
\uicontrol {Usage Statistics} > \uicontrol {Collected Data} by selecting
|
||||
\uicontrol {Qt Quick Designer Usage of views and actions} in
|
||||
\uicontrol {Data sources}.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-crashpad.html
|
||||
\previouspage collecting-user-feedback.html
|
||||
\nextpage studio-help.html
|
||||
|
||||
\title Reporting Crashes
|
||||
|
||||
You can enable \QDS to report crashes automatically. \QDS uses Google
|
||||
Crashpad to collect crashes and report them to the Sentry backend storage
|
||||
@@ -118,6 +176,4 @@
|
||||
remove the crash report data.
|
||||
|
||||
\image studio-crashpad-checkbox.png "Checkbox for enabling crash reporting"
|
||||
|
||||
\endif
|
||||
*/
|
||||
|
@@ -35,8 +35,8 @@
|
||||
the time of writing.
|
||||
|
||||
To develop for MCUs, \l{Using Project Wizards}{create an MCU project}. Only
|
||||
the components available on MCUs are displayed in the \uicontrol Components
|
||||
tab in \l Library. Only a subset of properties is supported for the
|
||||
the components available on MCUs are displayed in \l Library >
|
||||
\uicontrol Components. Only a subset of properties is supported for the
|
||||
supported components. The properties that are not available on MCUs are
|
||||
marked in the \l Properties view by enclosing them in square brackets.
|
||||
|
||||
|
@@ -96,7 +96,7 @@
|
||||
corresponding source code by clicking the error message or by using
|
||||
keyboard shortcuts.
|
||||
|
||||
\li \l{Managing Data Collection Settings}
|
||||
\li \l{Managing Data Collection}
|
||||
|
||||
If you agreed to pseudonymous data collection during \QC
|
||||
installation, you can turn it on and determine what type
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
/*!
|
||||
\page creator-help-overview.html
|
||||
\previouspage creator-telemetry.html
|
||||
\previouspage collecting-usage-statistics.html
|
||||
\nextpage creator-help.html
|
||||
|
||||
\title Getting Help
|
||||
|
@@ -51,6 +51,8 @@
|
||||
\l{http://doc.qt.io/QtForDeviceCreation/index.html}{Qt for Device Creation}
|
||||
documentation.
|
||||
|
||||
If you have \QDS installed, you can open \QDS examples from \QC in \QDS.
|
||||
|
||||
\list 1
|
||||
|
||||
\li In the \uicontrol Welcome mode, select \uicontrol Examples (1).
|
||||
|
@@ -115,6 +115,8 @@
|
||||
\li \l{Parsing C++ Files with the Clang Code Model}
|
||||
{Clang Code Model}
|
||||
|
||||
\li \l{Applying Refactoring Actions}{Quick Fixes}
|
||||
|
||||
\li \l{Using Clang Tools}{Clang Tools}
|
||||
|
||||
\li \l{To-Do Entries}{To-Do} (experimental)
|
||||
|
@@ -215,6 +215,7 @@
|
||||
\li \l{Searching with the Locator}
|
||||
\endlist
|
||||
\li \l{Refactoring}
|
||||
\li \l{Applying Refactoring Actions}
|
||||
\li \l{Beautifying Source Code}
|
||||
\li \l{Configuring the Editor}
|
||||
\list
|
||||
@@ -308,7 +309,10 @@
|
||||
\li \l{Keyboard Shortcuts}
|
||||
\li \l{Using External Tools}
|
||||
\li \l{Showing Task List Files in Issues Pane}
|
||||
\li \l{Managing Data Collection Settings}
|
||||
\li \l{Managing Data Collection}
|
||||
\list
|
||||
\li \l {Collecting Usage Statistics}
|
||||
\endlist
|
||||
\endlist
|
||||
\li \l{Getting Help}
|
||||
\list
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -68,8 +68,8 @@
|
||||
The main view of the application displays an SVG bubble image that moves
|
||||
around the screen when you tilt the device.
|
||||
|
||||
We use \e {Bluebubble.svg} in this tutorial, but you can use any other
|
||||
image or a QML type, instead.
|
||||
We use \e {Bluebubble.svg} in this tutorial, but you can use any other
|
||||
image or component, instead.
|
||||
|
||||
To create the UI in the Design mode:
|
||||
|
||||
@@ -80,8 +80,9 @@
|
||||
\li In the \uicontrol Navigator, select \uicontrol Label and press
|
||||
\key Delete to delete it.
|
||||
|
||||
\li In \uicontrol Library > \uicontrol {QML Types}, select
|
||||
\uicontrol Rectangle and drag and drop it to \e Window
|
||||
\li In \uicontrol Library > \uicontrol Components >
|
||||
\uicontrol {Default Components} > \uicontrol Basic, select
|
||||
\uicontrol Rectangle and drag-and-drop it to \e Window
|
||||
in \uicontrol Navigator.
|
||||
|
||||
\li Select the rectangle in \uicontrol Navigator to edit its properties:
|
||||
@@ -101,8 +102,9 @@
|
||||
\endlist
|
||||
|
||||
\li Select \uicontrol Library > \uicontrol Assets >
|
||||
\uicontrol {Add New Assets} to locate Bluebubble.svg
|
||||
(or your own image) and add it to the project folder.
|
||||
\inlineimage plus.png
|
||||
to locate Bluebubble.svg (or your own image) and add it to
|
||||
the project folder.
|
||||
\li Drag and drop the image from \uicontrol Assets to
|
||||
\e mainWindow in \uicontrol Navigator.
|
||||
|
||||
|
@@ -158,9 +158,10 @@
|
||||
To edit list models:
|
||||
|
||||
\list 1
|
||||
\li Drag and drop a \uicontrol {Grid View} or \uicontrol {List View}
|
||||
from \uicontrol Library to \uicontrol Navigator or
|
||||
\uicontrol {Form Editor}.
|
||||
\li Drag-and-drop a \uicontrol {Grid View} or \uicontrol {List View}
|
||||
from \uicontrol Library > \uicontrol Components >
|
||||
\uicontrol {Default Components} > \uicontrol Views to
|
||||
\uicontrol Navigator or \uicontrol {Form Editor}.
|
||||
\li Right-click the view in \uicontrol Navigator, and select
|
||||
\uicontrol {Edit List Model} in the context-menu to open
|
||||
the list model editor:
|
||||
@@ -174,7 +175,8 @@
|
||||
You can replace the default model and delegate with other,
|
||||
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.
|
||||
components are also available in \uicontrol Library > \uicontrol Components
|
||||
> \uicontrol {Qt Quick Controls}.
|
||||
|
||||
\include qtquick-pathview-editor.qdocinc pathview
|
||||
\if defined(qtdesignstudio)
|
||||
|
@@ -33,17 +33,27 @@
|
||||
|
||||
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, 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
|
||||
designs.
|
||||
formats, such as SVG. To use any image files in your designs, you need to
|
||||
first add them to \l Library:
|
||||
\list 1
|
||||
\li Select \uicontrol Library > \uicontrol Assets
|
||||
> \inlineimage plus.png
|
||||
.
|
||||
\li Select the image file, and then select \uicontrol Open.
|
||||
\li Select the location where the image will be saved in the
|
||||
\uicontrol {Add Resources} dialog.
|
||||
\li Select \uicontrol OK.
|
||||
\endlist
|
||||
|
||||
Your image is now available in \uicontrol Library > \uicontrol Assets.
|
||||
|
||||
\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
|
||||
\uicontrol Library to \uicontrol Navigator or \uicontrol {Form Editor},
|
||||
\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
|
||||
field in \uicontrol Properties.
|
||||
When you drag-and-drop an image file from \uicontrol Library >
|
||||
\uicontrol Assets to \l Navigator or \l {Form Editor}, \QC automatically
|
||||
creates an instance of the Image component for you with the path to the
|
||||
image file set as the value of the \uicontrol Source field in
|
||||
\uicontrol Properties.
|
||||
|
||||
To load images from a URL using a supported URL scheme, specify the URL
|
||||
in the \uicontrol Source field.
|
||||
|
@@ -36,7 +36,7 @@
|
||||
according to your needs. The values of some properties of the controls are
|
||||
specified by using styling, and therefore you cannot change them.
|
||||
|
||||
However, you can use some of the components in \uicontrol Library to draw
|
||||
However, you can use some of the components in \l Library to draw
|
||||
basic shapes, such as rectangles. In addition, \QDS comes with a set of
|
||||
more powerful and flexible graphical primitives, that allow creating more
|
||||
complex shapes, such as borders, triangles, arcs, and pies in
|
||||
@@ -193,6 +193,8 @@
|
||||
The area between the arc's start and end points or the area inside the
|
||||
outline are painted using either a solid fill color or a gradient.
|
||||
|
||||
\image studio-shapes-arc-outline-properties.png "Arc Outline Properties"
|
||||
|
||||
To create an arc with an outline, select the \uicontrol {Full outline}
|
||||
check box. The \uicontrol {Arc outline width} field sets the width of
|
||||
the arc outline, including the stroke. The \uicontrol {Arc outline begin}
|
||||
|
@@ -81,8 +81,17 @@
|
||||
\image qtquick-designer-text-properties.png "Text component properties"
|
||||
|
||||
To display custom fonts in the list of available fonts in the
|
||||
\uicontrol Font field, add them in the \uicontrol Assets tab
|
||||
of \uicontrol Library. For more information, see \l {Assets}.
|
||||
\uicontrol Font field, you need to first add them to \l Library:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Library > \l Assets
|
||||
> \inlineimage plus.png
|
||||
.
|
||||
\li Select the font file, and then select \uicontrol Open.
|
||||
\li Select the location where the file will be saved in the
|
||||
\uicontrol {Add Resources} dialog.
|
||||
\li Select \uicontrol OK.
|
||||
\endlist
|
||||
|
||||
You can use the buttons in the \uicontrol {Font style} group to emphasize
|
||||
text by making it bold, italic, underlined, or strikethrough.
|
||||
|
@@ -59,10 +59,11 @@
|
||||
(\uicontrol W) and height (\uicontrol H) of the button in
|
||||
\l Properties.
|
||||
|
||||
\li Drag and drop a \uicontrol Rectangle from \uicontrol Library to
|
||||
the component in \uicontrol Navigator. This creates a nested
|
||||
component where the Item is the parent of the Rectangle. Components
|
||||
are positioned relative to their parents.
|
||||
\li Drag-and-drop a \uicontrol Rectangle from \l Library >
|
||||
\uicontrol Components > \uicontrol {Default Components} >
|
||||
\uicontrol Basic to the component in \uicontrol Navigator. This
|
||||
creates a nested component where the Item is the parent of the
|
||||
Rectangle. Components are positioned relative to their parents.
|
||||
|
||||
\li In the \uicontrol Properties view, modify the appearance of the
|
||||
rectangle:
|
||||
@@ -82,7 +83,7 @@
|
||||
|
||||
\endlist
|
||||
|
||||
\li Drag and drop a \uicontrol {Text} component to the Item in
|
||||
\li Drag-and-drop a \uicontrol {Text} component to the Item in
|
||||
\uicontrol Navigator.
|
||||
|
||||
\li In the \uicontrol Properties view, edit the properties of the
|
||||
@@ -172,18 +173,19 @@
|
||||
\list 1
|
||||
\li Click \uicontrol {Design} to edit the component file in
|
||||
\l {Form Editor}.
|
||||
\li In the \uicontrol {Assets} tab of \l Library, select
|
||||
\inlineimage plus.png
|
||||
\li Select \l Library > \uicontrol Assets > \inlineimage plus.png
|
||||
to copy the image files you want to use to the project folder.
|
||||
\li In \l Navigator, select the root component and set the
|
||||
width (\uicontrol W) and height (\uicontrol H) of the button in the
|
||||
\l Properties view to match the size of the images
|
||||
you plan to use. This specifies the initial size of the button
|
||||
component.
|
||||
\li Drag and drop two \uicontrol {Border Image} components from
|
||||
\uicontrol Library to the root component in \uicontrol Navigator.
|
||||
\li Drag and drop a \uicontrol Text component to the root component.
|
||||
\li Drag and drop a \uicontrol {Mouse Area} to the root component.
|
||||
\li Drag-and-drop two \uicontrol {Border Image} components from
|
||||
\uicontrol Library > \uicontrol Components >
|
||||
\uicontrol {Default Components} > \uicontrol Basic to the root
|
||||
component in \uicontrol Navigator.
|
||||
\li Drag-and-drop a \uicontrol Text component to the root component.
|
||||
\li Drag-and-drop a \uicontrol {Mouse Area} to the root component.
|
||||
\li Select a border image to edit the values of its properties:
|
||||
\list a
|
||||
\li In the \uicontrol Id field, enter an ID for the border
|
||||
@@ -267,7 +269,7 @@
|
||||
When you work on other files in the project to create screens
|
||||
or other components for the UI, the button component appears in
|
||||
\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
|
||||
of their properties to assign them useful IDs, change their appearance,
|
||||
and set the button text for each button instance, for example.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 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.
|
||||
@@ -40,13 +40,16 @@
|
||||
To add fonts:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Library > \uicontrol Assets >
|
||||
\uicontrol {Add New Assets}.
|
||||
\li Browse to the folder that contains the font files and select them.
|
||||
\li Enter the name of the directory to save the fonts.
|
||||
\li Select \uicontrol Library > \l Assets
|
||||
> \inlineimage plus.png
|
||||
.
|
||||
\li Browse to the folder that contains the font files and select them,
|
||||
and then select \uicontrol Open.
|
||||
\li Select the location where the file will be saved in the
|
||||
\uicontrol {Add Resources} dialog.
|
||||
\li Select \uicontrol OK to save the fonts.
|
||||
\endlist
|
||||
|
||||
The fonts are added to the list of fonts for the \uicontrol Font property
|
||||
in \uicontrol Properties.
|
||||
in \l Properties.
|
||||
*/
|
||||
|
@@ -358,8 +358,8 @@
|
||||
When layering is enabled, you can use the component directly as a texture,
|
||||
in combination with the component you select in the \uicontrol Effect field.
|
||||
Typically, this component should be a shader effect with a source texture
|
||||
specified. You can use the effects in the \uicontrol Effects section
|
||||
of \uicontrol Library that are based on the components in the
|
||||
specified. You can use the effects in \l Library > \uicontrol Components >
|
||||
\uicontrol {Qt Quick Studio Effects} that are based on the components in the
|
||||
\l {Qt Graphical Effects} module.
|
||||
|
||||
To enable the component to pass the layer's offscreen surface to the effect
|
||||
|
@@ -109,6 +109,70 @@
|
||||
QML code by debugging or profiling it.
|
||||
\endif
|
||||
|
||||
\section1 For \macos Users
|
||||
|
||||
\QC uses standard names and locations for standard features, such as
|
||||
\e options or \e preferences. In this manual, the names and locations on
|
||||
Windows and Linux are usually used to keep the instructions short. Here are
|
||||
some places to check if you cannot find a function, dialog, or keyboard
|
||||
shortcut on \macos when following the instructions:
|
||||
|
||||
\table
|
||||
\header
|
||||
\li For
|
||||
\li Look In
|
||||
\row
|
||||
\li \uicontrol Tools > \uicontrol Options
|
||||
\li \uicontrol {\QC} > \uicontrol Preferences
|
||||
\row
|
||||
\li \uicontrol Help > \uicontrol {About Plugins}
|
||||
\li \uicontrol {\QC} > \uicontrol {About Plugins}
|
||||
\row
|
||||
\li Keyboard shortcuts
|
||||
\li \uicontrol {\QC} > \uicontrol Preferences > \uicontrol Environment >
|
||||
\uicontrol Keyboard
|
||||
\endtable
|
||||
|
||||
\section1 Switching UI Themes
|
||||
|
||||
Themes enable you to change the appearance of the UI from dark to light,
|
||||
for example. To switch themes, select \uicontrol Tools > \uicontrol Options
|
||||
> \uicontrol Environment, and then select a theme in the \uicontrol Theme
|
||||
field.
|
||||
|
||||
\image qtcreator-options-environment-interface.png "Interface settings"
|
||||
|
||||
\section1 Changing Languages
|
||||
|
||||
\QC has been localized into several languages. If the system language
|
||||
is one of the supported languages, it is automatically selected. To
|
||||
change the language, select \uicontrol Tools > \uicontrol Options >
|
||||
\uicontrol Environment and select a language in the \uicontrol Language
|
||||
field. Select \uicontrol {Restart Now} to restart \QC and have the change
|
||||
take effect.
|
||||
|
||||
\section1 High DPI Scaling
|
||||
|
||||
The operating systems supported by \QC implement high dots-per-inch (DPI)
|
||||
scaling at varying levels. Therefore, \QC handles high DPI scaling
|
||||
differently on different operating system:
|
||||
|
||||
\list
|
||||
\li On \macos, high DPI scaling is forced, which means that \QC allows
|
||||
Qt to use the system scaling factor as the \QC scaling factor.
|
||||
\li On Windows, if no \l{High DPI Support in Qt}
|
||||
{scaling environment variables} are set, \QC instructs Qt to detect
|
||||
the scaling factor and use it for \QC.
|
||||
\li On Linux, \QC leaves it to the user to enable high DPI scaling,
|
||||
because the process varies so much on different distributions
|
||||
and windowing systems that it cannot be reliably done automatically.
|
||||
\endlist
|
||||
|
||||
To override the default approach and always enable high-DPI scaling, select
|
||||
\uicontrol Tools > \uicontrol Options > \uicontrol Environment >
|
||||
\uicontrol {Enable high DPI scaling}. The changes will take effect after you
|
||||
restart \QC.
|
||||
|
||||
\section1 Navigating with Keyboard
|
||||
|
||||
\QC caters not only to those users who like to use the mouse, but also
|
||||
@@ -123,15 +187,6 @@
|
||||
documentation, see \l{How-tos}.
|
||||
\endif
|
||||
|
||||
\section1 Changing Languages
|
||||
|
||||
\QC has been localized into several languages. If the system language
|
||||
is one of the supported languages, it is automatically selected. To
|
||||
change the language, select \uicontrol Tools > \uicontrol Options >
|
||||
\uicontrol Environment and select a language in the \uicontrol Language
|
||||
field. Select \uicontrol {Restart Now} to restart \QC and have the change
|
||||
take effect.
|
||||
|
||||
\section1 Viewing Images
|
||||
|
||||
\QC opens image files in the image viewer.
|
||||
@@ -167,37 +222,8 @@
|
||||
different modes and states.
|
||||
\endif
|
||||
|
||||
\section1 Platform Notes
|
||||
|
||||
This section describes the cases where the behavior of \QC depends on the
|
||||
operating system it runs on.
|
||||
|
||||
\section2 Location of Functions
|
||||
|
||||
\QC uses standard names and locations for standard features, such as
|
||||
\e options or \e preferences. In this manual, the names and locations on
|
||||
Windows and Linux are usually used to keep the instructions short. Here are
|
||||
some places to check if you cannot find a function, dialog, or keyboard
|
||||
shortcut on \macos when following the instructions:
|
||||
|
||||
\table
|
||||
\header
|
||||
\li For
|
||||
\li Look In
|
||||
\row
|
||||
\li \uicontrol Tools > \uicontrol Options
|
||||
\li \uicontrol {\QC} > \uicontrol Preferences
|
||||
\row
|
||||
\li \uicontrol Help > \uicontrol {About Plugins}
|
||||
\li \uicontrol {\QC} > \uicontrol {About Plugins}
|
||||
\row
|
||||
\li Keyboard shortcuts
|
||||
\li \uicontrol {\QC} > \uicontrol Preferences > \uicontrol Environment >
|
||||
\uicontrol Keyboard
|
||||
\endtable
|
||||
|
||||
\if defined(qtcreator)
|
||||
\section2 Location of Settings Files
|
||||
\section1 Location of Settings Files
|
||||
|
||||
\QC creates the following files and directories:
|
||||
|
||||
@@ -239,31 +265,7 @@
|
||||
\endlist
|
||||
\endif
|
||||
|
||||
\section2 High DPI Scaling
|
||||
|
||||
The operating systems supported by \QC implement high dots-per-inch (DPI)
|
||||
scaling at varying levels. Therefore, \QC handles high DPI scaling
|
||||
differently on different operating system:
|
||||
|
||||
\list
|
||||
|
||||
\li On \macos, high DPI scaling is forced, which means that \QC allows
|
||||
Qt to use the system scaling factor as the \QC scaling factor.
|
||||
|
||||
\li On Windows, if no \l{High DPI Support in Qt}
|
||||
{scaling environment variables} are set, \QC instructs Qt to detect
|
||||
the scaling factor and use it for \QC.
|
||||
|
||||
\li On Linux, \QC leaves it to the user to enable high DPI scaling,
|
||||
because the process varies so much on different distributions
|
||||
and windowing systems that it cannot be reliably done automatically.
|
||||
|
||||
\endlist
|
||||
|
||||
To override the default approach and always enable high-DPI scaling, select
|
||||
\uicontrol Tools > \uicontrol Options > \uicontrol Environment >
|
||||
\uicontrol {Enable high DPI scaling}. The changes will take effect after you
|
||||
restart \QC.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@@ -85,9 +85,14 @@
|
||||
You can move the code for types and symbols around in the source file
|
||||
by dragging and dropping them in the outline.
|
||||
|
||||
\image qtcreator-outline-view.png "Outline view"
|
||||
|
||||
\list
|
||||
\li To see a complete list of all bindings, select
|
||||
\uicontrol {Filter Tree} > \uicontrol {Show All Bindings}.
|
||||
\li To sort types or symbols alphabetically, select
|
||||
\inlineimage sort_alphabetically.png
|
||||
(\uicontrol {Sort Alphabetically}).
|
||||
\li To stop the synchronization with the type or symbol selected in the
|
||||
editor, deselect \uicontrol {Synchronize with Editor}.
|
||||
\endlist
|
||||
@@ -95,7 +100,11 @@
|
||||
\section1 Viewing the Class Hierarchy
|
||||
|
||||
The \uicontrol {Class View} shows the class hierarchy of the currently
|
||||
open projects. To organize the view by subprojects, click
|
||||
open projects.
|
||||
|
||||
\image qtcreator-class-view.png "Class View"
|
||||
|
||||
To organize the view by subprojects, click
|
||||
\inlineimage qtcreator-show-subprojects.png
|
||||
(\uicontrol {Show Subprojects}).
|
||||
|
||||
@@ -124,6 +133,8 @@
|
||||
the current file, right-click in the editor and select
|
||||
\uicontrol {Open Include Hierarchy} or press \key {Ctrl+Shift+I}.
|
||||
|
||||
\image qtcreator-include-hierarchy-view.png "Include Hierarchy view"
|
||||
|
||||
To keep the view synchronized with the file currently opened in the editor,
|
||||
select \uicontrol {Synchronize with Editor}.
|
||||
*/
|
||||
|
@@ -1,8 +1,7 @@
|
||||
project = "$IDE_DISPLAY_NAME"
|
||||
project = $IDE_ID
|
||||
description = "$IDE_DISPLAY_NAME Manual"
|
||||
url = https://doc.qt.io/qtdesignstudio
|
||||
|
||||
moduleheader =
|
||||
version = $QTC_VERSION
|
||||
|
||||
#Words to ignore for auto-linking
|
||||
ignorewords += \
|
||||
|
@@ -30,6 +30,8 @@
|
||||
|
||||
\title Cluster Tutorial
|
||||
|
||||
\image clustertutorial.png "Cluster Tutorial example"
|
||||
|
||||
\e {Cluster Tutorial} example contains the source files for a set of
|
||||
video tutorials that explain how to export designs from Adobe
|
||||
Photoshop to \QDS and to edit them to create Qt Quick UIs.
|
||||
|
BIN
doc/qtdesignstudio/examples/doc/images/clustertutorial.png
Normal file
After Width: | Height: | Size: 49 KiB |
@@ -69,12 +69,13 @@
|
||||
\li In the \uicontrol {Screen resolution} field, select the initial
|
||||
size of the UI. In this tutorial, we use the smallest predefined
|
||||
size, \e {640 x 480}. You can easily change the screen size later
|
||||
in \uicontrol Properties.
|
||||
in \l Properties.
|
||||
\li Select \uicontrol Finish (or \uicontrol Done on \macos) to create
|
||||
the project.
|
||||
\endlist
|
||||
|
||||
Your project should now look something like this in the Design mode:
|
||||
Your project should now look something like this in the \uicontrol Design
|
||||
mode:
|
||||
|
||||
\image loginui1-project.png "Log In UI project in the Design mode"
|
||||
|
||||
@@ -134,12 +135,19 @@
|
||||
the \l Text component to set the title text in a larger strong font. In
|
||||
addition, you will import an image as an asset and add it to the page.
|
||||
|
||||
To be able to use an image in the UI, you must add it to your project
|
||||
in the \uicontrol Assets tab of \uicontrol Library. Click
|
||||
To add an image to your UI, you should first click
|
||||
\l {https://doc.qt.io/qtdesignstudio/images/used-in-examples/loginui1/qt_logo_green_64x64px.png}
|
||||
{here} to open the Qt logo in a browser and save it as a file on your
|
||||
computer. The image is only used for decoration, so you can also use
|
||||
any other image or just leave it out.
|
||||
computer. Next, you need to add the image to \l Library:
|
||||
\list 1
|
||||
\li Select \uicontrol Library > \uicontrol Assets
|
||||
> \inlineimage plus.png
|
||||
.
|
||||
\li Select the image file, and then select \uicontrol Open.
|
||||
\li Select the location where the image will be saved in the
|
||||
\uicontrol {Add Resources} dialog.
|
||||
\li Select \uicontrol OK.
|
||||
\endlist
|
||||
|
||||
To preview the changes that you make to the UI while you make
|
||||
them, select the \inlineimage live_preview.png
|
||||
@@ -159,7 +167,7 @@
|
||||
\inlineimage icon_color_gradient.png
|
||||
(\uicontrol {Linear Gradient}) button to add a linear gradient to
|
||||
the screen background. Click the start point (1) and end point (2)
|
||||
to specify the gradient colors. Drag and drop the points along the
|
||||
to specify the gradient colors. Drag-and-drop the points along the
|
||||
gradient bar to specify where the gradient starts and ends. In this
|
||||
tutorial, the color changes from white to green (#41cd52), starting
|
||||
mid-screen, at position 0.5. You can use your favorite colors or
|
||||
@@ -180,11 +188,11 @@
|
||||
\li In the \uicontrol {Font style} field, select the
|
||||
\uicontrol B button to use a strong font.
|
||||
\endlist
|
||||
\li Drag and drop the Qt logo from the \uicontrol Assets tab of
|
||||
\uicontrol Library to the top-left corner of the rectangle.
|
||||
\li Drag-and-drop the Qt logo from \uicontrol Library > \uicontrol Assets
|
||||
to the top-left corner of the rectangle.
|
||||
\image loginui1-library-assets.png "Library view Assets tab"
|
||||
\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
|
||||
\QDS automatically creates an instance of the \l{Images}{Image}
|
||||
component for you with the path to the image file set as the value of
|
||||
the \uicontrol Source field in \uicontrol Properties.
|
||||
\image loginui1-image-properties.png "Image properties"
|
||||
\li In the \uicontrol id field, change the id of the image to \e logo.
|
||||
@@ -215,8 +223,9 @@
|
||||
|
||||
The \l Library view lists the components in each module that are
|
||||
supported by \QDS. You can use the basic components to create your own
|
||||
components, and they will be listed under \uicontrol {My Components}.
|
||||
This section is only visible if you have created custom components.
|
||||
components, and they will be listed in \uicontrol Components >
|
||||
\uicontrol {My Components}. This section is only visible if you have created
|
||||
custom components.
|
||||
|
||||
The \l {basic-rectangle}{Rectangle}, \l Text, and \l {Images}{Image}
|
||||
components used in this tutorial are based on the \l Item component.
|
||||
@@ -237,9 +246,10 @@
|
||||
rounded corners.
|
||||
|
||||
If you want to specify the radius of each corner separately, you can use the
|
||||
\l{studio-rectangle}{Rectangle} component from the Studio Components
|
||||
module instead of the basic rectangle component. It is available in the
|
||||
\uicontrol {Studio Components} tab of \l Library > \uicontrol Components.
|
||||
\l{studio-rectangle}{Rectangle} component from the
|
||||
\uicontrol {Qt Quick Studio Components} module instead of the basic rectangle
|
||||
component. It is available in \uicontrol Library > \uicontrol Components
|
||||
> \uicontrol {Qt Quick Studio Components}.
|
||||
|
||||
\section3 Text Properties
|
||||
|
||||
@@ -248,19 +258,30 @@
|
||||
properties for each text component, such as size in points or pixels,
|
||||
weight, style, and spacing.
|
||||
|
||||
To display custom fonts in the list of available fonts in \l Properties,
|
||||
add them in the \uicontrol Assets tab of \uicontrol Library.
|
||||
To add custom fonts in the list of available fonts in \l Properties:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Library > \l Assets
|
||||
> \inlineimage plus.png
|
||||
.
|
||||
\li Browse to the folder that contains the font files and select them,
|
||||
and then select \uicontrol Open.
|
||||
\li Select the location where the file will be saved in the
|
||||
\uicontrol {Add Resources} dialog.
|
||||
\li Select \uicontrol OK to save the fonts.
|
||||
\endlist
|
||||
|
||||
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 component.
|
||||
from the \uicontrol {Qt Quick Controls} module instead of the Text component.
|
||||
|
||||
\section3 Image Properties
|
||||
|
||||
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
|
||||
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
|
||||
designs.
|
||||
graphics formats such as SVG. To add an image you wish to use in your
|
||||
designs to \uicontrol Library, select \uicontrol Library > \uicontrol Assets
|
||||
> \inlineimage plus.png
|
||||
, and then select the image file.
|
||||
|
||||
If you need to display animated images, use the \l {Animated Image}
|
||||
component, also available in \uicontrol Library > \uicontrol Components >
|
||||
@@ -270,15 +291,16 @@
|
||||
|
||||
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
|
||||
appears under \uicontrol {My Components} in \uicontrol Library > Components.
|
||||
You can drag and drop it to \l {Form Editor} and modify its properties
|
||||
in \l Properties to change its appearance and functionality.
|
||||
appears in \uicontrol Library > \uicontrol Components >
|
||||
\uicontrol {My Components}. You can drag-and-drop it to \l {Form Editor} and
|
||||
modify its properties in the \uicontrol Properties view to change its
|
||||
appearance and functionality.
|
||||
|
||||
If you find that you cannot use the wizard template nor the ready-made
|
||||
button controls available in the \uicontrol {Qt Quick Controls} tab
|
||||
in \uicontrol Library > \uicontrol Components to create the kind of push
|
||||
button that you want, you can create your button from scratch using default
|
||||
components. For more information, see \l {Creating Buttons} and
|
||||
button controls available in \uicontrol Library > \uicontrol Components >
|
||||
\uicontrol {Qt Quick Controls} to create the kind of push button that you
|
||||
want, you can create your button from scratch using default components. For
|
||||
more information, see \l {Creating Buttons} and
|
||||
\l {Creating Scalable Buttons and Borders}.
|
||||
|
||||
To create a push button by using the wizard template:
|
||||
@@ -316,8 +338,8 @@
|
||||
The \l {Qt Quick Templates 2} module provides the functionality of the
|
||||
Button component. The module is imported as \e T, and the alias is added to
|
||||
the Button component definition to indicate that the Button component from the
|
||||
Qt Quick Controls module is used, instead of some other component with the
|
||||
same name.
|
||||
\uicontrol {Qt Quick Controls} module is used, instead of some other
|
||||
component with the same name.
|
||||
|
||||
\printuntil text
|
||||
\dots
|
||||
@@ -408,11 +430,12 @@
|
||||
\list 1
|
||||
\li Double-click \e Screen01.ui.qml in \uicontrol Projects
|
||||
to open it in \uicontrol {Form Editor}.
|
||||
\li Drag and drop two instances of the PushButton component from
|
||||
\uicontrol Library to \uicontrol {Form Editor}.
|
||||
\li Drag-and-drop two instances of the PushButton component from
|
||||
\uicontrol Library > \uicontrol Components > \uicontrol {My Components}
|
||||
to \uicontrol {Form Editor}.
|
||||
\image loginui1-library.png "My Components tab of Library view"
|
||||
\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 Text field, enter \e {Log In} and select
|
||||
\uicontrol tr to mark the text
|
||||
|
@@ -119,7 +119,7 @@
|
||||
\inlineimage plus.png
|
||||
button to add the \l {Qt Quick Controls} module to the project:
|
||||
\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}
|
||||
component from the \uicontrol {Qt Quick Controls} tab to
|
||||
\l {Form Editor}.
|
||||
\li Select one of the text fields in \l Navigator, and
|
||||
|
@@ -72,7 +72,7 @@
|
||||
|
||||
\list 1
|
||||
\li Open \e {Screen01.ui.qml} in \l {Form Editor} for editing.
|
||||
\li Drag and drop a \uicontrol {Text Field} from \l Library
|
||||
\li Drag-and-drop a \uicontrol {Text Field} from \l Library
|
||||
> \uicontrol Components > \uicontrol {Qt Quick Controls} to
|
||||
\e fieldColumn in \l Navigator.
|
||||
\li In \l Properties, change the ID of the text field to
|
||||
@@ -82,9 +82,9 @@
|
||||
existing fields.
|
||||
\li In the \uicontrol Placeholder field, set the placeholder text to
|
||||
\e {Verify password} and mark the text translatable.
|
||||
\li Drag and drop a PushButton component from \uicontrol Library >
|
||||
\uicontrol {My QML Components} to their parent rectangle in
|
||||
\uicontrol Navigator.
|
||||
\li Drag-and-drop a PushButton component from \uicontrol Library >
|
||||
\uicontrol Components > \uicontrol {My Components} to its parent
|
||||
rectangle in \uicontrol Navigator.
|
||||
\li Select the button in \uicontrol Navigator and change its id to
|
||||
\e backButton in \uicontrol Properties.
|
||||
\li In the \uicontrol Geometry group, \uicontrol Size field, set the
|
||||
|
@@ -43,18 +43,20 @@
|
||||
create the progress bar. For another example of a progress bar, see the
|
||||
\l {progress-bar-control}{Progress Bar} component in Qt Quick Controls.
|
||||
|
||||
In the Design mode, we drag and drop a \uicontrol Rectangle from
|
||||
\l Library to \l {Form Editor} and modify its size to create the
|
||||
In the \uicontrol Design mode, we drag-and-drop a \uicontrol Rectangle from
|
||||
\l Library > \uicontrol Components > \uicontrol {Default Components} >
|
||||
\uicontrol Basic to \l {Form Editor} and modify its size to create the
|
||||
background for the progress bar. We change its ID to \e background in
|
||||
\l Properties.
|
||||
|
||||
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
|
||||
component for that. We drag and drop the Item from \uicontrol Library to
|
||||
\uicontrol {Form Editor} and change its ID to \e root in
|
||||
component for that. We drag-and-drop the Item from \uicontrol Library >
|
||||
\uicontrol Components > \uicontrol {Default Components} > \uicontrol Basic
|
||||
to \uicontrol {Form Editor} and change its ID to \e root in
|
||||
\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 \l Navigator. This enables us to use the anchor
|
||||
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
|
||||
@@ -63,11 +65,11 @@
|
||||
|
||||
\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
|
||||
\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
|
||||
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.
|
||||
|
||||
For more information about creating and positioning components, see
|
||||
|
@@ -175,7 +175,7 @@
|
||||
|
||||
In our UI, we use connections and states to move between screens. First,
|
||||
we specify the application workflow in \e ApplicationFlow.qml. When the
|
||||
file is open in \uicontrol {Form Editor}, we drag and drop the components
|
||||
file is open in \uicontrol {Form Editor}, we drag-and-drop the components
|
||||
that define the screens in the application from \uicontrol Library to
|
||||
\uicontrol Navigator or \uicontrol {Form Editor}: \e StartScreen,
|
||||
\e SettingsScreen, \e PresetsScreen, and \e RunningScreen.
|
||||
|
@@ -163,8 +163,7 @@
|
||||
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
|
||||
listed in \uicontrol Library > \uicontrol Components >
|
||||
\uicontrol {My Components}, and we can drag and drop them to the
|
||||
\l {Form Editor}.
|
||||
\uicontrol {My Components}, and we can drag-and-drop them to \l {Form Editor}.
|
||||
|
||||
\image webinardemo-mainappui.png "Main app UI in Design mode"
|
||||
|
||||
|
BIN
doc/qtdesignstudio/images/qt-bridge-qml-id-settings.png
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 32 KiB |
BIN
doc/qtdesignstudio/images/studio-feedback-popup.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -57,8 +57,9 @@
|
||||
|
||||
When you use \QBPS to export your designs, you will determine how you want
|
||||
each group or layer exported: as a \e component or \e child. A component
|
||||
will be imported as a single QML file that can contain other assets. A child
|
||||
will be imported as a single image file that you can use within QML files.
|
||||
will be imported as a single \l {UI Files}{UI file} that can contain other
|
||||
assets. A child will be imported as a single image file that you can use
|
||||
within UI files.
|
||||
|
||||
If you plan to use pieces of your design as separate images in the UI,
|
||||
group them on an artboard as separate layers. You can then export the group
|
||||
@@ -75,28 +76,27 @@
|
||||
|
||||
Place different parts of the UI, such as menus and pop-ups, on separate
|
||||
artboards to be able to export them as components or children and to
|
||||
import them as QML and PNG files that you can drag and drop to
|
||||
\uicontrol {Form Editor} in \QDS Design mode while creating a UI.
|
||||
import them as code and PNG files that you can drag and drop to
|
||||
\l {Form Editor} in \QDS Design mode while creating a UI.
|
||||
|
||||
\QDS offers predefined sets of UI controls that you can modify according
|
||||
to your needs. You can export your own controls as QML types, Qt Quick
|
||||
to your needs. You can export your own controls as components, Qt Quick
|
||||
Controls, or Studio Components. The position and dimensions of your control
|
||||
are preserved.
|
||||
|
||||
However, if you want your UI controls, such as check boxes, to look exactly
|
||||
like they do in Photoshop, you have to create the control in an Artboard and
|
||||
use the artboard in the layers where the control instance is to be created.
|
||||
\QB imports the control as a custom QML component that you can program in
|
||||
\QB imports the control as a custom component that you can program in
|
||||
\QDS.
|
||||
|
||||
\section1 Exporting Assets
|
||||
|
||||
Each artboard is exported automatically as a component, which means that it
|
||||
will be imported as a separate
|
||||
QML file that contains all the artwork on the artboard, except layers that
|
||||
are set to be skipped or exported as child items. You determine how
|
||||
each group or layer in an artboard is exported: as a component or a child
|
||||
item. In addition, you can merge the groups and layers of an artboard
|
||||
will be imported as a separate file that contains all the artwork on the
|
||||
artboard, except layers that are set to be skipped or exported as child items.
|
||||
You determine how each group or layer in an artboard is exported: as a component
|
||||
or a child item. In addition, you can merge the groups and layers of an artboard
|
||||
into the parent as one item or skip layers completely.
|
||||
|
||||
By default, layers are exported as follows:
|
||||
@@ -111,27 +111,28 @@
|
||||
selection.
|
||||
\endlist
|
||||
|
||||
\QBPS automatically proposes identifiers (QML ids) for all groups and layers.
|
||||
The ids will be used as filenames in \QDS. You can change the ids, so that
|
||||
you can easily find them in \QDS. Just keep in mind that the ids must be
|
||||
\QBPS automatically proposes identifiers (IDs) for all groups and layers.
|
||||
The IDs will be used as filenames in \QDS. You can change the IDs, so that
|
||||
you can easily find them in \QDS. Just keep in mind that the IDs must be
|
||||
unique and that they must follow some naming conventions.
|
||||
|
||||
You can export assets using the default settings and make all the changes
|
||||
later in \QDS. If you are familiar with the \l{QML Syntax Basics}
|
||||
{QML syntax}, you can modify the settings to tailor the generated QML to
|
||||
a certain degree. For example, you can specify the QML type or Studio
|
||||
component to use for a component or layer. If you have drawn an arc that
|
||||
you mean to animate, you can export it as an Arc Studio component to avoid
|
||||
having to replace the arc image with an Arc component in \QDS. Or you could
|
||||
export a button as a Qt Quick Controls 2 Button type.
|
||||
{QML syntax}, you can modify the settings to tailor the generated code to
|
||||
a certain degree. For example, you can specify the component or
|
||||
\l {Shapes}{Qt Quick Studio Component} to use for a artboard or layer.
|
||||
If you have drawn an arc that you mean to animate, you can export it as
|
||||
an \l Arc Studio component to avoid having to replace the arc image with
|
||||
an Arc component in \QDS. Or you could export a button as a
|
||||
Qt Quick Controls \l Button type.
|
||||
|
||||
You can specify effects, such as a blur effect, to use for a group or layer.
|
||||
|
||||
The QML types supported by \QDS are listed in the \uicontrol {QML Types}
|
||||
tab in the \uicontrol Library in the Design mode of \QDS. For more
|
||||
The QML types supported by \QDS are listed in the \uicontrol {Components}
|
||||
tab in the \l {Library} in the Design mode of \QDS. For more
|
||||
information, see \l{Creating Components}.
|
||||
|
||||
You can also specify values for the properties of the QML type or create
|
||||
You can also specify values for the properties of the component or create
|
||||
\l{Property Aliases}{property aliases} to fetch the values from other
|
||||
properties.
|
||||
|
||||
@@ -143,7 +144,7 @@
|
||||
|
||||
\list 1
|
||||
\li \QBPS automatically proposes identifiers for all groups and layers
|
||||
that you can change in the \uicontrol {QML ID} field. The ids must
|
||||
that you can change in the \uicontrol {ID} field. The IDs must
|
||||
be unique, they must begin with a lower-case letter or an
|
||||
underscore, and they can only contain letters, numbers, and
|
||||
underscore characters. For more information, see
|
||||
@@ -153,7 +154,7 @@
|
||||
\list
|
||||
\li \uicontrol Component exports the selected artboard, group,
|
||||
or layer with metadata. The exported data can be used later
|
||||
to import the component as a separate QML file that contains
|
||||
to import the component as a separate UI file that contains
|
||||
all the artwork in it, except layers that are set to be
|
||||
skipped or exported as child items.
|
||||
\li \uicontrol Child exports each asset of the selected group
|
||||
@@ -166,25 +167,31 @@
|
||||
\li In the \uicontrol {As Artboard} field, select an artboard
|
||||
to reuse. For example, you can use an artboard to define a
|
||||
component, such as a button, and reuse it in other artboards.
|
||||
\li In the \uicontrol {QML Type} field, specify the QML type
|
||||
\li In the \uicontrol {Component} field, specify the component
|
||||
or Studio component to morph this layer into. The component that is
|
||||
generated during import will be of this type. For example, if you
|
||||
drew a rectangle, you can export it as a Rectangle Studio component.
|
||||
You can provide the import statement of the module where the QML
|
||||
type is defined in the \uicontrol {Add Imports} field.
|
||||
drew a rectangle, you can export it as a \l {Studio Rectangle}{Rectangle}
|
||||
Studio component.
|
||||
You can provide the import statement of the module where the
|
||||
component type is defined in the \uicontrol {Imports} field.
|
||||
\note The implicit properties except position and size are not
|
||||
applied when the \uicontrol {Component} is defined. For example, all text
|
||||
properties will be ignored if \uicontrol {Component} is defined
|
||||
for a text layer, but explicit properties defined in the \uicontrol
|
||||
{Properties} field will be applied.
|
||||
\li Select the \uicontrol {Render Text} check box to render the text
|
||||
layer as an asset. The layer will be exported as an asset and the
|
||||
text data will not be exported. This allows the text layer to be
|
||||
merged to parent artboard or group as well.
|
||||
\li In the \uicontrol {Add Imports} field, enter additional
|
||||
import statements to have them added to the generated QML file.
|
||||
import statements to have them added to the generated UI file.
|
||||
For example, to use Qt Quick Controls 2.3, you need the import
|
||||
statement \c {QtQuick.Controls 2.3} and to use Qt Studio
|
||||
Components 1.0, you need the import statement
|
||||
\c {QtQuick.Studio.Components 1.0}. You can also import a module
|
||||
as an alias.
|
||||
\li In the \uicontrol {QML Properties} field, specify properties for
|
||||
the QML type. You can add and modify properties in \QDS.
|
||||
\li In the \uicontrol {Properties} field, specify properties for
|
||||
the component. You can add and modify properties in \QDS.
|
||||
\li Select the \uicontrol {Clip Contents} check box to enable clipping
|
||||
in the type generated from the layer. The generated type will clip
|
||||
its own painting, as well as the painting of its children, to its
|
||||
@@ -193,6 +200,8 @@
|
||||
generated from this layer as an alias in the parent component.
|
||||
\li Select \uicontrol {Cascade properties} to apply the current set of
|
||||
properties to all the children of the selected layer.
|
||||
\li In the \uicontrol Annotations field, specify annotation for the
|
||||
component. See \l {Annotating Designs}.
|
||||
\li Select \uicontrol Export to copy your assets to the export path you
|
||||
specified.
|
||||
\li When the exporting is done, select \uicontrol OK.
|
||||
@@ -204,6 +213,16 @@
|
||||
You can now create a project in \QDS and import the assets to it, as
|
||||
described in \l {Creating Projects} and \l{Importing Designs}.
|
||||
|
||||
|
||||
\section1 Customizing IDs
|
||||
|
||||
\QBPS enables customizing auto generated IDs. In the \uicontrol {ID Prefix}
|
||||
field, specify an ID prefix that will be prepended to all auto generated IDs.
|
||||
In the \uicontrol {ID Suffix} field, specify an ID suffix that will be
|
||||
appended to all auto generated IDs.
|
||||
|
||||
\image qt-bridge-qml-id-settings.png
|
||||
|
||||
\section1 Cloning Documents
|
||||
|
||||
\QBPS enables creating a clone of the current document. The clone workflow
|
||||
@@ -255,9 +274,9 @@
|
||||
PSD Document instance. You can undo the temporary changes done in the function
|
||||
\e preExport(...).
|
||||
\li customDefaultQmlId(name, instance)
|
||||
The function is called for setting the default QML id of the layer. The returned value
|
||||
is used for the QML id. Return \c false to use the auto generated QML id instead.
|
||||
The parameter \a name is the auto generated QML id by the plugin and \a instance is the
|
||||
The function is called for setting the default ID of the layer. The returned value
|
||||
is used for the ID. Return \c false to use the auto generated ID instead.
|
||||
The parameter \a name is the auto generated ID by the plugin and \a instance is the
|
||||
PSD layer instance.
|
||||
\endlist
|
||||
|
||||
@@ -292,13 +311,13 @@
|
||||
|
||||
The following guidelines are followed to generate the Photoshop document:
|
||||
\list
|
||||
\li An Artboard is created for each QML component exported and defined in the metadata file.
|
||||
\li An Artboard is created for each component exported and defined in the metadata file.
|
||||
\li An image layer is created for an item with an asset.
|
||||
\li A solid fill layer is created for an item without an asset.
|
||||
\li A paragraph text layer is created for Text items.
|
||||
\endlist
|
||||
|
||||
All QML metadata specified in the metadata file is assigned to the generated layers.
|
||||
All metadata specified in the metadata file is assigned to the generated layers.
|
||||
|
||||
An important concept of \e {Virtual parent} is applied to translate the QML DOM to Photoshop
|
||||
DOM. A QML \l Item can have children but a layer in a Photoshop document cannot have child
|
||||
|
@@ -44,22 +44,22 @@
|
||||
move it from the sketching page to the components page and use it
|
||||
in screens. When you export your assets, you can skip all artboards
|
||||
that you don't want to be part of the final UI, to avoid cluttering
|
||||
the \QDS project. The QML code generated in \QDS corresponds to the
|
||||
the \QDS project. The code generated in \QDS corresponds to the
|
||||
structure of your Sketch document.
|
||||
\li \QBSK supports document \e symbols and \e {symbol overrides} for
|
||||
text symbols. Each symbol is exported as a QML component, and each
|
||||
text symbols. Each symbol is exported as a component, and each
|
||||
symbol instance is generated as a respective \e component instance
|
||||
in the generated QML. The symbol overrides are exported as values of
|
||||
properties for the components. For example, if you use symbol
|
||||
overrides to specify the text for each button instance, it is
|
||||
in the generated component file. The symbol overrides are exported
|
||||
as values of properties for the components. For example, if you use
|
||||
symbol overrides to specify the text for each button instance, it is
|
||||
exported as a value of the text property.
|
||||
\li Create components in Sketch and export them to \QDS before you
|
||||
start making instances of them. In \QDS, add functionality to the
|
||||
components, such as button states and then bring them back to Sketch
|
||||
as assets. If you use functional QML components in Sketch, you will
|
||||
as assets. If you use functional \QDS components in Sketch, you will
|
||||
find it easier to merge new iterations of the design to \QDS and
|
||||
continue to build the screens there.
|
||||
\li Use descriptive and unique ids to avoid duplicate QML ids after
|
||||
\li Use descriptive and unique IDs to avoid duplicate IDs after
|
||||
exporting assets and \l{Importing 2D Assets}{importing} them to
|
||||
\QDS.
|
||||
\li Store all assets in the scalable vector graphics (SVG) format
|
||||
@@ -88,7 +88,7 @@
|
||||
designs from Sketch and import them into \QDS.
|
||||
|
||||
An artboard can only be exported as a component or skipped. A component will
|
||||
be imported as a separate QML file that contains all the artwork on the
|
||||
be imported as a separate file that contains all the artwork on the
|
||||
artboard, except layers that are set to be skipped or exported as child
|
||||
items. The child items can contain graphical assets or text.
|
||||
|
||||
@@ -101,11 +101,11 @@
|
||||
|
||||
Place different parts of the UI, such as menus and pop-ups, on separate
|
||||
artboards to be able to export them as components or children and to
|
||||
import them as QML files and images that you can drag and drop to the
|
||||
import them as component files and images that you can drag and drop to the
|
||||
\uicontrol {Form Editor} in \QDS Design mode while creating a UI.
|
||||
|
||||
If you want to use the assets on an artboard in \QDS as they are in Sketch,
|
||||
you can import the artboard without generating QML code for it.
|
||||
you can import the artboard without generating code for it.
|
||||
|
||||
\section2 Using Layers and Groups
|
||||
|
||||
@@ -118,19 +118,19 @@
|
||||
You can select the asset format and DPI to use for each image in
|
||||
\uicontrol Settings > \uicontrol {Asset Settings}.
|
||||
|
||||
\section2 Using QML Ids
|
||||
\section2 Using IDs
|
||||
|
||||
The most common issues in using \QBSK are caused by having duplicate ids in
|
||||
The most common issues in using \QBSK are caused by having duplicate IDs in
|
||||
your project. Even though the importer in \QDS is capable of detecting and
|
||||
retaining QML ids, you should still manually check all the QML ids to make
|
||||
retaining IDs, you should still manually check all the IDs to make
|
||||
them unique and descriptive.
|
||||
|
||||
Name the layers in exactly the same way as your QML ids, to be able to find
|
||||
Name the layers in exactly the same way as your IDs, to be able to find
|
||||
artwork later, especially as the export files can grow very large and
|
||||
complicated as they approach the level of a complete UI project.
|
||||
|
||||
\note Even though \QDS is capable of handling the ids during merges, we
|
||||
recommend that you do not change the ids after the first time you export
|
||||
\note Even though \QDS is capable of handling the IDs during merges, we
|
||||
recommend that you do not change the IDs after the first time you export
|
||||
the assets, to avoid problems.
|
||||
|
||||
\section1 Exporting Assets
|
||||
@@ -142,7 +142,7 @@
|
||||
\li Asset layers are exported as \e merged.
|
||||
\li Text layers can only be exported as \e child or \e skipped.
|
||||
\li A \e hotspot layer can only be exported as \e child or \e skipped.
|
||||
It is always exported as an instance of the \l {Mouse Area} type.
|
||||
It is always exported as an instance of the \l {Mouse Area} component.
|
||||
\li A symbol instance layer can only be exported as \e child or
|
||||
\e skipped.
|
||||
\li Images are exported in JPG, PNG, or SVG format, depending on your
|
||||
@@ -155,13 +155,13 @@
|
||||
|
||||
You can export assets using the default settings and make all the changes
|
||||
later in \QDS. If you are familiar with the \l{QML Syntax Basics}
|
||||
{QML syntax}, you can modify the settings to tailor the generated QML to
|
||||
a certain degree. For example, you can specify the QML type or
|
||||
{QML syntax}, you can modify the settings to tailor the generated code to
|
||||
a certain degree. For example, you can specify the component or
|
||||
\l {Shapes}{Qt Quick Studio Component} to use for a component or
|
||||
layer. If you have drawn an arc that you mean to animate, you can export it
|
||||
as an \l Arc component to avoid having to replace the arc image with an Arc
|
||||
component in \QDS. Or you could export a button as a Qt Quick Controls
|
||||
\l Button type.
|
||||
\l Button component.
|
||||
|
||||
\image qt-sketch-bridge.png
|
||||
|
||||
@@ -171,15 +171,15 @@
|
||||
|
||||
\list 1
|
||||
\li \QBSK automatically proposes identifiers for all groups and layers
|
||||
that you can change in the \uicontrol {QML ID} field. Use unique and
|
||||
descriptive ids to avoid duplicate QML ids when the layer and the
|
||||
that you can change in the \uicontrol {ID} field. Use unique and
|
||||
descriptive IDs to avoid duplicate IDs when the layer and the
|
||||
respective artwork is imported into \QDS.
|
||||
\li In the \uicontrol {Export As} field, select the export type for the
|
||||
group or layer:
|
||||
\list
|
||||
\li \uicontrol Component exports the selected symbol with
|
||||
metadata. The exported data can be used later to import
|
||||
the component as a separate QML file that contains all
|
||||
the component as a separate UI file that contains all
|
||||
the artwork in it, except layers or groups that are set
|
||||
to be skipped or exported as child items.
|
||||
\li \uicontrol Child exports each asset of the selected group
|
||||
@@ -190,34 +190,40 @@
|
||||
the parent artboard or group as one item.
|
||||
\li \uicontrol Skipped completely skips the selected layer.
|
||||
\endlist
|
||||
\li In the \uicontrol {QML Type} field, specify the QML type or
|
||||
\li In the \uicontrol {Component} field, specify the component or
|
||||
\l {Shapes}{Qt Quick Studio Component} to morph this
|
||||
layer into. The component that is generated during import will be
|
||||
of this type. For example, if you drew a rectangle, you can export
|
||||
it as a \l {basic-rectangle}{Rectangle} component.
|
||||
You can provide the import statement of the module where the QML
|
||||
type is defined in the \uicontrol {QML Imports} field.
|
||||
You can provide the import statement of the module where the
|
||||
component is defined in the \uicontrol {Imports} field.
|
||||
\note The implicit properties except position and size are not
|
||||
applied when the \uicontrol {Component} is defined. For example, all text
|
||||
properties will be ignored if \uicontrol {Component} is defined
|
||||
for a text layer, but explicit properties defined in the \uicontrol
|
||||
{Properties} field will be applied.
|
||||
\li Select the \uicontrol {Render Text} check box to render the text
|
||||
layer as an asset. The layer will be exported as an asset and the
|
||||
text data will not be exported. This allows the text layer to be
|
||||
merged to parent artboard or group as well.
|
||||
\li In the \uicontrol {QML Imports} field, enter
|
||||
additional import statements to have them added to the generated QML
|
||||
file. For example, to use Qt Quick Controls 2.3, you need the
|
||||
import statement \c {QtQuick.Controls 2.3} and to use Qt Quick
|
||||
Studio Components 1.0, you need the import statement
|
||||
\c {QtQuick.Studio.Components 1.0}. You can also import a module as
|
||||
an alias.
|
||||
\li In the \uicontrol {Properties} field, specify properties for the QML
|
||||
type. You can add and modify properties in \QDS.
|
||||
\li In the \uicontrol {Imports} field, enter additional import statements
|
||||
to have them added to the generated code file. For example, to use
|
||||
Qt Quick Controls 2.3, you need the import statement
|
||||
\c {QtQuick.Controls 2.3} and to use Qt Quick Studio Components 1.0,
|
||||
you need the import statement \c {QtQuick.Studio.Components 1.0}.
|
||||
You can also import a module as an alias.
|
||||
\li In the \uicontrol {Properties} field, specify properties for the
|
||||
component. You can add and modify properties in \QDS.
|
||||
\li Select the \uicontrol Alias check box to export the item generated
|
||||
from this layer as an alias in the parent component.
|
||||
\li Select the \uicontrol Clip check box to enable
|
||||
clipping in the type generated from the layer. The generated type
|
||||
will clip its own painting, as well as the painting of its children,
|
||||
to its bounding rectangle.
|
||||
\li Select the \uicontrol Clip check box to enable clipping in the
|
||||
component generated from the layer. The generated component will clip
|
||||
its own painting, as well as the painting of its children, to its
|
||||
bounding rectangle.
|
||||
\li Select the \uicontrol Visible check box to determine the visibility
|
||||
of the layer.
|
||||
\li In the \uicontrol Annotations field, specify annotation for the
|
||||
component. See \l {Annotating Designs}.
|
||||
\li Select the \uicontrol Settings tab to specify the export path and
|
||||
asset format.
|
||||
\li Select \uicontrol Export to copy your assets to the export path you
|
||||
@@ -258,8 +264,8 @@
|
||||
\section1 Exporting Library Symbols
|
||||
|
||||
\QBSK can handle symbols used from a local library. Before you use \QBSK to export a document
|
||||
that contains remote symbols, you must annotate the Sketch document of the local library for
|
||||
QML export.
|
||||
that contains remote symbols, you must prepare the Sketch document of the local library with
|
||||
\QBSK for export.
|
||||
|
||||
For more information about Sketch libraries, see Sketch documentation.
|
||||
|
||||
|
@@ -85,7 +85,7 @@
|
||||
editor for your system, and the \c sort tool are preconfigured for
|
||||
use. You can change their default configurations and configure new
|
||||
tools.
|
||||
\li \l{Managing Data Collection Settings}
|
||||
\li \l{Managing Data Collection}
|
||||
|
||||
\if defined (qtcreator)
|
||||
You can enable \QC to report crashes automatically. If you agreed to
|
||||
@@ -96,7 +96,8 @@
|
||||
You can enable \QDS to report crashes automatically. If you enable
|
||||
the telemetry plugin, you can turn on the pseudonymous user
|
||||
statistics collection and determine what type of data is collected
|
||||
and transmitted to the backend storage.
|
||||
and transmitted to the backend storage. You can also modify
|
||||
settings for collecting user feedback.
|
||||
\endif
|
||||
\endlist
|
||||
*/
|
||||
|
@@ -75,15 +75,16 @@
|
||||
to replace transition lines with connections to real signals
|
||||
from UI controls, as described in \l{Simulating Events}.
|
||||
\li To set up alternative pathways between flow items, use
|
||||
\uicontrol {Flow Decision} components from \l Library, as
|
||||
described in \l{Simulating Conditions}.
|
||||
\uicontrol {Flow Decision} components from \l Library >
|
||||
\uicontrol Components > \uicontrol {Flow View}, as described in
|
||||
\l{Simulating Conditions}.
|
||||
\li Use \l{Adding States}{states} in flows to modify the appearance
|
||||
of components on screens in response to user interaction, as
|
||||
described in \l{Applying States in Flows}.
|
||||
\li Use \uicontrol {Flow Wildcard} components from \uicontrol Library
|
||||
to prioritize events from other applications and to stop some
|
||||
screens from appearing on others, as described in
|
||||
\l{Reacting to External Events}.
|
||||
\li Use \uicontrol {Flow Wildcard} components from \uicontrol Library >
|
||||
\uicontrol Components > \uicontrol {Flow View} to prioritize events
|
||||
from other applications and to stop some screens from appearing on
|
||||
others, as described in \l{Reacting to External Events}.
|
||||
\endlist
|
||||
*/
|
||||
|
||||
@@ -188,10 +189,10 @@
|
||||
\image studio-flow-item.png "Custom Flow Item in Library"
|
||||
|
||||
\note You must use the wizard to create the flow items. After you create
|
||||
a flow view, the \uicontrol {Flow View} section becomes visible in
|
||||
\uicontrol Library. It contains a \uicontrol {Flow Item} component that
|
||||
you can use to \l{Applying States in Flows}{apply states to flow items},
|
||||
and that you should use solely for that purpose.
|
||||
a flow view, the \uicontrol {Flow View} module is added to \uicontrol Library
|
||||
> \uicontrol Components. It contains a \uicontrol {Flow Item} component that
|
||||
you can use to \l{Applying States in Flows}{apply states to flow items}, and
|
||||
that you should use solely for that purpose.
|
||||
|
||||
To add flow items:
|
||||
|
||||
@@ -202,16 +203,16 @@
|
||||
to create flow items for each screen in the UI.
|
||||
\li Add content to the flow item in one of the following ways:
|
||||
\list
|
||||
\li Drag and drop components from \l Library to a flow
|
||||
\li Drag-and-drop components from \uicontrol Library to a flow
|
||||
item in \l {Form Editor} or \l Navigator.
|
||||
\li Drag a screen from \uicontrol Library >
|
||||
\li Drag a screen from \uicontrol Library > \uicontrol Components
|
||||
\uicontrol {My Components} to a flow item in
|
||||
\uicontrol {Form Editor} or \uicontrol Navigator.
|
||||
\endlist
|
||||
\li In \l Properties, edit the properties of each flow item.
|
||||
\endlist
|
||||
|
||||
You can now drag the flow items from \uicontrol Library >
|
||||
You can now drag the flow items from \uicontrol Library > \uicontrol Components
|
||||
\uicontrol {My Components} to the flow view in \uicontrol {Form Editor}
|
||||
or \uicontrol Navigator. When you have all the flow items in place, you can
|
||||
\l{Adding Action Areas and Transitions}{add action areas} to them to create
|
||||
@@ -354,7 +355,7 @@
|
||||
\endlist
|
||||
|
||||
You can specify the following properties to change the appearance of
|
||||
transition lines in \l{Form Editor}:
|
||||
transition lines in \uicontrol {Form Editor}:
|
||||
|
||||
\image studio-flow-transition-line-properties.png "Flow Transition Line properties"
|
||||
|
||||
@@ -543,9 +544,9 @@
|
||||
To simulate conditions:
|
||||
|
||||
\list 1
|
||||
\li Drag a \uicontrol {Flow Decision} component from \l Library
|
||||
to a \l{Adding Flow Views}{flow view} in \l Navigator or
|
||||
\l {Form Editor}.
|
||||
\li Drag a \uicontrol {Flow Decision} component from \l Library >
|
||||
\uicontrol Components \uicontrol {Flow View} to a
|
||||
\l{Adding Flow Views}{flow view} in \l Navigator or \l {Form Editor}.
|
||||
\li Select the flow item where you want the application to start in
|
||||
\uicontrol Navigator or \uicontrol {Form Editor}, and then select
|
||||
\uicontrol {Flow} > \uicontrol {Set Flow Start} in the context menu.
|
||||
@@ -612,7 +613,8 @@
|
||||
You can use \l{Adding States}{states} in flows to modify the appearance
|
||||
of \l{glossary-component}{components} in flow items in response to user
|
||||
interaction, for example. For this purpose, you use the
|
||||
\uicontrol {Flow Item} components available in \l Library.
|
||||
\uicontrol {Flow Item} components available in \l Library >
|
||||
\uicontrol Components > \uicontrol {Flow View}.
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||
@@ -660,9 +662,10 @@
|
||||
To use wildcards:
|
||||
|
||||
\list 1
|
||||
\li Drag a \uicontrol {Flow Wildcard} component from \l Library
|
||||
to an \l{Adding Action Areas and Transitions}{action area} in
|
||||
\l Navigator or \l {Form Editor}.
|
||||
\li Drag a \uicontrol {Flow Wildcard} component from \l Library >
|
||||
\uicontrol Components > \uicontrol {Flow View} to an
|
||||
\l{Adding Action Areas and Transitions}{action area} in \l Navigator
|
||||
or \l {Form Editor}.
|
||||
\li In \l Properties, select flow items to add them to the
|
||||
positive and negative list of the action area.
|
||||
\endlist
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Bridge documentation.
|
||||
@@ -33,10 +33,11 @@
|
||||
\image studio-imported-assets.png "UI imported into Qt Design Studio"
|
||||
|
||||
\QB enables you to export assets and then import them to a \QDS project
|
||||
as image and QML files for editing in the \uicontrol {Form Editor}. If you
|
||||
make changes to your design in the design tool, you can merge the changes
|
||||
into existing QML files without overwriting the changes you have made in
|
||||
\QDS. For more information, see \l {Exporting from Design Tools}.
|
||||
as image and QML files for editing in \l {Form Editor}. If you make changes
|
||||
to your design in the design tool that you originally used to create it,
|
||||
you can merge the changes into existing QML files without overwriting the
|
||||
changes you have made in \QDS. For more information, see
|
||||
\l {Exporting from Design Tools}.
|
||||
|
||||
\note Attempting to import assets exported on another system might fail.
|
||||
|
||||
@@ -53,8 +54,8 @@
|
||||
create an empty project.
|
||||
\li In \uicontrol Projects, double-click \e Screen01.ui.qml to move to
|
||||
the Design mode.
|
||||
\li Select \uicontrol Library > \uicontrol Assets >
|
||||
\uicontrol {Add New Assets}.
|
||||
\li Select \l Library > \uicontrol Assets > \inlineimage plus.png
|
||||
.
|
||||
\li Select the folder where you exported the assets.
|
||||
\li Select \uicontrol {Exported Assets (*.metadata)} in the dropdown
|
||||
menu to filter \e .metadata files.
|
||||
@@ -85,12 +86,12 @@
|
||||
might take a little while for complex projects.
|
||||
\endlist
|
||||
|
||||
The imported assets are displayed in the \uicontrol Assets tab in the
|
||||
\uicontrol Library as PNG images. The components that you specified in
|
||||
the design tool are displayed in the \uicontrol {My QML Components} tab,
|
||||
as well as in the \uicontrol Projects view as separate QML files. To
|
||||
start using them, drag and drop them from \uicontrol Library to
|
||||
\uicontrol {Form Editor} or \uicontrol Navigator.
|
||||
The imported assets are displayed in \uicontrol Library > \uicontrol Assets
|
||||
as PNG images. The components that you specified in the design tool are
|
||||
displayed in \uicontrol Library > \uicontrol Components >
|
||||
\uicontrol {My Components} as well as in the \uicontrol Projects view as
|
||||
separate QML files. To start using them, drag-and-drop them from
|
||||
\uicontrol Library to \uicontrol {Form Editor} or \uicontrol Navigator.
|
||||
|
||||
\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
|
||||
@@ -98,7 +99,8 @@
|
||||
|
||||
After importing the metadata files, wait a few moments to allow all
|
||||
imported assets to appear in your project files before selecting your
|
||||
metadata filename from \uicontrol {QML Imports} > \uicontrol {Add Imports}.
|
||||
metadata filename from \uicontrol Assets > \inlineimage plus.png
|
||||
.
|
||||
|
||||
If asset importer conflicts, warnings, and errors are displayed in the
|
||||
\uicontrol {Asset Import} dialog while importing, fix the issues in
|
||||
|
@@ -191,6 +191,7 @@
|
||||
\li \l{Searching with the Locator}
|
||||
\endlist
|
||||
\li \l{Refactoring}
|
||||
\li \l{Applying Refactoring Actions}
|
||||
\li \l{Configuring the Editor}
|
||||
\list
|
||||
\li \l{Specifying Text Editor Settings}
|
||||
@@ -210,7 +211,12 @@
|
||||
\li \l{Profiling QML Applications}
|
||||
\endlist
|
||||
\li \l{Using External Tools}
|
||||
\li \l{Managing Data Collection Settings}
|
||||
\li \l{Managing Data Collection}
|
||||
\list
|
||||
\li \l {Collecting Usage Statistics}
|
||||
\li \l {Collecting User Feedback}
|
||||
\li \l {Reporting Crashes}
|
||||
\endlist
|
||||
\endlist
|
||||
\li \l{Help}
|
||||
\list
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt 3D Studio.
|
||||
@@ -161,7 +161,8 @@
|
||||
|
||||
\section2 Importing Assets
|
||||
\list 1
|
||||
\li In the \uicontrol Library view, select \uicontrol {Add New Assets}.
|
||||
\li Select \uicontrol Library > \uicontrol Assets > \inlineimage plus.png
|
||||
.
|
||||
\image exporting-from-qt3ds/09-add-new-assets.png
|
||||
|
||||
\li Select the \c .uia file for the \Q3DS project you wish to import, and
|
||||
@@ -173,7 +174,7 @@
|
||||
\image exporting-from-qt3ds/11-import.png "Import the file"
|
||||
|
||||
\li The 2D assets imported from \Q3DS now appear in \uicontrol Library
|
||||
under \uicontrol Assets tab.
|
||||
> \uicontrol Assets.
|
||||
\image exporting-from-qt3ds/12-imported-image-assets.png "Imported assets in Library"
|
||||
|
||||
\li The QML components generated from the imported \Q3DS project now appear
|
||||
@@ -216,8 +217,8 @@
|
||||
\section2 Converting 3D Elements
|
||||
|
||||
\list 1
|
||||
\li Drag subpresentation_ADAS from \uicontrol {My QML Components} in \uicontrol
|
||||
Library into layer folder in \uicontrol Navigator.
|
||||
\li Drag subpresentation_ADAS from \uicontrol Library > \uicontrol Components
|
||||
> {My 3D Components} into layer folder in \uicontrol Navigator.
|
||||
\image exporting-from-qt3ds/20-drag-subpresentation-adas-into-layer.png "Drag into layer"
|
||||
|
||||
\li To delete the old subpresentation rectangle, right-click on the file
|
||||
@@ -289,10 +290,10 @@
|
||||
\image exporting-from-qt3ds/32-rename-the-qml-stream-file.png "The QML stream file names should start with a capital letter"
|
||||
|
||||
\li Return to \QDS and enter the MyOwnCluster component. The QML stream
|
||||
component now appears in \uicontrol {My QML Components}.
|
||||
component now appears in \uicontrol {My 3D Components}.
|
||||
\image exporting-from-qt3ds/33-see-qml-stream-component-in-myqmlcomponents.png "QML stream in My QML Components"
|
||||
|
||||
\li Drag and drop the QML stream component to MyOwnCluster in \uicontrol
|
||||
\li Drag-and-drop the QML stream component to MyOwnCluster in \uicontrol
|
||||
Navigator.
|
||||
\image exporting-from-qt3ds/34-drag-to-myowncluster-in-navigator.png "Drag the QML stream component to MyOwnCluster"
|
||||
|
||||
|
@@ -41,7 +41,7 @@
|
||||
\image studio-qtquick-3d-components.png "Qt Quick 3D components in Library"
|
||||
|
||||
You can add a camera to your scene by dragging-and-dropping one from
|
||||
\l Library > \uicontrol Components > \uicontrol QtQuick3D > \uicontrol
|
||||
\l Library > \uicontrol Components > \uicontrol {Qt Quick 3D} > \uicontrol
|
||||
{Qt Quick 3D} to \l {3D Editor} or to a 3D view in \l Navigator.
|
||||
If the cameras are not displayed in \uicontrol Library, you should add the
|
||||
\uicontrol QtQuick3D module to your project, as described in
|
||||
|
@@ -31,10 +31,11 @@
|
||||
\title Using 3D Components
|
||||
|
||||
To use 3D components, you need to first add the required modules to your
|
||||
project in \l Library. For more information, see
|
||||
\l{Adding and Removing Modules}. You can then add 3D components to your scene
|
||||
by dragging-and-dropping them from \uicontrol Library > \uicontrol Components >
|
||||
\uicontrol QtQuick3D group to \l {3D Editor} or to a 3D view in \l Navigator.
|
||||
project in \l Library > \uicontrol Components > \inlineimage plus.png
|
||||
. For more information, see \l{Adding and Removing Modules}. You can then
|
||||
add 3D components to your scene by dragging-and-dropping them from
|
||||
\uicontrol Library > \uicontrol Components > \uicontrol {Qt Quick 3D} to
|
||||
\l {3D Editor} or to a 3D view in \l Navigator.
|
||||
|
||||
\note Using 3D components will affect the performance of your UI. You should
|
||||
not use 3D components if the same results can be achieved using 2D
|
||||
@@ -46,8 +47,8 @@
|
||||
\section1 Getting Started Videos
|
||||
|
||||
The following video shows you how to add the components included in the
|
||||
\uicontrol QtQuick3D module, such as 3D models, cameras, and lights, to your
|
||||
scene:
|
||||
\uicontrol {Qt Quick 3D} module, such as 3D models, cameras, and lights,
|
||||
to your scene:
|
||||
\youtube u3kZJjlk3CY
|
||||
|
||||
See the next video to learn more about the custom shader utilities, 3D
|
||||
|
@@ -45,7 +45,7 @@
|
||||
\l {Using Materials and Shaders}{materials}. If your scene did not contain
|
||||
them, you can add the corresponding \l {Using 3D Components}{Qt Quick 3D}
|
||||
components from \l Library > \uicontrol Components > \inlineimage plus.png
|
||||
> \uicontrol QtQuick3D > \uicontrol {Qt Quick 3D}.
|
||||
> \uicontrol {Qt Quick 3D} > \uicontrol {Qt Quick 3D}.
|
||||
|
||||
You can use the \l{Summary of the 3D Editor Toolbar Buttons}{toolbar buttons}
|
||||
to \e transform 3D components and manipulate the 3D scene. Transformation
|
||||
@@ -116,11 +116,11 @@
|
||||
\image studio-3d-editor-axis-helper.png "Axis helper in 3D Editor"
|
||||
|
||||
You can use scene cameras (2) to view the \uicontrol View3D component from a
|
||||
specific angle in \l {Form Editor} while editing scenes. Different
|
||||
types of cameras are available in \uicontrol Library > \uicontrol Components
|
||||
> \uicontrol QtQuick3D > \uicontrol {Qt Quick 3D}. For more information about
|
||||
using cameras in the scene, the available camera types, and their properties,
|
||||
see \l{Using Scene Camera}.
|
||||
specific angle in \l {Form Editor} while editing scenes. Different types of
|
||||
cameras are available in \uicontrol Library > \uicontrol Components
|
||||
> \uicontrol {Qt Quick 3D} > \uicontrol {Qt Quick 3D}. For more information
|
||||
about using cameras in the scene, the available camera types, and their
|
||||
properties, see \l{Using Scene Camera}.
|
||||
|
||||
\section1 Using Global and Local Orientation
|
||||
|
||||
|
@@ -34,8 +34,9 @@
|
||||
|
||||
\QDS provides a set of 3D effects, which are visible in \l {Form Editor}.
|
||||
To apply a visual effect to a scene, drag-and-drop an effect from \l Library
|
||||
> \uicontrol Components > \uicontrol QtQuick3D > \uicontrol {Qt Quick 3D Effects}
|
||||
to a \uicontrol View3D component in \l Navigator.
|
||||
> \uicontrol Components > \uicontrol {Qt Quick 3D} >
|
||||
\uicontrol {Qt Quick 3D Effects} to a \uicontrol View3D component in
|
||||
\l Navigator.
|
||||
|
||||
You can use the \l Effect component available in \uicontrol
|
||||
{Qt Quick 3D Effects} > \uicontrol {Custom Shader Utils} as the base
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Bridge documentation.
|
||||
@@ -56,8 +56,9 @@
|
||||
To import 3D assets to \QDS projects:
|
||||
|
||||
\list 1
|
||||
\li In the Design mode, select \uicontrol Library > \uicontrol Assets
|
||||
> \uicontrol {Add New Assets}.
|
||||
\li In the \l{Design Views}{Design mode}, select \l Library >
|
||||
\uicontrol Assets > \inlineimage plus.png
|
||||
.
|
||||
\li Select \uicontrol {3D Assets} in the dropdown menu to filter 3D
|
||||
graphics files.
|
||||
\li Select a file to import, and then select \uicontrol Open.
|
||||
@@ -67,6 +68,7 @@
|
||||
\li When the import is done, select \uicontrol Close.
|
||||
\endlist
|
||||
|
||||
You can open the imported files in the Design mode for editing in the
|
||||
\l{Editing 3D Scenes}{3D Editor}.
|
||||
The 3D asset you added to the project now appears in \uicontrol Library >
|
||||
\uicontrol Components > \uicontrol {My 3D Components}. You can add it to
|
||||
your UI by dragging-and-dropping it to \l {3D Editor}.
|
||||
*/
|
||||
|
@@ -34,9 +34,15 @@
|
||||
|
||||
Light components are the primary source of lighting in a \QDS scene.
|
||||
As a secondary light source, you can use \l{Using Image-based Lighting}
|
||||
{image-based lighting}. If the light components are not displayed in
|
||||
\l Library, you should add the \uicontrol QtQuick3D module to your project,
|
||||
as described in \l {Adding and Removing Modules}.
|
||||
{image-based lighting}.
|
||||
|
||||
To add light components to your UI, drag-and-drop them from \l Library
|
||||
> \uicontrol Components > \uicontrol {Qt Quick 3D} to \l {3D Editor} or to
|
||||
\l Navigator > \uicontrol Scene Environment > \uicontrol Scene.
|
||||
|
||||
If you cannot find the light components in \uicontrol Library, add the
|
||||
\uicontrol {Qt Quick 3D} module to your project as instructed in
|
||||
\l {Adding and Removing Modules}.
|
||||
|
||||
By default, all imported scenes are created with one directional light.
|
||||
You can use the following components to add lights:
|
||||
|
@@ -37,7 +37,7 @@
|
||||
|
||||
To apply a 3D material to a component, you should first delete the default
|
||||
material and then drag-and-drop a new material from \l Library >
|
||||
\uicontrol Components > \uicontrol QtQuick3D >
|
||||
\uicontrol Components > \uicontrol {Qt Quick 3D Materials} >
|
||||
\uicontrol {Qt Quick 3D Materials} to a model component in \l Navigator.
|
||||
The materials you add to the model are listed in the model component's
|
||||
\l Properties view. You can apply the same material to another component as
|
||||
|
@@ -41,8 +41,8 @@
|
||||
component is shaded by adding \l{Using 3D Materials}{materials} to the model.
|
||||
|
||||
You can drag-and-drop a model from \uicontrol Library > \uicontrol Components
|
||||
> \uicontrol QtQuick3D > \uicontrol {Qt Quick 3D} to \l {3D Editor} or to
|
||||
\l Navigator > \uicontrol {Scene Environment} > \uicontrol Scene. If the
|
||||
> \uicontrol {Qt Quick 3D} > \uicontrol {Qt Quick 3D} to \l {3D Editor} or
|
||||
to \l Navigator > \uicontrol {Scene Environment} > \uicontrol Scene. If the
|
||||
models are not displayed in \uicontrol Library, you should add the
|
||||
\uicontrol QtQuick3D module to your project, as described in
|
||||
\l {Adding and Removing Modules}.
|
||||
|
@@ -35,11 +35,11 @@
|
||||
to transform and set the opacity and visibility of multiple 3D components in
|
||||
the \l Properties view simultaneously. To add a \uicontrol Group component
|
||||
to your scene, drag-and-drop it from \l Library > \uicontrol Components >
|
||||
\uicontrol {QtQuick3D} > \uicontrol {Qt Quick 3D} to the \l {3D Editor} view
|
||||
or to a \uicontrol Scene component in \l Navigator. If the \uicontrol Group
|
||||
component is not displayed in\uicontrol Library, you should add the
|
||||
\uicontrol QtQuick3D module to your project, as described in
|
||||
\l {Adding and Removing Modules}.
|
||||
\uicontrol {Qt Quick 3D} > \uicontrol {Qt Quick 3D} to the \l {3D Editor}
|
||||
view or to \l Navigator > \uicontrol {Scene Environment} > \uicontrol Scene.
|
||||
If the \uicontrol Group component is not displayed in \uicontrol Library,
|
||||
you should add the \uicontrol {Qt Quick 3D} module to your project, as
|
||||
described in \l {Adding and Removing Modules}.
|
||||
|
||||
Select the \uicontrol Group component in \uicontrol Navigator to modify its
|
||||
properties in the \l Properties view.
|
||||
|
@@ -113,21 +113,22 @@
|
||||
|
||||
\section1 Applying Textures to Materials
|
||||
|
||||
Drag-and-drop an image from \l Library > \uicontrol Assets on a material to
|
||||
Drag-and-drop an image from \l Library > \l Assets on a material to
|
||||
create a texture component. Dragging an image to a default or principled
|
||||
material opens a \uicontrol {Select Texture Property} dialog. You can select
|
||||
the property to attach the texture to in the \uicontrol {Set texture to property}
|
||||
field. For a custom material, you must assign the texture to a map. If the
|
||||
\uicontrol Texture component is not displayed in \uicontrol Library, you
|
||||
should add the \uicontrol QtQuick3D module to your project, as described in
|
||||
\l {Adding and Removing Modules}.
|
||||
should add the \uicontrol {Qt Quick 3D} module to your project, as described
|
||||
in \l {Adding and Removing Modules}.
|
||||
|
||||
To use Texture components to apply textures to materials, drag-and-drop a
|
||||
Texture component from \l Library to a material component in \l Navigator.
|
||||
The new texture should now be visible in \l {Form Editor} and \l {3D Editor}.
|
||||
\note If the colors in your texture are not visualized correctly, you should
|
||||
check the color in the \uicontrol Diffuse property of the material and try
|
||||
changing it to white (#ffffff).
|
||||
Texture component from \uicontrol Library > \uicontrol Components >
|
||||
\uicontrol {Qt Quick 3D} > \uicontrol {Qt Quick 3D} to a material component
|
||||
in \l Navigator. The new texture should now be visible in \l {Form Editor}
|
||||
and \l {3D Editor}. \note If the colors in your texture are not visualized
|
||||
correctly, you should check the color in the \uicontrol Diffuse property of
|
||||
the material and try changing it to white (#ffffff).
|
||||
|
||||
\image studio-qtquick-3d-material-texture.png "Material properties"
|
||||
|
||||
|
@@ -32,16 +32,16 @@
|
||||
|
||||
To create a Qt Quick 3D UI project, we recommend using a \uicontrol
|
||||
{Qt Quick 3D Application Template} wizard template that adds the
|
||||
\l {Using 3D Components}{Qt Quick 3D} components to \l Library and contains
|
||||
a 3D view. A 3D view component includes a \l {Setting Scene Environment}
|
||||
{scene environment} as well as a scene \l {Using Lights}{light},
|
||||
\l {Using Scene Camera}{camera}, and \l {Adding 3D Models}{model}. A default
|
||||
\l {Using Materials and Shaders}{material} is attached to the model. You can
|
||||
attach \l {Attaching Textures to Materials}{textures} to materials. For more
|
||||
information about creating projects, see \l{Creating Projects}.
|
||||
\l {Using 3D Components}{Qt Quick 3D} components to \l Library >
|
||||
\uicontrol Components and contains a 3D view. A 3D view component includes a
|
||||
\l {Setting Scene Environment}{scene environment} as well as a scene
|
||||
\l {Using Lights}{light}, \l {Using Scene Camera}{camera}, and
|
||||
\l {Adding 3D Models}{model}. A default \l {Using Materials and Shaders}{material}
|
||||
is attached to the model. You can attach \l {Attaching Textures to Materials}{textures}
|
||||
to materials. For more information about creating projects, see \l{Creating Projects}.
|
||||
|
||||
To add a 3D view to some other kind of a project, you should first add the
|
||||
\uicontrol QtQuick3D module to \uicontrol Library, as described in
|
||||
To add a 3D view to some other kind of a project, you first need to add the
|
||||
\uicontrol {Qt Quick 3D} module to \uicontrol Library, as described in
|
||||
\l {Adding and Removing Modules}.
|
||||
|
||||
\image studio-qtquick-3d-components.png "Qt Quick 3D components in Library"
|
||||
|
4
src/libs/3rdparty/cplusplus/Lexer.cpp
vendored
@@ -926,11 +926,15 @@ bool Lexer::scanOptionalIntegerSuffix(bool allowU)
|
||||
yyinp();
|
||||
if (_yychar == 'l')
|
||||
yyinp();
|
||||
if (_yychar == 'u' || _yychar == 'U')
|
||||
yyinp();
|
||||
return true;
|
||||
case 'L':
|
||||
yyinp();
|
||||
if (_yychar == 'L')
|
||||
yyinp();
|
||||
if (_yychar == 'u' || _yychar == 'U')
|
||||
yyinp();
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@@ -111,6 +111,7 @@ enum class HighlightingType : quint8
|
||||
TemplateTemplateParameter,
|
||||
AngleBracketOpen,
|
||||
AngleBracketClose,
|
||||
DoubleAngleBracketClose, // clang parses ">>" as one token, even if it's closing a nested template
|
||||
TernaryIf,
|
||||
TernaryElse,
|
||||
};
|
||||
|
@@ -565,34 +565,12 @@ private:
|
||||
class IdsThatShouldNotBeUsedInDesigner : public QStringList
|
||||
{
|
||||
public:
|
||||
IdsThatShouldNotBeUsedInDesigner() : QStringList({"top",
|
||||
"bottom",
|
||||
"left",
|
||||
"right",
|
||||
"width",
|
||||
"height",
|
||||
"x",
|
||||
"y",
|
||||
"opacity",
|
||||
"parent",
|
||||
"item",
|
||||
"flow",
|
||||
"color",
|
||||
"margin",
|
||||
"padding",
|
||||
"border",
|
||||
"font",
|
||||
"text",
|
||||
"source",
|
||||
"state",
|
||||
"visible",
|
||||
"focus",
|
||||
"data",
|
||||
"clip",
|
||||
"layer",
|
||||
"scale",
|
||||
"enabled",
|
||||
"anchors"})
|
||||
IdsThatShouldNotBeUsedInDesigner()
|
||||
: QStringList({"top", "bottom", "left", "right", "width", "height",
|
||||
"x", "y", "opacity", "parent", "item", "flow",
|
||||
"color", "margin", "padding", "print", "border", "font",
|
||||
"text", "source", "state", "visible", "focus", "data",
|
||||
"clip", "layer", "scale", "enabled", "anchors"})
|
||||
{}
|
||||
};
|
||||
|
||||
|
@@ -117,6 +117,7 @@ bool ignore(ClangBackEnd::HighlightingType type)
|
||||
case HighlightingType::TemplateTemplateParameter:
|
||||
case HighlightingType::AngleBracketOpen:
|
||||
case HighlightingType::AngleBracketClose:
|
||||
case HighlightingType::DoubleAngleBracketClose:
|
||||
case HighlightingType::TernaryIf:
|
||||
case HighlightingType::TernaryElse:
|
||||
return true;
|
||||
@@ -151,6 +152,8 @@ TextEditor::HighlightingResult toHighlightingResult(
|
||||
result.kind = CppTools::SemanticHighlighter::AngleBracketOpen;
|
||||
else if (tokenInfo.types.mixinHighlightingTypes.contains(HighlightingType::AngleBracketClose))
|
||||
result.kind = CppTools::SemanticHighlighter::AngleBracketClose;
|
||||
else if (tokenInfo.types.mixinHighlightingTypes.contains(HighlightingType::DoubleAngleBracketClose))
|
||||
result.kind = CppTools::SemanticHighlighter::DoubleAngleBracketClose;
|
||||
else if (tokenInfo.types.mixinHighlightingTypes.contains(HighlightingType::TernaryIf))
|
||||
result.kind = CppTools::SemanticHighlighter::TernaryIf;
|
||||
else if (tokenInfo.types.mixinHighlightingTypes.contains(HighlightingType::TernaryElse))
|
||||
|
@@ -783,6 +783,7 @@ public:
|
||||
printer.showFunctionSignatures = true;
|
||||
printer.showReturnTypes = true;
|
||||
printer.showArgumentNames = true;
|
||||
printer.showTemplateParameters = true;
|
||||
Utils::ChangeSet headerChangeSet;
|
||||
const CppRefactoringChanges refactoring(snapshot());
|
||||
const QString filename = currentFile()->fileName();
|
||||
@@ -1906,7 +1907,7 @@ void CppEditorPlugin::test_quickfix_InsertVirtualMethods_implementationFile()
|
||||
original =
|
||||
"class BaseA {\n"
|
||||
"public:\n"
|
||||
" virtual int a() = 0;\n"
|
||||
" virtual int a(const std::vector<int> &v) = 0;\n"
|
||||
"};\n\n"
|
||||
"class Derived : public Bas@eA {\n"
|
||||
"public:\n"
|
||||
@@ -1915,7 +1916,7 @@ void CppEditorPlugin::test_quickfix_InsertVirtualMethods_implementationFile()
|
||||
expected =
|
||||
"class BaseA {\n"
|
||||
"public:\n"
|
||||
" virtual int a() = 0;\n"
|
||||
" virtual int a(const std::vector<int> &v) = 0;\n"
|
||||
"};\n\n"
|
||||
"class Derived : public BaseA {\n"
|
||||
"public:\n"
|
||||
@@ -1923,7 +1924,7 @@ void CppEditorPlugin::test_quickfix_InsertVirtualMethods_implementationFile()
|
||||
"\n"
|
||||
" // BaseA interface\n"
|
||||
"public:\n"
|
||||
" virtual int a();\n"
|
||||
" virtual int a(const std::vector<int> &v);\n"
|
||||
"};\n";
|
||||
testFiles << Tests::QuickFixTestDocument::create("file.h", original, expected);
|
||||
|
||||
@@ -1932,7 +1933,7 @@ void CppEditorPlugin::test_quickfix_InsertVirtualMethods_implementationFile()
|
||||
expected =
|
||||
"#include \"file.h\"\n"
|
||||
"\n\n"
|
||||
"int Derived::a()\n"
|
||||
"int Derived::a(const std::vector<int> &v)\n"
|
||||
"{\n}";
|
||||
testFiles << Tests::QuickFixTestDocument::create("file.cpp", original, expected);
|
||||
|
||||
|
@@ -178,6 +178,7 @@ void SemanticHighlighter::onHighlighterResultAvailable(int from, int to)
|
||||
for (int i = from; i < to; ++i) {
|
||||
const HighlightingResult &result = m_watcher->future().resultAt(i);
|
||||
if (result.kind != AngleBracketOpen && result.kind != AngleBracketClose
|
||||
&& result.kind != DoubleAngleBracketClose
|
||||
&& result.kind != TernaryIf && result.kind != TernaryElse) {
|
||||
const QTextBlock block =
|
||||
m_baseTextDocument->document()->findBlockByNumber(result.line - 1);
|
||||
@@ -193,14 +194,20 @@ void SemanticHighlighter::onHighlighterResultAvailable(int from, int to)
|
||||
parentheses.second = getClearedParentheses(parentheses.first);
|
||||
}
|
||||
Parenthesis paren;
|
||||
if (result.kind == AngleBracketOpen)
|
||||
if (result.kind == AngleBracketOpen) {
|
||||
paren = {Parenthesis::Opened, '<', result.column - 1};
|
||||
else if (result.kind == AngleBracketClose)
|
||||
} else if (result.kind == AngleBracketClose) {
|
||||
paren = {Parenthesis::Closed, '>', result.column - 1};
|
||||
else if (result.kind == TernaryIf)
|
||||
} else if (result.kind == DoubleAngleBracketClose) {
|
||||
Parenthesis extraParen = {Parenthesis::Closed, '>', result.column - 1};
|
||||
extraParen.source = parenSource();
|
||||
parentheses.second.append(extraParen);
|
||||
paren = {Parenthesis::Closed, '>', result.column};
|
||||
} else if (result.kind == TernaryIf) {
|
||||
paren = {Parenthesis::Opened, '?', result.column - 1};
|
||||
else if (result.kind == TernaryElse)
|
||||
} else if (result.kind == TernaryElse) {
|
||||
paren = {Parenthesis::Closed, ':', result.column - 1};
|
||||
}
|
||||
QTC_ASSERT(paren.pos != -1, continue);
|
||||
paren.source = parenSource();
|
||||
parentheses.second << paren;
|
||||
|
@@ -61,6 +61,7 @@ public:
|
||||
VirtualFunctionDeclarationUse,
|
||||
AngleBracketOpen,
|
||||
AngleBracketClose,
|
||||
DoubleAngleBracketClose,
|
||||
TernaryIf,
|
||||
TernaryElse,
|
||||
};
|
||||
|
@@ -54,6 +54,7 @@ const char HeightTag[] = "height";
|
||||
|
||||
const char MetadataTag[] = "metadata";
|
||||
const char ChildrenTag[] = "children";
|
||||
const char CustomIdTag[] = "customId";
|
||||
const char QmlIdTag[] = "qmlId";
|
||||
const char ExportTypeTag[] = "exportType";
|
||||
const char ExportTypeComponent[] = "component";
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include "componentexporter.h"
|
||||
|
||||
#include "qmlitemnode.h"
|
||||
#include "annotation.h"
|
||||
|
||||
namespace {
|
||||
static QString capitalize(const QString &str)
|
||||
@@ -85,6 +86,9 @@ QJsonObject QmlDesigner::ItemNodeDumper::json(QmlDesigner::Component &component)
|
||||
metadata.insert(ExportTypeTag, ExportTypeChild);
|
||||
metadata.insert(TypeNameTag, QString::fromLatin1(m_node.type()));
|
||||
|
||||
if (m_node.hasCustomId())
|
||||
metadata.insert(CustomIdTag, m_node.customId());
|
||||
|
||||
QString typeId = component.exporter().componentUuid(m_node);
|
||||
if (!typeId.isEmpty())
|
||||
metadata.insert(TypeIdTag, typeId);
|
||||
|
@@ -116,18 +116,17 @@ bool ItemLibraryImport::updateCategoryVisibility(const QString &searchText, bool
|
||||
*changed = false;
|
||||
|
||||
for (const auto &category : m_categoryModel.categorySections()) {
|
||||
category->setCategoryVisible(ItemLibraryModel::loadCategoryVisibleState(category->categoryName()));
|
||||
bool categoryChanged = false;
|
||||
bool hasVisibleItems = category->updateItemVisibility(searchText, &categoryChanged);
|
||||
categoryChanged |= category->setVisible(hasVisibleItems);
|
||||
|
||||
if (!searchText.isEmpty() || category->isCategoryVisible()) {
|
||||
bool categoryChanged = false;
|
||||
bool hasVisibleItems = category->updateItemVisibility(searchText, &categoryChanged);
|
||||
categoryChanged |= category->setVisible(hasVisibleItems);
|
||||
*changed |= categoryChanged;
|
||||
|
||||
*changed |= categoryChanged;
|
||||
if (hasVisibleItems)
|
||||
hasVisibleCategories = true;
|
||||
|
||||
if (hasVisibleItems)
|
||||
hasVisibleCategories = true;
|
||||
}
|
||||
if (searchText.isEmpty())
|
||||
category->setCategoryVisible(ItemLibraryModel::loadCategoryVisibleState(category->categoryName()));
|
||||
}
|
||||
|
||||
return hasVisibleCategories;
|
||||
|
@@ -431,8 +431,10 @@ void ItemLibraryWidget::removeImport(const QString &importUrl)
|
||||
QTC_ASSERT(m_model, return);
|
||||
|
||||
ItemLibraryImport *importSection = m_itemLibraryModel->importByUrl(importUrl);
|
||||
if (importSection)
|
||||
if (importSection) {
|
||||
importSection->showAllCategories();
|
||||
m_model->changeImports({}, {importSection->importEntry()});
|
||||
}
|
||||
}
|
||||
|
||||
void ItemLibraryWidget::addImportForItem(const QString &importUrl)
|
||||
|
@@ -1,8 +1,11 @@
|
||||
find_package(Qt5 COMPONENTS QmlDebug REQUIRED)
|
||||
|
||||
add_qtc_plugin(QmlPreview
|
||||
DEPENDS QmlDebug QmlJS
|
||||
PLUGIN_DEPENDS Core ProjectExplorer QmlJSTools QtSupport ResourceEditor QmlProjectManager
|
||||
PUBLIC_DEPENDS QmlDebug
|
||||
DEPENDS QmlJS
|
||||
PLUGIN_DEPENDS
|
||||
Core ProjectExplorer QmlJSTools QtSupport
|
||||
ResourceEditor QmlProjectManager
|
||||
SOURCES
|
||||
qmlpreviewclient.cpp qmlpreviewclient.h
|
||||
qmlpreviewconnectionmanager.cpp qmlpreviewconnectionmanager.h
|
||||
@@ -34,6 +37,6 @@ find_file(have_qml_debug_translation_protocol
|
||||
)
|
||||
extend_qtc_plugin(QmlPreview
|
||||
CONDITION have_qml_debug_translation_protocol
|
||||
PUBLIC_DEPENDS Qt5::QmlDebugPrivate
|
||||
DEPENDS Qt5::QmlDebugPrivate
|
||||
PUBLIC_DEFINES "FOUND_QML_DEBUG_TRANSLATION_PROTOCOL"
|
||||
)
|
||||
|
@@ -40,9 +40,6 @@ QmlPreviewConnectionManager::QmlPreviewConnectionManager(QObject *parent) :
|
||||
QmlDebug::QmlDebugConnectionManager(parent)
|
||||
{
|
||||
setTarget(nullptr);
|
||||
m_createDebugTranslationClientMethod = [](QmlDebug::QmlDebugConnection *connection) {
|
||||
return std::make_unique<QmlPreview::QmlDebugTranslationClient>(connection);
|
||||
};
|
||||
}
|
||||
|
||||
QmlPreviewConnectionManager::~QmlPreviewConnectionManager() = default;
|
||||
|
@@ -105,6 +105,13 @@ static void defaultFpsHandler(quint16 frames[8])
|
||||
Core::MessageManager::writeSilently(QString::fromLatin1("QML preview: %1 fps").arg(frames[0]));
|
||||
}
|
||||
|
||||
static std::unique_ptr<QmlDebugTranslationClient> defaultCreateDebugTranslationClientMethod(QmlDebug::QmlDebugConnection *connection)
|
||||
{
|
||||
auto client = std::make_unique<QmlPreview::QmlDebugTranslationClient>(connection);
|
||||
return client;
|
||||
};
|
||||
|
||||
|
||||
class QmlPreviewPluginPrivate : public QObject
|
||||
{
|
||||
public:
|
||||
@@ -198,6 +205,7 @@ QmlPreviewPluginPrivate::QmlPreviewPluginPrivate(QmlPreviewPlugin *parent)
|
||||
m_fileLoader = &defaultFileLoader;
|
||||
m_fileClassifer = &defaultFileClassifier;
|
||||
m_fpsHandler = &defaultFpsHandler;
|
||||
m_createDebugTranslationClientMethod = &defaultCreateDebugTranslationClientMethod;
|
||||
|
||||
Core::ActionContainer *menu = Core::ActionManager::actionContainer(
|
||||
Constants::M_BUILDPROJECT);
|
||||
|
@@ -29,6 +29,7 @@ import welcome 1.0
|
||||
import StudioFonts 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
visible: true
|
||||
width: 270
|
||||
height: 175
|
||||
@@ -37,6 +38,8 @@ Item {
|
||||
|
||||
property alias downloadIcon: downloadCloud.visible
|
||||
|
||||
signal clicked()
|
||||
|
||||
onVisibleChanged: {
|
||||
animateOpacity.start()
|
||||
animateScale.start()
|
||||
@@ -92,6 +95,8 @@ Item {
|
||||
label.color = "#686868"
|
||||
}
|
||||
|
||||
onClicked: root.clicked()
|
||||
|
||||
Image {
|
||||
id: downloadCloud
|
||||
x: 210
|
||||
|
@@ -40,6 +40,7 @@ GridView {
|
||||
imageSource: typeof(thumbnail) === "undefined" ? "images/thumbnail_test.png" : thumbnail;
|
||||
labelText: displayName
|
||||
downloadIcon: typeof(showDownload) === "undefined" ? false : showDownload;
|
||||
onClicked: root.itemSelected(index, root.model.get(index))
|
||||
|
||||
SequentialAnimation {
|
||||
id: animation
|
||||
@@ -62,10 +63,5 @@ GridView {
|
||||
easing.type: Easing.InOutExpo
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: root.itemSelected(index, root.model.get(index))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -519,8 +519,10 @@ void SubmitEditorWidget::verifyDescription()
|
||||
int secondLineLength = 0;
|
||||
if (subjectLength >= 0) {
|
||||
const int secondLineStart = subjectLength + 1;
|
||||
secondLineLength = d->m_description.indexOf(newLine, secondLineStart)
|
||||
- secondLineStart;
|
||||
int secondLineEnd = d->m_description.indexOf(newLine, secondLineStart);
|
||||
if (secondLineEnd == -1)
|
||||
secondLineEnd = descriptionLength;
|
||||
secondLineLength = secondLineEnd - secondLineStart;
|
||||
} else {
|
||||
subjectLength = descriptionLength;
|
||||
}
|
||||
|
@@ -599,14 +599,18 @@ void TokenInfo::punctuationOrOperatorKind()
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_types.mixinHighlightingTypes.empty()
|
||||
&& kind != CXCursor_InclusionDirective
|
||||
&& kind != CXCursor_PreprocessingDirective) {
|
||||
if (m_types.mainHighlightingType == HighlightingType::Punctuation
|
||||
&& m_types.mixinHighlightingTypes.empty()
|
||||
&& kind != CXCursor_OverloadedDeclRef
|
||||
&& kind != CXCursor_InclusionDirective
|
||||
&& kind != CXCursor_PreprocessingDirective) {
|
||||
const ClangString spelling = m_token->spelling();
|
||||
if (spelling == "<")
|
||||
m_types.mixinHighlightingTypes.push_back(HighlightingType::AngleBracketOpen);
|
||||
else if (spelling == ">")
|
||||
m_types.mixinHighlightingTypes.push_back(HighlightingType::AngleBracketClose);
|
||||
else if (spelling == ">>")
|
||||
m_types.mixinHighlightingTypes.push_back(HighlightingType::DoubleAngleBracketClose);
|
||||
}
|
||||
|
||||
if (isOutputArgument())
|
||||
|
@@ -363,6 +363,50 @@ void tst_SimpleLexer::literals_data()
|
||||
;
|
||||
QTest::newRow("microsoft-suffix") << source << expectedTokenKindList;
|
||||
|
||||
source =
|
||||
"42u\n"
|
||||
"43U\n"
|
||||
"44ul\n"
|
||||
"45UL\n"
|
||||
"46uL\n"
|
||||
"47Ul\n"
|
||||
"48ull\n"
|
||||
"49ULL\n"
|
||||
"50uLL\n"
|
||||
"51Ull\n"
|
||||
"52l\n"
|
||||
"53L\n"
|
||||
"54ll\n"
|
||||
"55LL\n"
|
||||
"56lu\n"
|
||||
"57LU\n"
|
||||
"58lU\n"
|
||||
"59Lu\n"
|
||||
"60llu\n"
|
||||
"61llU\n"
|
||||
"62LLU\n"
|
||||
"63LLu\n"
|
||||
"64lL\n" // wrong
|
||||
"65Ll\n" // wrong
|
||||
"66luu\n" // wrong
|
||||
"67LUU\n" // wrong
|
||||
"68lul\n" // wrong
|
||||
"69LUL\n" // wrong
|
||||
;
|
||||
expectedTokenKindList =
|
||||
TokenKindList() << T_NUMERIC_LITERAL << T_NUMERIC_LITERAL << T_NUMERIC_LITERAL
|
||||
<< T_NUMERIC_LITERAL << T_NUMERIC_LITERAL << T_NUMERIC_LITERAL
|
||||
<< T_NUMERIC_LITERAL << T_NUMERIC_LITERAL << T_NUMERIC_LITERAL
|
||||
<< T_NUMERIC_LITERAL << T_NUMERIC_LITERAL << T_NUMERIC_LITERAL
|
||||
<< T_NUMERIC_LITERAL << T_NUMERIC_LITERAL << T_NUMERIC_LITERAL
|
||||
<< T_NUMERIC_LITERAL << T_NUMERIC_LITERAL << T_NUMERIC_LITERAL
|
||||
<< T_NUMERIC_LITERAL << T_NUMERIC_LITERAL << T_NUMERIC_LITERAL
|
||||
<< T_NUMERIC_LITERAL
|
||||
<< T_ERROR << T_ERROR << T_ERROR
|
||||
<< T_ERROR << T_ERROR << T_ERROR
|
||||
;
|
||||
QTest::newRow("integer-suffix") << source << expectedTokenKindList;
|
||||
|
||||
source =
|
||||
"R\"(raw text)\"\n"
|
||||
"R\"delimiter(raw text)delimiter\"\n"
|
||||
|
@@ -769,3 +769,22 @@ template<typename T>
|
||||
void func(T v) {
|
||||
GlobalVar = 5;
|
||||
}
|
||||
|
||||
static std::vector<std::pair<int, int>> pv;
|
||||
|
||||
template <class T, long S>
|
||||
struct vecn
|
||||
{
|
||||
T v[S];
|
||||
};
|
||||
|
||||
template <class T, long S>
|
||||
static inline constexpr vecn<T, S> operator<(vecn<T, S> a, vecn<T, S> b)
|
||||
{
|
||||
vecn<T, S> x = vecn<T, S>{};
|
||||
for(long i = 0; i < S; ++i)
|
||||
{
|
||||
x[i] = a[i] < b[i];
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
@@ -869,6 +869,7 @@ static const char *highlightingTypeToCStringLiteral(HighlightingType type)
|
||||
RETURN_TEXT_FOR_CASE(TemplateTemplateParameter);
|
||||
RETURN_TEXT_FOR_CASE(AngleBracketOpen);
|
||||
RETURN_TEXT_FOR_CASE(AngleBracketClose);
|
||||
RETURN_TEXT_FOR_CASE(DoubleAngleBracketClose);
|
||||
RETURN_TEXT_FOR_CASE(TernaryIf);
|
||||
RETURN_TEXT_FOR_CASE(TernaryElse);
|
||||
}
|
||||
|
@@ -1794,6 +1794,19 @@ TEST_F(TokenProcessor, TemplateSeparateDeclDef)
|
||||
ASSERT_THAT(infos[37], IsHighlightingMark(764u, 5u, 9u, HighlightingType::GlobalVariable));
|
||||
}
|
||||
|
||||
TEST_F(TokenProcessor, NestedTemplate)
|
||||
{
|
||||
const auto infos = translationUnit.tokenInfosInRange(sourceRange(773, 44));
|
||||
ASSERT_THAT(infos[12], HasTwoTypes(HighlightingType::Punctuation,
|
||||
HighlightingType::DoubleAngleBracketClose));
|
||||
}
|
||||
|
||||
TEST_F(TokenProcessor, OperatorInTemplate)
|
||||
{
|
||||
const auto infos = translationUnit.tokenInfosInRange(sourceRange(787, 28));
|
||||
ASSERT_THAT(infos[9], HasOnlyType(HighlightingType::Punctuation));
|
||||
}
|
||||
|
||||
Data *TokenProcessor::d;
|
||||
|
||||
void TokenProcessor::SetUpTestCase()
|
||||
|