Merge remote-tracking branch 'origin/4.14'
Change-Id: I2ae0eb18782224e48cd20d41907f9dfea6ee1771
@@ -1,3 +1,19 @@
|
||||
# .clang-format for Qt Creator
|
||||
#
|
||||
# This is for clang-format >= 5.0.
|
||||
#
|
||||
# The configuration below follows the Qt Creator Coding Rules [1] as closely as
|
||||
# possible. For documentation of the options, see [2].
|
||||
#
|
||||
# Use ../../tests/manual/clang-format-for-qtc/test.cpp for documenting problems
|
||||
# or testing changes.
|
||||
#
|
||||
# In case you update this configuration please also update the qtcStyle() in src\plugins\clangformat\clangformatutils.cpp
|
||||
#
|
||||
# [1] https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html
|
||||
# [2] https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||
#
|
||||
---
|
||||
Language: Cpp
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
@@ -74,12 +90,12 @@ NamespaceIndentation: None
|
||||
ObjCBlockIndentWidth: 4
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakAssignment: 500
|
||||
PenaltyBreakBeforeFirstCallParameter: 150
|
||||
PenaltyBreakAssignment: 150
|
||||
PenaltyBreakBeforeFirstCallParameter: 300
|
||||
PenaltyBreakComment: 500
|
||||
PenaltyBreakFirstLessLess: 400
|
||||
PenaltyBreakString: 600
|
||||
PenaltyExcessCharacter: 7
|
||||
PenaltyExcessCharacter: 50
|
||||
PenaltyReturnTypeOnItsOwnLine: 300
|
||||
PointerAlignment: Right
|
||||
ReflowComments: false
|
||||
|
@@ -49,7 +49,7 @@ if (Qt5_VERSION VERSION_LESS 6.0.0)
|
||||
install(TARGETS Qt6Core5Compat EXPORT QtCreator)
|
||||
endif()
|
||||
find_package(Qt5 COMPONENTS LinguistTools QUIET)
|
||||
find_package(Qt5 COMPONENTS Designer DesignerComponents Help SerialPort Svg QUIET)
|
||||
find_package(Qt5 COMPONENTS Designer DesignerComponents Help SerialPort Svg Tools QUIET)
|
||||
|
||||
find_package(Threads)
|
||||
find_package(Clang QUIET)
|
||||
|
@@ -26,7 +26,9 @@ find_package(Qt6 ${Qt5_FIND_VERSION} CONFIG COMPONENTS Core QUIET)
|
||||
if (NOT Qt6_FOUND)
|
||||
# remove Core5Compat from components to find in Qt5, but add a dummy target,
|
||||
# which unfortunately cannot start with "Qt6::"
|
||||
# also remove Tools, where some tools have moved in Qt6, e.g. from Help
|
||||
list(REMOVE_ITEM Qt5_FIND_COMPONENTS Core5Compat)
|
||||
list(REMOVE_ITEM Qt5_FIND_COMPONENTS Tools)
|
||||
find_package(Qt5 ${Qt5_FIND_VERSION} CONFIG ${__arguments} ${Qt5_FIND_COMPONENTS})
|
||||
if (NOT TARGET Qt6Core5Compat)
|
||||
add_library(Qt6Core5Compat INTERFACE)
|
||||
@@ -64,7 +66,7 @@ endif()
|
||||
set(Qt5_FOUND ${Qt6_FOUND})
|
||||
set(Qt5_VERSION ${Qt6_VERSION})
|
||||
|
||||
foreach(tool qmake lrelease moc)
|
||||
foreach(tool qmake lrelease moc rcc qhelpgenerator)
|
||||
if (TARGET Qt6::${tool} AND NOT TARGET Qt5::${tool})
|
||||
add_executable(Qt5::${tool} IMPORTED GLOBAL)
|
||||
get_target_property(imported_location Qt6::${tool} IMPORTED_LOCATION_RELEASE)
|
||||
|
@@ -67,9 +67,9 @@ function(qtc_output_binary_dir varName)
|
||||
endfunction()
|
||||
|
||||
function(add_qtc_library name)
|
||||
cmake_parse_arguments(_arg "STATIC;OBJECT;SKIP_TRANSLATION;BUILD_BY_DEFAULT;ALLOW_ASCII_CASTS;UNVERSIONED"
|
||||
"DESTINATION;COMPONENT;SOURCES_PREFIX"
|
||||
"DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PROPERTIES" ${ARGN}
|
||||
cmake_parse_arguments(_arg "STATIC;OBJECT;SKIP_TRANSLATION;ALLOW_ASCII_CASTS;UNVERSIONED"
|
||||
"DESTINATION;COMPONENT;SOURCES_PREFIX;BUILD_DEFAULT"
|
||||
"CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PROPERTIES" ${ARGN}
|
||||
)
|
||||
|
||||
set(default_defines_copy ${DEFAULT_DEFINES})
|
||||
@@ -83,18 +83,29 @@ function(add_qtc_library name)
|
||||
|
||||
update_cached_list(__QTC_LIBRARIES "${name}")
|
||||
|
||||
# special libraries can be turned off
|
||||
if (_arg_BUILD_BY_DEFAULT)
|
||||
string(TOUPPER "BUILD_LIBRARY_${name}" _build_library_var)
|
||||
set(_build_library_default ${BUILD_LIBRARIES_BY_DEFAULT})
|
||||
if (DEFINED ENV{QTC_${_build_library_var}})
|
||||
set(_build_library_default "$ENV{QTC_${_build_library_var}}")
|
||||
endif()
|
||||
set(${_build_library_var} "${_build_library_default}" CACHE BOOL "Build library ${name}.")
|
||||
if (NOT _arg_CONDITION)
|
||||
set(_arg_CONDITION ON)
|
||||
endif()
|
||||
|
||||
if (NOT ${_build_library_var})
|
||||
return()
|
||||
endif()
|
||||
string(TOUPPER "BUILD_LIBRARY_${name}" _build_library_var)
|
||||
if (DEFINED _arg_BUILD_DEFAULT)
|
||||
set(_build_library_default ${_arg_BUILD_DEFAULT})
|
||||
else()
|
||||
set(_build_library_default ${BUILD_LIBRARIES_BY_DEFAULT})
|
||||
endif()
|
||||
if (DEFINED ENV{QTC_${_build_library_var}})
|
||||
set(_build_library_default "$ENV{QTC_${_build_library_var}}")
|
||||
endif()
|
||||
set(${_build_library_var} "${_build_library_default}" CACHE BOOL "Build library ${name}.")
|
||||
|
||||
if ((${_arg_CONDITION}) AND ${_build_library_var})
|
||||
set(_library_enabled ON)
|
||||
else()
|
||||
set(_library_enabled OFF)
|
||||
endif()
|
||||
|
||||
if (NOT _library_enabled)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# TODO copied from extend_qtc_target.
|
||||
@@ -121,13 +132,7 @@ function(add_qtc_library name)
|
||||
set(library_type OBJECT)
|
||||
endif()
|
||||
|
||||
set(_exclude_from_all EXCLUDE_FROM_ALL)
|
||||
if (_arg_BUILD_BY_DEFAULT)
|
||||
unset(_exclude_from_all)
|
||||
endif()
|
||||
|
||||
# Do not just build libraries...
|
||||
add_library(${name} ${library_type} ${_exclude_from_all} ${_arg_SOURCES})
|
||||
add_library(${name} ${library_type} ${_arg_SOURCES})
|
||||
add_library(${IDE_CASED_ID}::${name} ALIAS ${name})
|
||||
set_public_headers(${name} "${_arg_SOURCES}")
|
||||
|
||||
@@ -541,10 +546,10 @@ endfunction()
|
||||
|
||||
function(add_qtc_executable name)
|
||||
cmake_parse_arguments(_arg "SKIP_INSTALL;SKIP_TRANSLATION;ALLOW_ASCII_CASTS"
|
||||
"DESTINATION;COMPONENT"
|
||||
"DEPENDS;DEFINES;INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PROPERTIES" ${ARGN})
|
||||
"DESTINATION;COMPONENT;BUILD_DEFAULT"
|
||||
"CONDITION;DEPENDS;DEFINES;INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PROPERTIES" ${ARGN})
|
||||
|
||||
if ($_arg_UNPARSED_ARGUMENTS)
|
||||
if (${_arg_UNPARSED_ARGUMENTS})
|
||||
message(FATAL_ERROR "add_qtc_executable had unparsed arguments!")
|
||||
endif()
|
||||
|
||||
@@ -555,14 +560,27 @@ function(add_qtc_executable name)
|
||||
|
||||
update_cached_list(__QTC_EXECUTABLES "${name}")
|
||||
|
||||
if (NOT _arg_CONDITION)
|
||||
set(_arg_CONDITION ON)
|
||||
endif()
|
||||
|
||||
string(TOUPPER "BUILD_EXECUTABLE_${name}" _build_executable_var)
|
||||
set(_build_executable_default ${BUILD_EXECUTABLES_BY_DEFAULT})
|
||||
if (DEFINED _arg_BUILD_DEFAULT)
|
||||
set(_build_executable_default ${_arg_BUILD_DEFAULT})
|
||||
else()
|
||||
set(_build_executable_default ${BUILD_EXECUTABLES_BY_DEFAULT})
|
||||
endif()
|
||||
if (DEFINED ENV{QTC_${_build_executable_var}})
|
||||
set(_build_executable_default "$ENV{QTC_${_build_executable_var}}")
|
||||
endif()
|
||||
set(${_build_executable_var} "${_build_executable_default}" CACHE BOOL "Build executable ${name}.")
|
||||
|
||||
if (NOT ${_build_executable_var})
|
||||
if ((${_arg_CONDITION}) AND ${_build_executable_var})
|
||||
set(_executable_enabled ON)
|
||||
else()
|
||||
set(_executable_enabled OFF)
|
||||
endif()
|
||||
if (NOT _executable_enabled)
|
||||
return()
|
||||
endif()
|
||||
|
||||
@@ -906,3 +924,18 @@ function(qtc_add_resources target resourceName)
|
||||
target_sources(${target} PRIVATE "${generatedSourceCode}")
|
||||
set_property(SOURCE "${generatedSourceCode}" PROPERTY SKIP_AUTOGEN ON)
|
||||
endfunction()
|
||||
|
||||
function(qtc_add_public_header header)
|
||||
if (NOT IS_ABSOLUTE ${header})
|
||||
set(header "${CMAKE_CURRENT_SOURCE_DIR}/${header}")
|
||||
endif()
|
||||
|
||||
get_filename_component(source_dir ${header} DIRECTORY)
|
||||
file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} ${source_dir})
|
||||
|
||||
install(
|
||||
FILES ${header}
|
||||
DESTINATION "include/${include_dir_relative_path}"
|
||||
COMPONENT Devel EXCLUDE_FROM_ALL
|
||||
)
|
||||
endfunction()
|
||||
|
@@ -52,19 +52,19 @@ else ()
|
||||
set(_IDE_APP_TARGET "${IDE_ID}")
|
||||
|
||||
set(_IDE_LIBRARY_BASE_PATH "lib")
|
||||
set(_IDE_LIBRARY_PATH "lib/${IDE_ID}")
|
||||
set(_IDE_PLUGIN_PATH "lib/${IDE_ID}/plugins")
|
||||
set(_IDE_LIBRARY_PATH "lib/qtcreator")
|
||||
set(_IDE_PLUGIN_PATH "lib/qtcreator/plugins")
|
||||
if (WIN32)
|
||||
set(_IDE_LIBEXEC_PATH "bin")
|
||||
set(QT_DEST_PLUGIN_PATH "bin/plugins")
|
||||
set(QT_DEST_QML_PATH "bin/qml")
|
||||
else ()
|
||||
set(_IDE_LIBEXEC_PATH "libexec/${IDE_ID}")
|
||||
set(_IDE_LIBEXEC_PATH "libexec/qtcreator")
|
||||
set(QT_DEST_PLUGIN_PATH "lib/Qt/plugins")
|
||||
set(QT_DEST_QML_PATH "lib/Qt/qml")
|
||||
endif ()
|
||||
set(_IDE_DATA_PATH "share/${IDE_ID}")
|
||||
set(_IDE_DOC_PATH "share/doc/${IDE_ID}")
|
||||
set(_IDE_DATA_PATH "share/qtcreator")
|
||||
set(_IDE_DOC_PATH "share/doc/qtcreator")
|
||||
set(_IDE_BIN_PATH "bin")
|
||||
endif ()
|
||||
|
||||
@@ -179,19 +179,7 @@ endfunction()
|
||||
function(set_public_headers target sources)
|
||||
foreach(source IN LISTS sources)
|
||||
if (source MATCHES "\.h$|\.hpp$")
|
||||
|
||||
if (NOT IS_ABSOLUTE ${source})
|
||||
set(source "${CMAKE_CURRENT_SOURCE_DIR}/${source}")
|
||||
endif()
|
||||
|
||||
get_filename_component(source_dir ${source} DIRECTORY)
|
||||
file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} ${source_dir})
|
||||
|
||||
install(
|
||||
FILES ${source}
|
||||
DESTINATION "include/${include_dir_relative_path}"
|
||||
COMPONENT Devel EXCLUDE_FROM_ALL
|
||||
)
|
||||
qtc_add_public_header(${source})
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
@@ -182,7 +182,7 @@ function(qdoc_build_qdocconf_file _qdocconf_file)
|
||||
_setup_doc_targets()
|
||||
|
||||
_doc_find_program(_qdoc NAMES qdoc qdoc-qt5)
|
||||
if (_qdoc STREQUAL "_qdoc-NOTFOUND")
|
||||
if (_qdoc STREQUAL "_prg__qdoc-NOTFOUND")
|
||||
message(WARNING "No qdoc binary found: No documentation targets were generated")
|
||||
return()
|
||||
endif()
|
||||
|
@@ -1,6 +1,6 @@
|
||||
set(IDE_VERSION "4.13.82") # The IDE version.
|
||||
set(IDE_VERSION_COMPAT "4.13.82") # The IDE Compatibility version.
|
||||
set(IDE_VERSION_DISPLAY "4.14.0-beta1") # The IDE display version.
|
||||
set(IDE_VERSION "4.13.83") # The IDE version.
|
||||
set(IDE_VERSION_COMPAT "4.13.83") # The IDE Compatibility version.
|
||||
set(IDE_VERSION_DISPLAY "4.14.0-beta2") # The IDE display version.
|
||||
set(IDE_COPYRIGHT_YEAR "2020") # The IDE current copyright year.
|
||||
|
||||
set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation.
|
||||
|
1
dist/installer/mac/qt.conf
vendored
@@ -1,5 +1,4 @@
|
||||
[Paths]
|
||||
Binaries = MacOS
|
||||
Imports = Imports/qtquick1
|
||||
Qml2Imports = Imports/qtquick2
|
||||
Plugins = PlugIns
|
||||
|
BIN
doc/qtcreator/images/icons/itemdelegate-icon16.png
Normal file
After Width: | Height: | Size: 124 B |
BIN
doc/qtcreator/images/icons/scrollview-icon16.png
Normal file
After Width: | Height: | Size: 116 B |
BIN
doc/qtcreator/images/icons/stackview-icon16.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
doc/qtcreator/images/icons/swipeview-icon16.png
Normal file
After Width: | Height: | Size: 152 B |
BIN
doc/qtcreator/images/icons/swipeview-icon@2x.png
Normal file
After Width: | Height: | Size: 184 B |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 31 KiB |
BIN
doc/qtcreator/images/qtquick-designer-edit-list-model.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 20 KiB |
BIN
doc/qtcreator/images/qtquick-designer-gradient-stops.gif
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
doc/qtcreator/images/qtquick-designer-gradient-types.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
doc/qtcreator/images/qtquick-designer-gridview-properties.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
doc/qtcreator/images/qtquick-designer-image-properties.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
doc/qtcreator/images/qtquick-designer-image-type.png
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
doc/qtcreator/images/qtquick-designer-listview-preview.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
doc/qtcreator/images/qtquick-designer-listview-properties.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
doc/qtcreator/images/qtquick-designer-pathview-properties.png
Normal file
After Width: | Height: | Size: 19 KiB |
@@ -258,20 +258,167 @@
|
||||
Android manifest file unless you need to specify Android specific settings
|
||||
like the application's icon. Also, the manifest file is needed if you want
|
||||
to publish the package in the Play Store.
|
||||
If you use qmake as the build system, you can create an Android manifest
|
||||
file and edit it in \QC. Select
|
||||
\uicontrol Projects > \uicontrol Build > \uicontrol {Build Android APK}
|
||||
> \uicontrol {Create Templates} to create the file and to open it in the
|
||||
Android Manifest Editor.
|
||||
|
||||
\image qtcreator-android-manifest-editor.png "Android Manifest Editor"
|
||||
\section2 Package Names
|
||||
|
||||
Android application packages are usually named by using a hierarchical
|
||||
pattern with the levels in the hierarchy separated by periods (.). In
|
||||
general, a package name begins with the top level domain name of the
|
||||
organization followed by the organization's domain name and any subdomain
|
||||
names listed in reverse order. The organization can then choose a specific
|
||||
name for their package. Package names should be written in all lowercase
|
||||
characters whenever possible. For example, \c {org.qtproject.example}.
|
||||
|
||||
Complete conventions for disambiguating package names and rules for naming
|
||||
packages when the Internet domain name cannot be directly used as a package
|
||||
name are described in section 7.7 of the Java Language Specification.
|
||||
|
||||
For more information about package names, see
|
||||
\l{Android Application Fundamentals}.
|
||||
|
||||
\section2 Styling
|
||||
|
||||
Qt uses different methods to determine how Qt Widgets and Qt Quick Controls
|
||||
should be styled:
|
||||
|
||||
\list
|
||||
\li Select \uicontrol Default or \uicontrol Full when using
|
||||
Qt Widgets or Qt Quick Controls 1 in your project.
|
||||
|
||||
\note This method uses some Android non-SDK interfaces,
|
||||
that are being restricted by Google starting from Android 9.0
|
||||
(API 28).
|
||||
\li Select \uicontrol Minimal when using Qt Quick Controls 2
|
||||
but no Qt Widgets or Qt Quick Controls 1. This is faster than
|
||||
using the default or full options.
|
||||
\li Select \uicontrol None when using neither Qt Widgets
|
||||
nor Qt Quick Controls 1 or 2.
|
||||
\endlist
|
||||
|
||||
\section2 Screen Orientation
|
||||
|
||||
You can specify different options for determining screen orientation,
|
||||
depending on sensor readings or user preferences. The following table
|
||||
lists the options available.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Orientation
|
||||
\li Description
|
||||
\row
|
||||
\li Unspecified
|
||||
\li The system chooses the orientation. The policy it uses, and
|
||||
therefore the choices made in specific contexts, may differ
|
||||
from device to device.
|
||||
\row
|
||||
\li Behind
|
||||
\li Use the same orientation as the activity that's immediately
|
||||
beneath it in the activity stack.
|
||||
\row
|
||||
\li Landscape
|
||||
\li Landscape orientation, where the display width is larger than
|
||||
its height.
|
||||
\row
|
||||
\li Portrait
|
||||
\li Portrait orientation, where the display height is larger than
|
||||
its width.
|
||||
\row
|
||||
\li Reverse landscape
|
||||
\li Landscape orientation in the opposite direction of normal
|
||||
landscape.
|
||||
\row
|
||||
\li Reverse portrait
|
||||
\li Portrait orientation in the opposite direction of normal
|
||||
portrait.
|
||||
\row
|
||||
\li Sensor landscape
|
||||
\li Landscape orientation, but it can be either normal or reverse
|
||||
landscape based on the device sensor. The sensor is used even
|
||||
if the user has locked sensor-based rotation.
|
||||
\row
|
||||
\li Sensor portrait
|
||||
\li Portrait orientation, but it can be either normal or reverse
|
||||
portrait based on the device sensor. The sensor is used even
|
||||
if the user has locked sensor-based rotation.
|
||||
\row
|
||||
\li User landscape
|
||||
\li Landscape orientation, but it can be either normal or reverse
|
||||
landscape based on the device sensor and the user's preference.
|
||||
\row
|
||||
\li User portrait
|
||||
\li Portrait orientation, but it can be either normal or reverse
|
||||
portrait based on the device sensor and the user's preference.
|
||||
\row
|
||||
\li Sensor
|
||||
\li The orientation is determined by the device orientation sensor.
|
||||
The orientation of the display depends on how the user is
|
||||
holding the device. It changes when the user rotates the device.
|
||||
Some devices, however, will not rotate to all four possible
|
||||
orientations by default. To allow all four orientations, select
|
||||
the full sensor option. The sensor is used even if the user
|
||||
locked sensor-based rotation.
|
||||
\row
|
||||
\li Full sensor
|
||||
\li The orientation is determined by the device orientation sensor
|
||||
for any of the four orientations. This is similar to the sensor
|
||||
option, except that it allows any of the four possible screen
|
||||
orientations, regardless of what the device will normally do.
|
||||
For example, some devices won't normally use reverse portrait
|
||||
or reverse landscape, but this option enables them.
|
||||
\row
|
||||
\li No sensor
|
||||
\li The orientation is determined without reference to a physical
|
||||
orientation sensor. The sensor is ignored, so the display will
|
||||
not rotate based on how the user moves the device.
|
||||
\row
|
||||
\li User
|
||||
\li The user's current preferred orientation.
|
||||
\row
|
||||
\li Full user
|
||||
\li If the user has locked sensor-based rotation, this option
|
||||
behaves in the same way as the user option. Otherwise, it
|
||||
behaves the same as the full sensor option, and allows any
|
||||
of the four possible screen orientations.
|
||||
\row
|
||||
\li Locked
|
||||
\li Locks the orientation to its current rotation, whatever that is.
|
||||
\endtable
|
||||
|
||||
\section2 Supported Resolutions
|
||||
|
||||
You can set different images to be shown as application icons and splash
|
||||
screens on low, medium, high, and extra high DPI displays. The following
|
||||
list summarizes the DPI values typically associated with each category:
|
||||
|
||||
\list
|
||||
\li Low-density (LDPI): ~120dpi
|
||||
\li Medium-density (MDPI): ~160dpi
|
||||
\li High-density (HDPI): ~240dpi
|
||||
\li Extra-high-density (XHDPI): ~320dpi
|
||||
\li Extra-extra-high-density (XXHDPI): ~480dpi
|
||||
\li Extra-extra-extra-high-density (XXXHDPI): ~640dpi
|
||||
\endlist
|
||||
|
||||
\section2 Android Manifest Editor
|
||||
|
||||
If you use qmake as the build system, you can create an Android manifest
|
||||
file and edit it in \QC.
|
||||
|
||||
To create an Android manifest file and to open it in the Android Manifest
|
||||
Editor:
|
||||
|
||||
\list 1
|
||||
|
||||
\li In the \uicontrol {Package name} field, enter a package name for the application.
|
||||
The application is launched by an automatically generated Java launcher that
|
||||
is packaged with the application into an Android package (.apk). For more
|
||||
information, see \l{Android Application Fundamentals}.
|
||||
\li Select \uicontrol Projects > \uicontrol Build >
|
||||
\uicontrol {Build Android APK} > \uicontrol {Create Templates}.
|
||||
|
||||
\li In the \uicontrol {Package name} field, enter a valid
|
||||
\l{Package Names}{package name} for the application.
|
||||
For example, \c {org.example.myapplication}.
|
||||
The application is launched by an automatically generated Java launcher
|
||||
that is packaged with the application into an Android package (.apk).
|
||||
|
||||
\image qtcreator-android-manifest-editor-package.png "Package info in Android Manifest Editor"
|
||||
|
||||
\li You can specify an internal version number for the package in the
|
||||
\uicontrol {Version code} field. It is used to determine whether one version of
|
||||
@@ -294,41 +441,38 @@
|
||||
You can also give an activity a name and select the activity to run.
|
||||
|
||||
\li In the \uicontrol {Style extraction} field, set the method that Qt
|
||||
uses to extract style information:
|
||||
\list
|
||||
\li Select \uicontrol Default or \uicontrol Full when using
|
||||
Qt Widgets or Qt Quick Controls 1 in your project.
|
||||
uses to \l{Styling}{determine which UI style to use}.
|
||||
|
||||
\note This method uses some Android non-SDK interfaces,
|
||||
that are being restricted by Google starting from Android 9.0
|
||||
(API 28).
|
||||
\li Select \uicontrol Minimal when using Qt Quick Controls 2
|
||||
but no Qt Widgets or Qt Quick Controls 1. This is faster than
|
||||
using the default or full options.
|
||||
\li Select \uicontrol None when using neither Qt Widgets
|
||||
nor Qt Quick Controls 1 or 2.
|
||||
\endlist
|
||||
\li In the \uicontrol {Screen orientation} field, select the option for
|
||||
determining \l{Screen Orientation}{screen orientation}.
|
||||
|
||||
\li In \uicontrol {Application icon}, select an icon. Click the
|
||||
\uicontrol {Master icon} button to select an icon with the highest resolution,
|
||||
then, it will resize and set the three icon fields for low, medium, and high DPI icons
|
||||
as needed.
|
||||
\li In \uicontrol {Application icon}, select an image with the highest
|
||||
\l{Supported Resolutions}{resolution} as the \uicontrol {Master icon}.
|
||||
\QC resizes the icon and sets versions of it to be shown on low,
|
||||
medium, high, and extra high DPI displays, as needed. Alternatively,
|
||||
set the icons for each resolution separately.
|
||||
|
||||
\image qtcreator-android-manifest-editor-app-icon.png "Application icons in Android Manifest Editor"
|
||||
|
||||
\li In \uicontrol {Splash screen}, select images to display as splash
|
||||
screens depending on the device orientation. You can set different images
|
||||
to be shown on low, medium, and high DPI displays. By default, the splash
|
||||
screen is hidden automatically when an activity is drawn. To keep it
|
||||
visible until \l{QtAndroid::hideSplashScreen()} is called, select the
|
||||
to be shown on low, medium, high, and extra high DPI displays. By default,
|
||||
the splash screen is hidden automatically when an activity is drawn. To keep
|
||||
it visible until \l{QtAndroid::hideSplashScreen()} is called, select the
|
||||
\uicontrol {Sticky splash screen} check box.
|
||||
|
||||
\li In \uicontrol {Android services}, you can add and remove services. You must
|
||||
enter at least a service class name for a new service. If you select
|
||||
\image qtcreator-android-manifest-editor-splash-screen.png "Splash screens in Android Manifest Editor"
|
||||
|
||||
\li In \uicontrol {Android services}, select \uicontrol Add to add a service.
|
||||
You must enter at least a service class name for a new service. If you select
|
||||
\uicontrol {Run in external process}, you also need to enter a process name.
|
||||
If you select \uicontrol {Run in external library}, you need to enter a library name.
|
||||
Service arguments are mandatory for a service that is not run in an external
|
||||
library. For more information about writing service code and structure of services,
|
||||
see \l{Android Services}.
|
||||
|
||||
\image qtcreator-android-manifest-editor-services.png "Android services in Android Manifest Editor"
|
||||
|
||||
\li In the \uicontrol Permissions field, you can specify the permissions that your
|
||||
application needs. Starting from Android 6.0 (API 23), permissions have to be
|
||||
requested at runtime (see \l{QtAndroid::requestPermissionsSync()} or
|
||||
@@ -336,6 +480,8 @@
|
||||
users are asked to grant the permissions when they install the application.
|
||||
Android OS then grants the application access to the appropriate data and features.
|
||||
|
||||
\image qtcreator-android-manifest-editor-permissions.png "Permissions in Android Manifest Editor"
|
||||
|
||||
\li Select the \uicontrol {Include default permissions for Qt modules} and
|
||||
\uicontrol {Include default features for Qt modules} check boxes to add the
|
||||
permissions needed by Qt libraries. This can be
|
||||
|
@@ -351,7 +351,7 @@
|
||||
\li Ctrl+0
|
||||
\row
|
||||
\li Toggle Vim-style editing
|
||||
\li Alt+V, Alt+V
|
||||
\li Alt+Y, Alt+Y
|
||||
\row
|
||||
\li Split
|
||||
\li Ctrl+E, 2
|
||||
@@ -517,7 +517,7 @@
|
||||
\li Ctrl+Alt+Space
|
||||
\row
|
||||
\li Execute user actions in FakeVim mode
|
||||
\li Alt+V, n, where n is the number of the user action, from 1 to 9
|
||||
\li Alt+Y, n, where n is the number of the user action, from 1 to 9
|
||||
\endif
|
||||
\endtable
|
||||
|
||||
|
@@ -45,7 +45,7 @@
|
||||
The build errors and warnings are parsed and displayed in the
|
||||
\uicontrol Issues output pane.
|
||||
|
||||
Select the \uicontrol {Keep original jobs num} check box to stop
|
||||
Select the \uicontrol {Keep original jobs number} check box to stop
|
||||
IncrediBuild from overriding the \c {-j} command line switch, which
|
||||
controls the number of processes that the build tools executed by
|
||||
\QC run in parallel. The default value set by IncrediBuild is 200.
|
||||
@@ -79,9 +79,10 @@
|
||||
be used to provide configuration options if those builds use
|
||||
additional processes that are not included in those packages. It is
|
||||
required to configure distributable processes in Dev Tools builds.
|
||||
\li \uicontrol {Avoid local} frees up resources on the initiator
|
||||
machine. This might be beneficial for distribution if the initiator
|
||||
turns into a bottleneck for the build because of high CPU usage.
|
||||
\li \uicontrol {Avoid local task execution} frees up resources on the
|
||||
initiator machine. This might be beneficial for distribution if the
|
||||
initiator turns into a bottleneck for the build because of high
|
||||
CPU usage.
|
||||
\li \uicontrol {Maximum CPUs to utilize in the build} specifies the
|
||||
maximum amount of remote cores to use in the build. Overrides the
|
||||
corresponding global setting.
|
||||
@@ -89,7 +90,7 @@
|
||||
\uicontrol {Oldest allowed Helper machine OS} specify the newest and
|
||||
oldest operating system installed on a Helper machine to be allowed
|
||||
to participate as a Helper in the build.
|
||||
\li \uicontrol {Build Title} specifies a custom header line which will
|
||||
\li \uicontrol {Build title} specifies a custom header line which will
|
||||
be displayed in the beginning of the build output text. This title
|
||||
will also be used for the Build History and Build Monitor displays.
|
||||
\li \uicontrol {Save IncrediBuild monitor file} writes a copy of the
|
||||
@@ -119,8 +120,9 @@
|
||||
builds, but not for Make and Build tools or Dev Tools builds.
|
||||
\li \uicontrol {Additional arguments} are concatenated to the final
|
||||
buildconsole command line.
|
||||
\li \uicontrol {Open Monitor} opens an IncrediBuild Build Monitor that
|
||||
graphically displays the build's progress once the build starts.
|
||||
\li \uicontrol {Open Build Monitor} opens an IncrediBuild Build Monitor
|
||||
that graphically displays the build's progress once the build
|
||||
starts.
|
||||
\endlist
|
||||
|
||||
//! [incredibuild build steps]
|
||||
|
@@ -57,11 +57,10 @@
|
||||
properties set in \QD can be changed dynamically within the code.
|
||||
Furthermore, features such as widget promotion and custom plugins
|
||||
allow you to use your own widgets with \QD.
|
||||
\li \l{Optimizing Applications for Mobile Devices}
|
||||
|
||||
Mobile devices have been designed for use when mobile. Keep the
|
||||
characteristics of mobile devices in mind when you create
|
||||
applications for them.
|
||||
\li \l{Best Practices}
|
||||
|
||||
Apply the best practices to ensure that the UIs you create work
|
||||
efficiently on the intended platforms, such as mobile devices.
|
||||
\endlist
|
||||
*/
|
||||
|
@@ -30,9 +30,9 @@
|
||||
// **********************************************************************
|
||||
|
||||
/*!
|
||||
\previouspage adding-plugins.html
|
||||
\previouspage creator-ui-best-practices.html
|
||||
\page creator-usability.html
|
||||
\nextpage creator-coding.html
|
||||
\nextpage studio-qtquick-best-practices.html
|
||||
|
||||
\title Optimizing Applications for Mobile Devices
|
||||
|
||||
|
@@ -0,0 +1,47 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 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 adding-plugins.html
|
||||
\page creator-ui-best-practices.html
|
||||
\nextpage creator-usability.html
|
||||
|
||||
\title Best Practices
|
||||
|
||||
Apply the best practices to ensure that the UIs you create work
|
||||
efficiently on the intended platforms, such as mobile devices.
|
||||
|
||||
\list
|
||||
\li \l {Optimizing Applications for Mobile Devices}
|
||||
|
||||
Guidelines to help you design and develop usable applications for
|
||||
mobile devices with varying characteristics.
|
||||
|
||||
\li \l {Qt Quick Best Practices}
|
||||
|
||||
Guidelines describing the most efficient ways to use \QDS to
|
||||
create UIs and scenes that run flawlessly on the intended platforms.
|
||||
\endlist
|
||||
*/
|
@@ -98,6 +98,8 @@
|
||||
\list
|
||||
\li \l{Editing 2D Content}
|
||||
\li \l{Shapes}
|
||||
\li \l{Images}
|
||||
\li \l{Lists and Other Data Models}
|
||||
\li \l{Creating Buttons}
|
||||
\li \l{Creating Scalable Buttons and Borders}
|
||||
\endlist
|
||||
@@ -120,7 +122,6 @@
|
||||
\li \l{Managing C++ Backend Objects}
|
||||
\endlist
|
||||
\li \l {Adding States}
|
||||
\li \l {Editing PathView Properties}
|
||||
\endlist
|
||||
\li \l{Editing 3D Scenes}
|
||||
\list
|
||||
@@ -157,7 +158,14 @@
|
||||
\list
|
||||
\li \l{Adding Qt Designer Plugins}
|
||||
\endlist
|
||||
\li \l{Optimizing Applications for Mobile Devices}
|
||||
\li \l {Best Practices}
|
||||
\list
|
||||
\li \l{Optimizing Applications for Mobile Devices}
|
||||
\li \l{Qt Quick Best Practices}
|
||||
\list
|
||||
\li \l{Creating Optimized 3D Scenes}
|
||||
\endlist
|
||||
\endlist
|
||||
\endlist
|
||||
\li \l{Coding}
|
||||
\list
|
||||
|
@@ -77,7 +77,7 @@
|
||||
\list
|
||||
\li \l{Developing Qt Quick Applications}
|
||||
\li \l{Developing Widget Based Applications}
|
||||
\li \l{Optimizing Applications for Mobile Devices}
|
||||
\li \l{Best Practices}
|
||||
\endlist
|
||||
\li \b {\l{Coding}}
|
||||
\list
|
||||
|
255
doc/qtcreator/src/qtquick/library/qtquick-data-models.qdoc
Normal file
@@ -0,0 +1,255 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 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 quick-data-models.html
|
||||
\previouspage quick-images.html
|
||||
\nextpage quick-buttons.html
|
||||
|
||||
\title Lists and Other Data Models
|
||||
|
||||
Applications typically need to handle and display data that is organized
|
||||
into list or grid views. Qt Quick uses models, views, and delegates for
|
||||
this purpose. They modularize the visualization of data in order to give
|
||||
you control over the different aspects of the data. For example, you can
|
||||
swap a list view with a grid view with little changes to the data.
|
||||
Similarly, encapsulating an instance of the data in a delegate allows
|
||||
developers to dictate how to present or handle the data.
|
||||
|
||||
A \e model contains the data and its structure. There are several QML
|
||||
types for creating different types of models. A \e view is a container
|
||||
that displays the data in a list or a grid, or along a path. A \e delegate
|
||||
dictates how the data should appear in the view. The delegate takes each
|
||||
piece of data in the model and encapsulates it. The data is then accessible
|
||||
through the delegate.
|
||||
|
||||
To visualize data, the view's model property is bound to a model and the
|
||||
delegate property to a component.
|
||||
|
||||
For more information, see \l{Models and Views in Qt Quick}.
|
||||
|
||||
\section1 List and Grid Views
|
||||
|
||||
A list view organizes items as a list, whereas a grid view organizes them as
|
||||
a grid. By default, items in list and grid views flow vertically from left
|
||||
to right. They are laid out from left to right horizontally, and from top to
|
||||
bottom vertically.
|
||||
|
||||
You can change the list view orientation in the \uicontrol Orientation
|
||||
field and the grid view flow in the \uicontrol Flow field. You can change
|
||||
the layout direction in the \uicontrol {Layout direction} field. These
|
||||
properties can be combined to produce a variety of layouts.
|
||||
|
||||
\image qtquick-designer-listview-properties.png "List View properties"
|
||||
|
||||
For a list view, you can specify space between list items in the
|
||||
\uicontrol Spacing field. For a grid view, you can specify the width
|
||||
and height of each cell in the \uicontrol W and \uicontrol H fields.
|
||||
|
||||
\image qtquick-designer-gridview-properties.png "Grid View properties"
|
||||
|
||||
Select the \uicontrol {Navigation wraps} check box to specify that key
|
||||
navigation wraps around and moves the selection to the next line or cell
|
||||
in the other end of the view when it reaches the end of the view.
|
||||
|
||||
Both list and grid views are inherently \l {Flickable}{flickable}.
|
||||
|
||||
The value of the \uicontrol {Snap mode} field determines how the view
|
||||
scrolling will settle following a drag or flick. By default, the view
|
||||
stops anywhere within the visible area. If you select \uicontrol SnapToRow,
|
||||
the view settles with a row (or column for a grid view top-to-bottom flow)
|
||||
aligned with the start of the view. If you select \uicontrol SnapOneRow,
|
||||
the view will settle no more than one row or column away from the first
|
||||
visible row at the time the mouse button is released. This option is
|
||||
particularly useful for moving one page at a time.
|
||||
|
||||
\section1 Delegate Cache
|
||||
|
||||
The value of the \uicontrol Cache field determines whether delegates are
|
||||
retained outside the visible area of the view.
|
||||
|
||||
If this value is greater than zero, the view may keep as many delegates
|
||||
instantiated as will fit within the cache specified. For example, if in
|
||||
a vertical view the delegate is 20 pixels high, there are three columns
|
||||
and the cache is set to 40, then up to six delegates above and below the
|
||||
visible area may be created or retained. The cached delegates are created
|
||||
asynchronously, allowing creation to occur across multiple frames and
|
||||
reducing the likelihood of skipping frames. In order to improve painting
|
||||
performance delegates outside the visible area are not painted.
|
||||
|
||||
The default value of this property is platform dependent, but will usually
|
||||
be a value greater than zero. Negative values are ignored.
|
||||
|
||||
The cache is not a pixel buffer. It only maintains additional instantiated
|
||||
delegates.
|
||||
|
||||
\note Setting the \uicontrol Cache property is not a replacement for
|
||||
creating efficient delegates. It can improve the smoothness of scrolling
|
||||
behavior at the expense of additional memory usage. The fewer objects and
|
||||
bindings in a delegate, the faster a view can be scrolled. It is important
|
||||
to realize that setting a cache will only postpone issues caused by
|
||||
slow-loading delegates, it is not a solution to this problem.
|
||||
|
||||
\section1 View Highlight
|
||||
|
||||
The current item in a list or grid view is higlighted if you set
|
||||
the value of the \uicontrol Range field to \uicontrol ApplyRange
|
||||
or \uicontrol StrictlyEnforceRange. When you select to apply the
|
||||
range, the view attempts to maintain the highlight within the range.
|
||||
However, the highlight can move outside of the range at the ends of
|
||||
the view or due to mouse interaction. When you select to enforce the
|
||||
range, the highlight never moves outside of the range. The current
|
||||
item changes if a keyboard or mouse action would cause the highlight
|
||||
to move outside of the range.
|
||||
|
||||
The values of the \uicontrol {Preferred begin} and \uicontrol {Preferred end}
|
||||
fields affect the position of the current item when the view is scrolled.
|
||||
For example, if the currently selected item should stay in the middle of the
|
||||
view when it is scrolled, set the begin and end values to the top and bottom
|
||||
coordinates of where the middle item would be. If the current item is
|
||||
changed programmatically, the view will automatically scroll so that the
|
||||
current item is in the middle of the view. The begin value must be less than
|
||||
the end value.
|
||||
|
||||
Select the \uicontrol {Follows current item} check box to enable the view to
|
||||
manage the highlight. The highlight is moved smoothly to follow the current
|
||||
item. Otherwise, the highlight is not moved by the view, and any movement
|
||||
must be implemented by the highlight.
|
||||
|
||||
The values of the \uicontrol {Move duration}, \uicontrol {Move velocity}
|
||||
\uicontrol {Resize duration}, and \uicontrol {Resize velocity} fields
|
||||
control the speed of the move and resize animations for the highlight.
|
||||
|
||||
\section1 Editing List Models
|
||||
|
||||
When you add a \l{GridView}{Grid View}, \l{ListView}{List View}, or
|
||||
\l{PathView}{Path View}, the ListModel and the delegate component that
|
||||
creates an instance for each item in the model are added automatically.
|
||||
For grid and list views, you can edit the list model in \QC.
|
||||
|
||||
\image qtquick-designer-listview-preview.png "Preview of a list view"
|
||||
|
||||
To edit list models:
|
||||
|
||||
\list 1
|
||||
\li Drag and drop a \uicontrol {Grid View} or \uicontrol {List View}
|
||||
from \uicontrol Library to \uicontrol Navigator or
|
||||
\uicontrol {Form Editor}.
|
||||
\li Right-click the view in \uicontrol Navigator, and select
|
||||
\uicontrol {Edit List Model} in the context-menu to open
|
||||
the list model editor:
|
||||
\image qtquick-designer-edit-list-model.png "List view in model editor"
|
||||
\li Double-click the column headings and cells to change their values.
|
||||
\li Use the toolbar buttons to add, remove, or move rows and columns.
|
||||
In a list, each column represents a property and each row adds a
|
||||
list item.
|
||||
\endlist
|
||||
|
||||
You can replace the default model and delegate with other,
|
||||
more complex models and delegates in \uicontrol {Text Editor}.
|
||||
\l{ItemDelegate}{Item Delegate} and \l{SwipeDelegate}{Swipe Delegate}
|
||||
types are also available in \uicontrol Library.
|
||||
|
||||
\include qtquick-pathview-editor.qdocinc pathview
|
||||
\if defined(qtdesignstudio)
|
||||
\include qtquick-pathview-editor.qdocinc svgpath
|
||||
\endif
|
||||
|
||||
\section1 Summary of Model Components
|
||||
|
||||
The following table lists the QML types that you can use to add data models
|
||||
to UIs. The \e Location column contains the tab name where you can find the
|
||||
type in \uicontrol Library. The \e MCU column indicates which types are
|
||||
supported on MCUs.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Icon
|
||||
\li Name
|
||||
\li Location
|
||||
\li MCU
|
||||
\li Purpose
|
||||
\row
|
||||
\li \inlineimage gridview-icon16.png
|
||||
\li \l{GridView}{Grid View}
|
||||
\li Qt Quick - Views
|
||||
\li
|
||||
\li A grid vizualization of a model.
|
||||
\row
|
||||
\li \inlineimage icons/itemdelegate-icon16.png
|
||||
\li \l{ItemDelegate}{Item Delegate}
|
||||
\li Qt Quick - Controls 2
|
||||
\li
|
||||
\li A standard view item that can be used as a delegate in various
|
||||
views and controls, such as \l ListView and \l ComboBox.
|
||||
\row
|
||||
\li \inlineimage listview-icon16.png
|
||||
\li \l{ListView}{List View}
|
||||
\li Qt Quick - Views
|
||||
\li \inlineimage ok
|
||||
\li A list vizualization of a model.
|
||||
\row
|
||||
\li \inlineimage pathview-icon16.png
|
||||
\li \l{Path View}
|
||||
\li Qt Quick - Views
|
||||
\li
|
||||
\li Vizualizes the contents of a model along a path.
|
||||
\row
|
||||
\li \inlineimage icons/scrollview-icon16.png
|
||||
\li \l [QtQuickControls] {ScrollView}{Scroll View}
|
||||
\li Qt Quick - Controls 2
|
||||
\li
|
||||
\li Provides scrolling for user-defined content. It can be used instead
|
||||
of a \l Flickable item.
|
||||
\row
|
||||
\li \inlineimage icons/stackview-icon16.png
|
||||
\li \l [QtQuickControls] {StackView}{Stack View}
|
||||
\li Qt Quick - Controls 2
|
||||
\li
|
||||
\li A stack-based navigation model.
|
||||
\if defined(qtdesignstudio)
|
||||
\row
|
||||
\li \inlineimage icons/item-svg-16px.png
|
||||
\li SvgPath
|
||||
\li Studio Components
|
||||
\li
|
||||
\li An SVG path data string that is used to draw a path as a line.
|
||||
\endif
|
||||
\row
|
||||
\li \inlineimage icons/itemdelegate-icon16.png
|
||||
\li \l{SwipeDelegate}{Swipe Delegate}
|
||||
\li Qt Quick - Controls 2
|
||||
\li
|
||||
\li A view item that can be swiped left or right to expose more
|
||||
options or information. It is used as a delegate in views such
|
||||
as \l ListView.
|
||||
\row
|
||||
\li \inlineimage icons/swipeview-icon16.png
|
||||
\li \l[QtQuickControls] {SwipeView}{Swipe View}
|
||||
\li Qt Quick - Controls 2
|
||||
\li \inlineimage ok
|
||||
\li Enables users to navigate pages by swiping sideways.
|
||||
\endtable
|
||||
*/
|
239
doc/qtcreator/src/qtquick/library/qtquick-images.qdoc
Normal file
@@ -0,0 +1,239 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 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 quick-images.html
|
||||
\previouspage quick-text.html
|
||||
\nextpage quick-data-models.html
|
||||
|
||||
\title Images
|
||||
|
||||
The \l Image type is used for adding images to the UI in several supported
|
||||
formats, including bitmap formats, such as PNG and JPEG, and vector graphics
|
||||
formats, such as SVG. You must add the images to your project in the
|
||||
\uicontrol Assets tab of \uicontrol Library to be able to use them in
|
||||
designs.
|
||||
|
||||
\image qtquick-designer-image-type.png "Image type in different views"
|
||||
|
||||
When you drag and drop an image file from the \uicontrol Assets tab of
|
||||
\uicontrol Library to \uicontrol Navigator or \uicontrol {Form Editor},
|
||||
\QC automatically creates a component of the \l Image type for you with
|
||||
the path to the image file set as the value of the \uicontrol Source
|
||||
field in \uicontrol Properties.
|
||||
|
||||
To load images from a URL using a supported URL scheme, specify the URL
|
||||
in the \uicontrol Source field.
|
||||
|
||||
You can use the \l [QML]{BorderImage}{Border Image} type to display
|
||||
an image, such as a PNG file, as a border and a background. For more
|
||||
information about using border images to create buttons, see
|
||||
\l {Creating Scalable Buttons and Borders}.
|
||||
|
||||
If you need to display animated images, such as GIFs, use the
|
||||
\l {AnimatedImage}{Animated Image} type.
|
||||
|
||||
\section1 Image Size
|
||||
|
||||
\image qtquick-designer-image-properties.png "Image properties"
|
||||
|
||||
If the image \uicontrol Size is not specified, the size of the source
|
||||
image is used automatically.
|
||||
|
||||
By default, explicitly setting the width and height of the item causes
|
||||
the image to be scaled to that size. To change this behavior, set the
|
||||
value of the \uicontrol {Fill mode} field. Images can be stretched, tiled,
|
||||
or scaled uniformly to the specified size with or without cropping. The
|
||||
\uicontrol Pad option means that the image is not transformed.
|
||||
|
||||
\note If the \uicontrol Clip check box is not selected, the item might
|
||||
paint outside its bounding rectangle even if the \uicontrol {Fill mode}
|
||||
is set to \uicontrol PreserveAspectCrop.
|
||||
|
||||
Select the \uicontrol Smooth check box to smoothly filter images when scaled
|
||||
or transformed. Smooth filtering gives better visual quality, but it may be
|
||||
slower on some hardware. If the image is displayed at its natural size,
|
||||
this property has no visual or performance effect.
|
||||
|
||||
Select the \uicontrol Mipmap check box to use mipmap filtering when scaling
|
||||
or transforming images. Mipmap filtering gives better visual quality when
|
||||
scaling down compared with smooth filtering, but it may come at a
|
||||
performance cost both when initializing the image and during rendering.
|
||||
|
||||
Select the \uicontrol {Auto transform} check box if the image should
|
||||
automatically apply image transformation metadata, such as EXIF orientation.
|
||||
|
||||
\section1 Source Size
|
||||
|
||||
The \uicontrol {Source size} property specifies the scaled width and height
|
||||
of the full-frame image. Unlike the value of the \uicontrol Size property,
|
||||
which scales the painting of the image, this property sets the maximum
|
||||
number of pixels stored for the loaded image so that large images do not
|
||||
use more memory than necessary. This ensures the image in memory is no
|
||||
larger than the set source size, regardless of its set size.
|
||||
|
||||
If the image's actual size is larger than the source size, the image is
|
||||
scaled down. If only one dimension of the size is set to greater than 0,
|
||||
the other dimension is set in proportion to preserve the source image's
|
||||
aspect ratio. The \uicontrol {Fill mode} is independent of this.
|
||||
|
||||
If both the source size width and height are set, the image is scaled
|
||||
down to fit within the specified size maintaining the image's aspect ratio.
|
||||
However, if \uicontrol PreserveAspectCrop or \uicontrol PreserveAspectFit
|
||||
are used, the image is scaled to match the optimal size for cropping or
|
||||
fitting.
|
||||
|
||||
If the source is an intrinsically scalable image (such as SVG), source size
|
||||
determines the size of the loaded image regardless of intrinsic size.
|
||||
Avoid changing the source size property dynamically, because rendering an
|
||||
SVG is slow compared with rendering other image formats.
|
||||
|
||||
If the source is a non-scalable image (such as JPEG), the loaded image will
|
||||
be no greater than the source size specifies. For some formats, the whole
|
||||
image will never actually be loaded into memory.
|
||||
|
||||
\note Changing this property dynamically causes the image source to be
|
||||
reloaded, potentially even from the network, if it is not in the disk cache.
|
||||
Select the \uicontrol Cache check box to cache the image.
|
||||
|
||||
\section1 Image Alignment
|
||||
|
||||
You can align images horizontally and vertically. By default, images are
|
||||
centered.
|
||||
|
||||
Select the \uicontrol Mirrored check box to horizontally invert the image,
|
||||
effectively displaying a mirrored image.
|
||||
|
||||
\section1 Performance
|
||||
|
||||
By default, locally available images are loaded immediately, and the UI
|
||||
is blocked until loading is complete. If a large image is to be loaded,
|
||||
it may be preferable to load the image in a low priority thread, by
|
||||
selecting the \uicontrol Asynchronous check box. If the image is obtained
|
||||
from a network rather than a local resource, it is automatically loaded
|
||||
asynchronously.
|
||||
|
||||
Images are cached and shared internally, so if several images have the same
|
||||
\uicontrol Source, only one copy of the image will be loaded.
|
||||
|
||||
\note Images are often the greatest user of memory in UIs. We recommended
|
||||
that you set the \uicontrol {Source size} of images that do not form a part
|
||||
of the UI. This is especially important for content that is loaded from
|
||||
external sources or provided by the user.
|
||||
|
||||
\section1 Border Image
|
||||
|
||||
The Border Image type extends the features of the \l Image type. It is used
|
||||
to create borders out of images by scaling or tiling parts of each image. A
|
||||
source image is broken into 9 regions that are scaled or tiled individually.
|
||||
The corner regions are not scaled at all, while the horizontal and vertical
|
||||
regions are scaled according to the values of the
|
||||
\uicontrol {Horizontal tile mode} and \uicontrol {Vertical tile mode} field,
|
||||
or both.
|
||||
|
||||
The \uicontrol Stretch option scales the image to fit the available area.
|
||||
The \uicontrol Repeat option tiles the image until there is no more space.
|
||||
To ensure that the last image is not cropped, select the \uicontrol Round
|
||||
option that scales the images down when necessary.
|
||||
|
||||
Specify the regions of the image in the \uicontrol {Border left},
|
||||
\uicontrol {Border right}, \uicontrol {Border top}, and
|
||||
\uicontrol {Border bottom} fields. The regions describe
|
||||
the distance from each edge of the source image to use as a border.
|
||||
|
||||
\image qtquick-designer-border-image-properties.png "Border Image properties"
|
||||
|
||||
\note You cannot change the \uicontrol {Source size} of a border image.
|
||||
|
||||
For examples of using border images, see the documentation of the
|
||||
\l [QtQuick]{BorderImage} type.
|
||||
|
||||
\section1 Animated Image
|
||||
|
||||
The Animated Image type extends the features of the \l Image type, providing
|
||||
a way to play animations stored as images containing a series of frames,
|
||||
such as those stored in GIF files.
|
||||
|
||||
Set the speed of the animation in the \uicontrol Speed field. The speed is
|
||||
measured in percentage of the original animated image speed. The default
|
||||
speed is 1.0, which means the original speed.
|
||||
|
||||
\image qtquick-designer-animated-image-properties.png "Animated Image properties"
|
||||
|
||||
To pause or play the animation, select the \uicontrol Paused or
|
||||
\uicontrol Playing check boxes.
|
||||
|
||||
When the \uicontrol Cache check box is selected, every frame of the
|
||||
animation is cached. Deselect the check box if you are playing a long
|
||||
or large animation and you want to conserve memory.
|
||||
|
||||
If the image data comes from a sequential device (such as a socket),
|
||||
Animated Image can only loop if caching is enabled.
|
||||
|
||||
\section1 Summary of Images
|
||||
|
||||
The following table lists the QML types that you can use to add images.
|
||||
The \e Location column contains the tab name where you can find the type
|
||||
in \uicontrol Library. The \e MCU column indicates which types are supported
|
||||
on MCUs.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Icon
|
||||
\li Name
|
||||
\li Location
|
||||
\li MCU
|
||||
\li Purpose
|
||||
\row
|
||||
\li \inlineimage animated-image-icon16.png
|
||||
\li \l [QtQuick]{AnimatedImage}{Animated Image}
|
||||
\li Qt Quick - Basic
|
||||
\li
|
||||
\li An images that stores animations containing a series of frames,
|
||||
such as those stored in GIF files.
|
||||
\row
|
||||
\li \inlineimage border-image-icon16.png
|
||||
\li \l [QtQuick]{BorderImage}{Border Image}
|
||||
\li Qt Quick - Basic
|
||||
\li \inlineimage ok
|
||||
\li An image that is used as a border or background.
|
||||
\row
|
||||
\li \inlineimage image-icon16.png
|
||||
\li \l [QtQuick]{Image}
|
||||
\li Qt Quick - Basic
|
||||
\li \inlineimage ok
|
||||
\li An image in one of the supported formats, including bitmap formats
|
||||
such as PNG and JPEG and vector graphics formats such as SVG.
|
||||
\if defined(qtdesignstudio)
|
||||
\row
|
||||
\li \inlineimage icons/iso-icons-16px.png
|
||||
\li IsoIcon
|
||||
\li Studio Components
|
||||
\li
|
||||
\li An icon from an ISO 7000 icon library specified as a \l Picture
|
||||
type. You can select the icon to use and its color.
|
||||
\endif
|
||||
\endtable
|
||||
*/
|
@@ -0,0 +1,98 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
//! [pathview]
|
||||
|
||||
\section1 Path View
|
||||
|
||||
The Path View type lays out data provided by data models on a \l{Path}.
|
||||
|
||||
A graphical spline editor enables you to specify path view paths, which
|
||||
is a non-trivial task to do in the code editor.
|
||||
|
||||
\image qmldesigner-pathview-editor.png "Path View editor"
|
||||
|
||||
To start editing the path, double-click the path view in
|
||||
\uicontrol {Form Editor}. The editor composes the path of PathCubic path
|
||||
objects. They are cubic Bezier curves to a given position with two control
|
||||
points. Drag and drop the control points in \uicontrol {Form Editor} to
|
||||
construct the curve.
|
||||
|
||||
In addition, PathLine and PathQuad path objects are supported indirectly.
|
||||
To make a curve segment linear, select \uicontrol {Make Curve Segment Straight} in
|
||||
the context menu.
|
||||
|
||||
By default, the path is closed, which means that its start and end points
|
||||
are identical. To create separate start and end points for it, right-click
|
||||
an edit point to open a context menu, and deselect \uicontrol {Closed Path}.
|
||||
|
||||
To add intermediary points to a curve segment, select \uicontrol {Split Segment}
|
||||
in the context menu.
|
||||
|
||||
In the \uicontrol Properties view, you can specify other properties for
|
||||
the path view. The value of the \uicontrol {Drag margin} field specifies
|
||||
the maximum distance from the path that initiates mouse dragging.
|
||||
|
||||
\image qtquick-designer-pathview-properties.png "Path View properties"
|
||||
|
||||
Select the \uicontrol Interactive check box to make an item flickable.
|
||||
The value of the \uicontrol {Flick deceleration} field specifies the
|
||||
rate at which a flick will decelerate.
|
||||
|
||||
In the \uicontrol Offset field, specify how far along the path the items
|
||||
are from their initial positions. This is a real number that ranges from
|
||||
0 to the value of the \uicontrol {Item count} field, which displays the
|
||||
number of items in the model.
|
||||
|
||||
\if defined(qtdesignstudio)
|
||||
\note You can also use the \l SvgPath Studio Component to specify an SVG
|
||||
path data string that draws a path.
|
||||
\endif
|
||||
|
||||
//! [pathview]
|
||||
|
||||
//! [svgpath]
|
||||
|
||||
\section1 SvgPath
|
||||
|
||||
The Svg Path type uses an SVG path data string to draw a path as a line.
|
||||
|
||||
The stroke property values that specify the appearance of the path are
|
||||
described in \l{Strokes}.
|
||||
|
||||
\image studio-svgpath-properties.png "Svg Path properties"
|
||||
|
||||
The \uicontrol {Path data} field contains the SVG path data
|
||||
string that specifies the path. For more information, see
|
||||
\l{https://www.w3.org/TR/SVG/paths.html#PathData}{W3C SVG Path Data}.
|
||||
|
||||
\note Mixing SvgPath with other types of elements is not always supported.
|
||||
For example, when \l Shape is backed by \c GL_NV_path_rendering, a
|
||||
\l ShapePath can contain one or more SvgPath elements, or one or more
|
||||
elements of other types, but not both.
|
||||
|
||||
//! [svgpath]
|
||||
*/
|
101
doc/qtcreator/src/qtquick/qtdesignstudio-best-practices.qdoc
Normal file
@@ -0,0 +1,101 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Design Studio 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-qtquick-best-practices.html
|
||||
\if defined(qtdesignstudio)
|
||||
\previouspage {Tutorials}
|
||||
\nextpage studio-optimized-3d-scenes.html
|
||||
\else
|
||||
\previouspage creator-usability.html
|
||||
\nextpage studio-optimized-3d-scenes.html
|
||||
\endif
|
||||
|
||||
\title Qt Quick Best Practices
|
||||
|
||||
The following guidelines describe the most efficient ways to use \QC to
|
||||
create UIs and scenes that run flawlessly on the intended platforms.
|
||||
|
||||
For best practices in creating 3D scenes with optimized graphics
|
||||
performance, see \l {Creating Optimized 3D Scenes}.
|
||||
|
||||
\if defined(qtdesignstudio)
|
||||
For guidelines on how to achieve best results when importing assets, see
|
||||
\l {Exporting Artwork from Design Tools}.
|
||||
\endif
|
||||
|
||||
\section1 Naming Conventions
|
||||
|
||||
Establish naming conventions to keep the items in your UI organized.
|
||||
Name your items accurately and give them suitable QML IDs. You should
|
||||
manually specify the names of the items you export from design tools to
|
||||
create reliable and self-explanatory names that follow the naming
|
||||
conventions you have established.
|
||||
|
||||
For example, a button symbol might have the ID \e myButton_symbol and the
|
||||
different layers might have it as a prefix with the states appended, thus
|
||||
producing IDs such as \e myButton_symbol_default. To prepare for additional
|
||||
mouse areas later in the project, you could use similar IDs for them, such
|
||||
as \e myButton_symbol_hotspot. When you use the button as instances in a
|
||||
screen, you would give each of these instances a unique ID that relates to
|
||||
that screen. For example, \e myButton_myMenu_home, \e myButton_myMenu_profile,
|
||||
and \e myButton_myMenu_settings
|
||||
|
||||
\section1 Planning the UI
|
||||
|
||||
Plan your UI properly. Know what elements, such as screens, components,
|
||||
and states, you need. Creating a descriptive wireframe and acquiring a
|
||||
detailed UI specification before you start will make the process of creating
|
||||
the UI more efficient.
|
||||
|
||||
\section1 Using Components Economically
|
||||
|
||||
It is important to understand the performance costs associated with using
|
||||
components.
|
||||
|
||||
To use components efficiently and economically:
|
||||
|
||||
\list
|
||||
\li Componentize your design by packaging your resources into reusable
|
||||
components that can be conveniently recombined to suit the needs of
|
||||
your UI.
|
||||
\li Use as few components as necessary. To minimize the number of
|
||||
components, use alias properties and states to create the
|
||||
differences in your instances. We recommend reusing components
|
||||
instead of duplicating them, so the components do not need to be
|
||||
processed as completely new types. This reduces loading and
|
||||
compilation time as well as the size of the binary.
|
||||
\li Any content that is data-driven should be
|
||||
\l {Using Qt Quick UI Forms}{exported as a public property} of the
|
||||
relevant component. For example, a speedometer should have an \c int
|
||||
or \c real property for speed to which the UI is bound.
|
||||
\li Separate UI from the application logic. Designers should work with
|
||||
the UI forms (.ui.qml files), while developers should work on the
|
||||
corresponding QML files (.qml) to define their programmatic
|
||||
behaviors or JavaScript. This enables iteration from both the design
|
||||
and development side of the process without the the risk of
|
||||
overwriting each other's work.
|
||||
\endlist
|
||||
*/
|
@@ -0,0 +1,200 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Design Studio 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-optimized-3d-scenes.html
|
||||
\previouspage studio-qtquick-best-practices.html
|
||||
\if defined(qtdesignstudio)
|
||||
\nextpage studio-projects-managing.html
|
||||
\else
|
||||
\nextpage creator-coding.html
|
||||
\endif
|
||||
|
||||
\title Creating Optimized 3D Scenes
|
||||
|
||||
In \QC, you can use various means to create a 3D scene. Your choice of
|
||||
strategy should always depend on the target platform of your scene.
|
||||
The way the content of your scene is authored can have dramatic effects on
|
||||
the runtime performance of your UI. The Optimal 3D Scene described
|
||||
below illustrates four different ways to create a scene. Also see guidelines
|
||||
for \l{Optimizing your 3D Scene}{optimizing the graphics performance of your 3D scene}
|
||||
and \l{Best Practices for 3D Scenes Based on Use Cases}.
|
||||
|
||||
\section1 The Optimal 3D Scene Example
|
||||
|
||||
The \l {Optimal 3D Scene} example features four versions of the same kitchen
|
||||
scene that have been created using different strategies: High, Low, Combined,
|
||||
and Vertex Color. The High Scene includes a significantly higher number of
|
||||
objects compared to the other versions of the scene. The Low, Combined and
|
||||
Vertex scenes include less objects since they have been optimized by, for
|
||||
example, combining geometry and baking materials into textures. The
|
||||
following image displays the components in each scene in \uicontrol
|
||||
Navigator to illustrate the structural differences between the scenes.
|
||||
|
||||
\image studio-kitchen-navigators.png "Navigators for the four scenes in the Optimal 3D Scene."
|
||||
|
||||
\section2 The High Scene
|
||||
|
||||
\image studio-kitchen-high.png "The High Scene in the Optimal 3D Scene"
|
||||
|
||||
The High scene (1) includes a total of 27 objects. The scene is otherwise
|
||||
similar to the Low scene, but has more details and animated components, such
|
||||
as cabinet doors that can be opened and a latch for the oven.
|
||||
|
||||
\section2 The Low Scene
|
||||
|
||||
\image studio-kitchen-low.png "The Low Scene in the Optimal 3D Scene"
|
||||
|
||||
The Low scene (2) includes a total of 12 objects. Each model, for example
|
||||
cabinets, lamps, plates, and the sink, are separate meshes.
|
||||
|
||||
\section2 The Combined Scene
|
||||
|
||||
\image studio-kitchen-combined.png "The Combined Scene in the Optimal 3D Scene"
|
||||
|
||||
The Combined scene (3) has all the meshes combined into a single object. All
|
||||
materials are baked into one single texture.
|
||||
|
||||
\section2 The Vertex Color Scene
|
||||
|
||||
\image studio-kitchen-vertex.png "The Vertex Color Scene in the Optimal 3D Scene"
|
||||
|
||||
The Vertex Color scene (4) has all the meshes combined into a single object,
|
||||
and colors for the mesh are provided from .mesh file's vertex data, which
|
||||
includes one material and no textures.
|
||||
|
||||
\section1 Optimizing Your 3D Scene
|
||||
|
||||
To optimize the graphics performance of your 3D scene, you should first
|
||||
consider whether you need to animate the 3D objects, lights, camera, or
|
||||
other components in your scene. If not, simplify the scene structure by, for
|
||||
example, combining geometries and baking materials into textures. Ideally,
|
||||
pre-render your 3D image into a 2D image. You should not waste resources
|
||||
by rendering static 3D objects. You should also check if your scene has
|
||||
multiple instances of the same mesh. If so, import only one instance of the
|
||||
mesh, duplicate it in the scene, and use the same material for each
|
||||
duplicate.
|
||||
|
||||
See also the following guidelines related to scene graph, asset complexity,
|
||||
CPU specific optimization, and model geometry.
|
||||
|
||||
\section2 Scene Graph
|
||||
|
||||
The scene graph is the hierarchy of nodes that describe the scene to be
|
||||
rendered.
|
||||
|
||||
In \QC, the scene graph is represented by the tree-like view in
|
||||
\uicontrol Navigator. You can also view the hierarchy of nodes in the
|
||||
\uicontrol {Text Editor} view. By minimizing the size of the scene graph,
|
||||
you can minimize the effort needed when running the scene. In terms of
|
||||
optimization, you should avoid unnecessary groups and complex hierarchy when
|
||||
possible. Deep hierarchies with complex parenting increase the performance
|
||||
cost.
|
||||
|
||||
\section2 Asset Complexity
|
||||
|
||||
The performance of your UI or scene may sometimes be bottlenecked at render
|
||||
time. Avoid this by simplifying your assets.
|
||||
|
||||
For 3D models, you should try to use the minimum number of triangles or
|
||||
vertices to achieve the desired result. Also note that smaller images
|
||||
require less memory and render faster.
|
||||
|
||||
\section2 Optimizing CPU Performance
|
||||
|
||||
Rendering objects requires plenty of processing work from the CPU.
|
||||
Processing each component consumes resources, so reducing the visible object
|
||||
count reduces the amount of work required from the CPU.
|
||||
|
||||
To reduce the visible object count:
|
||||
\list
|
||||
\li Combine objects that are positioned closely and share a texture.
|
||||
\note Combining objects that do not share a texture does not increase
|
||||
the CPU performance while running the scene.
|
||||
\li Use fewer materials by combining separate textures into a single
|
||||
texture atlas (like in the Merged scene in the
|
||||
Kitchen Scene Example).
|
||||
\li Minimize the number of factors that cause objects to be rendered
|
||||
multiple times, for example reflections and shadows.
|
||||
\endlist
|
||||
|
||||
\section2 Optimizing Model Geometry
|
||||
|
||||
To optimize the geometry of a model:
|
||||
|
||||
\list
|
||||
\li Minimize the number of triangles used in the model.
|
||||
\li Minimize the number of UV mapping seams and hard edges created with
|
||||
doubled-up vertices.
|
||||
\endlist
|
||||
|
||||
\section1 Best Practices for 3D Scenes Based on Use Cases
|
||||
|
||||
The following table summarizes best practices related to optimizing 3D
|
||||
scenes in the form of use cases.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li How to...
|
||||
\li Solution
|
||||
\row
|
||||
\li Get best performance from the 3D scene.
|
||||
\li If no animation is required, pre-render your 3D scene into a 2D
|
||||
image.
|
||||
|
||||
\row
|
||||
\li Include animation for some of the objects in the scene
|
||||
(for example, to open doors).
|
||||
\li Merge all objects that are static, and export only one of
|
||||
each animated component (for example, each door type).
|
||||
|
||||
\row
|
||||
\li Get best performance with animated camera.
|
||||
\li While using a 2D image is not an option in this case, you should
|
||||
combine all geometry and bake lighting and materials into a single
|
||||
material.
|
||||
|
||||
\row
|
||||
\li Get best performance with animated light.
|
||||
\li While using a 2D image is not an option in this case, you should
|
||||
combine all geometry and bake all materials into a single
|
||||
material.
|
||||
|
||||
\row
|
||||
\li Get best performance in a 3D scene where all meshes are
|
||||
separated.
|
||||
\li Use the same material for each instance of the same mesh.
|
||||
|
||||
\row
|
||||
\li Disable rendering for one of the meshes during runtime.
|
||||
\li Keep that particular mesh separate but merge the rest of the
|
||||
components.
|
||||
|
||||
\row
|
||||
\li Use baked textures with low memory.
|
||||
\li Bake mesh colors into vertex colors (see the Vertex Color Scene
|
||||
in the example project).
|
||||
\endtable
|
||||
*/
|
@@ -61,9 +61,5 @@
|
||||
logic. You can associate transitions with items to define
|
||||
how their properties will animate when they change due to a state
|
||||
change.
|
||||
\li \l {Editing PathView Properties}
|
||||
|
||||
You can use a graphical spline editor to specify \l{PathView} paths.
|
||||
A path view lays out data provided by data models on a \l{Path}.
|
||||
\endlist
|
||||
*/
|
||||
|
@@ -30,7 +30,7 @@
|
||||
// **********************************************************************
|
||||
|
||||
/*!
|
||||
\previouspage qtquick-form-editor.html
|
||||
\previouspage quick-data-models.html
|
||||
\page quick-buttons.html
|
||||
\nextpage quick-scalable-image.html
|
||||
|
||||
|
@@ -119,10 +119,10 @@
|
||||
|
||||
\list
|
||||
\li \l Shapes
|
||||
\li Text
|
||||
\li Images
|
||||
\li \l Images
|
||||
\li UI controls
|
||||
\li Screens
|
||||
\li \l {Lists and Other Data Models}
|
||||
\endlist
|
||||
|
||||
\section2 Basic QML Types
|
||||
@@ -150,36 +150,6 @@
|
||||
\li \l [QtQuick]{TextInput}{Text Input} adds a single line of editable
|
||||
plain text that can be validated.
|
||||
\endlist
|
||||
|
||||
\section2 Using Data Models
|
||||
|
||||
You can create the following types of views to organize items provided by
|
||||
\l{Models and Views in Qt Quick}{data models}:
|
||||
|
||||
\list
|
||||
\li \l{GridView}{Grid View} provides a grid vizualization of a model.
|
||||
\li \l{ListView}{List View} provides a list vizualization of a model.
|
||||
\li \l{PathView}{Path View} visualizes the contents of a model along a
|
||||
path. For more information, see \l{Editing PathView Properties}.
|
||||
\li \l [QtQuickControls] {ScrollView}{Scroll View} provides scrolling
|
||||
for user-defined content. It can be used instead of a \l Flickable
|
||||
item.
|
||||
\li \l [QtQuickControls] {StackView}{Stack View} provides a stack-based
|
||||
navigation model.
|
||||
\li \l[QtQuickControls] {SwipeView}{Swipe View} enables users to
|
||||
navigate pages by swiping sideways.
|
||||
\endlist
|
||||
|
||||
When you add a \l{GridView}{Grid View}, \l{ListView}{List View}, or
|
||||
\l{PathView}{Path View}, the ListModel and the delegate component that
|
||||
creates an instance for each item in the model are added automatically.
|
||||
You can edit item properties in \uicontrol Properties or in
|
||||
\uicontrol {Text Editor}. You can also replace the default model and
|
||||
delegate with other, more complex models and delegates in
|
||||
\uicontrol {Text Editor}. \l{ItemDelegate}{Item Delegate} and
|
||||
\l{SwipeDelegate}{Swipe Delegate} delegate components are also available
|
||||
in \uicontrol Library.
|
||||
|
||||
\section1 User Interaction Methods
|
||||
|
||||
You can use the following QML types to add basic interaction methods to
|
||||
|
@@ -1,66 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 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 qmldesigner-pathview-editor.html
|
||||
\previouspage quick-states.html
|
||||
\nextpage studio-3d.html
|
||||
|
||||
\title Editing PathView Properties
|
||||
|
||||
A \l{PathView}{Path View} lays out data provided by data models on a
|
||||
\l{Path}.
|
||||
|
||||
A graphical spline editor enables you to specify path view paths, which
|
||||
is a non-trivial task to do in the code editor.
|
||||
|
||||
\image qmldesigner-pathview-editor.png "PathView editor"
|
||||
|
||||
To start editing the path, double-click the path view on the canvas. The
|
||||
editor composes the path of PathCubic path objects. They are cubic Bezier
|
||||
curves to a given position with two control points. Drag and drop the
|
||||
control points to construct the curve.
|
||||
|
||||
In addition, PathLine and PathQuad path objects are supported indirectly.
|
||||
To make a curve segment linear, select \uicontrol {Make Curve Segment Straight} in
|
||||
the context menu.
|
||||
|
||||
By default, the path is closed, which means that its start and end points
|
||||
are identical. To create separate start and end points for it, right-click
|
||||
an edit point to open a context menu, and deselect \uicontrol {Closed Path}.
|
||||
|
||||
To add intermediary points to a curve segment, select \uicontrol {Split Segment}
|
||||
in the context menu.
|
||||
|
||||
In the \uicontrol Properties view, you can specify other properties for
|
||||
the path view. For example, what is the maximum distance from the path that
|
||||
initiates mouse dragging and what is the rate at which a flick will
|
||||
decelerate.
|
||||
|
||||
\if defined(qtdesignstudio)
|
||||
\note You can also use the \l SvgPath Qt Quick Studio Component to
|
||||
specify an SVG path data string that draws a path.
|
||||
\endif
|
||||
*/
|
@@ -138,15 +138,77 @@
|
||||
You can use either a solid color (3) or a gradient (4). You can select the
|
||||
gradient in the \uicontrol {Gradient Picker} (5).
|
||||
|
||||
The gradient stops (6) specify the color used at a given position in a
|
||||
gradient. Drag them along the slider to set their values.
|
||||
|
||||
The \uicontrol Original field displays the original color of the item,
|
||||
whereas the \uicontrol New field displays the current color. The
|
||||
\uicontrol Recent field displays the colors that you have last selected.
|
||||
|
||||
\section1 Picking Gradients
|
||||
|
||||
A gradient is defined by two or more colors, which will be blended
|
||||
seamlessly. The colors are specified as a set of gradient stops,
|
||||
each of which defines a position on the gradient bar from 0.0 to 1.0
|
||||
and a color. Drag the gradient stops along the gradient bar to set their
|
||||
values. Select the arrow below a gradient stop to see its value as
|
||||
a number.
|
||||
|
||||
To add gradient stops, move the cursor over the gradient bar and point at
|
||||
it with the finger-shaped cursor. To remove gradient stops, pull them away
|
||||
from the gradient line.
|
||||
|
||||
\image qtquick-designer-gradient-stops.gif
|
||||
|
||||
Calculating gradients can be computationally expensive compared to the
|
||||
use of solid color fills or images. Consider using gradients only for
|
||||
static items in a UI.
|
||||
|
||||
\if defined(qtdesignstudio)
|
||||
\section2 Setting Gradient Properties
|
||||
|
||||
Select the arrow below the gradient button to set gradient properties
|
||||
for Studio Components.
|
||||
|
||||
\image qtquick-designer-gradient-types.png "Gradients supported by Studio Components"
|
||||
|
||||
\section3 Linear Gradients
|
||||
|
||||
A \e {linear gradient} interpolates colors between start and end points.
|
||||
Outside these points, the gradient is either padded, reflected, or repeated
|
||||
depending on the spread type. Set start and end points for horizontal and
|
||||
vertical interpolation in the \uicontrol X1, \uicontrol X2, \uicontrol Y1,
|
||||
and \uicontrol Y2 fields.
|
||||
|
||||
\image qtquick-designer-gradient-properties-linear.png "Linear gradient properties"
|
||||
|
||||
\section3 Radial Gradients
|
||||
|
||||
A \e {radial gradient} interpolates colors between a focal circle and a
|
||||
center circle. Points outside the cone defined by the two circles will
|
||||
be transparent. Outside the end points, the gradient is either padded,
|
||||
reflected, or repeated depending on the spread type.
|
||||
|
||||
\image qtquick-designer-gradient-properties-radial.png "Radial gradient properties"
|
||||
|
||||
You can set the center and focal radius in the \uicontrol {Center radius}
|
||||
and \uicontrol {Focal radius} fields. For simple radial gradients, set to
|
||||
the focal radius to 0.
|
||||
|
||||
You can set the center and focal points in the \uicontrol CenterX,
|
||||
\uicontrol CenterY, \uicontrol FocalX, and \uicontrol FocalY fields.
|
||||
To specify a simple radial gradient, set the focal X and focal Y to
|
||||
the value of center X and center Y, respectively.
|
||||
|
||||
\section3 Conical Gradients
|
||||
|
||||
A \e {conical gradient} interpolates colors counter-clockwise around a
|
||||
center point. Set the horizontal and vertical center point of the gradient
|
||||
in the \uicontrol CenterX and \uicontrol CenterY fields and the start angle
|
||||
in the \uicontrol Angle field.
|
||||
|
||||
\image qtquick-designer-gradient-properties-conical.png "Conical gradient properties"
|
||||
\endif
|
||||
|
||||
\section2 Selecting Web Gradients
|
||||
|
||||
The \uicontrol {Gradient Picker} enables you to specify
|
||||
\l{https://webgradients.com/}{WebGradients} for QML types
|
||||
that support \l QGradient.
|
||||
|
@@ -30,7 +30,7 @@
|
||||
\else
|
||||
\previouspage quick-connections-backend.html
|
||||
\endif
|
||||
\nextpage qmldesigner-pathview-editor.html
|
||||
\nextpage studio-3d.html
|
||||
|
||||
\title Adding States
|
||||
|
||||
@@ -181,7 +181,8 @@
|
||||
\endtable
|
||||
|
||||
In addition, you can use arithmetic operators to compare numbers before
|
||||
checks.
|
||||
checks. However, we recommend that you create separate properties for this
|
||||
purpose whenever possible.
|
||||
|
||||
\section2 Examples of when Conditions
|
||||
|
||||
|
@@ -46,6 +46,15 @@
|
||||
you can associate with an item to define how its properties will animate
|
||||
when they change due to a state change.
|
||||
|
||||
Each component in a scene or a project can have its own timeline and its own
|
||||
set of states. We recommend that you place your timelines inside the
|
||||
components and precompose them. Each component's timeline runs independently
|
||||
of the rest of the scene, allowing for time-independent animations.
|
||||
Additionally, separate states allow common functionality to be factored out
|
||||
and reused across the scene. Do note, however, that adding states and
|
||||
timelines to your components will increase the file size and runtime memory
|
||||
requirements of your UI.
|
||||
|
||||
You can find a video tutorial about creating timelines and adding keyframes
|
||||
\l{https://resources.qt.io/development-topic-ui-design/qtdesignstudio-clustertutorial-parttwo}
|
||||
{here}.
|
||||
|
@@ -32,7 +32,7 @@
|
||||
/*!
|
||||
\previouspage creator-using-qt-designer.html
|
||||
\page adding-plugins.html
|
||||
\nextpage creator-usability.html
|
||||
\nextpage creator-ui-best-practices.html
|
||||
|
||||
\title Adding Qt Designer Plugins
|
||||
|
||||
|
@@ -0,0 +1,60 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** 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.
|
||||
**
|
||||
** BSD License Usage
|
||||
** Alternatively, you may use this file under the terms of the BSD license
|
||||
** as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.12
|
||||
import Optimal3DScene 1.0
|
||||
|
||||
Item {
|
||||
width: Constants.width
|
||||
height: Constants.height
|
||||
|
||||
Screen01 {
|
||||
}
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
/* File generated by Qt Creator */
|
||||
|
||||
import QmlProject 1.1
|
||||
|
||||
Project {
|
||||
mainFile: "Optimal3DScene.qml"
|
||||
|
||||
/* Include .qml, .js, and image files from current directory and subdirectories */
|
||||
QmlFiles {
|
||||
directory: "."
|
||||
}
|
||||
|
||||
JavaScriptFiles {
|
||||
directory: "."
|
||||
}
|
||||
|
||||
ImageFiles {
|
||||
directory: "."
|
||||
}
|
||||
|
||||
Files {
|
||||
filter: "*.conf"
|
||||
files: ["qtquickcontrols2.conf"]
|
||||
}
|
||||
|
||||
Files {
|
||||
filter: "qmldir"
|
||||
directory: "."
|
||||
}
|
||||
|
||||
Files {
|
||||
filter: "*.ttf;*.otf"
|
||||
}
|
||||
|
||||
Environment {
|
||||
QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf"
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR: "1"
|
||||
QMLSCENE_CORE_PROFILE: "true"
|
||||
}
|
||||
|
||||
/* List of plugin directories passed to QML runtime */
|
||||
importPaths: [ "imports", "asset_imports" ]
|
||||
|
||||
/* Required for deployment */
|
||||
targetDirectory: "/opt/Optimal3DScene"
|
||||
}
|
191
doc/qtdesignstudio/examples/Optimal3DScene/Screen01.ui.qml
Normal file
@@ -0,0 +1,191 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** 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.
|
||||
**
|
||||
** BSD License Usage
|
||||
** Alternatively, you may use this file under the terms of the BSD license
|
||||
** as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick3D 1.15
|
||||
import Optimal3DScene 1.0
|
||||
import Quick3DAssets.High 1.0
|
||||
import Quick3DAssets.Low 1.0
|
||||
import Quick3DAssets.Merged 1.0
|
||||
import QtQuick 2.15
|
||||
import Quick3DAssets.VertexColor 1.0
|
||||
|
||||
Rectangle {
|
||||
width: Constants.width
|
||||
height: Constants.height
|
||||
|
||||
color: Constants.backgroundColor
|
||||
property alias high: high
|
||||
|
||||
View3D {
|
||||
id: view3D
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1280
|
||||
height: 720
|
||||
SceneEnvironment {
|
||||
id: sceneEnvironment
|
||||
antialiasingQuality: SceneEnvironment.High
|
||||
antialiasingMode: SceneEnvironment.MSAA
|
||||
}
|
||||
|
||||
Node {
|
||||
id: scenelow
|
||||
|
||||
PerspectiveCamera {
|
||||
id: camera
|
||||
x: 0
|
||||
y: 501.999
|
||||
z: 953.07697
|
||||
}
|
||||
|
||||
Low {
|
||||
id: low
|
||||
eulerRotation.z: 0.00001
|
||||
eulerRotation.y: -135
|
||||
eulerRotation.x: 0.00002
|
||||
}
|
||||
|
||||
PointLight {
|
||||
id: lightPoint
|
||||
x: 0
|
||||
y: 888.433
|
||||
castsShadow: true
|
||||
brightness: 400
|
||||
quadraticFade: 0.01318
|
||||
z: -0.00007
|
||||
}
|
||||
}
|
||||
|
||||
Node {
|
||||
id: scenehigh
|
||||
PerspectiveCamera {
|
||||
id: camera1
|
||||
x: 0
|
||||
y: 501.999
|
||||
z: 953.07697
|
||||
}
|
||||
|
||||
PointLight {
|
||||
id: lightPoint1
|
||||
x: 0
|
||||
y: 888.433
|
||||
brightness: 400
|
||||
castsShadow: true
|
||||
z: -0.00007
|
||||
quadraticFade: 0.01318
|
||||
}
|
||||
|
||||
High {
|
||||
id: high
|
||||
eulerRotation.y: -135
|
||||
}
|
||||
}
|
||||
|
||||
Node {
|
||||
id: scenecombined
|
||||
PerspectiveCamera {
|
||||
id: camera2
|
||||
x: 0
|
||||
y: 501.999
|
||||
z: 953.07697
|
||||
}
|
||||
|
||||
PointLight {
|
||||
id: lightPoint2
|
||||
x: 0
|
||||
y: 888.433
|
||||
brightness: 350
|
||||
castsShadow: true
|
||||
z: -0.00007
|
||||
quadraticFade: 0.01318
|
||||
}
|
||||
|
||||
Merged {
|
||||
id: merged
|
||||
eulerRotation.y: -135
|
||||
}
|
||||
}
|
||||
|
||||
Node {
|
||||
id: scenevertexcolor
|
||||
PerspectiveCamera {
|
||||
id: camera3
|
||||
x: 0
|
||||
y: 501.999
|
||||
z: 953.07697
|
||||
}
|
||||
|
||||
PointLight {
|
||||
id: lightPoint3
|
||||
x: 0
|
||||
y: 888.433
|
||||
brightness: 350
|
||||
castsShadow: true
|
||||
z: -0.00007
|
||||
quadraticFade: 0.01318
|
||||
}
|
||||
|
||||
VertexColor {
|
||||
id: vertexColor
|
||||
eulerRotation.y: -135
|
||||
}
|
||||
}
|
||||
environment: sceneEnvironment
|
||||
}
|
||||
}
|
||||
|
||||
/*##^##
|
||||
Designer {
|
||||
D{i:0;active3dScene:10;formeditorZoom:0.6600000262260437}D{i:3;invisible:true}D{i:7;invisible:true}
|
||||
D{i:11;invisible:true}
|
||||
}
|
||||
##^##*/
|
||||
|
@@ -0,0 +1,3 @@
|
||||
visibleInNavigator: true
|
||||
canBeDroppedInFormEditor: false
|
||||
canBeDroppedInView3D: true
|
@@ -0,0 +1,496 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** 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.
|
||||
**
|
||||
** BSD License Usage
|
||||
** Alternatively, you may use this file under the terms of the BSD license
|
||||
** as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick3D 1.15
|
||||
|
||||
Node {
|
||||
id: rootNode
|
||||
|
||||
Model {
|
||||
id: floor
|
||||
eulerRotation.x: -90
|
||||
scale.x: 800
|
||||
scale.y: 800
|
||||
scale.z: 800
|
||||
source: "meshes/floor.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: floor_material
|
||||
diffuseColor: "#ff353b2a"
|
||||
}
|
||||
materials: [
|
||||
floor_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: ovenLatch
|
||||
x: -500
|
||||
y: 100
|
||||
z: -350
|
||||
eulerRotation.x: -44.54277
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/ovenLatch.mesh"
|
||||
eulerRotation.z: -90
|
||||
eulerRotation.y: 90
|
||||
|
||||
DefaultMaterial {
|
||||
id: induction_material
|
||||
diffuseColor: "#ff040404"
|
||||
}
|
||||
|
||||
DefaultMaterial {
|
||||
id: oven_material
|
||||
diffuseColor: "#ffa3a3a3"
|
||||
}
|
||||
materials: [
|
||||
induction_material,
|
||||
oven_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: ovenHigh
|
||||
x: -600
|
||||
z: -300
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/ovenHigh.mesh"
|
||||
materials: [
|
||||
oven_material,
|
||||
induction_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: tapHigh
|
||||
x: -679.799
|
||||
y: 420
|
||||
z: 100
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/tapHigh.mesh"
|
||||
materials: [
|
||||
oven_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: fridgeDoor
|
||||
x: 499
|
||||
y: 450.82
|
||||
z: 500
|
||||
eulerRotation.x: -89.98022
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/fridgeDoor.mesh"
|
||||
eulerRotation.z: -160.70996
|
||||
eulerRotation.y: 17.65012
|
||||
materials: [
|
||||
oven_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: fridgeHigh
|
||||
x: 300
|
||||
y: 0.82016
|
||||
z: 600
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/fridgeHigh.mesh"
|
||||
materials: [
|
||||
oven_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: plateHigh
|
||||
y: 417.734
|
||||
z: 600
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/plateHigh.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: plate_material
|
||||
diffuseColor: "#ff8fa365"
|
||||
}
|
||||
materials: [
|
||||
plate_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: plateHigh_001
|
||||
x: -200
|
||||
y: 417.734
|
||||
z: 600
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/plateHigh_001.mesh"
|
||||
materials: [
|
||||
plate_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: plateHigh_002
|
||||
y: 424.176
|
||||
z: 600
|
||||
eulerRotation.x: -90
|
||||
eulerRotation.y: -19.7049
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/plateHigh_002.mesh"
|
||||
materials: [
|
||||
plate_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: roofLightHigh
|
||||
x: -0.000179373
|
||||
y: 1200.82
|
||||
z: -1.67638e-06
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/roofLightHigh.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: lamp_material
|
||||
diffuseColor: "#ff0c0c0c"
|
||||
}
|
||||
materials: [
|
||||
lamp_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: roofHighpoly
|
||||
y: 1200
|
||||
z: -0.999999
|
||||
eulerRotation.x: -90
|
||||
scale.x: 800
|
||||
scale.y: 800
|
||||
scale.z: 800
|
||||
source: "meshes/roofHighpoly.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: roof_material
|
||||
diffuseColor: "#ff747474"
|
||||
}
|
||||
materials: [
|
||||
roof_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: sinkCabinHigh_002
|
||||
x: -500
|
||||
y: 250
|
||||
z: -99
|
||||
eulerRotation.x: -89.97202
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/sinkCabinHigh_002.mesh"
|
||||
eulerRotation.z: -18.43495
|
||||
eulerRotation.y: 45
|
||||
|
||||
DefaultMaterial {
|
||||
id: cabinDoor_material
|
||||
diffuseColor: "#ff505050"
|
||||
}
|
||||
materials: [
|
||||
cabinDoor_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: sinkCabinHigh_001
|
||||
x: -500
|
||||
y: 250
|
||||
z: 299
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/sinkCabinHigh_001.mesh"
|
||||
eulerRotation.z: 0
|
||||
eulerRotation.y: 81.49729
|
||||
materials: [
|
||||
cabinDoor_material
|
||||
]
|
||||
}
|
||||
|
||||
Node {
|
||||
id: tileHolderHigh
|
||||
x: 200
|
||||
y: 430
|
||||
z: 700
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
|
||||
Model {
|
||||
id: kitchenTile_005
|
||||
x: -9
|
||||
y: 0.299997
|
||||
z: 9.53674e-07
|
||||
eulerRotation.z: -90
|
||||
source: "meshes/kitchenTile_005.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: tiles_material
|
||||
diffuseColor: "#f6f4f4"
|
||||
}
|
||||
materials: [
|
||||
tiles_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: kitchenTile_004
|
||||
x: -9
|
||||
y: 0.299997
|
||||
z: 1.1
|
||||
eulerRotation.z: -90
|
||||
source: "meshes/kitchenTile_004.mesh"
|
||||
materials: [
|
||||
tiles_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: kitchenTile_002
|
||||
x: -9
|
||||
y: 0.299997
|
||||
z: 2.2
|
||||
eulerRotation.z: -90
|
||||
source: "meshes/kitchenTile_002.mesh"
|
||||
materials: [
|
||||
tiles_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: kitchenTile_003
|
||||
y: -9.53674e-07
|
||||
z: 2.2
|
||||
source: "meshes/kitchenTile_003.mesh"
|
||||
materials: [
|
||||
tiles_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: kitchenTile_001
|
||||
y: -9.53674e-07
|
||||
z: 1.1
|
||||
source: "meshes/kitchenTile_001.mesh"
|
||||
materials: [
|
||||
tiles_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: kitchenTile
|
||||
source: "meshes/kitchenTile.mesh"
|
||||
materials: [
|
||||
tiles_material
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Model {
|
||||
id: sinkCabinHigh
|
||||
x: -600
|
||||
z: 300
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/sinkCabinHigh.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: sink_material
|
||||
diffuseColor: "#ff2d2d2d"
|
||||
}
|
||||
materials: [
|
||||
sink_material,
|
||||
oven_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: cornerHigh
|
||||
x: -600
|
||||
z: 600
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/cornerHigh.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: cabinTop_material
|
||||
diffuseColor: "#ff121212"
|
||||
}
|
||||
materials: [
|
||||
cabinTop_material,
|
||||
oven_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: cabinsLeftDoor3
|
||||
x: -399
|
||||
y: 250
|
||||
z: 500
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/cabinsLeftDoor3.mesh"
|
||||
eulerRotation.x: -89.05581
|
||||
eulerRotation.z: 179.99979
|
||||
eulerRotation.y: -135.19951
|
||||
materials: [
|
||||
cabinDoor_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: cabinsLeftDoor2
|
||||
x: -199
|
||||
y: 250
|
||||
z: 500
|
||||
eulerRotation.x: -89.98022
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/cabinsLeftDoor2.mesh"
|
||||
eulerRotation.z: 53.1301
|
||||
eulerRotation.y: -21.80141
|
||||
materials: [
|
||||
cabinDoor_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: cabinsLeftDoor1
|
||||
x: 0.999999
|
||||
y: 250
|
||||
z: 500
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/cabinsLeftDoor1.mesh"
|
||||
eulerRotation.x: -88.52515
|
||||
eulerRotation.z: -108.53853
|
||||
eulerRotation.y: 173.47327
|
||||
materials: [
|
||||
cabinDoor_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: cabinsLeftHigh
|
||||
x: -100
|
||||
y: 240.447
|
||||
z: 580.588
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/cabinsLeftHigh.mesh"
|
||||
materials: [
|
||||
oven_material,
|
||||
cabinTop_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: roomBaseHigh
|
||||
eulerRotation.x: -90
|
||||
scale.x: 800
|
||||
scale.y: 800
|
||||
scale.z: 800
|
||||
source: "meshes/roomBaseHigh.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: wall_material
|
||||
diffuseColor: "#ff7f85a3"
|
||||
}
|
||||
materials: [
|
||||
wall_material
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 662 B |
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,2 @@
|
||||
module Quick3DAssets.High
|
||||
High 1.0 High.qml
|
@@ -0,0 +1,3 @@
|
||||
visibleInNavigator: true
|
||||
canBeDroppedInFormEditor: false
|
||||
canBeDroppedInView3D: true
|
@@ -0,0 +1,298 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** 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.
|
||||
**
|
||||
** BSD License Usage
|
||||
** Alternatively, you may use this file under the terms of the BSD license
|
||||
** as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick3D 1.15
|
||||
|
||||
Node {
|
||||
id: rootNode
|
||||
|
||||
Model {
|
||||
id: ovenLow
|
||||
x: -600
|
||||
z: -300
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/ovenLow.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: oven_material
|
||||
diffuseColor: "#ffa3a3a3"
|
||||
}
|
||||
|
||||
DefaultMaterial {
|
||||
id: induction_material
|
||||
diffuseColor: "#ff040404"
|
||||
}
|
||||
materials: [
|
||||
oven_material,
|
||||
induction_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: tapLow
|
||||
x: -679.799
|
||||
y: 420
|
||||
z: 100
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/tapLow.mesh"
|
||||
materials: [
|
||||
oven_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: plateLow_002
|
||||
y: 424.176
|
||||
z: 600
|
||||
eulerRotation.x: -90
|
||||
eulerRotation.y: -19.7049
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/plateLow_002.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: plate_material
|
||||
diffuseColor: "#ff8fa365"
|
||||
}
|
||||
materials: [
|
||||
plate_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: plateLow_001
|
||||
x: -200
|
||||
y: 417.734
|
||||
z: 600
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/plateLow_001.mesh"
|
||||
materials: [
|
||||
plate_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: plateLow
|
||||
y: 417.734
|
||||
z: 600
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/plateLow.mesh"
|
||||
materials: [
|
||||
plate_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: fridgeLow
|
||||
x: 300
|
||||
y: 0.82016
|
||||
z: 600
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/fridgeLow.mesh"
|
||||
materials: [
|
||||
oven_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: roofLightLow
|
||||
x: -0.000179373
|
||||
y: 1200.82
|
||||
z: -1.67638e-06
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/roofLightLow.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: lamp_material
|
||||
diffuseColor: "#ff0c0c0c"
|
||||
}
|
||||
materials: [
|
||||
lamp_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: kitchenTilesLow
|
||||
x: 200
|
||||
y: 430
|
||||
z: 700
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/kitchenTilesLow.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: tiles_material
|
||||
diffuseColor: "#ffcccccc"
|
||||
}
|
||||
materials: [
|
||||
tiles_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: sinkCabinLow
|
||||
x: -600
|
||||
z: 300
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/sinkCabinLow.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: sink_material
|
||||
diffuseColor: "#ff2d2d2d"
|
||||
}
|
||||
|
||||
DefaultMaterial {
|
||||
id: cabinDoor_material
|
||||
diffuseColor: "#ff505050"
|
||||
}
|
||||
materials: [
|
||||
sink_material,
|
||||
oven_material,
|
||||
cabinDoor_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: corner
|
||||
x: -600
|
||||
z: 600
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/corner.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: cabinTop_material
|
||||
diffuseColor: "#ff121212"
|
||||
}
|
||||
materials: [
|
||||
cabinTop_material,
|
||||
oven_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: roomBaseLow
|
||||
eulerRotation.x: -90
|
||||
scale.x: 800
|
||||
scale.y: 800
|
||||
scale.z: 800
|
||||
source: "meshes/roomBaseLow.mesh"
|
||||
|
||||
DefaultMaterial {
|
||||
id: floor_material
|
||||
diffuseColor: "#ff353b2a"
|
||||
}
|
||||
|
||||
DefaultMaterial {
|
||||
id: wall_material
|
||||
diffuseColor: "#ff7f85a3"
|
||||
}
|
||||
|
||||
DefaultMaterial {
|
||||
id: roof_material
|
||||
diffuseColor: "#ff747474"
|
||||
}
|
||||
materials: [
|
||||
floor_material,
|
||||
wall_material,
|
||||
roof_material
|
||||
]
|
||||
}
|
||||
|
||||
Model {
|
||||
id: cabinsLeftLow
|
||||
x: -100
|
||||
y: 238.4
|
||||
z: 553.885
|
||||
eulerRotation.x: -90
|
||||
scale.x: 100
|
||||
scale.y: 100
|
||||
scale.z: 100
|
||||
source: "meshes/cabinsLeftLow.mesh"
|
||||
materials: [
|
||||
oven_material,
|
||||
cabinDoor_material,
|
||||
cabinTop_material
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
/*##^##
|
||||
Designer {
|
||||
D{i:0;active3dScene:0}
|
||||
}
|
||||
##^##*/
|
After Width: | Height: | Size: 640 B |
After Width: | Height: | Size: 1.2 KiB |