Merge remote-tracking branch 'origin/8.0'
Conflicts: src/plugins/qmldesigner/qmldesignerprojectmanager.cpp Change-Id: I5106bb632c2a3a144287097137be45b0894b9ee4
@@ -43,10 +43,10 @@ Prerequisites:
|
||||
* Debugging Tools for Windows (optional, for MSVC debugging support with CDB)
|
||||
* On Mac OS X: latest Xcode
|
||||
* On Linux: GCC 7 or later
|
||||
* LLVM/Clang 10 or later (optional, LLVM/Clang 13 is recommended.
|
||||
* LLVM/Clang 10 or later (optional, LLVM/Clang 14 is recommended.
|
||||
See [instructions](#getting-llvmclang-for-the-clang-code-model) on how to
|
||||
get LLVM.
|
||||
The ClangFormat, ClangPchManager and ClangRefactoring use the LLVM C++ API.
|
||||
The ClangFormat plugin uses the LLVM C++ API.
|
||||
Since the LLVM C++ API provides no compatibility guarantee,
|
||||
if later versions don't compile we don't support that version.)
|
||||
* CMake
|
||||
@@ -149,8 +149,8 @@ like Qt and LLVM, additionally run
|
||||
|
||||
## Getting LLVM/Clang for the Clang Code Model
|
||||
|
||||
The Clang Code Model depends on the LLVM/Clang libraries. The currently
|
||||
recommended LLVM/Clang version is 13.0.
|
||||
The Clang code model uses `Clangd` and the ClangFormat plugin depends on the
|
||||
LLVM/Clang libraries. The currently recommended LLVM/Clang version is 14.0.
|
||||
|
||||
### Prebuilt LLVM/Clang packages
|
||||
|
||||
|
||||
55
dist/changelog/changes-8.0.0.md
vendored
@@ -10,6 +10,11 @@ the public Git repository. For example:
|
||||
git clone git://code.qt.io/qt-creator/qt-creator.git
|
||||
git log --cherry-pick --pretty=oneline origin/7.0..v8.0.0
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
* Moved `Tools > Options` to `Edit > Preferences`
|
||||
|
||||
Help
|
||||
----
|
||||
|
||||
@@ -20,24 +25,38 @@ Editing
|
||||
|
||||
* Added shortcut for adding next search match to multi-selection
|
||||
* Added warning when editing generated file (QTCREATORBUG-27173)
|
||||
* Added option for hiding line ending information
|
||||
* Added option for hiding line ending information `Text Editor > Display >
|
||||
Display file line ending`
|
||||
* Fixed updating of annotations (QTCREATORBUG-26812)
|
||||
* Fixed that whitespace was not selected on double-click (QTCREATORBUG-24607)
|
||||
* Fixed `Rewrap Paragraph` when indenting with tabs (QTCREATORBUG-27602)
|
||||
* Fixed code folding marker visibility after `Open in New Window`
|
||||
(QTCREATORBUG-27748)
|
||||
|
||||
### C++
|
||||
|
||||
* Removed `libclang` based code model
|
||||
* Fixed that `Generate Setter and Getter` generated non-static methods for
|
||||
static pointer types (QTCREATORBUG-27547)
|
||||
* Fixed `Add Local Declaration` for class templates (QTCREATORBUG-26004)
|
||||
* Fixed that `Follow Symbol Under Cursor` could jump to new location even after
|
||||
the user started doing other things (QTCREATORBUG-20878)
|
||||
* Fixed that macros were highlighted as preprocessor statements
|
||||
(QTCREATORBUG-23548)
|
||||
* Fixed initialization of pointer variables when generating member for
|
||||
`Q_PROPERTY` (QTCREATORBUG-27770)
|
||||
* Clangd
|
||||
* Increased minimum `Clangd` version to 14
|
||||
* Added warning and disabling of `Clangd` by default on machines with low
|
||||
memory (QTCREATORBUG-19297)
|
||||
* Improved performance of `compile_commands.json` creation
|
||||
* Replaced some refactoring actions by the ones from `Clangd`
|
||||
* Added desugaring of types and warning about unused includes
|
||||
* Added option for ignoring big files
|
||||
* Added information on parent function to `Find References With Access Type`
|
||||
(QTCREATORBUG-27550)
|
||||
* Added warning icon and deprecation tag to completion items for deprecated
|
||||
API (QTCREATORBUG-2325)
|
||||
* Worked around `Clangd` highlighting issue (QTCREATORBUG-27601)
|
||||
* Fixed `Follow Symbol Under Cursor` for template types (QTCREATORBUG-27524)
|
||||
* Fixed that issues from other files could be shown in `Issues`
|
||||
@@ -47,7 +66,7 @@ Editing
|
||||
* Fixed that UI files with same name could confuse code model
|
||||
(QTCREATORBUG-27584)
|
||||
* clang-format
|
||||
* Simplified options dialog
|
||||
* Fixed cursor position when undoing formatting (QTCREATORBUG-27608)
|
||||
|
||||
### QML
|
||||
|
||||
@@ -55,6 +74,10 @@ Editing
|
||||
(QTCREATORBUG-23411)
|
||||
* Fixed handling of JavaScript string templates (QTCREATORBUG-21869)
|
||||
* Fixed formatting issue with nullish coalescing operator (QTCREATORBUG-27344)
|
||||
* Fixed that `Follow Symbol Under Cursor` could open file from build directory
|
||||
instead of source directory (QTCREATORBUG-27173)
|
||||
* Fixed member lookup for items with same name in different modules
|
||||
(QTCREATORBUG-26714)
|
||||
|
||||
### Python
|
||||
|
||||
@@ -70,6 +93,8 @@ Editing
|
||||
### Language Server Protocol
|
||||
|
||||
* Improved performance for large server responses
|
||||
* Added support for dragging in `Outline` (QTCREATORBUG-27502)
|
||||
* Fixed order of outline items (QTCREATORBUG-4346)
|
||||
* Fixed semantic highlighting after server reset
|
||||
* Fixed that semantic update was delayed by `Document update threshold` even
|
||||
after saving
|
||||
@@ -80,6 +105,10 @@ Editing
|
||||
|
||||
* Added button for copying image as data URL
|
||||
|
||||
### FakeVim
|
||||
|
||||
* Partially implemented multi repeat command `:g, :v`
|
||||
|
||||
Projects
|
||||
--------
|
||||
|
||||
@@ -97,12 +126,20 @@ Projects
|
||||
* Removed hardcoded `QT_QML_DEBUG` from wizard created project files
|
||||
* Fixed issue when reconfiguring with `QML debugging and profiling` option
|
||||
enabled
|
||||
* Fixed missing path to `ninja` for `ExternalProject_Add` (QTCREATORBUG-27495)
|
||||
* Fixed that headers were wrongly classified as `C` code if `qt_add_qml_module`
|
||||
is used (QTCREATORBUG-27117)
|
||||
|
||||
### Compilation Database
|
||||
|
||||
* Fixed wrong removal of command line options (QTCREATORBUG-22949)
|
||||
|
||||
Debugging
|
||||
---------
|
||||
|
||||
* Switched fallback Qt version for debug information to Qt 6.2
|
||||
* Added pretty printer for `QAnyStringView`
|
||||
* Added workaround for LLDB on Ubuntu 22.04
|
||||
|
||||
Analyzer
|
||||
--------
|
||||
@@ -143,6 +180,8 @@ Platforms
|
||||
* Removed support for Universal Windows Platform (UWP)
|
||||
* Added auto-detection for MSVC ARM toolchain and debugger
|
||||
* Fixed ABI detection on ARM Windows
|
||||
* Fixed ABI detection of static Qt (QTCREATORBUG-27735)
|
||||
* Fixed interrupting remote CDB processes (QTCREATORBUG-21657)
|
||||
|
||||
### macOS
|
||||
|
||||
@@ -156,9 +195,14 @@ Platforms
|
||||
* Aligned platform names with Android Studio (QTCREATORBUG-27161)
|
||||
* Fixed issues with newer SDK tools (QTCREATORBUG-27174)
|
||||
|
||||
### iOS
|
||||
|
||||
* Improved consecutive deployment speed (QTCREATORBUG-24371)
|
||||
|
||||
### Remote Linux
|
||||
|
||||
* Switched to `echo` for testing connection
|
||||
* Fixed deployment of multiple directories with `rsync`
|
||||
|
||||
### Docker
|
||||
|
||||
@@ -178,6 +222,7 @@ Credits for these changes go to:
|
||||
--------------------------------
|
||||
Aaron Barany
|
||||
Adam Treat
|
||||
Aleksei German
|
||||
Alesandro Portale
|
||||
Alessandro Portale
|
||||
Alexander Akulich
|
||||
@@ -187,6 +232,8 @@ Andre Hartmann
|
||||
André Pönitz
|
||||
Artem Sokolovskii
|
||||
Assam Boudjelthia
|
||||
Bartlomiej Moskal
|
||||
BogDan Vatra
|
||||
Christiaan Janssen
|
||||
Christian Kandeler
|
||||
Christian Stenger
|
||||
@@ -201,16 +248,20 @@ Evgeny Shtanov
|
||||
Fawzi Mohamed
|
||||
Henning Gruendl
|
||||
Ihor Ivlev
|
||||
Ippei Sugita
|
||||
Jaroslaw Kobus
|
||||
Knud Dollereder
|
||||
Leena Miettinen
|
||||
Mahmoud Badri
|
||||
Marcus Tillmanns
|
||||
Mats Honkamaa
|
||||
Maximilian Goldstein
|
||||
Miikka Heikkinen
|
||||
Orgad Shaneh
|
||||
Piotr Mućko
|
||||
Rafael Roquetto
|
||||
Robert Löhning
|
||||
Samuel Ghinet
|
||||
Sergey Morozov
|
||||
Tapani Mattila
|
||||
Tasuku Suzuki
|
||||
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
BIN
doc/qtcreator/images/qtcreator-gitlab-clone-repository.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
doc/qtcreator/images/qtcreator-gitlab-preferences-add-server.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
doc/qtcreator/images/qtcreator-gitlab-preferences-project.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
doc/qtcreator/images/qtcreator-gitlab-preferences.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
doc/qtcreator/images/qtcreator-gitlab-project-list.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 10 KiB |
BIN
doc/qtcreator/images/qtcreator-language-server-generic-stdio.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
doc/qtcreator/images/qtcreator-python-advanced.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
doc/qtcreator/images/qtcreator-python-interpreters.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
doc/qtcreator/images/qtcreator-python-plugins.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
@@ -50,8 +50,8 @@
|
||||
architectures (ABIs) installed as one.
|
||||
|
||||
To enable helpful code editing features for Java, such as code completion,
|
||||
highlighting, function tooltips, and navigating in code, specify settings
|
||||
for a \l{Specifying Java Language Server Settings}{Java language server}.
|
||||
highlighting, function tooltips, and navigating in code, add a
|
||||
\l{Java Language Server}{Java language server}.
|
||||
|
||||
The Android Debug Bridge (adb) command line tool is integrated to \QC to
|
||||
enable you to deploy applications to connected Android devices, to run
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
\image qtcreator-options-code-style-cpp.png "C++ Code Style options"
|
||||
\li Give a name to the settings and click \uicontrol OK.
|
||||
\li Click \uicontrol Edit to specify code style settings for the project.
|
||||
\image qtcreator-code-style-settings-edit-cpp.png "Edit Code Style Settings dialog"
|
||||
\image qtcreator-code-style-settings-edit-cpp.png "Edit Code Style dialog"
|
||||
\endlist
|
||||
|
||||
You can specify how to:
|
||||
@@ -129,7 +129,7 @@
|
||||
You can use the live preview to see how the options change the indentation.
|
||||
|
||||
To specify different settings for a particular project, select
|
||||
\uicontrol Projects > \uicontrol {Code Style Settings}.
|
||||
\uicontrol Projects > \uicontrol {Code Style}.
|
||||
|
||||
\include creator-clangformat.qdocinc clang format
|
||||
\endif
|
||||
@@ -146,14 +146,17 @@
|
||||
\image qtcreator-options-code-style-qml.png "QML Code Style options"
|
||||
\li Give a name to the settings and click \uicontrol OK.
|
||||
\li Click \uicontrol Edit to specify code style settings for the project.
|
||||
\image qtcreator-code-style-settings-edit-qtquick.png "Edit Code Style Settings dialog"
|
||||
\image qtcreator-code-style-settings-edit-qtquick.png "Edit Code Style dialog"
|
||||
\endlist
|
||||
|
||||
You can specify how to interpret the \key Tab key presses and how to align
|
||||
continuation lines.
|
||||
|
||||
In \uicontrol {Line length}, you can adjust the maximum line length for
|
||||
code lines.
|
||||
|
||||
To specify different settings for a particular project, select
|
||||
\uicontrol Projects > \uicontrol {Code Style Settings}.
|
||||
\uicontrol Projects > \uicontrol {Code Style}.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\section1 Indenting Nim Files
|
||||
@@ -167,7 +170,7 @@
|
||||
\image qtcreator-options-code-style-nim.png "Nim Code Style options"
|
||||
\li Give a name to the settings and click \uicontrol OK.
|
||||
\li Click \uicontrol Edit to specify code style settings for the project.
|
||||
\image qtcreator-code-style-settings-edit-nim.png "Edit Code Style Settings dialog"
|
||||
\image qtcreator-code-style-settings-edit-nim.png "Edit Code Style dialog"
|
||||
\endlist
|
||||
|
||||
You can specify how to interpret the \key Tab key presses and how to align
|
||||
|
||||
@@ -125,7 +125,9 @@
|
||||
\section2 Selecting Line Ending Style
|
||||
|
||||
To switch between Windows line endings (CRLF) and Unix line endings (LF),
|
||||
select the ending style on the editor toolbar (6).
|
||||
select the ending style on the editor toolbar (6). To hide this field,
|
||||
select \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor}
|
||||
> \uicontrol Display, and deselect \uicontrol {Display file line ending}.
|
||||
|
||||
To set the line endings to use for all projects by default, select
|
||||
\uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} >
|
||||
|
||||
@@ -176,6 +176,9 @@
|
||||
\li In \uicontrol {Document update threshold}, specify the amount of
|
||||
time \QC waits before sending document changes to the server.
|
||||
If the document changes again while waiting, this timeout is reset.
|
||||
\li Select \uicontrol {Ignore files greater than} to make parsing faster
|
||||
by ignoring big files. Specify the maximum size of files to parse in
|
||||
the field next to the check box.
|
||||
\li The \uicontrol {Diagnostic Configuration} field shows the Clang
|
||||
checks to perform. Click the value of the field to open the
|
||||
\uicontrol {Diagnostic Configurations} dialog, where you can
|
||||
|
||||
@@ -79,33 +79,31 @@
|
||||
|
||||
\section1 Specifying Settings for Language Clients
|
||||
|
||||
You can add a generic generic stdIO language server for Python, for example.
|
||||
For \l{Connecting Android Devices}{Android development}, you can add a Java
|
||||
language server.
|
||||
\QC supports adding a Java language server for
|
||||
\l{Connecting Android Devices}{Android development}. A Python language
|
||||
server is added by default and you can edit its preferences.
|
||||
For other languages, you can add generic stdIO language servers.
|
||||
|
||||
\section2 Adding Language Servers
|
||||
|
||||
To view a list of language servers, select \uicontrol Edit >
|
||||
\uicontrol Preferences > \uicontrol {Language Client} (or
|
||||
\uicontrol {Qt Creator} > \uicontrol Preferences >
|
||||
\uicontrol {Language Client} > on \macos).
|
||||
|
||||
\image qtcreator-language-client-options.png "Language client options page"
|
||||
To add language servers, select \uicontrol Edit > \uicontrol Preferences >
|
||||
\uicontrol {Language Client} > \uicontrol Add (or \uicontrol {Qt Creator} >
|
||||
\uicontrol Preferences > \uicontrol {Language Client} > \uicontrol Add
|
||||
on \macos).
|
||||
|
||||
To enable a language server, select the check box next to the language
|
||||
server name and specify settings for the server.
|
||||
server name and set server preferences.
|
||||
|
||||
To remove language servers from the list, select \uicontrol Delete.
|
||||
|
||||
\section2 Specifying Generic Settings
|
||||
\section2 Generic StdIO Language Server
|
||||
|
||||
To add a generic language server:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Edit > \uicontrol Preferences >
|
||||
\uicontrol {Language Client} > \uicontrol Add >
|
||||
\uicontrol {New Generic StdIO Language Server}
|
||||
\uicontrol {Generic StdIO Language Server}
|
||||
to add a generic language server.
|
||||
\image qtcreator-language-server-generic-stdio.png
|
||||
\li In the \uicontrol Name field, enter a name for the language server.
|
||||
Select the \inlineimage icons/replace.png
|
||||
(\uicontrol {Variables}) button to use a variable for the server
|
||||
@@ -119,8 +117,9 @@
|
||||
with a matching MIME type is opened. \l{Viewing Output}
|
||||
{General Messages} displays information about the connection to the
|
||||
language server.
|
||||
\li In the \uicontrol Initialization field, you can add language server
|
||||
specific JSON attributes to pass to an \c initialize request.
|
||||
\li In the \uicontrol {Initialization options} field, you can add
|
||||
language server specific JSON attributes to pass to an \c initialize
|
||||
request.
|
||||
\li In the \uicontrol Executable field, enter the path to the language
|
||||
server executable.
|
||||
\li In the \uicontrol Arguments field, enter any required command line
|
||||
@@ -128,15 +127,15 @@
|
||||
arguments.
|
||||
\endlist
|
||||
|
||||
\section2 Specifying Java Language Server Settings
|
||||
\section2 Java Language Server
|
||||
|
||||
To add a Java language server:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Edit > \uicontrol Preferences >
|
||||
\uicontrol {Language Client} > \uicontrol Add >
|
||||
\uicontrol {New Java Language Server} to add a Java language server.
|
||||
\image qtcreator-language-client-options-java.png "Java language server options"
|
||||
\uicontrol {Java Language Server} to add a Java language server.
|
||||
\image qtcreator-language-client-options-java.png "Java language server preferences"
|
||||
\li In the \uicontrol Name field, enter a name for the language server.
|
||||
Select the \inlineimage icons/replace.png
|
||||
(\uicontrol {Variables}) button to use a variable for the server
|
||||
@@ -146,6 +145,25 @@
|
||||
the Java language server \c .jar file.
|
||||
\endlist
|
||||
|
||||
\section2 Python Language Server
|
||||
|
||||
To set preferences for Python language servers:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Edit > \uicontrol Preferences >
|
||||
\uicontrol Python > \uicontrol {Language Server Configuration} to
|
||||
select the Python language server plugins to use.
|
||||
\image qtcreator-python-plugins.png "Python Language Server Configuration"
|
||||
\li Select \uicontrol Advanced to configure the plugins.
|
||||
\image qtcreator-python-advanced.png "Python language server plugin configuration"
|
||||
\endlist
|
||||
|
||||
For a complete list of configuration options, see
|
||||
\l{https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md}
|
||||
{Python Language Server Configuration}.
|
||||
|
||||
To disable the Python language server, deselect
|
||||
\uicontrol {Use Python Language Server}.
|
||||
|
||||
\section1 Supported Locator Filters
|
||||
|
||||
@@ -166,7 +184,7 @@
|
||||
responses that contain the requested information if the language server is
|
||||
capable of handling the requests. To inspect the communication between \QC
|
||||
and language servers and view server capabilities, select \uicontrol Tools
|
||||
> \uicontrol {Debug \QC} > \uicontrol {Inspect Language Client}.
|
||||
> \uicontrol {Debug \QC} > \uicontrol {Inspect Language Clients}.
|
||||
|
||||
\image qtcreator-language-client-inspector-log.png "Language Client Inspector dialog"
|
||||
|
||||
@@ -201,11 +219,11 @@
|
||||
For a clangd server, you can inspect the total amount of memory used by a
|
||||
particular component in \uicontrol {Memory Usage}.
|
||||
|
||||
\image qtcreator-language-client-inspector-capabilities.png "Language Client Inspector Capabilities tab"
|
||||
\image qtcreator-language-client-inspector-memory-usage.png "Language Client Inspector Memory Usage tab"
|
||||
|
||||
\section1 Reporting Issues
|
||||
|
||||
The language service client has been mostly tested with Python and Java.
|
||||
The language server client has been mostly tested with Python and Java.
|
||||
If problems arise when you try them or some other language, please select
|
||||
\uicontrol Help > \uicontrol {Report Bug} to report them in the
|
||||
\l{https://bugreports.qt.io/}{Qt Project Bug Tracker}. The reports
|
||||
|
||||
@@ -33,6 +33,21 @@
|
||||
to gain access to individual Qt modules, such as \l {Qt Core}, \l {Qt GUI},
|
||||
and \l {Qt Widgets}.
|
||||
|
||||
If you have not installed PySide6, \QC prompts you to install it after
|
||||
the project is created. Further, it prompts you to install the
|
||||
\l {Python Language Server}{Python language server} that provides services
|
||||
such as code completion and annotations. Select \uicontrol Install to install
|
||||
PySide6 and the language server.
|
||||
|
||||
To view and manage the available Python interpreters, select \uicontrol Edit
|
||||
> \uicontrol Preferences > \uicontrol Python > \uicontrol Interpreters.
|
||||
|
||||
\image qtcreator-python-interpreters.png "Python Interpreters in Preferences"
|
||||
|
||||
You can add and remove interpreters and clean up references to interpreters
|
||||
that have been uninstalled, but still appear in the list. In addition, you
|
||||
can set the interpreter to use by default.
|
||||
|
||||
The Qt for Python Application wizards generate a \c {.pyproject} file that
|
||||
lists the files in the Python project and a \c {.py} file that contains
|
||||
some boilerplate code. In addition, the widget based UI wizard creates a
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
\li \l{Using ClearCase}
|
||||
\li \l{Using CVS}
|
||||
\li \l{Using Git}
|
||||
\li \l{Using GitLab}
|
||||
\li \l{Using Mercurial}
|
||||
\li \l{Using Perforce}
|
||||
\li \l{Using Subversion}
|
||||
|
||||
@@ -220,6 +220,9 @@
|
||||
|
||||
\li Export SVG images to pixmaps
|
||||
|
||||
\li Copy an image as a data URL, which enables you to include it in web
|
||||
pages as if it were an external resource
|
||||
|
||||
\li Switch between background and outline modes
|
||||
|
||||
\li Zoom in and out
|
||||
|
||||
146
doc/qtcreator/src/vcs/creator-only/creator-vcs-gitlab.qdoc
Normal file
@@ -0,0 +1,146 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2022 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
\previouspage creator-vcs-git.html
|
||||
\page creator-vcs-gitlab.html
|
||||
\nextpage creator-vcs-mercurial.html
|
||||
|
||||
\title Using GitLab
|
||||
|
||||
GitLab is a DevOps tool developed by GitLab. You can clone projects from
|
||||
GitLab servers and use \l{Using Git}{Git} to manage your local and remote
|
||||
repositories.
|
||||
|
||||
To enable the experimental GitLab plugin, select \uicontrol Help >
|
||||
\uicontrol {About Plugins} > \uicontrol {Version Control} >
|
||||
\uicontrol GitLab. Then select \uicontrol {Restart Now} to
|
||||
restart \QC and load the plugin.
|
||||
|
||||
To use GitLab, you must create a connection to the GitLab server and clone
|
||||
the projects you want to work on. You can also link previously cloned
|
||||
projects to GitLab in the project settings. This enables you to receive
|
||||
event notifications in the \l {Viewing Output}{Version Control} pane.
|
||||
|
||||
\section1 Connecting to GitLab Servers
|
||||
|
||||
To connect to a GitLab server, you need to specify the server host name and
|
||||
port number, as well as an access token that you create in GitLab for \QC.
|
||||
The permission scope of the token must be at least \c read_api or \c api.
|
||||
|
||||
To specify connections to GitLab servers, select \uicontrol Edit >
|
||||
\uicontrol Preferences > \uicontrol {Version Control} > \uicontrol GitLab:
|
||||
|
||||
\image qtcreator-gitlab-preferences.png
|
||||
|
||||
To add GitLab servers:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Add to open the \uicontrol {Add Server} dialog:
|
||||
\image qtcreator-gitlab-preferences-add-server.png
|
||||
\li In \uicontrol Host, enter the host name of the GitLab server.
|
||||
\li In \uicontrol Description, enter a free-form text that is displayed
|
||||
in the GitLab settings of a linked project.
|
||||
\li In \uicontrol {Access token}, enter the access token you created for
|
||||
\QC in the GitLab server, in \uicontrol Preferences >
|
||||
\uicontrol {Access Tokens}.
|
||||
\li In \uicontrol Port, enter a port number.
|
||||
\li Deselect the \uicontrol HTTPS check box to use an HTTP connection
|
||||
instead of a secure connection.
|
||||
\li Select \uicontrol Add to create the connection.
|
||||
\endlist
|
||||
|
||||
In the \uicontrol GitLab tab, \uicontrol curl displays the path to the
|
||||
\c curl tool used for HTTP connections. You can specify another path to
|
||||
use another instance of the tool than the one found by \QC.
|
||||
|
||||
To edit the selected connection, select \uicontrol Edit.
|
||||
|
||||
To remove the selected connection, select \uicontrol Remove.
|
||||
|
||||
\section1 Cloning Projects
|
||||
|
||||
You can clone projects from the connected GitLab servers. \QC reads your
|
||||
user name and ID from the access token and displays the available projects
|
||||
in each server. You can search for a particular project or browse projects
|
||||
in the list.
|
||||
|
||||
To clone projects from GitLab:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Tools > \uicontrol GitLab to view a list of
|
||||
connected GitLab servers and available projects in each server:
|
||||
\image qtcreator-gitlab-project-list.png
|
||||
\li In \uicontrol Remote, select a GitLab server.
|
||||
\li In \uicontrol Projects, select the project to clone.
|
||||
\li Select \uicontrol Clone to open the \uicontrol {Clone Repository}
|
||||
dialog:
|
||||
\image qtcreator-gitlab-clone-repository.png
|
||||
\li In \uicontrol Repository, specify the URL of the repository.
|
||||
\li In \uicontrol Path, specify the path where to clone the repository.
|
||||
\li In \uicontrol Directory, specify the name of the directory for the
|
||||
cloned repository.
|
||||
\li Select the \uicontrol Recursive check box to also clone submodules
|
||||
of the repository.
|
||||
\li Select \uicontrol Clone to clone the project to the specified
|
||||
directory.
|
||||
\endlist
|
||||
|
||||
\QC automatically opens the project. If the cloned project has several
|
||||
project files (such as CMakeList.txt, .pro, and .qbs), \QC prompts you to
|
||||
select the one to open. If it does not contain a project file that \QC can
|
||||
open, select \uicontrol File > \uicontrol {New Project} >
|
||||
\uicontrol {Import Project} > \uicontrol {Import Existing Project} to
|
||||
import the project as a generic project. For more information, see
|
||||
\l {Using Project Wizards}.
|
||||
|
||||
\section1 Linking Projects with GitLab
|
||||
|
||||
Link a project with a GitLab token to receive notifications on events, such
|
||||
as merge requests, issues, or comments, in the \uicontrol {Version Control}
|
||||
pane. The information is fetched every 15 minutes. Only events that occurred
|
||||
after the last time you logged into GitLab are displayed when you open the
|
||||
project for the first time. Subsequently, events that occurred after the last
|
||||
successful fetch are listed.
|
||||
|
||||
To link with GitLab:
|
||||
|
||||
\list 1
|
||||
\li In the \uicontrol Projects mode, select \uicontrol {GitLab} to view
|
||||
the GitLab settings for the currently active project:
|
||||
\image qtcreator-gitlab-preferences-project.png
|
||||
\li In \uicontrol Host, select the URL of the GitLab server.
|
||||
\li In \uicontrol {Linked GitLab configuration}, select the GitLab
|
||||
server settings to use.
|
||||
\li Select \uicontrol {Link with GitLab} to receive event notifications
|
||||
in the \uicontrol {Version Control} pane.
|
||||
\endlist
|
||||
|
||||
To test the connection to the host using the access token specified in the
|
||||
GitLab configuration, select \uicontrol {Test Connection}.
|
||||
|
||||
To stop the reception of event notifications, select
|
||||
\uicontrol {Unlink from GitLab}.
|
||||
*/
|
||||
@@ -30,7 +30,7 @@
|
||||
// **********************************************************************
|
||||
|
||||
/*!
|
||||
\previouspage creator-vcs-git.html
|
||||
\previouspage creator-vcs-gitlab.html
|
||||
\page creator-vcs-mercurial.html
|
||||
\nextpage creator-vcs-perforce.html
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2022 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -72,6 +72,10 @@
|
||||
\li Git version 1.9.0, or later
|
||||
|
||||
Gerrit version 2.6, or later
|
||||
\row
|
||||
\li \l{Using GitLab}{GitLab}
|
||||
\li \l{http://gitlab.com/}
|
||||
\li Experimental
|
||||
\row
|
||||
\li \l{Using Mercurial}{Mercurial}
|
||||
\li \l{http://mercurial.selenic.com/}
|
||||
@@ -124,6 +128,7 @@
|
||||
\li \l{https://doc.qt.io/qtcreator/creator-vcs-fossil.html}
|
||||
{Qt Creator Fossil Plugin Manual}
|
||||
\li \l{Using Git}
|
||||
\li \l{Using GitLab}
|
||||
\li \l{Using Mercurial}
|
||||
\li \l{Using Perforce}
|
||||
\li \l{Using Subversion}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
\nextpage studio-porting-projects.html
|
||||
\else
|
||||
\previouspage creator-vcs-cvs.html
|
||||
\nextpage creator-vcs-mercurial.html
|
||||
\nextpage creator-vcs-gitlab.html
|
||||
\endif
|
||||
|
||||
\title Using Git
|
||||
|
||||
BIN
doc/qtdesignstudio/images/icons/apply-material.png
Normal file
|
After Width: | Height: | Size: 779 B |
BIN
doc/qtdesignstudio/images/material-editor-browser.webp
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
doc/qtdesignstudio/images/materials-remove-material.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
doc/qtdesignstudio/images/navigator-material-texture.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 13 KiB |
BIN
doc/qtdesignstudio/images/studio-qtquick-3d-material.webp
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
doc/qtdesignstudio/images/timeline-bind-animation-state.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
doc/qtdesignstudio/images/timeline-insert-keyframe.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
doc/qtdesignstudio/images/timeline-per-property-recording.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
doc/qtdesignstudio/images/timeline-settings-dialog-second.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
doc/qtdesignstudio/images/timeline-settings-dialog.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
doc/qtdesignstudio/images/timeline-settings-property-binding.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
doc/qtdesignstudio/images/timeline-states.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
@@ -60,7 +60,7 @@
|
||||
\li \l{Lists and Other Data Models}
|
||||
\row
|
||||
\li Timeline
|
||||
\li \l{Creating Timelines}
|
||||
\li \l{Creating a Timeline}
|
||||
\if defined(qtdesignstudio)
|
||||
\row
|
||||
\li Event List
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
\list
|
||||
\li \l{Form Editor}
|
||||
\li \l{3D Editor}
|
||||
\li \l{Material Editor and Browser}
|
||||
\li \l{Components}
|
||||
\li \l{Assets}
|
||||
\li \l{Navigator}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/*!
|
||||
\previouspage qtquick-form-editor.html
|
||||
\page studio-3d-editor.html
|
||||
\nextpage quick-components-view.html
|
||||
\nextpage studio-material-editor.html
|
||||
|
||||
\title 3D Editor
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
\title Materials and Shaders
|
||||
|
||||
\image studio-qtquick-3d-material.png "Material attached to model in Design mode"
|
||||
\image studio-qtquick-3d-material.webp "Material attached to model in Design mode"
|
||||
|
||||
Materials and shaders define how object surfaces are rendered in \QDS and
|
||||
live preview. As you change the properties of materials, new shaders are
|
||||
@@ -40,6 +40,10 @@
|
||||
a shader depends on a combination of the properties that are set on it, and
|
||||
the context of the scene itself.
|
||||
|
||||
It is recommended that you use the \l {Material Editor and Browser} when
|
||||
working with materials, but you can also add materials using the components
|
||||
library.
|
||||
|
||||
The materials that you used in your imported scenes are imported to \QDS
|
||||
as \l{Qt Quick 3D} components. When you add a View3D component, it contains
|
||||
a DefaultMaterial component. You can use the following predefined Qt Quick
|
||||
@@ -62,171 +66,12 @@
|
||||
defines an image and how the image is mapped to meshes in a 3D scene. For
|
||||
more information, see \l {Textures}.
|
||||
|
||||
You can modify material properties in the \uicontrol Properties view, as
|
||||
instructed in the following sections. The availability of the properties
|
||||
depends on the material type.
|
||||
You can create and modify materials in
|
||||
\uicontrol {Material Editor} and \uicontrol {Material Browser}. The availability
|
||||
of the properties depends on the material type.
|
||||
|
||||
\image studio-qtquick-3d-default-material.png "DefaultMaterial properties"
|
||||
|
||||
To enable the material to use vertex colors from the mesh, select the
|
||||
\uicontrol {Enable vertex colors} check box. These are multiplied
|
||||
by any other colors specified for the material.
|
||||
\image studio-qtquick-3d-default-material.webp "DefaultMaterial properties"
|
||||
|
||||
You can animate material properties in the \uicontrol Timeline view, as
|
||||
instructed in \l {Creating Timeline Animations}.
|
||||
|
||||
\section1 Blending Colors
|
||||
|
||||
To determine how the colors of a model blend with the colors of the models
|
||||
behind it, set the \uicontrol {Blend mode} property. To make opaque objects
|
||||
occlude the objects behind them, select \uicontrol {SourceOver}.
|
||||
|
||||
For a lighter result, select \uicontrol Screen to blend colors using an
|
||||
inverted multiply or \uicontrol ColorDodge to blend them by inverted
|
||||
division. Color dodge procudes an even lighter result than screen.
|
||||
|
||||
For a darker result, select \uicontrol Multiply to blend colors using a
|
||||
multiply or \uicontrol ColorBurn to blend them by inverted division, where
|
||||
the result also is inverted. Color burn produces an even darker result than
|
||||
multiply.
|
||||
|
||||
The screen and multiply modes are order-independent, so select them to
|
||||
avoid \e popping, which can happen when using semi-opaque objects and
|
||||
sorting the back and front faces or models.
|
||||
|
||||
For a result with higher contrast, select \uicontrol Overlay, which is a mix
|
||||
of the multiply and screen modes.
|
||||
|
||||
\section1 Lighting Materials
|
||||
|
||||
To set the lighting method for generating a material, use the
|
||||
\uicontrol Lighting property. Select \uicontrol {Fragment lighting} to
|
||||
calculate diffuse and specular lighting for each rendered pixel. Some
|
||||
effects, such as Fresnel or a bump map, require fragment lighting.
|
||||
|
||||
To skip lighting calculation, select \uicontrol {No lighting}. This is very
|
||||
fast and quite effective when using image maps that do not need to be shaded
|
||||
by lighting.
|
||||
|
||||
To set the base color for the material, use the \uicontrol {Diffuse Color}
|
||||
property. You can either use the color picker or specify a RBG value. Set
|
||||
the diffuse color to black to create purely-specular materials, such as
|
||||
metals or mirrors. To apply a texture to a material, set it as the value of
|
||||
the \uicontrol {Diffuse map} property. Using a texture with transparency
|
||||
also applies the alpha channel as an \uicontrol {Opacity map}. You can set
|
||||
the opacity of the material independently of the model as the value of the
|
||||
\uicontrol Opacity property.
|
||||
|
||||
\section1 Self-Illuminating Materials
|
||||
|
||||
To set the color and amount of self-illumination for a material, use the
|
||||
\uicontrol {Emissive color} and \uicontrol {Emissive factor} properties. In
|
||||
a scene with black ambient lighting, a material with an emissive factor of 0
|
||||
is black where the light does not shine on it. Setting the emissive factor
|
||||
to 1 shows the material in its diffuse color instead.
|
||||
|
||||
To use a Texture for specifying the emissive factor for different parts of
|
||||
the material, set the \uicontrol {Emissive map} property. Using a grayscale
|
||||
image does not affect the color of the result, while using a color image
|
||||
produces glowing regions with the color affected by the emissive map.
|
||||
|
||||
\section1 Using Highlights and Reflections
|
||||
|
||||
You can control the highlights and reflections on a material by setting the
|
||||
properties in the \uicontrol Specular group. You can use the color picker
|
||||
or set a RGB value to specify the color used to adjust specular reflections.
|
||||
Use white for no effect
|
||||
|
||||
To use a color texture to modulate the amount and the color of specularity
|
||||
across the surface of a material, set the \uicontrol {Specular map}
|
||||
property. Set the \uicontrol {Specular amount} property to specify the
|
||||
strength of specularity. This property does not affect the specular
|
||||
reflection map, but it does affect the amount of reflections from a scene's
|
||||
light probe.
|
||||
|
||||
\note Unless your mesh is high-resolution, you may need to use fragment
|
||||
lighting to get good specular highlights from scene lights.
|
||||
|
||||
To determine how to calculate specular highlights for lights in the scene,
|
||||
set the \uicontrol {Specular model}. In addition to the default mode, you
|
||||
can use the GGX or Ward lighting model.
|
||||
|
||||
To use a Texture for specular highlighting on a material, set the
|
||||
\uicontrol {Reflection map} property. When the texture is applied using
|
||||
environmental mapping (not UV mapping), the map appears to be reflecting
|
||||
from the environment as you rotate the model. Specular reflection maps are
|
||||
an easy way to add a high-quality look at a relatively low cost.
|
||||
|
||||
To specify an image to use as the specular reflection map, set the
|
||||
\uicontrol {Light probe} property.
|
||||
|
||||
Crisp images cause your material to look very glossy. The more you
|
||||
blur your image, the softer your material appears.
|
||||
|
||||
To decrease head-on reflections (looking directly at the surface)
|
||||
while maintaining reflections seen at grazing angles, set the
|
||||
\uicontrol {Fresnel power} property. To select the angles to control,
|
||||
set the \uicontrol {Index of refraction} property.
|
||||
|
||||
To control the size of the specular highlights generated from lights and the
|
||||
clarity of reflections in general, set the \uicontrol {Specular roughness}
|
||||
property. Larger values increase the roughness, while softening specular
|
||||
highlights and blurring reflections. To control the specular roughness of
|
||||
the material using a Texture, set the \uicontrol {Roughness map property}.
|
||||
|
||||
\section1 Simulating Geometry Displacement
|
||||
|
||||
Specify the properties in the \uicontrol {Bump/Normal} group to simulate
|
||||
fine geometry displacement across the surface of the material. Set the
|
||||
\uicontrol {Bump map} property to use a grayscale texture for the
|
||||
simulation. Brighter pixels indicate raised regions.
|
||||
|
||||
To use a RGB image for simulation, set the \uicontrol {Normal map} property.
|
||||
The RGB channels indicate XYZ normal deviations.
|
||||
|
||||
The amount of displacement is controlled by the \uicontrol {Bump amount}
|
||||
property.
|
||||
|
||||
Bump and normal maps do not affect the silhouette of a model. To affect the
|
||||
silhouette, set the \uicontrol {Displacement map} property. It specifies a
|
||||
grayscale image used to offset the vertices of geometry across the surface
|
||||
of the material. The \uicontrol {Displacement amount} property specifies the
|
||||
offset amount.
|
||||
|
||||
\section1 Specifying Material Translucency
|
||||
|
||||
Set the properties in the \uicontrol Translucency group to control how much
|
||||
light can pass through the material from behind. To use a grayscale texture,
|
||||
specify it as the value of the \uicontrol {Translucency map} property.
|
||||
|
||||
To specify the amount of light wrap for the translucency map, set the
|
||||
\uicontrol {Diffuse light wrap} property. A value of 0 does not wrap the
|
||||
light at all, while a value of 1 wraps the light all around the object.
|
||||
|
||||
To specify the amount of falloff for the translucency based on
|
||||
the angle of the normals of the object to the light source, set
|
||||
the \uicontrol {Translucency falloff} property.
|
||||
|
||||
\section1 Culling Faces
|
||||
|
||||
Set the \uicontrol {Culling mode} property to determine whether the front
|
||||
and back faces of a model are rendered. Culling modes check whether the
|
||||
points in the polygon appear in clockwise or counter-clockwise order when
|
||||
projected onto the screen. If front-facing polygons have a clockwise
|
||||
winding, but the polygon projected on the screen has a counter-clockwise
|
||||
winding, the projected polygon is rotated to face away from the camera and
|
||||
is not rendered. Culling makes rendering objects quicker and more efficient
|
||||
by reducing the number of polygons to draw.
|
||||
|
||||
\section1 Applying Materials to Models
|
||||
|
||||
To apply materials to models, you should first delete the default material,
|
||||
and then drag-and-drop a new material from \l Assets to a model component
|
||||
in \l Navigator.
|
||||
|
||||
You can apply the same material to another component as well. Again,
|
||||
delete the default material first. You should then select the component and
|
||||
go to the \uicontrol Properties view. Find the \uicontrol Materials property,
|
||||
select the \inlineimage icons/plus.png
|
||||
icon, and choose the new material in the dropdown menu.
|
||||
*/
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/*!
|
||||
\page quick-components-view.html
|
||||
\previouspage studio-3d-editor.html
|
||||
\previouspage studio-material-editor.html
|
||||
\nextpage quick-assets.html
|
||||
|
||||
\title Components
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
\image studio-timeline-empty.png "Empty Timeline view"
|
||||
|
||||
Select the \inlineimage icons/plus.png
|
||||
(\uicontrol {Add Timeline}) button to \l{Creating Timelines}
|
||||
{create a timeline} and specify settings for it in the
|
||||
\uicontrol {Timeline Settings} dialog.
|
||||
(\uicontrol {Add Timeline}) button to
|
||||
\l{Creating a Timeline}{create a timeline} and specify settings for it in
|
||||
the \uicontrol {Timeline Settings} dialog.
|
||||
|
||||
\image studio-timeline-settings.png "Timeline Settings dialog"
|
||||
|
||||
@@ -124,11 +124,11 @@
|
||||
\li \inlineimage icons/animation.png
|
||||
\li Opens the \uicontrol {Timeline Settings} dialog for editing
|
||||
timeline settings.
|
||||
\li \l{Creating Timelines}
|
||||
\li \l{Creating a Timeline}
|
||||
\row
|
||||
\li Timeline ID
|
||||
\li Displays the ID of the current timeline.
|
||||
\li \l{Creating Timelines}
|
||||
\li \l{Creating a Timeline}
|
||||
\row
|
||||
\li \inlineimage icons/to_first_frame.png
|
||||
\li \uicontrol {To Start (Home)} moves to the first frame on the
|
||||
@@ -170,7 +170,7 @@
|
||||
\li Specifies the first frame of the timeline. Negative values are
|
||||
allowed. The difference between the start frame and the end frame
|
||||
determines the duration of the animation.
|
||||
\li \l{Creating Timelines}
|
||||
\li \l{Creating a Timeline}
|
||||
\row
|
||||
\li \inlineimage icons/zoom_small.png
|
||||
\li \uicontrol {Zoom Out} (\key Ctrl+-) zooms out of the view.
|
||||
@@ -189,7 +189,7 @@
|
||||
the start frame and the end frame determines the duration of the
|
||||
animation, so if the start frame is 0, the end frame equals the
|
||||
duration.
|
||||
\li \l{Creating Timelines}
|
||||
\li \l{Creating a Timeline}
|
||||
\row
|
||||
\li State Name
|
||||
\li Displays the name of the current state.
|
||||
|
||||
@@ -30,18 +30,19 @@
|
||||
|
||||
\title Creating Timeline Animations
|
||||
|
||||
You can create timeline and keyframe based animations for linear
|
||||
You can create timelines and keyframe-based animations for linear
|
||||
interpolation through intermediate values at specified keyframes
|
||||
instead of immediately changing to the target value.
|
||||
|
||||
\section1 Creating Timelines
|
||||
You can also bind the timeline to a property value of a component such as
|
||||
a slider and control the animation this way.
|
||||
|
||||
You specify settings for the timeline and for running the animation in the
|
||||
\uicontrol {Timeline Settings} dialog. The \uicontrol Animation radio button
|
||||
is selected for a timeline animation and the \uicontrol {Expression binding}
|
||||
radio button for a \l{Setting Bindings}{property animation}.
|
||||
\section1 Creating an Animation
|
||||
|
||||
\image studio-timeline-settings.png "Timeline Settings dialog"
|
||||
To create an animation, whether it's a keyframe animation or an animation
|
||||
bound to a property value, you first need to create a timeline.
|
||||
|
||||
\section2 Creating a Timeline
|
||||
|
||||
To create a timeline to animate a UI component:
|
||||
|
||||
@@ -50,95 +51,97 @@
|
||||
(\uicontrol {Add Timeline}) button to specify settings
|
||||
for the timeline and running the animation
|
||||
in the \uicontrol {Timeline Settings} dialog.
|
||||
\li In the \uicontrol {Timeline ID} field, enter an ID that describes
|
||||
the animated component.
|
||||
\li In the \uicontrol {Start frame} field, set the first frame of the
|
||||
timeline. Negative values are allowed.
|
||||
\li In the \uicontrol {End frame} field, set the last frame of the
|
||||
timeline.
|
||||
\li In the \uicontrol {Animation ID} field, enter an ID for the
|
||||
animation.
|
||||
\li Select the \uicontrol {Running in Base State} check box to run the
|
||||
animation when the base state is applied. Deselect the check box
|
||||
if you want to run the animation when some other state is applied.
|
||||
For more information, see \l{Binding Animations to States}.
|
||||
\li In the \uicontrol {Start frame} field, set the first frame of the
|
||||
animation.
|
||||
\li In the \uicontrol {End frame} field, set the last frame of the
|
||||
animation.
|
||||
\li In the \uicontrol {Duration} field, set the length of the
|
||||
animation from the start frame to the end frame. If you set a
|
||||
shorter duration than the number of frames, frames are left out
|
||||
from the end of the animation when viewing it.
|
||||
\li Select the \uicontrol Continuous check box to loop the animation
|
||||
indefinitely.
|
||||
\li In the \uicontrol Loops field, select the number of times to run
|
||||
the animation as a loop. The default number of loops is one, which
|
||||
means that you must restart the animation to see it again
|
||||
\li Select the \uicontrol {Ping pong} check box to play the animation
|
||||
backwards back to the beginning when it reaches the end.
|
||||
\li In the \uicontrol Finished field, select the state
|
||||
to apply when the animation finishes.
|
||||
\li On the \uicontrol {Timeline Settings} tab:
|
||||
\list
|
||||
\li In the \uicontrol {Timeline ID} field, enter an id that
|
||||
describes the timeline.
|
||||
\li In the \uicontrol {Start frame} field, set the first frame
|
||||
of the timeline. Negative values are allowed.
|
||||
\li In the \uicontrol {End frame} field, set the last frame
|
||||
of the timeline.
|
||||
\image timeline-settings-dialog.png
|
||||
\endlist
|
||||
\li On the \uicontrol {Animation Settings} tab:
|
||||
\list
|
||||
\li In the \uicontrol {Animation ID} field, enter an ID for the
|
||||
animation.
|
||||
\li Optional. Select the \uicontrol {Running in Base State}
|
||||
check box to run the animation when the base state is applied.
|
||||
Clear the check box to run the animation when some other state
|
||||
is applied. For more information, see
|
||||
\l{Binding Animations to States}.
|
||||
\li In the \uicontrol {Start frame} field, set the first frame
|
||||
of the animation.
|
||||
\li In the \uicontrol {End frame} field, set the last frame of
|
||||
the animation.
|
||||
\li In the \uicontrol {Duration} field, set the length of the
|
||||
animation in milliseconds.
|
||||
\li Optional. Select the \uicontrol Continuous check box to
|
||||
loop the animation indefinitely.
|
||||
\li Optional. In the \uicontrol Loops field, set the number of
|
||||
times to run the animation. The default number of
|
||||
loops is one, which means that you must restart the animation
|
||||
to see it again.
|
||||
\li Optional. Select the \uicontrol {Ping pong} check box to
|
||||
play the animation backwards back to the beginning when it
|
||||
reaches the end.
|
||||
\li Optional. In the \uicontrol Finished field, select the state
|
||||
to transition to when the animation finishes.
|
||||
\endlist
|
||||
\li Select \uicontrol Close to close the dialog and save the settings.
|
||||
\endlist
|
||||
|
||||
To create additional timelines, select the \inlineimage icons/plus.png
|
||||
(\uicontrol {Add Timeline}) button next to the
|
||||
\uicontrol {Timeline Settings} tab.
|
||||
Now, with the settings set for the timeline and the animation, you
|
||||
set the keyframes for the properties to animate.
|
||||
|
||||
To specify settings for running timeline animations, select the
|
||||
\inlineimage icons/plus.png
|
||||
(\uicontrol {Add Animation}) button next to the
|
||||
\uicontrol {Animation Settings} tab. For example, you could create
|
||||
settings for running a part of the timeline animation between specified
|
||||
frames or for running the animation backwards from the last frame to the
|
||||
first.
|
||||
\section3 Creating Additional Timelines
|
||||
|
||||
To modify the settings, select the \inlineimage icons/animation.png
|
||||
(\uicontrol {Timeline Settings (S)}) button on the \l{Timeline Toolbar}
|
||||
{toolbar} (or press \key S) in the \l Timeline view.
|
||||
You can create more than one timeline. The purpose of several timelines is
|
||||
to use different timelines in different states.
|
||||
|
||||
\section2 Binding Animations to States
|
||||
To create a timeline for a second state:
|
||||
|
||||
The table at the bottom of the \uicontrol {Timeline Settings} dialog lists
|
||||
the available states. Double-click the values in the \uicontrol Timeline
|
||||
and \uicontrol Animation column to bind the states to animations. In the
|
||||
\uicontrol {Fixed Frame} column, you can bind the states that don't have
|
||||
animations to fixed frames.
|
||||
\list 1
|
||||
\li In \uicontrol {Timeline}, open the \uicontrol {Timeline Settings}
|
||||
dialog.
|
||||
\li Next to the \uicontrol {Timeline Settings} tab, select
|
||||
\inlineimage icons/plus.png
|
||||
. This creates another timeline.
|
||||
\li In the table below the \uicontrol {Animation Settings} tab, set the
|
||||
Timeline for the state where you want to use it.
|
||||
\image timeline-settings-dialog-second.png
|
||||
\endlist
|
||||
To set the keyframe values for the timeline you created, first select the
|
||||
state in \uicontrol {States} and the timeline is available in
|
||||
\uicontrol{Timelines}.
|
||||
|
||||
\section1 Managing Keyframes
|
||||
|
||||
To animate components in the \l Timeline view, move to a frame
|
||||
on the timeline and specify changes in the values of a property. \QC
|
||||
automatically adds keyframes between two keyframes and sets their values
|
||||
evenly to create an appearance of movement or transformation.
|
||||
|
||||
\image studio-timeline-with-tracks.png "Timeline view"
|
||||
\image timeline-states.png
|
||||
|
||||
\section2 Setting Keyframe Values
|
||||
|
||||
You can insert keyframes for all the properties of all the components that
|
||||
you want to animate first, and then record the changes in their values by
|
||||
selecting the \inlineimage icons/local_record_keyframes.png
|
||||
(\uicontrol {Per Property Recording}) button for one property at a time.
|
||||
For example, you can hide and show components by turning their visibility
|
||||
off and on or by setting their opacity to 0 or 1.
|
||||
When you create a timeline, \QDS creates one animation for the timeline.
|
||||
You can create as many animations for a timeline as you want. For example,
|
||||
you can create animations to run just a small section of the timeline or to
|
||||
run the timeline backwards.
|
||||
|
||||
You can also select the \uicontrol {Auto Key (K)} button (or press \key K)
|
||||
to record changes in property values, but you need to be more careful about
|
||||
which property values you are changing to avoid surprises.
|
||||
To animate components in the \l Timeline view, you set keyframe values for
|
||||
the property to animate. \QDS automatically adds keyframes between two
|
||||
keyframes and sets their values evenly to create, for example, movement or
|
||||
transformation.
|
||||
|
||||
To record the changes of property values:
|
||||
To set keyframe values for a component property:
|
||||
|
||||
\list 1
|
||||
\li In the \l Navigator view, select the component to animate.
|
||||
\li In the \l Properties view, select \inlineimage icons/action-icon.png
|
||||
(\uicontrol Actions) > \uicontrol {Insert Keyframe} for the property
|
||||
that you want to animate.
|
||||
\image timeline-insert-keyframe.png
|
||||
\li In the \l Timeline view, select the
|
||||
\uicontrol {Per Property Recording} button
|
||||
to start recording property changes.
|
||||
\li Check that the playhead is in frame 0 and enter the value of the
|
||||
\image timeline-per-property-recording.png
|
||||
\li Ensure that the playhead is in frame 0 and enter the value of the
|
||||
property in the field next to the property name on the timeline.
|
||||
Press \key Enter to save the value.
|
||||
\li Move the playhead to another frame on the timeline and specify
|
||||
@@ -148,11 +151,67 @@
|
||||
\uicontrol {Per Property Recording} again to stop recording.
|
||||
\endlist
|
||||
|
||||
\section2 Binding a Timeline to a Property
|
||||
|
||||
When you bind a timeline to a component property, the animation's
|
||||
current frame is controlled by the value of the property.
|
||||
|
||||
In this example, you bind the timeline to a slider component.
|
||||
|
||||
With a timeline created and keyframe values set:
|
||||
|
||||
\list 1
|
||||
\li From \uicontrol {Components}, drag a slider to
|
||||
\uicontrol {Form Editor} or \uicontrol {Navigator}.
|
||||
\li In \uicontrol {Navigator}, select \e slider and in
|
||||
\uicontrol {Properties}, set:
|
||||
\list
|
||||
\li \uicontrol To to 1000.
|
||||
\note The \uicontrol From and \uicontrol To values of the slider
|
||||
should match the \uicontrol {Start Frame} and
|
||||
\uicontrol {End Frame} values of the timeline if you want to
|
||||
control the complete animation with the slider.
|
||||
\endlist
|
||||
\li In the \uicontrol {Timeline Settings} dialog, select
|
||||
\inlineimage icons/minus.png
|
||||
next to the \uicontrol {Animation Settings} tab to delete the
|
||||
animation. If you have several animations, delete all.
|
||||
\li In \uicontrol {Expression binding}, enter \c {slider.value}.
|
||||
\image timeline-settings-property-binding.png
|
||||
\endlist
|
||||
|
||||
\section2 Binding Animations to States
|
||||
|
||||
You can bind animations to states, this means that the animation will run
|
||||
when you enter the state.
|
||||
|
||||
To bind an animation to a state:
|
||||
\list 1
|
||||
\li In the table at the bottom of the \uicontrol {Timeline Settings}
|
||||
dialog lists:
|
||||
\list
|
||||
\li Double-click the value in the \uicontrol Timeline field and select
|
||||
the timeline with the animation you want to bind to the state.
|
||||
\li Double-click the value in the \uicontrol Animation field and
|
||||
select the animation you want to bind to the state.
|
||||
\image timeline-bind-animation-state.png
|
||||
\endlist
|
||||
\endlist
|
||||
To bind a state to a certain keyframe in an animation without running the
|
||||
animation, set the keyframe in the \uicontrol{Fixed Frame} field.
|
||||
|
||||
\section1 Managing Keyframes
|
||||
|
||||
\image studio-timeline-with-tracks.png "Timeline view"
|
||||
|
||||
\section2 Editing Keyframes
|
||||
|
||||
To remove all the changes you recorded for a property, right-click the
|
||||
property name on the timeline and select \uicontrol {Remove Property}.
|
||||
|
||||
To add keyframes to the keyframe track of a component at the current
|
||||
position of the playhead, select \uicontrol {Add Keyframes at Current Frame}.
|
||||
position of the playhead, right-click the component name on the timeline and
|
||||
select \uicontrol {Add Keyframes at Current Frame}.
|
||||
|
||||
Keyframes are marked on the timeline by using \l{keyframe_marker}{markers}
|
||||
of different colors and shapes, depending on whether they are active or
|
||||
@@ -162,7 +221,7 @@
|
||||
\section2 Editing Keyframe Values
|
||||
|
||||
To fine-tune the value of a keyframe, double-click a keyframe marker or
|
||||
select \uicontrol {Edit Keyframe} in the context menu.
|
||||
right-click it and select \uicontrol {Edit Keyframe} in the context menu.
|
||||
|
||||
The \uicontrol {Edit Keyframe} dialog displays the name of the property
|
||||
you are animating and its current value at the frame specified in the
|
||||
@@ -173,27 +232,36 @@
|
||||
\section2 Copying Keyframes
|
||||
|
||||
You can copy the keyframes from the keyframe track for a component and
|
||||
paste them to the keyframe track of another component. To copy all
|
||||
keyframes from one track to another one, first right-click the component ID
|
||||
and select \uicontrol {Copy All Keyframes} in the context menu.
|
||||
Then right-click the other component ID, and select
|
||||
\uicontrol {Paste Keyframes} in the context menu.
|
||||
paste them to the keyframe track of another component.
|
||||
|
||||
To copy all keyframes from one track to another one:
|
||||
\list 1
|
||||
\li Right-click the component ID and select
|
||||
\uicontrol {Copy All Keyframes} in the context menu.
|
||||
\li Right-click the other component ID, and select
|
||||
\uicontrol {Paste Keyframes} in the context menu.
|
||||
\endlist
|
||||
|
||||
\section2 Deleting Keyframes
|
||||
|
||||
To delete the selected keyframe, select \uicontrol {Delete Keyframe} in the
|
||||
context menu.
|
||||
To delete a keyframe, right-click it and select \uicontrol {Delete Keyframe}
|
||||
in the context menu.
|
||||
|
||||
To delete all keyframes from the selected component, select
|
||||
To delete all keyframes from the selected component, right-click the
|
||||
component name in \uicontrol {Timeline} and select
|
||||
\uicontrol {Delete All Keyframes} in the context menu.
|
||||
|
||||
\section1 Viewing the Animation
|
||||
|
||||
You can view the animation on the canvas by moving the playhead along the
|
||||
timeline.
|
||||
To preview your animation, do one of the following in the
|
||||
\uicontrol{Timeline} view:
|
||||
\list
|
||||
\li Drag the playhead along the timeline.
|
||||
\li Select \inlineimage icons/start_playback.png
|
||||
button or press \key Space.
|
||||
\endlist
|
||||
|
||||
To preview the animation, select the \uicontrol {Play (Space)}
|
||||
button or press \key Space. To preview the whole UI, select the
|
||||
To preview the whole UI, select the
|
||||
\inlineimage icons/live_preview.png
|
||||
(\uicontrol {Show Live Preview}) button on the canvas toolbar
|
||||
or press \key {Alt+P}.
|
||||
|
||||
266
doc/qtdesignstudio/src/views/studio-material-editor.qdoc
Normal file
@@ -0,0 +1,266 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2022 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 studio-material-editor.html
|
||||
\previouspage studio-3d-editor.html
|
||||
\nextpage quick-components-view.html
|
||||
|
||||
|
||||
\title Material Editor and Browser
|
||||
|
||||
In the \uicontrol {Material Editor} and \uicontrol {Material Browser} views,
|
||||
you create and manage materials.
|
||||
|
||||
\image material-editor-browser.webp "Material Editor and Browser"
|
||||
|
||||
\section1 Creating a Material
|
||||
|
||||
To create a new material, do one of the following:
|
||||
|
||||
\list
|
||||
\li In \uicontrol {Material Browser}, select \inlineimage icons/plus.png
|
||||
.
|
||||
\li In \uicontrol {Material Editor}, select \inlineimage icons/plus.png
|
||||
.
|
||||
\endlist
|
||||
|
||||
\section1 Editing a Material
|
||||
|
||||
To edit a material, select it in \uicontrol{Material Browser} and edit its
|
||||
properties in \uicontrol{Material Editor}. If \uicontrol {Material Editor}
|
||||
is closed, open it in one of the following ways:
|
||||
|
||||
\list
|
||||
\li In \uicontrol{Navigator}, right-click an object that has the material
|
||||
assigned to it and select \uicontrol {Edit Material}.
|
||||
\li In \uicontrol{Material Browser}, double-click a material.
|
||||
\endlist
|
||||
|
||||
\section1 Assigning a Material to an Object
|
||||
|
||||
To assign a material to a 3D object in your project, first select the object
|
||||
in \uicontrol Navigator or \uicontrol {3D Editor}. Then, do one of the
|
||||
following:
|
||||
|
||||
\list
|
||||
\li In \uicontrol {Material Browser}, right-click the material and select
|
||||
\uicontrol {Apply to Selected}. If there already is any material assigned
|
||||
to the object, you can select whether to replace the material or to add
|
||||
another material to the object.
|
||||
\li In \uicontrol {Material Editor}, select
|
||||
\inlineimage icons/apply-material.png
|
||||
. This replaces any material already assigned to the object.
|
||||
\endlist
|
||||
|
||||
\section1 Removing a Material from an Object
|
||||
|
||||
To remove an assigned material from an object:
|
||||
\list 1
|
||||
\li In \uicontrol{Navigator}, select the object.
|
||||
\li In \uicontrol{Properties}, select
|
||||
\inlineimage icons/close.png
|
||||
next to the material.
|
||||
\image materials-remove-material.png
|
||||
\endlist
|
||||
|
||||
\section1 Using Texture Maps
|
||||
|
||||
In \QDS you can add many different texture maps to your material.
|
||||
|
||||
To add a texture map to a material:
|
||||
\list 1
|
||||
\li Select the material in \uicontrol{Material Browser}.
|
||||
\li From \uicontrol {Assets}, drag an image to the correct map field
|
||||
in \uicontrol {Material Editor}. For example, to add a diffuse map, drag
|
||||
the image to \uicontrol{Diffuse Map} in \uicontrol{Material Editor}.
|
||||
\endlist
|
||||
|
||||
\section2 Using a Reflection Map for Environmental Mapping
|
||||
|
||||
To use a texture for environmental mapping, you need to set the mapping
|
||||
mode to \e {environment}.
|
||||
|
||||
To add a reflection map for environmental mapping to a material:
|
||||
|
||||
\list 1
|
||||
\li Select the material in \uicontrol {Material Browser}.
|
||||
\li From \uicontrol{Assets}, drag an image to
|
||||
\uicontrol{Reflection Map}.
|
||||
\li In \uicontrol {Navigator}, select
|
||||
\inlineimage icons/filtericon.png
|
||||
and then clear \uicontrol {Show Only Visible Components}. Now the
|
||||
texture you just added to the material is visible in
|
||||
\uicontrol {Navigator}.
|
||||
\image navigator-material-texture.png
|
||||
\li In \uicontrol {Navigator}, select the texture.
|
||||
\li In \uicontrol {Properties}, set \uicontrol {Texture Mapping} to
|
||||
\uicontrol {Environment}.
|
||||
\endlist
|
||||
|
||||
\section1 Blending Colors
|
||||
|
||||
To determine how the colors of a model blend with the colors of the models
|
||||
behind it, set the \uicontrol {Blend mode} property. To make opaque objects
|
||||
occlude the objects behind them, select \uicontrol {SourceOver}.
|
||||
|
||||
For a lighter result, select \uicontrol Screen to blend colors using an
|
||||
inverted multiply or \uicontrol ColorDodge to blend them by inverted
|
||||
division. Color dodge produces an even lighter result than screen.
|
||||
|
||||
For a darker result, select \uicontrol Multiply to blend colors using a
|
||||
multiply or \uicontrol ColorBurn to blend them by inverted division, where
|
||||
the result also is inverted. Color burn produces an even darker result than
|
||||
multiply.
|
||||
|
||||
The screen and multiply modes are order-independent, so select them to
|
||||
avoid \e popping, which can happen when using semi-opaque objects and
|
||||
sorting the back and front faces or models.
|
||||
|
||||
For a result with higher contrast, select \uicontrol Overlay, which is a mix
|
||||
of the multiply and screen modes.
|
||||
|
||||
\section1 Lighting Materials
|
||||
|
||||
To set the lighting method for generating a material, use the
|
||||
\uicontrol Lighting property. Select \uicontrol {Fragment lighting} to
|
||||
calculate diffuse and specular lighting for each rendered pixel. Some
|
||||
effects, such as Fresnel or a bump map, require fragment lighting.
|
||||
|
||||
To skip lighting calculation, select \uicontrol {No lighting}. This is very
|
||||
fast and quite effective when using image maps that do not need to be shaded
|
||||
by lighting.
|
||||
|
||||
To set the base color for the material, use the \uicontrol {Diffuse Color}
|
||||
property. You can either use the color picker or specify a RBG value. Set
|
||||
the diffuse color to black to create purely-specular materials, such as
|
||||
metals or mirrors. To apply a texture to a material, set it as the value of
|
||||
the \uicontrol {Diffuse map} property. Using a texture with transparency
|
||||
also applies the alpha channel as an \uicontrol {Opacity map}. You can set
|
||||
the opacity of the material independently of the model as the value of the
|
||||
\uicontrol Opacity property.
|
||||
|
||||
\section1 Self-Illuminating Materials
|
||||
|
||||
To set the color and amount of self-illumination for a material, use the
|
||||
\uicontrol {Emissive color} and \uicontrol {Emissive factor} properties. In
|
||||
a scene with black ambient lighting, a material with an emissive factor of 0
|
||||
is black where the light does not shine on it. Setting the emissive factor
|
||||
to 1 shows the material in its diffuse color instead.
|
||||
|
||||
To use a Texture for specifying the emissive factor for different parts of
|
||||
the material, set the \uicontrol {Emissive map} property. Using a grayscale
|
||||
image does not affect the color of the result, while using a color image
|
||||
produces glowing regions with the color affected by the emissive map.
|
||||
|
||||
\section1 Using Highlights and Reflections
|
||||
|
||||
You can control the highlights and reflections on a material by setting the
|
||||
properties in the \uicontrol Specular group. You can use the color picker
|
||||
or set a RGB value to specify the color used to adjust specular reflections.
|
||||
Use white for no effect.
|
||||
|
||||
To use a color texture to modulate the amount and the color of specularity
|
||||
across the surface of a material, set the \uicontrol {Specular map}
|
||||
property. Set the \uicontrol {Specular amount} property to specify the
|
||||
strength of specularity. This property does not affect the specular
|
||||
reflection map, but it does affect the amount of reflections from a scene's
|
||||
light probe.
|
||||
|
||||
\note Unless your mesh is high-resolution, you may need to use fragment
|
||||
lighting to get good specular highlights from scene lights.
|
||||
|
||||
To determine how to calculate specular highlights for lights in the scene,
|
||||
set the \uicontrol {Specular model}. In addition to the default mode, you
|
||||
can use the GGX or Ward lighting model.
|
||||
|
||||
To use a Texture for specular highlighting on a material, set the
|
||||
\uicontrol {Reflection map} property. When the texture is applied using
|
||||
environmental mapping (not UV mapping), the map appears to be reflecting
|
||||
from the environment as you rotate the model. Specular reflection maps are
|
||||
an easy way to add a high-quality look at a relatively low cost.
|
||||
|
||||
To specify an image to use as the specular reflection map, set the
|
||||
\uicontrol {Light probe} property.
|
||||
|
||||
Crisp images cause your material to look very glossy. The more you
|
||||
blur your image, the softer your material appears.
|
||||
|
||||
To decrease head-on reflections (looking directly at the surface)
|
||||
while maintaining reflections seen at grazing angles, set the
|
||||
\uicontrol {Fresnel power} property. To select the angles to control,
|
||||
set the \uicontrol {Index of refraction} property.
|
||||
|
||||
To control the size of the specular highlights generated from lights and the
|
||||
clarity of reflections in general, set the \uicontrol {Specular roughness}
|
||||
property. Larger values increase the roughness, while softening specular
|
||||
highlights and blurring reflections. To control the specular roughness of
|
||||
the material using a Texture, set the \uicontrol {Roughness map property}.
|
||||
|
||||
\section1 Simulating Geometry Displacement
|
||||
|
||||
Specify the properties in the \uicontrol {Bump/Normal} group to simulate
|
||||
fine geometry displacement across the surface of the material. Set the
|
||||
\uicontrol {Bump map} property to use a grayscale texture for the
|
||||
simulation. Brighter pixels indicate raised regions.
|
||||
|
||||
To use an image for simulation, set the \uicontrol {Normal map} property.
|
||||
The RGB channels indicate XYZ normal deviations.
|
||||
|
||||
The amount of displacement is controlled by the \uicontrol {Bump amount}
|
||||
property.
|
||||
|
||||
Bump and normal maps do not affect the silhouette of a model. To affect the
|
||||
silhouette, set the \uicontrol {Displacement map} property. It specifies a
|
||||
grayscale image used to offset the vertices of geometry across the surface
|
||||
of the material. The \uicontrol {Displacement amount} property specifies the
|
||||
offset amount.
|
||||
|
||||
\section1 Specifying Material Translucency
|
||||
|
||||
Set the properties in the \uicontrol Translucency group to control how much
|
||||
light can pass through the material from behind. To use a grayscale texture,
|
||||
specify it as the value of the \uicontrol {Translucency map} property.
|
||||
|
||||
To specify the amount of light wrap for the translucency map, set the
|
||||
\uicontrol {Diffuse light wrap} property. A value of 0 does not wrap the
|
||||
light at all, while a value of 1 wraps the light all around the object.
|
||||
|
||||
To specify the amount of falloff for the translucency based on
|
||||
the angle of the normals of the object to the light source, set
|
||||
the \uicontrol {Translucency falloff} property.
|
||||
|
||||
\section1 Culling Faces
|
||||
|
||||
Set the \uicontrol {Culling mode} property to determine whether the front
|
||||
and back faces of a model are rendered. Culling modes check whether the
|
||||
points in the polygon appear in clockwise or counter-clockwise order when
|
||||
projected onto the screen. If front-facing polygons have a clockwise
|
||||
winding, but the polygon projected on the screen has a counter-clockwise
|
||||
winding, the projected polygon is rotated to face away from the camera and
|
||||
is not rendered. Culling makes rendering objects quicker and more efficient
|
||||
by reducing the number of polygons to draw.
|
||||
|
||||
*/
|
||||
@@ -61,7 +61,8 @@ public:
|
||||
QSize captureImageMinimumSize,
|
||||
QSize captureImageMaximumSize,
|
||||
qint32 stateInstanceId,
|
||||
const QList<QColor> &edit3dBackgroundColor)
|
||||
const QList<QColor> &edit3dBackgroundColor,
|
||||
const QColor &edit3dGridColor)
|
||||
: instances(instanceContainer)
|
||||
, reparentInstances(reparentContainer)
|
||||
, ids(idVector)
|
||||
@@ -78,6 +79,7 @@ public:
|
||||
, captureImageMaximumSize(captureImageMaximumSize)
|
||||
, stateInstanceId{stateInstanceId}
|
||||
, edit3dBackgroundColor{edit3dBackgroundColor}
|
||||
, edit3dGridColor{edit3dGridColor}
|
||||
{}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const CreateSceneCommand &command)
|
||||
@@ -98,6 +100,7 @@ public:
|
||||
out << command.captureImageMinimumSize;
|
||||
out << command.captureImageMaximumSize;
|
||||
out << command.edit3dBackgroundColor;
|
||||
out << command.edit3dGridColor;
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -120,6 +123,7 @@ public:
|
||||
in >> command.captureImageMinimumSize;
|
||||
in >> command.captureImageMaximumSize;
|
||||
in >> command.edit3dBackgroundColor;
|
||||
in >> command.edit3dGridColor;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -141,6 +145,7 @@ public:
|
||||
QSize captureImageMaximumSize;
|
||||
qint32 stateInstanceId = 0;
|
||||
QList<QColor> edit3dBackgroundColor;
|
||||
QColor edit3dGridColor;
|
||||
};
|
||||
|
||||
QDebug operator<<(QDebug debug, const CreateSceneCommand &command);
|
||||
|
||||
@@ -40,6 +40,7 @@ public:
|
||||
ActiveSceneChanged,
|
||||
RenderModelNodePreviewImage,
|
||||
Import3DSupport,
|
||||
ModelAtPos,
|
||||
None };
|
||||
|
||||
PuppetToCreatorCommand(Type type, const QVariant &data);
|
||||
|
||||
@@ -57,10 +57,12 @@ public:
|
||||
ParticlesRestart,
|
||||
ParticlesSeek,
|
||||
SelectBackgroundColor,
|
||||
SelectGridColor,
|
||||
ResetBackgroundColor,
|
||||
GetModelAtPos
|
||||
};
|
||||
|
||||
explicit View3DActionCommand(Type type, const QVariant &value);
|
||||
View3DActionCommand(Type type, const QVariant &value);
|
||||
|
||||
View3DActionCommand() = default;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<file>mockfiles/images/directional@2x.png</file>
|
||||
<file>mockfiles/images/point.png</file>
|
||||
<file>mockfiles/images/point@2x.png</file>
|
||||
<file>mockfiles/images/floor_tex.png</file>
|
||||
<file>mockfiles/images/static_floor.png</file>
|
||||
<file>mockfiles/images/spot.png</file>
|
||||
<file>mockfiles/images/spot@2x.png</file>
|
||||
<file>mockfiles/qt5/AdjustableArrow.qml</file>
|
||||
|
||||
BIN
share/qtcreator/qml/qmlpuppet/mockfiles/images/static_floor.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
@@ -47,6 +47,7 @@ Item {
|
||||
property alias contentItem: contentItem
|
||||
property color backgroundGradientColorStart: "#222222"
|
||||
property color backgroundGradientColorEnd: "#999999"
|
||||
property color gridColor: "#aaaaaa"
|
||||
|
||||
enum SelectionMode { Item, Group }
|
||||
enum TransformMode { Move, Rotate, Scale }
|
||||
@@ -96,12 +97,14 @@ Item {
|
||||
{"usePerspective": usePerspective,
|
||||
"showSceneLight": showEditLight,
|
||||
"showGrid": showGrid,
|
||||
"gridColor": gridColor,
|
||||
"importScene": activeScene,
|
||||
"cameraZoomFactor": cameraControl._zoomFactor,
|
||||
"z": 1});
|
||||
editView.usePerspective = Qt.binding(function() {return usePerspective;});
|
||||
editView.showSceneLight = Qt.binding(function() {return showEditLight;});
|
||||
editView.showGrid = Qt.binding(function() {return showGrid;});
|
||||
editView.gridColor = Qt.binding(function() {return gridColor;});
|
||||
editView.cameraZoomFactor = Qt.binding(function() {return cameraControl._zoomFactor;});
|
||||
|
||||
selectionBoxes.length = 0;
|
||||
@@ -217,10 +220,19 @@ Item {
|
||||
function updateViewStates(viewStates)
|
||||
{
|
||||
if ("selectBackgroundColor" in viewStates) {
|
||||
var color = viewStates.selectBackgroundColor
|
||||
backgroundGradientColorStart = color[0];
|
||||
backgroundGradientColorEnd = color[1];
|
||||
if (Array.isArray(viewStates.selectBackgroundColor)) {
|
||||
var colors = viewStates.selectBackgroundColor
|
||||
backgroundGradientColorStart = colors[0];
|
||||
backgroundGradientColorEnd = colors[1];
|
||||
} else {
|
||||
var color = viewStates.selectBackgroundColor
|
||||
backgroundGradientColorStart = color;
|
||||
backgroundGradientColorEnd = color;
|
||||
}
|
||||
}
|
||||
|
||||
if ("selectGridColor" in viewStates)
|
||||
viewRoot.gridColor = viewStates.selectGridColor
|
||||
}
|
||||
|
||||
// If resetToDefault is true, tool states not specifically set to anything will be reset to
|
||||
|
||||
@@ -33,6 +33,7 @@ Node {
|
||||
property alias lines: gridGeometry.lines
|
||||
property alias step: gridGeometry.step
|
||||
property alias subdivAlpha: subGridMaterial.opacity
|
||||
property alias gridColor: mainGridMaterial.diffuseColor
|
||||
|
||||
eulerRotation.x: 90
|
||||
|
||||
|
||||
@@ -45,10 +45,6 @@ View3D {
|
||||
|
||||
Node {
|
||||
DirectionalLight {
|
||||
shadowMapQuality: Light.ShadowMapQualityMedium
|
||||
shadowFilter: 20
|
||||
shadowFactor: 21
|
||||
castsShadow: true
|
||||
eulerRotation.x: -26
|
||||
eulerRotation.y: -57
|
||||
}
|
||||
@@ -68,25 +64,5 @@ View3D {
|
||||
source: "#Sphere"
|
||||
materials: previewMaterial
|
||||
}
|
||||
|
||||
Model {
|
||||
id: floorModel
|
||||
source: "#Rectangle"
|
||||
scale.y: 8
|
||||
scale.x: 8
|
||||
eulerRotation.x: -90
|
||||
materials: floorMaterial
|
||||
DefaultMaterial {
|
||||
id: floorMaterial
|
||||
diffuseMap: floorTex
|
||||
|
||||
Texture {
|
||||
id: floorTex
|
||||
source: "../images/floor_tex.png"
|
||||
scaleU: floorModel.scale.x
|
||||
scaleV: floorModel.scale.y
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,14 +123,13 @@ Item {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
// We can use static image in Qt5 as only small previews will be generated
|
||||
Image {
|
||||
id: backgroundRect
|
||||
anchors.fill: parent
|
||||
z: -1
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 1.0; color: "#222222" }
|
||||
GradientStop { position: 0.0; color: "#999999" }
|
||||
}
|
||||
source: "../images/static_floor.png"
|
||||
fillMode: Image.Stretch
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ View3D {
|
||||
function fitToViewPort(closeUp)
|
||||
{
|
||||
// The magic number is the distance from camera default pos to origin
|
||||
_generalHelper.calculateNodeBoundsAndFocusCamera(theCamera, sourceModel, root,
|
||||
_generalHelper.calculateNodeBoundsAndFocusCamera(theCamera, model, root,
|
||||
1040, closeUp);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ View3D {
|
||||
|
||||
materials: [
|
||||
DefaultMaterial {
|
||||
diffuseColor: "#4aee45"
|
||||
diffuseColor: "#999999"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ View3D {
|
||||
property bool usePerspective: false
|
||||
property alias showSceneLight: sceneLight.visible
|
||||
property alias showGrid: helperGrid.visible
|
||||
property alias gridColor: helperGrid.gridColor
|
||||
property alias sceneHelpers: sceneHelpers
|
||||
property alias perspectiveCamera: scenePerspectiveCamera
|
||||
property alias orthoCamera: sceneOrthoCamera
|
||||
|
||||
@@ -48,6 +48,7 @@ Item {
|
||||
property alias contentItem: contentItem
|
||||
property color backgroundGradientColorStart: "#222222"
|
||||
property color backgroundGradientColorEnd: "#999999"
|
||||
property color gridColor: "#aaaaaa"
|
||||
|
||||
enum SelectionMode { Item, Group }
|
||||
enum TransformMode { Move, Rotate, Scale }
|
||||
@@ -100,12 +101,14 @@ Item {
|
||||
{"usePerspective": usePerspective,
|
||||
"showSceneLight": showEditLight,
|
||||
"showGrid": showGrid,
|
||||
"gridColor": gridColor,
|
||||
"importScene": activeScene,
|
||||
"cameraZoomFactor": cameraControl._zoomFactor,
|
||||
"z": 1});
|
||||
editView.usePerspective = Qt.binding(function() {return usePerspective;});
|
||||
editView.showSceneLight = Qt.binding(function() {return showEditLight;});
|
||||
editView.showGrid = Qt.binding(function() {return showGrid;});
|
||||
editView.gridColor = Qt.binding(function() {return gridColor;});
|
||||
editView.cameraZoomFactor = Qt.binding(function() {return cameraControl._zoomFactor;});
|
||||
|
||||
selectionBoxes.length = 0;
|
||||
@@ -211,10 +214,19 @@ Item {
|
||||
function updateViewStates(viewStates)
|
||||
{
|
||||
if ("selectBackgroundColor" in viewStates) {
|
||||
var color = viewStates.selectBackgroundColor
|
||||
backgroundGradientColorStart = color[0];
|
||||
backgroundGradientColorEnd = color[1];
|
||||
if (Array.isArray(viewStates.selectBackgroundColor)) {
|
||||
var colors = viewStates.selectBackgroundColor
|
||||
backgroundGradientColorStart = colors[0];
|
||||
backgroundGradientColorEnd = colors[1];
|
||||
} else {
|
||||
var color = viewStates.selectBackgroundColor
|
||||
backgroundGradientColorStart = color;
|
||||
backgroundGradientColorEnd = color;
|
||||
}
|
||||
}
|
||||
|
||||
if ("selectGridColor" in viewStates)
|
||||
viewRoot.gridColor = viewStates.selectGridColor
|
||||
}
|
||||
|
||||
// If resetToDefault is true, tool states not specifically set to anything will be reset to
|
||||
|
||||
@@ -33,6 +33,7 @@ Node {
|
||||
property alias lines: gridGeometry.lines
|
||||
property alias step: gridGeometry.step
|
||||
property alias subdivAlpha: subGridMaterial.opacity
|
||||
property alias gridColor: mainGridMaterial.diffuseColor
|
||||
|
||||
eulerRotation.x: 90
|
||||
|
||||
|
||||
@@ -45,10 +45,6 @@ View3D {
|
||||
|
||||
Node {
|
||||
DirectionalLight {
|
||||
shadowMapQuality: Light.ShadowMapQualityMedium
|
||||
shadowFilter: 20
|
||||
shadowFactor: 21
|
||||
castsShadow: true
|
||||
eulerRotation.x: -26
|
||||
eulerRotation.y: -57
|
||||
}
|
||||
@@ -70,24 +66,5 @@ View3D {
|
||||
materials: previewMaterial
|
||||
}
|
||||
|
||||
Model {
|
||||
id: floorModel
|
||||
source: "#Rectangle"
|
||||
scale.y: 8
|
||||
scale.x: 8
|
||||
eulerRotation.x: -90
|
||||
materials: floorMaterial
|
||||
DefaultMaterial {
|
||||
id: floorMaterial
|
||||
diffuseMap: floorTex
|
||||
|
||||
Texture {
|
||||
id: floorTex
|
||||
source: "../images/floor_tex.png"
|
||||
scaleU: floorModel.scale.x
|
||||
scaleV: floorModel.scale.y
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,6 +126,50 @@ Item {
|
||||
GradientStop { position: 1.0; color: "#222222" }
|
||||
GradientStop { position: 0.0; color: "#999999" }
|
||||
}
|
||||
|
||||
// Use View3D instead of static image to make background look good on all resolutions
|
||||
View3D {
|
||||
anchors.fill: parent
|
||||
environment: sceneEnv
|
||||
|
||||
SceneEnvironment {
|
||||
id: sceneEnv
|
||||
antialiasingMode: SceneEnvironment.MSAA
|
||||
antialiasingQuality: SceneEnvironment.High
|
||||
}
|
||||
|
||||
DirectionalLight {
|
||||
eulerRotation.x: -26
|
||||
eulerRotation.y: -57
|
||||
}
|
||||
|
||||
PerspectiveCamera {
|
||||
y: 125
|
||||
z: 120
|
||||
eulerRotation.x: -31
|
||||
clipNear: 1
|
||||
clipFar: 1000
|
||||
}
|
||||
|
||||
Model {
|
||||
id: floorModel
|
||||
source: "#Rectangle"
|
||||
scale.y: 8
|
||||
scale.x: 8
|
||||
eulerRotation.x: -90
|
||||
materials: floorMaterial
|
||||
DefaultMaterial {
|
||||
id: floorMaterial
|
||||
diffuseMap: floorTex
|
||||
Texture {
|
||||
id: floorTex
|
||||
source: "../images/floor_tex.png"
|
||||
scaleU: floorModel.scale.x
|
||||
scaleV: floorModel.scale.y
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ View3D {
|
||||
function fitToViewPort(closeUp)
|
||||
{
|
||||
// The magic number is the distance from camera default pos to origin
|
||||
_generalHelper.calculateNodeBoundsAndFocusCamera(theCamera, sourceModel, root,
|
||||
_generalHelper.calculateNodeBoundsAndFocusCamera(theCamera, model, root,
|
||||
1040, closeUp);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ View3D {
|
||||
|
||||
materials: [
|
||||
DefaultMaterial {
|
||||
diffuseColor: "#4aee45"
|
||||
diffuseColor: "#999999"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ View3D {
|
||||
property bool usePerspective: false
|
||||
property alias showSceneLight: sceneLight.visible
|
||||
property alias showGrid: helperGrid.visible
|
||||
property alias gridColor: helperGrid.gridColor
|
||||
property alias sceneHelpers: sceneHelpers
|
||||
property alias perspectiveCamera: scenePerspectiveCamera
|
||||
property alias orthoCamera: sceneOrthoCamera
|
||||
|
||||
@@ -812,7 +812,7 @@ QVector3D GeneralHelper::pivotScenePosition(QQuick3DNode *node) const
|
||||
// Calculate bounds for given node, including all child nodes.
|
||||
// Returns true if the tree contains at least one Model node.
|
||||
bool GeneralHelper::getBounds(QQuick3DViewport *view3D, QQuick3DNode *node, QVector3D &minBounds,
|
||||
QVector3D &maxBounds, bool recursive)
|
||||
QVector3D &maxBounds)
|
||||
{
|
||||
if (!node) {
|
||||
const float halfExtent = 100.f;
|
||||
@@ -825,7 +825,7 @@ bool GeneralHelper::getBounds(QQuick3DViewport *view3D, QQuick3DNode *node, QVec
|
||||
auto nodePriv = QQuick3DObjectPrivate::get(node);
|
||||
auto renderNode = static_cast<QSSGRenderNode *>(nodePriv->spatialNode);
|
||||
|
||||
if (recursive && renderNode) {
|
||||
if (renderNode) {
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 4, 0)
|
||||
if (renderNode->flags.testFlag(QSSGRenderNode::Flag::TransformDirty))
|
||||
renderNode->calculateLocalTransform();
|
||||
@@ -850,7 +850,7 @@ bool GeneralHelper::getBounds(QQuick3DViewport *view3D, QQuick3DNode *node, QVec
|
||||
if (auto childNode = qobject_cast<QQuick3DNode *>(child)) {
|
||||
QVector3D newMinBounds = minBounds;
|
||||
QVector3D newMaxBounds = maxBounds;
|
||||
bool childHasModel = getBounds(view3D, childNode, newMinBounds, newMaxBounds, true);
|
||||
bool childHasModel = getBounds(view3D, childNode, newMinBounds, newMaxBounds);
|
||||
// Ignore any subtrees that do not have Model in them as we don't need those
|
||||
// for visual bounds calculations
|
||||
if (childHasModel) {
|
||||
|
||||
@@ -130,7 +130,7 @@ private:
|
||||
void handlePendingToolStateUpdate();
|
||||
QVector3D pivotScenePosition(QQuick3DNode *node) const;
|
||||
bool getBounds(QQuick3DViewport *view3D, QQuick3DNode *node, QVector3D &minBounds,
|
||||
QVector3D &maxBounds, bool recursive = false);
|
||||
QVector3D &maxBounds);
|
||||
|
||||
QTimer m_overlayUpdateTimer;
|
||||
QTimer m_toolStateUpdateTimer;
|
||||
|
||||
@@ -198,8 +198,7 @@ void IconRenderer::finishCreateIcon()
|
||||
|
||||
render(saveFile);
|
||||
|
||||
// Allow little time for file operations to finish
|
||||
QTimer::singleShot(1000, qGuiApp, &QGuiApplication::quit);
|
||||
QTimer::singleShot(0, qGuiApp, &QGuiApplication::quit);
|
||||
}
|
||||
|
||||
void IconRenderer::render(const QString &fileName)
|
||||
|
||||
@@ -848,6 +848,18 @@ void Qt5InformationNodeInstanceServer::updateActiveSceneToEditView3D(bool timerC
|
||||
m_activeSceneIdUpdateTimer.stop();
|
||||
}
|
||||
|
||||
// We may have to substitute another scene to work around QTBUG-103316
|
||||
// The worked around issue is that if a material is used in multiple scenes, there is some
|
||||
// kind of ownership for it in the first View3D that uses it, so if that view is not rendered
|
||||
// first, the material will not be properly initialized for other views using it.
|
||||
// To make materials work properly, we ensure that views are rendered at least once in the
|
||||
// order they appear in the scene.
|
||||
if (!m_priorityView3DsToRender.isEmpty()) {
|
||||
QObject *sceneRoot = find3DSceneRoot(m_priorityView3DsToRender.first());
|
||||
if (sceneRoot)
|
||||
activeSceneVar = objectToVariant(sceneRoot);
|
||||
}
|
||||
|
||||
QMetaObject::invokeMethod(m_editView3DData.rootItem, "setActiveScene", Qt::QueuedConnection,
|
||||
Q_ARG(QVariant, activeSceneVar),
|
||||
Q_ARG(QVariant, QVariant::fromValue(sceneId)));
|
||||
@@ -1012,7 +1024,7 @@ void Qt5InformationNodeInstanceServer::doRender3DEditView()
|
||||
// If we have only one or no render queued, send the result to the creator side.
|
||||
// Otherwise, we'll hold on that until we have rendered all pending frames to ensure sent
|
||||
// results are correct.
|
||||
if (m_need3DEditViewRender <= 1) {
|
||||
if (m_priorityView3DsToRender.isEmpty() && m_need3DEditViewRender <= 1) {
|
||||
nodeInstanceClient()->handlePuppetToCreatorCommand({PuppetToCreatorCommand::Render3DView,
|
||||
QVariant::fromValue(imgContainer)});
|
||||
#ifdef QUICK3D_PARTICLES_MODULE
|
||||
@@ -1023,6 +1035,25 @@ void Qt5InformationNodeInstanceServer::doRender3DEditView()
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_priorityView3DsToRender.isEmpty()) {
|
||||
static int tryCounter = 0;
|
||||
QObject *sceneRoot = find3DSceneRoot(m_priorityView3DsToRender.first());
|
||||
bool needAnotherRender = false;
|
||||
if (sceneRoot) {
|
||||
// Active scene is updated asynchronously, so verify we are actually rendering
|
||||
// the correct priority scene
|
||||
QObject *activeScene = QQmlProperty::read(m_editView3DData.rootItem, "activeScene").value<QObject *>();
|
||||
needAnotherRender = activeScene != sceneRoot;
|
||||
}
|
||||
|
||||
if (!needAnotherRender || ++tryCounter > 10) {
|
||||
m_priorityView3DsToRender.removeFirst();
|
||||
updateActiveSceneToEditView3D();
|
||||
tryCounter = 0;
|
||||
}
|
||||
++m_need3DEditViewRender;
|
||||
}
|
||||
|
||||
if (m_need3DEditViewRender > 0) {
|
||||
// We queue another render even if the requested render count was one, because another
|
||||
// render is needed to ensure gizmo geometries are properly updated.
|
||||
@@ -1059,6 +1090,13 @@ void Qt5InformationNodeInstanceServer::doRenderModelNodeImageView()
|
||||
{
|
||||
// This crashes on Qt 6.0.x due to QtQuick3D issue, so the preview generation is disabled
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) || QT_VERSION >= QT_VERSION_CHECK(6, 1, 0)
|
||||
if (!m_priorityView3DsToRender.isEmpty()) {
|
||||
// Postpone any preview renders until we have rendered the priority views to ensure
|
||||
// materials in material library are properly initialized
|
||||
m_renderModelNodeImageViewTimer.start(17);
|
||||
return;
|
||||
}
|
||||
|
||||
RequestModelNodePreviewImageCommand cmd = *m_modelNodePreviewImageCommands.begin();
|
||||
ServerNodeInstance instance;
|
||||
if (cmd.renderItemId() >= 0)
|
||||
@@ -1578,6 +1616,8 @@ void Qt5InformationNodeInstanceServer::add3DViewPorts(const QList<ServerNodeInst
|
||||
for (const ServerNodeInstance &instance : instanceList) {
|
||||
if (instance.isSubclassOf("QQuick3DViewport")) {
|
||||
QObject *obj = instance.internalObject();
|
||||
if (!m_editView3DSetupDone)
|
||||
m_priorityView3DsToRender.append(obj); // Workaround for quick3d bug QTBUG-103316
|
||||
if (!m_view3Ds.contains(obj)) {
|
||||
m_view3Ds << obj;
|
||||
QObject::connect(obj, SIGNAL(widthChanged()), this, SLOT(handleView3DSizeChange()));
|
||||
@@ -1746,7 +1786,7 @@ QObject *Qt5InformationNodeInstanceServer::find3DSceneRoot(QObject *obj) const
|
||||
}
|
||||
|
||||
void Qt5InformationNodeInstanceServer::setup3DEditView(const QList<ServerNodeInstance> &instanceList,
|
||||
const QHash<QString, QVariantMap> &toolStates)
|
||||
const CreateSceneCommand &command)
|
||||
{
|
||||
#ifdef QUICK3D_MODULE
|
||||
if (!m_editView3DData.rootItem)
|
||||
@@ -1779,6 +1819,7 @@ void Qt5InformationNodeInstanceServer::setup3DEditView(const QList<ServerNodeIns
|
||||
Qt5InformationNodeInstanceServer::updateActiveSceneToEditView3D(true);
|
||||
});
|
||||
|
||||
const QHash<QString, QVariantMap> &toolStates = command.edit3dToolStates;
|
||||
QString lastSceneId;
|
||||
auto helper = qobject_cast<QmlDesigner::Internal::GeneralHelper *>(m_3dHelper);
|
||||
if (helper) {
|
||||
@@ -1832,11 +1873,23 @@ void Qt5InformationNodeInstanceServer::setup3DEditView(const QList<ServerNodeIns
|
||||
|
||||
createCameraAndLightGizmos(instanceList);
|
||||
|
||||
if (!command.edit3dBackgroundColor.isEmpty()) {
|
||||
View3DActionCommand backgroundColorCommand(View3DActionCommand::SelectBackgroundColor,
|
||||
QVariant::fromValue(command.edit3dBackgroundColor));
|
||||
view3DAction(backgroundColorCommand);
|
||||
}
|
||||
|
||||
if (command.edit3dGridColor.isValid()) {
|
||||
View3DActionCommand backgroundColorCommand(View3DActionCommand::SelectGridColor,
|
||||
QVariant::fromValue(command.edit3dGridColor));
|
||||
view3DAction(backgroundColorCommand);
|
||||
}
|
||||
|
||||
// Queue two renders to make sure icon gizmos update properly
|
||||
render3DEditView(2);
|
||||
#else
|
||||
Q_UNUSED(instanceList)
|
||||
Q_UNUSED(toolStates)
|
||||
Q_UNUSED(command)
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1958,7 +2011,7 @@ void Qt5InformationNodeInstanceServer::createScene(const CreateSceneCommand &com
|
||||
nodeInstanceClient()->componentCompleted(createComponentCompletedCommand(instanceList));
|
||||
|
||||
if (ViewConfig::isQuick3DMode()) {
|
||||
setup3DEditView(instanceList, command.edit3dToolStates);
|
||||
setup3DEditView(instanceList, command);
|
||||
updateRotationBlocks(command.auxiliaryChanges);
|
||||
}
|
||||
|
||||
@@ -1967,12 +2020,6 @@ void Qt5InformationNodeInstanceServer::createScene(const CreateSceneCommand &com
|
||||
#ifdef IMPORT_QUICK3D_ASSETS
|
||||
QTimer::singleShot(0, this, &Qt5InformationNodeInstanceServer::resolveImportSupport);
|
||||
#endif
|
||||
|
||||
if (!command.edit3dBackgroundColor.isEmpty()) {
|
||||
View3DActionCommand backgroundColorCommand(View3DActionCommand::SelectBackgroundColor,
|
||||
QVariant::fromValue(command.edit3dBackgroundColor));
|
||||
view3DAction(backgroundColorCommand);
|
||||
}
|
||||
}
|
||||
|
||||
void Qt5InformationNodeInstanceServer::sendChildrenChangedCommand(const QList<ServerNodeInstance> &childList)
|
||||
@@ -2237,9 +2284,12 @@ void Qt5InformationNodeInstanceServer::view3DAction(const View3DActionCommand &c
|
||||
case View3DActionCommand::ShowCameraFrustum:
|
||||
updatedToolState.insert("showCameraFrustum", command.isEnabled());
|
||||
break;
|
||||
case View3DActionCommand::SelectBackgroundColor: {
|
||||
case View3DActionCommand::SelectBackgroundColor:
|
||||
updatedViewState.insert("selectBackgroundColor", command.value());
|
||||
break;
|
||||
case View3DActionCommand::SelectGridColor: {
|
||||
updatedViewState.insert("selectGridColor", command.value());
|
||||
break;
|
||||
}
|
||||
#ifdef QUICK3D_PARTICLES_MODULE
|
||||
case View3DActionCommand::ShowParticleEmitter:
|
||||
@@ -2269,6 +2319,32 @@ void Qt5InformationNodeInstanceServer::view3DAction(const View3DActionCommand &c
|
||||
m_particleAnimationDriver->setSeekerPosition(static_cast<const View3DSeekActionCommand &>(command).position());
|
||||
break;
|
||||
#endif
|
||||
#ifdef QUICK3D_MODULE
|
||||
case View3DActionCommand::GetModelAtPos: {
|
||||
// pick a Quick3DModel at view position
|
||||
auto helper = qobject_cast<QmlDesigner::Internal::GeneralHelper *>(m_3dHelper);
|
||||
if (!helper)
|
||||
return;
|
||||
|
||||
QQmlProperty editViewProp(m_editView3DData.rootItem, "editView", context());
|
||||
QObject *obj = qvariant_cast<QObject *>(editViewProp.read());
|
||||
QQuick3DViewport *editView = qobject_cast<QQuick3DViewport *>(obj);
|
||||
|
||||
QPointF pos = command.value().toPointF();
|
||||
QQuick3DModel *hitModel = helper->pickViewAt(editView, pos.x(), pos.y()).objectHit();
|
||||
|
||||
// filter out picks of models created dynamically or inside components
|
||||
QQuick3DModel *resolvedPick = qobject_cast<QQuick3DModel *>(helper->resolvePick(hitModel));
|
||||
|
||||
if (resolvedPick) {
|
||||
ServerNodeInstance instance = instanceForObject(resolvedPick);
|
||||
nodeInstanceClient()->handlePuppetToCreatorCommand(
|
||||
{PuppetToCreatorCommand::ModelAtPos, QVariant(instance.instanceId())});
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ private:
|
||||
void createEditView3D();
|
||||
void create3DPreviewView();
|
||||
void setup3DEditView(const QList<ServerNodeInstance> &instanceList,
|
||||
const QHash<QString, QVariantMap> &toolStates);
|
||||
const CreateSceneCommand &command);
|
||||
void createCameraAndLightGizmos(const QList<ServerNodeInstance> &instanceList) const;
|
||||
void add3DViewPorts(const QList<ServerNodeInstance> &instanceList);
|
||||
void add3DScenes(const QList<ServerNodeInstance> &instanceList);
|
||||
@@ -165,6 +165,7 @@ private:
|
||||
QSet<QObject *> m_view3Ds;
|
||||
QMultiHash<QObject *, QObject *> m_3DSceneMap; // key: scene root, value: node
|
||||
QObject *m_active3DView = nullptr;
|
||||
QList<QObject *> m_priorityView3DsToRender;
|
||||
QObject *m_active3DScene = nullptr;
|
||||
QSet<ServerNodeInstance> m_parentChangedSet;
|
||||
QList<ServerNodeInstance> m_completedComponentList;
|
||||
|
||||
@@ -405,6 +405,7 @@ QImage Qt5NodeInstanceServer::grabItem(QQuickItem *item)
|
||||
QQuickItemPrivate *pItem = QQuickItemPrivate::get(item);
|
||||
|
||||
const bool renderEffects = qEnvironmentVariableIsSet("QMLPUPPET_RENDER_EFFECTS");
|
||||
const bool smoothRendering = qEnvironmentVariableIsSet("QMLPUPPET_SMOOTH_RENDERING");
|
||||
|
||||
if (renderEffects) {
|
||||
if (parentEffectItem(item))
|
||||
@@ -427,17 +428,20 @@ QImage Qt5NodeInstanceServer::grabItem(QQuickItem *item)
|
||||
|
||||
ServerNodeInstance instance = instanceForObject(item);
|
||||
|
||||
const bool rootIs3DObject = rootIsRenderable3DObject();
|
||||
|
||||
// Setting layer enabled to false messes up the bounding rect.
|
||||
// Therefore we calculate it upfront.
|
||||
QRectF renderBoundingRect;
|
||||
if (instance.isValid())
|
||||
renderBoundingRect = instance.boundingRect();
|
||||
|
||||
else if (rootIsRenderable3DObject())
|
||||
else if (rootIs3DObject)
|
||||
renderBoundingRect = item->boundingRect();
|
||||
else
|
||||
renderBoundingRect = ServerNodeInstance::effectAdjustedBoundingRect(item);
|
||||
|
||||
const int scaleFactor = (smoothRendering && !rootIs3DObject) ? 2 : 1;
|
||||
|
||||
// Hide immediate children that have instances and are QQuickItems so we get only
|
||||
// the parent item's content, as compositing is handled on creator side.
|
||||
QSet<QQuickItem *> layerChildren;
|
||||
@@ -470,6 +474,8 @@ QImage Qt5NodeInstanceServer::grabItem(QQuickItem *item)
|
||||
// us to render it to a texture that we can grab to an image.
|
||||
QSGRenderContext *rc = QQuickWindowPrivate::get(m_viewData.window.data())->context;
|
||||
QSGLayer *layer = rc->sceneGraphContext()->createLayer(rc);
|
||||
if (smoothRendering)
|
||||
layer->setSamples(4);
|
||||
layer->setItem(pItem->itemNode());
|
||||
|
||||
layer->setRect(QRectF(renderBoundingRect.x(),
|
||||
@@ -478,8 +484,8 @@ QImage Qt5NodeInstanceServer::grabItem(QQuickItem *item)
|
||||
-renderBoundingRect.height()));
|
||||
|
||||
const QSize minSize = rc->sceneGraphContext()->minimumFBOSize();
|
||||
layer->setSize(QSize(qMax(minSize.width(), int(renderBoundingRect.width())),
|
||||
qMax(minSize.height(), int(renderBoundingRect.height()))));
|
||||
layer->setSize(QSize(qMax(minSize.width(), int(renderBoundingRect.width() * scaleFactor)),
|
||||
qMax(minSize.height(), int(renderBoundingRect.height() * scaleFactor))));
|
||||
layer->scheduleUpdate();
|
||||
|
||||
if (layer->updateTexture())
|
||||
@@ -489,6 +495,8 @@ QImage Qt5NodeInstanceServer::grabItem(QQuickItem *item)
|
||||
|
||||
delete layer;
|
||||
layer = nullptr;
|
||||
|
||||
renderImage.setDevicePixelRatio(scaleFactor);
|
||||
});
|
||||
|
||||
m_viewData.renderControl->render();
|
||||
@@ -514,7 +522,6 @@ QImage Qt5NodeInstanceServer::grabItem(QQuickItem *item)
|
||||
|
||||
if (!isLayerEnabled(pItem))
|
||||
pItem->derefFromEffectItem(false);
|
||||
|
||||
#else
|
||||
Q_UNUSED(item)
|
||||
#endif
|
||||
|
||||
@@ -111,8 +111,6 @@ void Qt5RenderNodeInstanceServer::collectItemChangesAndSendChangeCommands()
|
||||
}
|
||||
}
|
||||
|
||||
clearChangedPropertyList();
|
||||
|
||||
if (Internal::QuickItemNodeInstance::unifiedRenderPath()) {
|
||||
if (windowDirty)
|
||||
nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand({rootNodeInstance()}));
|
||||
@@ -134,13 +132,15 @@ void Qt5RenderNodeInstanceServer::collectItemChangesAndSendChangeCommands()
|
||||
}
|
||||
|
||||
if (rootIsRenderable3DObject() && rootNodeInstance().contentItem()
|
||||
&& DesignerSupport::isDirty(rootNodeInstance().contentItem(),
|
||||
DesignerSupport::AllMask)
|
||||
&& !changedPropertyList().isEmpty()
|
||||
&& nodeInstanceClient()->bytesToWrite() < 10000) {
|
||||
|
||||
Internal::QuickItemNodeInstance::updateDirtyNode(rootNodeInstance().contentItem());
|
||||
nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand({rootNodeInstance()}));
|
||||
}
|
||||
|
||||
clearChangedPropertyList();
|
||||
|
||||
inFunction = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,12 +504,12 @@ QImage QuickItemNodeInstance::renderImage() const
|
||||
if (s_unifiedRenderPath) {
|
||||
renderImage = nodeInstanceServer()->grabWindow();
|
||||
renderImage = renderImage.copy(renderBoundingRect.toRect());
|
||||
/* When grabbing an offscren window the device pixel ratio is 1 */
|
||||
renderImage.setDevicePixelRatio(1);
|
||||
} else {
|
||||
renderImage = nodeInstanceServer()->grabItem(quickItem());
|
||||
}
|
||||
|
||||
/* When grabbing an offscren window the device pixel ratio is 1 */
|
||||
renderImage.setDevicePixelRatio(1);
|
||||
#endif
|
||||
|
||||
return renderImage;
|
||||
|
||||
@@ -59,6 +59,10 @@ Item {
|
||||
width: itemLibraryIconWidth // to be set in Qml context
|
||||
height: itemLibraryIconHeight // to be set in Qml context
|
||||
source: itemLibraryIconPath // to be set by model
|
||||
|
||||
// Icons generated for components can change if the component is edited,
|
||||
// so don't cache them locally at Image level.
|
||||
cache: itemComponentSource === ""
|
||||
}
|
||||
|
||||
Text {
|
||||
|
||||
@@ -29,7 +29,7 @@ import QtQuick 2.15
|
||||
QtObject {
|
||||
id: values
|
||||
|
||||
property string baseFont: "TitilliumWeb"
|
||||
property string baseFont: "Titillium Web"
|
||||
|
||||
property real scaleFactor: 1.0
|
||||
property real checkBoxSize: Math.round(26 * values.scaleFactor)
|
||||
|
||||
@@ -128,7 +128,7 @@ Item {
|
||||
StudioControls.MenuSeparator {}
|
||||
|
||||
StudioControls.MenuItem {
|
||||
text: qsTr("New Material")
|
||||
text: qsTr("Create New Material")
|
||||
|
||||
onTriggered: materialBrowserModel.addNewMaterial()
|
||||
}
|
||||
@@ -169,7 +169,8 @@ Item {
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("No materials yet.\nClick '+' above to start.")
|
||||
text: qsTr("There are no materials in this project.<br>Select '<b>+</b>' to create one.")
|
||||
textFormat: Text.RichText
|
||||
color: StudioTheme.Values.themeTextColor
|
||||
font.pixelSize: StudioTheme.Values.mediumFontSize
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -179,7 +180,8 @@ Item {
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("Add QtQuick3D module using the Components view to enable the Material Browser.");
|
||||
text: qsTr("To use <b>Material Browser</b>, first add the QtQuick3D module in the <b>Components</b> view.");
|
||||
textFormat: Text.RichText
|
||||
color: StudioTheme.Values.themeTextColor
|
||||
font.pixelSize: StudioTheme.Values.mediumFontSize
|
||||
topPadding: 30
|
||||
|
||||
@@ -72,9 +72,12 @@ Rectangle {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
|
||||
onClicked: (mouse) => {
|
||||
onPressed: (mouse) => {
|
||||
materialBrowserModel.selectMaterial(index)
|
||||
if (mouse.button === Qt.RightButton)
|
||||
|
||||
if (mouse.button === Qt.LeftButton)
|
||||
rootView.startDragMaterial(index, mapToGlobal(mouse.x, mouse.y))
|
||||
else if (mouse.button === Qt.RightButton)
|
||||
root.showContextMenu()
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,9 @@ PropertyEditorPane {
|
||||
height: 150
|
||||
|
||||
Text {
|
||||
text: hasQuick3DImport ? qsTr("No materials yet.\nClick '+' above to start.")
|
||||
: qsTr("Add QtQuick3D module using the Components view to enable the Material Editor.")
|
||||
text: hasQuick3DImport ? qsTr("There are no materials in this project.<br>Select '<b>+</b>' to create one.")
|
||||
: qsTr("To use <b>Material Editor</b>, first add the QtQuick3D module in the <b>Components</b> view.")
|
||||
textFormat: Text.RichText
|
||||
color: StudioTheme.Values.themeTextColor
|
||||
font.pixelSize: StudioTheme.Values.mediumFontSize
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
@@ -63,7 +63,7 @@ Rectangle {
|
||||
buttonSize: root.height
|
||||
enabled: hasQuick3DImport
|
||||
onClicked: root.toolBarAction(ToolBarAction.AddNewMaterial)
|
||||
tooltip: qsTr("Add a new material.")
|
||||
tooltip: qsTr("Create new material.")
|
||||
}
|
||||
|
||||
IconButton {
|
||||
|
||||
@@ -75,7 +75,7 @@ Section {
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
width: implicitWidth
|
||||
backendValue: backendValues.display
|
||||
model: [ "IconOnly", "TextOnly", "TextBesideIcon" ]
|
||||
model: [ "IconOnly", "TextOnly", "TextBesideIcon", "TextUnderIcon" ]
|
||||
scope: "AbstractButton"
|
||||
enabled: backendValue.isAvailable
|
||||
}
|
||||
@@ -140,6 +140,7 @@ Section {
|
||||
|
||||
SecondColumnLayout {
|
||||
CheckBox {
|
||||
id: autoRepeat
|
||||
text: backendValues.autoRepeat.valueToString
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
@@ -148,5 +149,63 @@ Section {
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Repeat delay")
|
||||
tooltip: qsTr("Initial delay of auto-repetition in milliseconds.")
|
||||
enabled: autoRepeat.checked
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
width: implicitWidth
|
||||
minimumValue: 0
|
||||
maximumValue: 9999999
|
||||
decimals: 0
|
||||
backendValue: backendValues.autoRepeatDelay
|
||||
enabled: autoRepeat.checked
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: "ms"
|
||||
elide: Text.ElideNone
|
||||
enabled: autoRepeat.checked
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Repeat interval")
|
||||
tooltip: qsTr("Interval of auto-repetition in milliseconds.")
|
||||
enabled: autoRepeat.checked
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
width: implicitWidth
|
||||
minimumValue: 0
|
||||
maximumValue: 9999999
|
||||
decimals: 0
|
||||
backendValue: backendValues.autoRepeatInterval
|
||||
enabled: autoRepeat.checked
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: "ms"
|
||||
elide: Text.ElideNone
|
||||
enabled: autoRepeat.checked
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,4 +70,6 @@ Column {
|
||||
ControlSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -48,9 +48,13 @@ Column {
|
||||
|
||||
AbstractButtonSection {}
|
||||
|
||||
IconSection {}
|
||||
|
||||
ControlSection {}
|
||||
|
||||
FontSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -47,9 +47,13 @@ Column {
|
||||
|
||||
AbstractButtonSection {}
|
||||
|
||||
IconSection {}
|
||||
|
||||
ControlSection {}
|
||||
|
||||
FontSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -49,9 +49,13 @@ Column {
|
||||
|
||||
AbstractButtonSection {}
|
||||
|
||||
IconSection {}
|
||||
|
||||
ControlSection {}
|
||||
|
||||
FontSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -138,4 +138,6 @@ Column {
|
||||
FontSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2022 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL3$
|
||||
** 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 http://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at http://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or later as published by the Free
|
||||
** Software Foundation and appearing in the file LICENSE.GPL included in
|
||||
** the packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 2.0 requirements will be
|
||||
** met: http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import HelperWidgets 2.0
|
||||
import QtQuickDesignerTheme 1.0
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
ControlSection {}
|
||||
|
||||
FontSection {}
|
||||
|
||||
PaddingSection {}
|
||||
}
|
||||
@@ -67,7 +67,10 @@ Column {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: "ms" }
|
||||
ControlLabel {
|
||||
text: "ms"
|
||||
elide: Text.ElideNone
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
@@ -76,9 +79,13 @@ Column {
|
||||
|
||||
AbstractButtonSection {}
|
||||
|
||||
IconSection {}
|
||||
|
||||
ControlSection {}
|
||||
|
||||
FontSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -194,4 +194,6 @@ Column {
|
||||
ControlSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,8 @@ Column {
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
|
||||
FontSection {
|
||||
caption: qsTr("Font Inheritance")
|
||||
expanded: false
|
||||
|
||||
@@ -73,4 +73,6 @@ Column {
|
||||
FontSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2022 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL3$
|
||||
** 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 http://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at http://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or later as published by the Free
|
||||
** Software Foundation and appearing in the file LICENSE.GPL included in
|
||||
** the packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 2.0 requirements will be
|
||||
** met: http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import HelperWidgets 2.0
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
Section {
|
||||
id: root
|
||||
|
||||
property bool blockedByContext: backendValues.display.enumeration === "TextOnly"
|
||||
|
||||
caption: qsTr("Icon")
|
||||
width: parent.width
|
||||
|
||||
SectionLayout {
|
||||
// We deliberately kept the "name" property out as it is only properly supported by linux
|
||||
// based operating systems out of the box.
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Source")
|
||||
blockedByTemplate: !backendValues.icon_source.isAvailable
|
||||
enabled: !root.blockedByContext
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
UrlChooser {
|
||||
backendValue: backendValues.icon_source
|
||||
enabled: backendValues.icon_source.isAvailable && !root.blockedByContext
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Color")
|
||||
blockedByTemplate: !backendValues.icon_color.isAvailable
|
||||
enabled: !root.blockedByContext
|
||||
}
|
||||
|
||||
ColorEditor {
|
||||
backendValue: backendValues.icon_color
|
||||
supportGradient: false
|
||||
enabled: backendValues.icon_color.isAvailable && !root.blockedByContext
|
||||
}
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Size")
|
||||
blockedByTemplate: !backendValues.icon_width.isAvailable
|
||||
enabled: !root.blockedByContext
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
backendValue: backendValues.icon_width
|
||||
maximumValue: 0xffff
|
||||
minimumValue: 0
|
||||
decimals: 0
|
||||
enabled: backendValues.icon_width.isAvailable && !root.blockedByContext
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
tooltip: qsTr("Width")
|
||||
enabled: backendValues.icon_width.isAvailable && !root.blockedByContext
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
SpinBox {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
backendValue: backendValues.icon_height
|
||||
maximumValue: 0xffff
|
||||
minimumValue: 0
|
||||
decimals: 0
|
||||
enabled: backendValues.icon_height.isAvailable && !root.blockedByContext
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
tooltip: qsTr("Height")
|
||||
enabled: backendValues.icon_height.isAvailable && !root.blockedByContext
|
||||
}
|
||||
/*
|
||||
TODO QDS-4836
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
LinkIndicator2D {}
|
||||
*/
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Cache")
|
||||
tooltip: qsTr("Whether the icon should be cached.")
|
||||
blockedByTemplate: !backendValues.icon_cache.isAvailable
|
||||
enabled: !root.blockedByContext
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
CheckBox {
|
||||
text: backendValues.icon_cache.valueToString
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
backendValue: backendValues.icon_cache
|
||||
enabled: backendValues.icon_cache.isAvailable && !root.blockedByContext
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Copyright (C) 2022 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
|
||||
@@ -35,8 +35,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.15
|
||||
import HelperWidgets 2.0
|
||||
import QtQuick.Layouts 1.15
|
||||
import HelperWidgets 2.0
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
Section {
|
||||
|
||||
@@ -46,9 +46,13 @@ Column {
|
||||
|
||||
AbstractButtonSection {}
|
||||
|
||||
IconSection {}
|
||||
|
||||
ControlSection {}
|
||||
|
||||
FontSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -106,4 +106,6 @@ Column {
|
||||
ControlSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -118,4 +118,6 @@ Column {
|
||||
FontSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ Column {
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
|
||||
FontSection {
|
||||
caption: qsTr("Font Inheritance")
|
||||
expanded: false
|
||||
|
||||
@@ -129,4 +129,6 @@ Column {
|
||||
ControlSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -44,9 +44,13 @@ Column {
|
||||
|
||||
AbstractButtonSection {}
|
||||
|
||||
IconSection {}
|
||||
|
||||
ControlSection {}
|
||||
|
||||
FontSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -48,9 +48,13 @@ Column {
|
||||
|
||||
AbstractButtonSection {}
|
||||
|
||||
IconSection {}
|
||||
|
||||
ControlSection {}
|
||||
|
||||
FontSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||
@@ -213,4 +213,6 @@ Column {
|
||||
ControlSection {}
|
||||
|
||||
PaddingSection {}
|
||||
|
||||
InsetSection {}
|
||||
}
|
||||
|
||||