Merge remote-tracking branch 'origin/qds-1.50' into qds-1.59
Change-Id: Ic3ae0fd8c779c0bac8a0f01e87043251b3ce7fd4
@@ -5,6 +5,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
include(FeatureSummary)
|
||||
include(QtCreatorIDEBranding)
|
||||
include(QtCreatorTranslations)
|
||||
|
||||
set(IDE_REVISION FALSE CACHE BOOL "Marks the presence of IDE revision string.")
|
||||
set(IDE_REVISION_STR "" CACHE STRING "The IDE revision string.")
|
||||
|
||||
167
cmake/QtCreatorTranslations.cmake
Normal file
@@ -0,0 +1,167 @@
|
||||
# Defines function add_translation_targets
|
||||
|
||||
function(_extract_ts_data_from_targets outprefix)
|
||||
set(_sources "")
|
||||
set(_includes "")
|
||||
|
||||
set(_targets "${ARGN}")
|
||||
list(REMOVE_DUPLICATES _targets)
|
||||
|
||||
foreach(t IN ITEMS ${_targets})
|
||||
if (TARGET "${t}")
|
||||
get_target_property(_skip_translation "${t}" QT_SKIP_TRANSLATION)
|
||||
get_target_property(_source_dir "${t}" SOURCE_DIR)
|
||||
get_target_property(_interface_include_dirs "${t}" INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property(_include_dirs "${t}" INCLUDE_DIRECTORIES)
|
||||
get_target_property(_source_files "${t}" SOURCES)
|
||||
get_target_property(_extra_translations "${t}" QT_EXTRA_TRANSLATIONS)
|
||||
|
||||
if (NOT _skip_translation)
|
||||
if(_include_dirs)
|
||||
list(APPEND _includes ${_include_dirs})
|
||||
endif()
|
||||
|
||||
if(_interface_include_dirs)
|
||||
list(APPEND _interface_includes ${_include_dirs})
|
||||
endif()
|
||||
|
||||
set(_target_sources "")
|
||||
if(_source_files)
|
||||
list(APPEND _target_sources ${_source_files})
|
||||
endif()
|
||||
if(_extra_translations)
|
||||
list(APPEND _target_sources ${_extra_translations})
|
||||
endif()
|
||||
foreach(s IN ITEMS ${_target_sources})
|
||||
get_filename_component(_abs_source "${s}" ABSOLUTE BASE_DIR "${_source_dir}")
|
||||
list(APPEND _sources "${_abs_source}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set("${outprefix}_sources" "${_sources}" PARENT_SCOPE)
|
||||
set("${outprefix}_includes" "${_includes}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_create_ts_custom_target name)
|
||||
cmake_parse_arguments(_arg "" "FILE_PREFIX;TS_TARGET_PREFIX" "LANGUAGES;SOURCES;INCLUDES" ${ARGN})
|
||||
if (_arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Invalid parameters to _create_ts_custom_target: ${_arg_UNPARSED_ARGUMENTS}.")
|
||||
endif()
|
||||
|
||||
if (NOT _arg_TS_TARGET_PREFIX)
|
||||
set(_arg_TS_TARGET_PREFIX "ts_")
|
||||
endif()
|
||||
|
||||
set(ts_languages ${_arg_LANGUAGES})
|
||||
if (NOT ts_languages)
|
||||
set(ts_languages "${name}")
|
||||
endif()
|
||||
|
||||
foreach(l IN ITEMS ${ts_languages})
|
||||
list(APPEND ts_files "${CMAKE_CURRENT_SOURCE_DIR}/${_arg_FILE_PREFIX}_${l}.ts")
|
||||
endforeach()
|
||||
|
||||
set(_sources "${_arg_SOURCES}")
|
||||
list(SORT _sources)
|
||||
|
||||
set(_includes "${_arg_INCLUDES}")
|
||||
|
||||
list(REMOVE_DUPLICATES _sources)
|
||||
list(REMOVE_DUPLICATES _includes)
|
||||
|
||||
list(REMOVE_ITEM _sources "")
|
||||
list(REMOVE_ITEM _includes "")
|
||||
|
||||
set(_prepended_includes)
|
||||
foreach(include IN LISTS _includes)
|
||||
list(APPEND _prepended_includes "-I${include}")
|
||||
endforeach()
|
||||
set(_includes "${_prepended_includes}")
|
||||
|
||||
string(REPLACE ";" "\n" _sources_str "${_sources}")
|
||||
string(REPLACE ";" "\n" _includes_str "${_includes}")
|
||||
|
||||
set(ts_file_list "${CMAKE_CURRENT_BINARY_DIR}/ts_${name}.lst")
|
||||
file(WRITE "${ts_file_list}" "${_sources_str}\n${_includes_str}\n")
|
||||
|
||||
add_custom_target("${_arg_TS_TARGET_PREFIX}${name}"
|
||||
COMMAND Qt5::lupdate -locations relative -no-ui-lines -no-sort "@${ts_file_list}" -ts ${ts_files}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Generate .ts files"
|
||||
DEPENDS ${_sources}
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
|
||||
function(add_translation_targets file_prefix)
|
||||
if (NOT TARGET Qt5::lrelease)
|
||||
# No Qt translation tools were found: Skip this directory
|
||||
message(WARNING "No Qt translation tools found, skipping translation targets. Add find_package(Qt5 COMPONENTS LinguistTools) to CMake to enable.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
cmake_parse_arguments(_arg ""
|
||||
"OUTPUT_DIRECTORY;INSTALL_DESTINATION;TS_TARGET_PREFIX;QM_TARGET_PREFIX;ALL_QM_TARGET"
|
||||
"LANGUAGES;TARGETS;SOURCES;INCLUDES" ${ARGN})
|
||||
if (_arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Invalid parameters to add_translation_targets: ${_arg_UNPARSED_ARGUMENTS}.")
|
||||
endif()
|
||||
|
||||
if (NOT _arg_TS_TARGET_PREFIX)
|
||||
set(_arg_TS_TARGET_PREFIX "ts_")
|
||||
endif()
|
||||
|
||||
if (NOT _arg_QM_TARGET_PREFIX)
|
||||
set(_arg_QM_TARGET_PREFIX "generate_qm_file_")
|
||||
endif()
|
||||
|
||||
if (NOT _arg_ALL_QM_TARGET)
|
||||
set(_arg_ALL_QM_TARGET "generate_qm_files")
|
||||
endif()
|
||||
|
||||
if (NOT _arg_OUTPUT_DIRECTORY)
|
||||
set(_arg_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
if (NOT _arg_INSTALL_DESTINATION)
|
||||
message(FATAL_ERROR "Please provide a INSTALL_DESTINATION to add_translation_targets")
|
||||
endif()
|
||||
|
||||
_extract_ts_data_from_targets(_to_process "${_arg_TARGETS}")
|
||||
|
||||
_create_ts_custom_target(untranslated
|
||||
FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}"
|
||||
SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES})
|
||||
|
||||
if (NOT TARGET "${_arg_ALL_QM_TARGET}")
|
||||
add_custom_target("${_arg_ALL_QM_TARGET}" ALL COMMENT "Generate .qm-files")
|
||||
endif()
|
||||
|
||||
foreach(l IN ITEMS ${_arg_LANGUAGES})
|
||||
set(_ts_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_prefix}_${l}.ts")
|
||||
set(_qm_file "${_arg_OUTPUT_DIRECTORY}/${file_prefix}_${l}.qm")
|
||||
|
||||
_create_ts_custom_target("${l}" FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}"
|
||||
SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES})
|
||||
|
||||
add_custom_command(OUTPUT "${_qm_file}"
|
||||
COMMAND Qt5::lrelease "${_ts_file}" -qm "${_qm_file}"
|
||||
MAIN_DEPENDENCY "${_ts_file}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Generate .qm file"
|
||||
VERBATIM)
|
||||
add_custom_target("${_arg_QM_TARGET_PREFIX}${l}" DEPENDS "${_qm_file}")
|
||||
install(FILES "${_qm_file}" DESTINATION ${_arg_INSTALL_DESTINATION})
|
||||
|
||||
add_dependencies("${_arg_ALL_QM_TARGET}" "${_arg_QM_TARGET_PREFIX}${l}")
|
||||
endforeach()
|
||||
|
||||
_create_ts_custom_target(all
|
||||
LANGUAGES ${_arg_LANGUAGES}
|
||||
TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}"
|
||||
FILE_PREFIX "${file_prefix}"
|
||||
SOURCES ${_to_process_sources} ${_arg_SOURCES}
|
||||
INCLUDES ${_to_process_includes} ${_arg_INCLUDES}
|
||||
)
|
||||
endfunction()
|
||||
@@ -52,9 +52,10 @@
|
||||
|
||||
While it is useful to learn the basics of Qt Quick, you can also rely on
|
||||
\QMLD to write the code for you when you drag-and-drop the ready-made
|
||||
components to the working area and change them to your liking by modifying
|
||||
their properties in the Design mode. You can always check up details in
|
||||
the extensive Qt Quick documentation by pressing \key F1.
|
||||
components to the \uicontrol {Form Editor} view and change them to your
|
||||
liking by modifying their properties in the \uicontrol Properties view in
|
||||
the Design mode. You can always check up details in the extensive Qt Quick
|
||||
documentation by pressing \key F1.
|
||||
|
||||
\list
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2018 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Design Studio.
|
||||
**
|
||||
** $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 QmlProject 1.1
|
||||
|
||||
Project {
|
||||
mainFile: "ClusterTutorial.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: "."
|
||||
}
|
||||
|
||||
Environment {
|
||||
QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf"
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR: "1"
|
||||
}
|
||||
|
||||
/* List of plugin directories passed to QML runtime */
|
||||
importPaths: [ "imports", "backend"]
|
||||
|
||||
/* Required for deployment */
|
||||
targetDirectory: "/opt/ClusterTutorial"
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Design Studio.
|
||||
**
|
||||
** $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.4
|
||||
import CoffeeMachine 1.0
|
||||
|
||||
ApplicationFlowForm {
|
||||
id: applicationFlow
|
||||
state: "initial"
|
||||
|
||||
property int animationDuration: 400
|
||||
|
||||
choosingCoffee.brewButtonSelection.onClicked: {
|
||||
applicationFlow.state = "to settings"
|
||||
applicationFlow.choosingCoffee.milkSlider.value = applicationFlow.choosingCoffee.sideBar.currentMilk
|
||||
applicationFlow.choosingCoffee.sugarSlider.value = 2
|
||||
}
|
||||
|
||||
choosingCoffee.sideBar.onCoffeeSelected: {
|
||||
applicationFlow.state = "selection"
|
||||
}
|
||||
|
||||
choosingCoffee.backButton.onClicked: {
|
||||
applicationFlow.state = "back to selection"
|
||||
}
|
||||
|
||||
choosingCoffee.brewButton.onClicked: {
|
||||
applicationFlow.state = "to empty cup"
|
||||
}
|
||||
|
||||
emptyCup.continueButton.onClicked: {
|
||||
applicationFlow.state = "to brewing"
|
||||
brewing.coffeeName = choosingCoffee.sideBar.currentCoffee
|
||||
brewing.foamAmount = choosingCoffee.sideBar.currentFoam
|
||||
brewing.milkAmount = applicationFlow.choosingCoffee.milkSlider.value
|
||||
brewing.coffeeAmount = choosingCoffee.sideBar.currentCoffeeAmount
|
||||
brewing.start()
|
||||
}
|
||||
|
||||
brewing.onFinished: {
|
||||
applicationFlow.state = "reset"
|
||||
}
|
||||
|
||||
}
|
||||
159
doc/qtdesignstudio/examples/coffeemachine/CoffeeButton.qml
Normal file
@@ -0,0 +1,159 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Design Studio.
|
||||
**
|
||||
** $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.4
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import CoffeeMachine 1.0
|
||||
|
||||
Image {
|
||||
id: root
|
||||
source: "images/icons/coffees/Cappuccino.png"
|
||||
signal clicked
|
||||
|
||||
property int duration: 250
|
||||
property alias text: label.text
|
||||
//! [0]
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: root.clicked()
|
||||
onPressed: {
|
||||
glow.visible = true
|
||||
animation1.start()
|
||||
animation2.start()
|
||||
}
|
||||
}
|
||||
//! [0]
|
||||
|
||||
Rectangle {
|
||||
id: glow
|
||||
visible: false
|
||||
|
||||
width: 250
|
||||
height: 250
|
||||
color: "#00000000"
|
||||
radius: 125
|
||||
scale: 1.05
|
||||
border.color: "#ffffff"
|
||||
}
|
||||
|
||||
Label {
|
||||
id: label
|
||||
x: 292
|
||||
y: 252
|
||||
text: qsTr("Label")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: "#443224"
|
||||
font.family: Constants.fontFamily
|
||||
font.pixelSize: 28
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
target: glow
|
||||
id: animation1
|
||||
duration: root.duration
|
||||
loops: 1
|
||||
from: 1.05
|
||||
to: 1.2
|
||||
property: "scale"
|
||||
}
|
||||
|
||||
ParallelAnimation {
|
||||
id: animation2
|
||||
SequentialAnimation {
|
||||
PropertyAnimation {
|
||||
target: glow
|
||||
duration: root.duration
|
||||
loops: 1
|
||||
from: 0.2
|
||||
to: 1.0
|
||||
property: "opacity"
|
||||
}
|
||||
PropertyAnimation {
|
||||
target: glow
|
||||
duration: root.duration
|
||||
loops: 1
|
||||
from: 1.0
|
||||
to: 0.0
|
||||
property: "opacity"
|
||||
}
|
||||
|
||||
PropertyAction {
|
||||
target: glow
|
||||
property: "visible"
|
||||
value: false
|
||||
}
|
||||
}
|
||||
|
||||
SequentialAnimation {
|
||||
PropertyAction {
|
||||
target: glow
|
||||
property: "border.width"
|
||||
value: 20
|
||||
}
|
||||
|
||||
PauseAnimation {
|
||||
duration: 200
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
target: glow
|
||||
duration: root.duration
|
||||
loops: 1
|
||||
from: 20
|
||||
to: 10
|
||||
property: "border.width"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2018 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Design Studio.
|
||||
**
|
||||
** $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 QmlProject 1.1
|
||||
|
||||
Project {
|
||||
mainFile: "CoffeeMachine.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: "."
|
||||
}
|
||||
|
||||
Environment {
|
||||
QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf"
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR: "1"
|
||||
}
|
||||
|
||||
/* List of plugin directories passed to QML runtime */
|
||||
importPaths: [ "imports" ]
|
||||
|
||||
/* Required for deployment */
|
||||
targetDirectory: "/opt/CoffeeMachine"
|
||||
}
|
||||
100
doc/qtdesignstudio/examples/coffeemachine/SideBar.qml
Normal file
@@ -0,0 +1,100 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Design Studio.
|
||||
**
|
||||
** $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.4
|
||||
|
||||
SideBarForm {
|
||||
id: sideBar
|
||||
property string currentCoffee: qsTr("Cappuccino")
|
||||
signal coffeeSelected
|
||||
property real currentFoam: 1
|
||||
property real currentMilk: 0
|
||||
property real currentCoffeeAmount: 4
|
||||
|
||||
Behavior on currentMilk {
|
||||
NumberAnimation { duration: 250 }
|
||||
}
|
||||
|
||||
Behavior on currentCoffeeAmount {
|
||||
NumberAnimation { duration: 250 }
|
||||
}
|
||||
|
||||
macchiatoButton.onClicked: {
|
||||
sideBar.currentCoffee = qsTr("Macchiato")
|
||||
sideBar.currentFoam = 1
|
||||
sideBar.currentMilk = 1
|
||||
sideBar.currentCoffeeAmount = 4
|
||||
sideBar.coffeeSelected()
|
||||
}
|
||||
|
||||
latteButton.onClicked: {
|
||||
sideBar.currentCoffee = qsTr("Latte")
|
||||
sideBar.currentFoam = 1
|
||||
sideBar.currentMilk = 10
|
||||
sideBar.currentCoffeeAmount = 3
|
||||
sideBar.coffeeSelected()
|
||||
}
|
||||
|
||||
espressoButton.onClicked: {
|
||||
sideBar.currentCoffee = qsTr("Espresso")
|
||||
sideBar.currentFoam = 0
|
||||
sideBar.currentMilk = 0
|
||||
sideBar.currentCoffeeAmount = 4
|
||||
sideBar.coffeeSelected()
|
||||
}
|
||||
|
||||
cappuccinoButton.onClicked: {
|
||||
sideBar.currentCoffee = qsTr("Cappuccino")
|
||||
sideBar.currentFoam = 1
|
||||
sideBar.currentMilk = 7
|
||||
sideBar.currentCoffeeAmount = 3.5
|
||||
sideBar.coffeeSelected()
|
||||
}
|
||||
}
|
||||
50
doc/qtdesignstudio/examples/doc/clustertutorial.qdoc
Normal file
@@ -0,0 +1,50 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2018 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
\example ClusterTutorial
|
||||
\ingroup studioexamples
|
||||
\brief Contains sources for the Cluster Tutorial videos.
|
||||
|
||||
\title Cluster Tutorial
|
||||
|
||||
\e {Cluster Tutorial} example contains the source files for a set of
|
||||
video tutorials that explain how to export designs from Adobe
|
||||
Photoshop to \QDS and to edit them to create Qt Quick UIs.
|
||||
|
||||
Select the \uicontrol Tutorials tab in the Welcome mode to watch the
|
||||
following tutorials:
|
||||
|
||||
\list
|
||||
\li Part 1 provides an introduction to \QDS and \QB Adobe Photoshop
|
||||
exporter.
|
||||
\li Part 2 describes adding custom fonts and getting started with the
|
||||
timeline.
|
||||
\li Part 3 describes creating animations, applying effects, and using
|
||||
ISO icons.
|
||||
\li Part 4 describes using bindings and mock data.
|
||||
\li Part 5 describes states, animation, and easing curves.
|
||||
\endlist
|
||||
*/
|
||||
175
doc/qtdesignstudio/examples/doc/coffeemachine.qdoc
Normal file
@@ -0,0 +1,175 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
\example CoffeeMachine
|
||||
\ingroup studioexamples
|
||||
|
||||
\title Coffee Machine
|
||||
\brief Illustrates how to use the timeline and states to animate transitions
|
||||
in a UI.
|
||||
|
||||
\image coffee-machine-overview.png
|
||||
|
||||
\e {Coffee Machine} lets users choose the type of coffee to brew.
|
||||
They can determine the ratio of coffee, hot milk, and milk foam by using
|
||||
sliders. The progress of the brewing process is displayed as
|
||||
an animation. When the coffee is ready, the startup screen appears again.
|
||||
|
||||
The \e {ApplicationFlow.ui.qml} file contains all the screens in the
|
||||
UI. We use states to display the appropriate screen in the
|
||||
viewport and the timeline to animate the transitions between and on
|
||||
the screens.
|
||||
|
||||
\section1 Application Flow
|
||||
|
||||
On the startup screen, \e {AnimationFlowForm.ui.qml}, users can select
|
||||
from several types of coffee to fill the empty cup. The selection
|
||||
triggers \c animation1 and \c animation2 in \e {CoffeeButton.qml}.
|
||||
|
||||
\quotefromfile CoffeeMachine/CoffeeButton.qml
|
||||
\skipto PropertyAnimation
|
||||
\printuntil }
|
||||
\printuntil }
|
||||
\dots
|
||||
|
||||
Selecting the coffee type triggers the respective signal handler in
|
||||
\e {SideBar.qml}, which sets the default mix for the selected coffee type.
|
||||
The following code snippet displays the \c {cappuccinoButton.onClicked()}
|
||||
signal handler:
|
||||
|
||||
\quotefromfile CoffeeMachine/SideBar.qml
|
||||
\skipto cappuccinoButton.onClicked
|
||||
\printuntil }
|
||||
|
||||
The \c {sideBar.coffeeSelected()} signal sets \c {applicationFlow.state}
|
||||
in \e {ApplicationFlow.qml} to \c "selection". We will specify the states
|
||||
later.
|
||||
|
||||
\quotefromfile CoffeeMachine/ApplicationFlow.qml
|
||||
\skipto choosingCoffee.sideBar.onCoffeeSelected
|
||||
\printuntil }
|
||||
|
||||
\image coffee-machine-selection.png
|
||||
|
||||
Clicking \uicontrol {Brew me a cup} triggers the
|
||||
\c {choosingCoffee.brewButtonSelection.onClicked}
|
||||
signal handler, which changes the application flow
|
||||
state to \c {"to settings"}:
|
||||
|
||||
\quotefromfile CoffeeMachine/ApplicationFlow.qml
|
||||
\skipto choosingCoffee.brewButtonSelection.onClicked
|
||||
\printuntil }
|
||||
|
||||
Users can use the sliders for the amount of milk and
|
||||
sugar to change the default values.
|
||||
|
||||
\image coffee-machine-modify.png
|
||||
|
||||
Clicking \uicontrol Brew triggers the
|
||||
\c {choosingCoffee.brewButton.onClicked()}
|
||||
signal handler, which sets the application
|
||||
flow state to \c {"to empty cup"}.
|
||||
|
||||
\skipto choosingCoffee.brewButton.onClicked
|
||||
\printuntil }
|
||||
|
||||
\image coffee-machine-emptycup.png
|
||||
|
||||
Clicking on \uicontrol Continue triggers the
|
||||
\c {emptyCup.continueButton.onClicked} signal
|
||||
handler, which sets the application flow status
|
||||
to \c {"to brewing"}.
|
||||
|
||||
\skipto emptyCup.continueButton.onClicked
|
||||
\printuntil }
|
||||
|
||||
When the coffee is ready, the \c {brewing.onFinished} signal handler
|
||||
is triggered. It sets the application flow status to \c "reset", so
|
||||
that the application returns to the startup screen.
|
||||
|
||||
\section1 Using Timelines to Animate Transitions
|
||||
|
||||
The Coffee Machine application screens for choosing coffee, empty cup, and
|
||||
brewing each use custom QML types specified in separate QML files.
|
||||
|
||||
We use the \uicontrol Timeline view to animate the transitions between
|
||||
the screens during the application flow in \e {ApplicationFlow.ui.qml}.
|
||||
|
||||
\image coffee-machine-timeline.png
|
||||
|
||||
Our viewport contains 200 frames, so we select the
|
||||
\inlineimage plus.png "Plus button"
|
||||
button to add a 1200-frame timeline to the root element.
|
||||
We use the default values for all other fields.
|
||||
|
||||
To start recording the transition from the startup screen to the coffee
|
||||
selection screen on the timeline, we select \e choosingCoffee in the
|
||||
\uicontrol Navigator. We check that the playhead is at frame 0, and then
|
||||
select the \inlineimage recordfill.png
|
||||
(\uicontrol {Auto Key (K)}) button (or press \key k).
|
||||
|
||||
At frame 0, we set the X coordinate to 0 in \uicontrol Properties >
|
||||
\uicontrol Geometry > \uicontrol Position. We then move the playhead
|
||||
to 400 frames and set the X coordinate to a negative value.
|
||||
|
||||
\image coffee-machine-properties.png
|
||||
|
||||
When we deselect the record button to stop recording the timeline, the
|
||||
new timeline appears in the view.
|
||||
|
||||
For more information about using the timeline, see \l {Creating Animations}.
|
||||
|
||||
\section1 Using States to Move Between Screens
|
||||
|
||||
We use the \uicontrol States view to determine the contents of the
|
||||
viewport. The animations are run when moving from one state to another.
|
||||
|
||||
\image coffee-machine-states.png
|
||||
|
||||
We create the states by moving from viewport to viewport in
|
||||
\e ApplicationFlow.ui.qml and clicking \inlineimage plus.png "Add button"
|
||||
in the \uicontrol States view.
|
||||
|
||||
We also create states for animations that are run when moving to the
|
||||
\c {"settings"} and \c {"selection"} states.
|
||||
|
||||
We then return to the \uicontrol Timeline view and select
|
||||
\inlineimage animation.png "Timeline Settings button"
|
||||
to open the \uicontrol {Timeline Settings} dialog. We select
|
||||
the \uicontrol Add button to create animations for each part
|
||||
of the timeline. Therefore, the start and end frame of each
|
||||
animation are important, whereas their duration is not.
|
||||
|
||||
\image coffee-machine-timeline-settings.png
|
||||
|
||||
We set the start frame for the \c {"selection"} state to 400 and
|
||||
the end frame to 200, because we are moving back on the timeline to display
|
||||
the selection sidebar.
|
||||
|
||||
In the \uicontrol {Transitions to states} field, we select the state to
|
||||
switch to when the animation ends. In the lower part of the dialog, we
|
||||
bind the states that don't have animations to fixed frames.
|
||||
*/
|
||||
129
doc/qtdesignstudio/examples/doc/ebikedesign.qdoc
Normal file
@@ -0,0 +1,129 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
\example EBikeDesign
|
||||
\ingroup studioexamples
|
||||
|
||||
\title E-Bike Design
|
||||
\brief Illustrates how to use the timeline and states to animate transitions
|
||||
in an application.
|
||||
|
||||
\image ebikedesign.png "Standard screen"
|
||||
|
||||
\e {E-Bike Design} is a control center application for electric bikes.
|
||||
The application contains a Standard screen that displays a speedometer,
|
||||
a Trip screen that displays statistics about the current trip, and a
|
||||
Navigator screen that displays a map.
|
||||
|
||||
The Trip and Navigator screens display a small animated speedometer that
|
||||
the users can select to move back to the Standard screen.
|
||||
|
||||
\image ebikedesign-trip.png "Trip screen"
|
||||
|
||||
In the \e {Screen01.ui.qml} file, we place the screens in a row in the
|
||||
following order from left to right: Trip, Standard, Navigator. We will
|
||||
use states to show the appropriate screen in the viewport, and the timeline
|
||||
to animate the transitions between and on the screens.
|
||||
|
||||
\section1 Using Timelines to Animate Transitions
|
||||
|
||||
We use the \uicontrol Timeline view to animate the transitions between
|
||||
the screens in \e {Screen01.ui.qml}.
|
||||
|
||||
Our viewport contains 1000 frames, so we select the
|
||||
\inlineimage plus.png "Plus button"
|
||||
button to add a 5000-frame timeline to the root element.
|
||||
We use the default values for all other fields.
|
||||
|
||||
To start recording the transitions between the Standard screen and the
|
||||
Trip and Navigator screens on the timeline, we select \e screenCanvas in
|
||||
the Design mode \uicontrol Navigator view. We check that the playhead is at
|
||||
frame 0, and then select the \inlineimage recordfill.png
|
||||
(\uicontrol {Auto Key (K)}) button (or press \key k).
|
||||
|
||||
\image ebikedesign-timeline.png "Timeline view"
|
||||
|
||||
At frame 0, we set the X coordinate to 0 in \uicontrol Properties >
|
||||
\uicontrol Geometry > \uicontrol Position to display the Trip screen.
|
||||
We then move the playhead to frame 1000 and set the X coordinate to
|
||||
-1286 to display the Standard screen. We continue by moving the playhead
|
||||
to frame 2000 and setting the X coordinate to -2560 to display the
|
||||
Navigator screen. At frame 3000, we set the X coordinate back to -1268
|
||||
to return to the Standard screen. Finally, at frame 4000, we set the X
|
||||
coordinate to -19 to return to the Trip screen.
|
||||
|
||||
When we deselect the record button to stop recording the timeline, the
|
||||
new timeline appears in the view.
|
||||
|
||||
When we select \e tripScreen in the \uicontrol Navigator, we can see the
|
||||
properties of the TripScreen QML type that we can animate in the
|
||||
\uicontrol Properties view.
|
||||
|
||||
\image ebikedesign-trip-properties.png "Properties view of the Trip type"
|
||||
|
||||
We set values for the \uicontrol Visibility,
|
||||
\uicontrol Opacity, \uicontrol currentFrame, and \uicontrol Scale properties
|
||||
to fade out the current screen when moving to another one and to make the
|
||||
speedometer grow and shrink in size depending on its current position.
|
||||
|
||||
For more information about using the timeline, see \l {Creating Animations}.
|
||||
|
||||
\section1 Using States to Move Between Screens
|
||||
|
||||
We use the \uicontrol States view to determine the contents of the viewport.
|
||||
The animations are run in a particular state or when moving from one state
|
||||
to another.
|
||||
|
||||
\image ebikedesign-states.png "States view"
|
||||
|
||||
We create the states for displaying the Trip, Standard, and Navigation
|
||||
screens by moving from viewport to viewport in \e Screen01.ui.qml and
|
||||
clicking \inlineimage plus.png "Add button" in the \uicontrol States view
|
||||
when the appropriate screen is displayed in the viewport.
|
||||
|
||||
We then create states for animations that are run when moving between the
|
||||
screens: TripToStandard, StandardToNavigation, NavigationToStandard, and
|
||||
StandardToTrip.
|
||||
|
||||
Finally, we create states for enlarging and shrinking the speedometer: Big,
|
||||
ToBig, and FromBig.
|
||||
|
||||
We then return to the \uicontrol Timeline view and select
|
||||
\inlineimage animation.png "Timeline Settings button"
|
||||
to open the \uicontrol {Timeline Settings} dialog. We select
|
||||
the \uicontrol Add button to create animations for each part
|
||||
of the timeline. Therefore, the start and end frame of each
|
||||
animation are important, whereas their duration is not.
|
||||
|
||||
\image ebikedesign-timeline-settings.png "Timeline Settings dialog"
|
||||
|
||||
We set the start and end frames for the transitions to states to match the
|
||||
values of the X coordinate we set on the timeline.
|
||||
|
||||
In the \uicontrol {Transitions to states} field, we select the state to
|
||||
switch to when the animation ends. In the lower part of the dialog, we
|
||||
bind the states that don't have animations to fixed frames.
|
||||
*/
|
||||
|
After Width: | Height: | Size: 43 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/coffee-machine-modify.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 124 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/coffee-machine-states.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 14 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/ebikedesign-states.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 19 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/ebikedesign-timeline.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 26 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/ebikedesign-trip.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/ebikedesign.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/progressbar-animated.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/progressbar-rectangle.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 16 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/progressbar-timeline.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/progressbar.png
Normal file
|
After Width: | Height: | Size: 9.9 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/sidemenu-connections.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 22 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/sidemenu-menubar.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/sidemenu-states.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 18 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/sidemenu-timeline.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/sidemenu-ui.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/sidemenu.png
Normal file
|
After Width: | Height: | Size: 149 KiB |
|
After Width: | Height: | Size: 48 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/webinardemo-mainappui.png
Normal file
|
After Width: | Height: | Size: 228 KiB |
|
After Width: | Height: | Size: 204 KiB |
|
After Width: | Height: | Size: 207 KiB |
|
After Width: | Height: | Size: 14 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/webinardemo-states.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
doc/qtdesignstudio/examples/doc/images/webinardemo-timeline.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
@@ -78,9 +78,8 @@
|
||||
\section2 Learn Qt Quick - Projects and Files
|
||||
|
||||
\QDS creates a set of boilerplate files and folders that you need to create
|
||||
a UI using Qt Quick and QML. The files are listed in the \uicontrol Project
|
||||
tab in the \uicontrol Navigator and in the \uicontrol Projects view. For
|
||||
more information, see \l {Viewing Project Files}.
|
||||
a UI using Qt Quick and QML. The files are listed in the \uicontrol Projects
|
||||
view. For more information, see \l {Viewing Project Files}.
|
||||
|
||||
\image loginui1-project-files.png
|
||||
|
||||
@@ -108,9 +107,8 @@
|
||||
QML files define a hierarchy of objects with a highly-readable, structured
|
||||
layout. Every QML file consists of two parts: an imports section and an
|
||||
object declaration section. The QML types and functionality most common to
|
||||
UIs are provided in the QtQuick import. Select the \uicontrol {Text Editor}
|
||||
tab in the Design mode or press \key F4 to view the QML code of an ui.qml
|
||||
file.
|
||||
UIs are provided in the QtQuick import. You can view the QML code of an
|
||||
ui.qml file in the \uicontrol {Text Editor} view.
|
||||
|
||||
For more information about creating a QML file from scratch, see
|
||||
\l{First Steps with QML}.
|
||||
@@ -127,17 +125,21 @@
|
||||
|
||||
To preview the changes that you make to the UI while you make
|
||||
them, select the \inlineimage live_preview.png
|
||||
(\uicontrol {Show Live Preview}) button on the canvas toolbar
|
||||
or press \key {Alt+P}.
|
||||
(\uicontrol {Show Live Preview}) button on the \uicontrol {Form Editor}
|
||||
view toolbar or press \key {Alt+P}.
|
||||
|
||||
The \e Screen01.ui.qml file that the wizard created for you should be
|
||||
open in the Design mode. If it is not, you can double-click it in the
|
||||
\uicontrol Project sidebar view to open it.
|
||||
\uicontrol Projects view to open it.
|
||||
|
||||
To modify \e Screen01.ui.qml in the \uicontrol {Form Editor} tab:
|
||||
\note The visibility of views depends on the selected workspace. To open
|
||||
hidden views, select \uicontrol Window > \uicontrol Views in the Design
|
||||
mode. For more information, see \l {Managing Workspaces}.
|
||||
|
||||
To modify \e Screen01.ui.qml in the \uicontrol {Form Editor}:
|
||||
|
||||
\list 1
|
||||
\li Select \e Rectangle in the \uicontrol Navigator to display its
|
||||
\li Select \e Rectangle in the \uicontrol Navigator view to display its
|
||||
properties in the \uicontrol Properties view.
|
||||
\li In the \uicontrol Color field, select the
|
||||
\inlineimage icons/action-icon-binding.png
|
||||
@@ -182,7 +184,7 @@
|
||||
\skipto import
|
||||
\printuntil loginui1 1.0
|
||||
|
||||
The \uicontrol Library lists the QML types in each Qt module that are
|
||||
The \uicontrol Library view lists the QML types in each Qt module that are
|
||||
supported by \QDS. You can use the basic types to create your own QML
|
||||
types, and they will be listed in the \uicontrol {My QML Components} tab.
|
||||
The tab is only visible if you have created custom QML components.
|
||||
@@ -196,8 +198,8 @@
|
||||
You can use another wizard to create a push button and to add it to the
|
||||
project. The wizard creates a reusable button component that appears in
|
||||
the \uicontrol {My QML Components} tab in the \uicontrol Library. You can
|
||||
drag and drop it to the canvas and modify its properties to change its
|
||||
appearance and functionality.
|
||||
drag and drop it to the \uicontrol {Form Editor} and modify its properties
|
||||
in the \uicontrol Properties view to change its appearance and functionality.
|
||||
|
||||
If you find that you cannot use the wizard to create the kind of push
|
||||
button that you want, you can create your button from scratch using basic
|
||||
@@ -269,8 +271,8 @@
|
||||
\li On the toolbar, select \uicontrol Master >
|
||||
\uicontrol buttonBackground to move into the button background
|
||||
component.
|
||||
\li Select the button background on the canvas or in the
|
||||
\uicontrol Navigator to display its properties in the
|
||||
\li Select the button background in the \uicontrol {Form Editor} or
|
||||
in the \uicontrol Navigator to display its properties in the
|
||||
\uicontrol Properties view.
|
||||
\li In the \uicontrol Color field, select
|
||||
\inlineimage icons/action-icon.png
|
||||
@@ -290,14 +292,15 @@
|
||||
to save your changes.
|
||||
\endlist
|
||||
|
||||
To move back to the top level PushButton type on the canvas, select
|
||||
To move back to the top level PushButton type in the
|
||||
\uicontrol {Form Editor}, select
|
||||
\uicontrol PushButton.ui.qml on the breadcrumb bar (1):
|
||||
|
||||
\image loginui1-breadcrumb-bar.png "Breadcrumb bar in the Design mode."
|
||||
|
||||
Your button should now look something like this:
|
||||
|
||||
\image loginui1-button-styled.png "Modified button in the Design mode."
|
||||
\image loginui1-button-styled.png "Modified button in the Form Editor"
|
||||
|
||||
\section2 Learn Qt Quick - Property Bindings
|
||||
|
||||
@@ -327,11 +330,11 @@
|
||||
You will now add two button instances to the UI and modify their labels.
|
||||
|
||||
\list 1
|
||||
\li Double-click \e Screen01.ui.qml in the \uicontrol Project sidebar
|
||||
view to open it on the canvas.
|
||||
\li Double-click \e Screen01.ui.qml in the \uicontrol Projects
|
||||
view to open it in the \uicontrol {Form Editor}.
|
||||
\li Drag and drop two instances of the PushButton type from the
|
||||
\uicontrol Library to the canvas.
|
||||
\image loginui1-library.png "Library sidebar view"
|
||||
\uicontrol Library to the \uicontrol {Form Editor}.
|
||||
\image loginui1-library.png "Library view"
|
||||
\li Select one of the buttons in the \uicontrol Navigator to modify
|
||||
its id and text label in the \uicontrol Properties view.
|
||||
\li In the \uicontrol Id field, enter \e loginButton.
|
||||
@@ -347,9 +350,9 @@
|
||||
buttons so that the text fits comfortably on the button background.
|
||||
In this example, the button width is set to 120 pixels.
|
||||
\li Move the cursor on the selected button to make the selection icon
|
||||
appear. You can now drag the button to another position on the
|
||||
canvas. Use the guidelines to align the buttons below the page
|
||||
title:
|
||||
appear. You can now drag the button to another position in the
|
||||
\uicontrol {Form Editor}. Use the guidelines to align the buttons
|
||||
below the page title:
|
||||
\image loginui1-align-buttons.png
|
||||
\li Select \uicontrol File > \uicontrol Save or press \key {Ctrl+S}
|
||||
to save your changes.
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
|
||||
\section1 Anchoring UI Components
|
||||
|
||||
First, you will add a new rectangle to the canvas and move all the
|
||||
current UI components to it to create a new page. Then, you will
|
||||
First, you will add a new rectangle to the \uicontrol {Form Editor} and move
|
||||
all the current UI components to it to create a new page. Then, you will
|
||||
\l {Setting Anchors and Margins}{anchor} the static elements on the
|
||||
page, that is the logo image (\e logo) and page title (\e pageTitle),
|
||||
to the page. When you created the project using the new project wizard
|
||||
@@ -65,20 +65,20 @@
|
||||
|
||||
To preview the changes that you make to the UI while you make
|
||||
them, select the \inlineimage live_preview.png
|
||||
(\uicontrol {Show Live Preview}) button on the canvas toolbar
|
||||
or press \key {Alt+P}.
|
||||
(\uicontrol {Show Live Preview}) button on the \uicontrol {Form Editor}
|
||||
toolbar or press \key {Alt+P}.
|
||||
|
||||
To anchor components on a page:
|
||||
|
||||
\list 1
|
||||
\li Open \e {Screen01.ui.qml} for editing in the Design mode
|
||||
\uicontrol {Form Editor} tab.
|
||||
\uicontrol {Form Editor}.
|
||||
\li Select the rectangle that forms the UI background in the
|
||||
\uicontrol Navigator, and change its id to \e root in the
|
||||
\uicontrol Properties view.
|
||||
\li Drag and drop a \uicontrol Rectangle from the \uicontrol Library
|
||||
to \e root, and change its id to \e loginPage.
|
||||
\li In the \uicontrol Layout tab, select the \inlineimage anchor-fill.png
|
||||
\li In the \uicontrol Layout view, select the \inlineimage anchor-fill.png
|
||||
(\uicontrol {Fill Parent Item}) button to anchor the page to the root
|
||||
item on all sides.
|
||||
\li Select all the other UI elements below \e root in the
|
||||
@@ -132,7 +132,7 @@
|
||||
\l {Qt Quick Controls 2} types in the tab:
|
||||
\image loginui2-imports.png
|
||||
\li Drag and drop two instances of the \uicontrol {Text Field} type
|
||||
to the canvas.
|
||||
to the \uicontrol {Form Editor}.
|
||||
\li Select one of the text fields in the \uicontrol Navigator, and
|
||||
change its id to \e usernameField in the \uicontrol Properties view.
|
||||
\li In the \uicontrol Geometry group, \uicontrol Size field, set the
|
||||
@@ -141,8 +141,8 @@
|
||||
\uicontrol tr to mark the text translatable.
|
||||
\image loginui2-field-properties.png "Text field properties"
|
||||
\li In the \uicontrol Text field, delete the default text to make the
|
||||
placeholder text visible on the canvas. The text value always takes
|
||||
precedence over the placeholder text value.
|
||||
placeholder text visible on the \uicontrol {Form Editor}. The text
|
||||
value always takes precedence over the placeholder text value.
|
||||
\li Select the other text field, and change its id to
|
||||
\e passwordField, placeholder text to \e Password,
|
||||
and width to \e 300 pixels. Also remove the default text.
|
||||
@@ -155,7 +155,8 @@
|
||||
\uicontrol Navigator, and right-click on either item
|
||||
to open a context menu.
|
||||
\li Select \uicontrol Position > \uicontrol {Position in Column}
|
||||
to position the fields on top of each other on the canvas.
|
||||
to position the fields on top of each other in the
|
||||
\uicontrol {Form Editor}.
|
||||
\li Select the column in the \uicontrol Navigator and change its id
|
||||
to \e fieldColumn in \uicontrol Properties.
|
||||
\li In the \uicontrol Spacing field, set the spacing between the
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
|
||||
To preview the changes that you make to the UI while you make
|
||||
them, select the \inlineimage live_preview.png
|
||||
(\uicontrol {Show Live Preview}) button on the canvas toolbar
|
||||
or press \key {Alt+P}.
|
||||
(\uicontrol {Show Live Preview}) button on the \uicontrol {Form Editor}
|
||||
toolbar or press \key {Alt+P}.
|
||||
|
||||
To add the text field and a back button needed on the registration page:
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
\li In the \uicontrol Placeholder field, set the placeholder text to
|
||||
\e {Verify password}.
|
||||
\li In the \uicontrol Text field, delete the default text to make the
|
||||
placeholder text visible on the canvas.
|
||||
placeholder text visible in the \uicontrol {Form Editor}.
|
||||
\li Drag and drop a PushButton type from the \uicontrol Library,
|
||||
\uicontrol {My QML Components} tab, to \e loginPage in the
|
||||
\uicontrol Navigator.
|
||||
@@ -114,7 +114,7 @@
|
||||
\section1 Using States to Simulate Page Changes
|
||||
|
||||
You will now add \l{Adding States}{states} to the UI to show and hide UI
|
||||
components on the canvas:
|
||||
components in the \uicontrol {Form Editor}:
|
||||
|
||||
\list 1
|
||||
\li In the \uicontrol States view, select the \inlineimage plus.png
|
||||
@@ -250,7 +250,7 @@
|
||||
\li Right-click \e loginButton in the \uicontrol Navigator and select
|
||||
\uicontrol {Go into Component} to open \e PushButton.ui.qml for
|
||||
editing in the Design mode.
|
||||
\li Open the \uicontrol {Text Editor} tab.
|
||||
\li Open the \uicontrol {Text Editor}.
|
||||
\li Edit the property values for the \e down state, to set the button
|
||||
text color to white and the background and border colors to
|
||||
darker shades of green by using the \c {Qt.darker()} function:
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
|
||||
To preview the changes that you make to the UI while you make
|
||||
them, select the \inlineimage live_preview.png
|
||||
(\uicontrol {Show Live Preview}) button on the canvas toolbar
|
||||
or press \key {Alt+P}.
|
||||
(\uicontrol {Show Live Preview}) button on the \uicontrol {Form Editor}
|
||||
toolbar or press \key {Alt+P}.
|
||||
|
||||
\section2 Replacing Columns with Anchors
|
||||
|
||||
|
||||
237
doc/qtdesignstudio/examples/doc/progressbar.qdoc
Normal file
@@ -0,0 +1,237 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
\example ProgressBar
|
||||
\ingroup studioexamples
|
||||
|
||||
\title Progress Bar
|
||||
\brief Illustrates how to use timelines to create an animated progress bar.
|
||||
|
||||
\image progressbar.png "Progress Bar example application"
|
||||
|
||||
\e {Progress Bar} animates rectangles and numbers using timelines.
|
||||
|
||||
\section1 Creating the Progress Bar
|
||||
|
||||
First, we create an empty Qt Quick project, as described in
|
||||
\l {Creating Projects}. For the purposes of this example,
|
||||
we call the project \e progressbar.
|
||||
|
||||
In this example, we use two overlapping rectangles and a text label to
|
||||
create the progress bar. For another example of a progress bar, see the
|
||||
\l [QtQuickControls2] {ProgressBar} in Qt Quick Controls.
|
||||
|
||||
In the Design mode, we drag and drop a \uicontrol Rectangle from the
|
||||
\uicontrol Library to the \uicontrol {Form Editor} and modify its size
|
||||
to create the background for the progress bar. We change its id to
|
||||
\e background in the \uicontrol Properties view.
|
||||
|
||||
We want to be able to control the background rectangle and the text label
|
||||
that was added by the project wizard, so we will use an \uicontrol Item
|
||||
for that. We drag and drop the item from the \uicontrol Library to the
|
||||
\uicontrol {Form Editor} and change its id to \e root in the
|
||||
\uicontrol Properties view.
|
||||
|
||||
To make the background and text children of the item, we drag and drop them
|
||||
to the item in the \uicontrol Navigator view. This enables us to use the anchor
|
||||
buttons in \uicontrol Properties > \uicontrol Layout to anchor them to their
|
||||
parent. We anchor the background to its parent on all edges, with a 30-pixel
|
||||
margin at the top to leave space for the text. We then anchor the text to
|
||||
the top of the item.
|
||||
|
||||
\image progressbar-rectangle.png "Progress bar background in the Form Editor"
|
||||
|
||||
We now drag and drop another rectangle on top of the background rectangle in
|
||||
the \uicontrol Navigator and change its id to \e indicator in the properties.
|
||||
We then anchor the left, top, and bottom of the indicator to its parent with
|
||||
5-pixel margins. We leave the right side free, because its value needs to
|
||||
change for the animation.
|
||||
|
||||
For more information about creating and positioning components, see
|
||||
\l {Creating Components}.
|
||||
|
||||
\section1 Animating Progress Bar Elements
|
||||
|
||||
The text label will indicate the progress in numbers and changing color,
|
||||
while the indicator rectangle will indicate it by getting wider and
|
||||
changing color. To animate the label and indicator, we'll add timelines
|
||||
in the \uicontrol Timeline view.
|
||||
|
||||
For more information about using the timeline, see \l {Creating Animations}.
|
||||
|
||||
\section2 Adding Color Animation
|
||||
|
||||
First, we add a color animation to the \e root item. We select the
|
||||
\inlineimage plus.png
|
||||
button to add a 100-frame timeline to root. You can use the default
|
||||
values for all other fields.
|
||||
|
||||
\image progressbar-timeline-settings.png "Timeline settings"
|
||||
|
||||
To start recording a color animation on the timeline, we check that the
|
||||
playhead is at frame 0 and then select the \inlineimage recordfill.png
|
||||
(\uicontrol {Auto Key (K)}) button (or press \key k).
|
||||
|
||||
\image progressbar-timeline.png "Color animation timeline"
|
||||
|
||||
We then set the color at frame 0 to green (\e {#8de98d}) in
|
||||
\uicontrol Properties > \uicontrol Text > \uicontrol {Text Color}.
|
||||
We can either pick a color from the color selector or use the
|
||||
\uicontrol {Set Binding} command in the \inlineimage submenu.png
|
||||
(\uicontrol Settings) menu to open the \uicontrol {Binding Editor}.
|
||||
|
||||
We then move the playhead to frame 50 and set the text color to red
|
||||
(\e {#de4f4f}). Finally, we move the playhead to frame 100 and set
|
||||
the color to yellow (\e {#f0c861}).
|
||||
|
||||
When we deselect the record button to stop recording the timeline, the
|
||||
new timeline appears in the view.
|
||||
|
||||
We can drag the playhead along the timeline to see the color animation.
|
||||
|
||||
\section2 Animating the Indicator
|
||||
|
||||
We select \e indicator in \uicontrol Navigator and then select the record
|
||||
button again to animate the width of the indicator. At frame 0, we set the
|
||||
width to 0 in \uicontrol Properties > \uicontrol Geometry > \uicontrol Size.
|
||||
We then move the playhead to 100 frames and set the width to 590.
|
||||
|
||||
\image progressbar-timeline-indicator.png "Indicator timeline"
|
||||
|
||||
We will now copy the color animation from the text label to the indicator.
|
||||
First, we right-click the text item in the \uicontrol Timeline view to open
|
||||
a context menu and select \uicontrol {Copy All Keyframes from Item} to copy
|
||||
the keyframe values we specified for the text label.
|
||||
|
||||
Next, we select the indicator in the \uicontrol Navigator, and then select
|
||||
\uicontrol {Insert Keyframes for Item} to paste the keyframe
|
||||
values to the indicator.
|
||||
|
||||
\image progressbar-timeline-indicator-color.png "Indicator timeline with color animation"
|
||||
|
||||
When we move the playhead, we can see that the color animation is also
|
||||
applied to the indicator.
|
||||
|
||||
\section1 Creating a Reusable Component
|
||||
|
||||
We want the progress bar to be reusable, so we'll move it to a separate
|
||||
QML file. To make sure that the component will contain the timeline, we
|
||||
select \uicontrol {Filter Tree} in the \uicontrol Navigator, and then
|
||||
deselect the \uicontrol {Show Only Visible Items} check box to show the
|
||||
timeline item in the \uicontrol Navigator. We then move the timeline item
|
||||
to \e root to have it moved as a part of the root component.
|
||||
|
||||
Now we can right-click root to open a context menu and select
|
||||
\uicontrol {Move Component into Separate File}. We can see the
|
||||
properties that will be available from outside of the component.
|
||||
|
||||
\image progressbar-move-component.png "Move Component into Separate File dialog"
|
||||
|
||||
\section1 Exporting Properties
|
||||
|
||||
We now select the root component in the \uicontrol Navigator, and
|
||||
then select \uicontrol {Go into Component} in the context menu to
|
||||
open \e Root.qml in the \uicontrol {Form Editor}.
|
||||
|
||||
We want to be able to use the keyframe value as the value of the text label,
|
||||
so we will export it as a property alias. We select \e timeline in the
|
||||
\uicontrol Navigator and then \uicontrol Properties > \uicontrol Timeline >
|
||||
\uicontrol {Current frame} > \uicontrol Settings >
|
||||
\uicontrol {Export Property as Alias}.
|
||||
|
||||
\image progressbar-root-export-property.png "Export keyframe group as a property"
|
||||
|
||||
When we select \e root in the \uicontrol Navigator, we can see the
|
||||
\e timelineCurrentFrame property in \uicontrol Connections
|
||||
> \uicontrol Bindings. We double-click it to change its name
|
||||
to \e progress.
|
||||
|
||||
\image progressbar-bindings-progress.png "Connections view Bindings tab"
|
||||
|
||||
We will bind some JavaScript to the value of the text label to turn
|
||||
it into a running number that reflects the number of the keyframe on the
|
||||
timeline. We select the text label in the \uicontrol Navigator, and then
|
||||
select \uicontrol Properties > \uicontrol Text > \uicontrol {Set Binding}
|
||||
to open the \uicontrol {Binding Editor}. We set
|
||||
\c {Math.round(root.progress)} as the value of the text label.
|
||||
|
||||
When we move back to the top-level file, we can see that the number of the
|
||||
current keyframe (0) is displayed as the value of the text label.
|
||||
|
||||
\section1 Animating Progress Bar Instances
|
||||
|
||||
We want to experiment with different start and end values and easing curves,
|
||||
so we copy-paste the progress bar instance twice in the top-level file. We
|
||||
use a column layout to lay out the progress bar instances.
|
||||
|
||||
We can now add timelines for each progress bar instance, with different
|
||||
settings. We select the \inlineimage plus.png
|
||||
button to add a 4000-frame timeline to the first progress bar instance
|
||||
(\e root). We select the \uicontrol Continuous check box, so that the
|
||||
animation will loop.
|
||||
|
||||
In \uicontrol Properties > \uicontrol Root, we can see the
|
||||
\uicontrol progress property that we can animate. If we had
|
||||
called the component and property something else, we would
|
||||
see the names we gave them here.
|
||||
|
||||
With the playhead in the first frame, we select the record button and
|
||||
give the \uicontrol progress property the initial value of \e 5. We then
|
||||
move the playhead to frame 2000 and give it the value of \e 95. We
|
||||
continue to the last frame and set the value back to \e 5 to have a
|
||||
smooth looping animation.
|
||||
|
||||
When we select the \uicontrol {Show Live Preview} button on the
|
||||
\uicontrol {Form Editor} toolbar, we see a running number and moving
|
||||
progress indicator of the animated progress bar instance.
|
||||
|
||||
\image progressbar-animated.png
|
||||
|
||||
We now change the settings of the other two progress bar instances. We
|
||||
make one of the indicators move from right to left by starting from frame
|
||||
100. When all our progress bar instances have been animated, we'll continue
|
||||
by specifying easing curves for them.
|
||||
|
||||
For more information about previewing UIs, see \l {Previewing}.
|
||||
|
||||
\section1 Specifying Easing Curves
|
||||
|
||||
We can add custom easing curves to every keyframe in the animations. First,
|
||||
we select the keyframe to add the easing curve to, and then select
|
||||
\uicontrol {Edit Easing Curve} in the context menu. We can select several
|
||||
keyframes simultaneously if we want to use the same easing curve for them.
|
||||
|
||||
We select the easing curve in the \uicontrol {Easing Curve Editor}.
|
||||
|
||||
\image studio-easing-curve-editor.png "Easing Curve Editor"
|
||||
|
||||
When we apply easing curves to animations, the shape of the keyframe
|
||||
marker changes from \inlineimage keyframe_linear_inactive.png
|
||||
to \inlineimage keyframe_manualbezier_inactive.png
|
||||
.
|
||||
|
||||
For more information, see \l{Editing Easing Curves}.
|
||||
*/
|
||||
235
doc/qtdesignstudio/examples/doc/sidemenu.qdoc
Normal file
@@ -0,0 +1,235 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
\example SideMenu
|
||||
\ingroup studioexamples
|
||||
|
||||
\title Side Menu
|
||||
\brief Illustrates how to create reusable components and an animated menu
|
||||
for applying effects.
|
||||
|
||||
\image sidemenu.png "Side menu example application"
|
||||
|
||||
\e {Side Menu} displays a menu bar and a side menu that slides open when
|
||||
users click the menu icon. The appearance of the menu bar buttons changes
|
||||
when users hover the cursor over them or select them.
|
||||
|
||||
Each button opens an image file. The side menu can be used to apply
|
||||
\l {Qt Graphical Effects}{graphical effects}, such as hue, saturation,
|
||||
and blur, to the images.
|
||||
|
||||
\section1 Creating Reusable Buttons
|
||||
|
||||
We select \uicontrol File > \uicontrol {New File or Project} >
|
||||
\uicontrol {Files and Classes} > \uicontrol {Qt Quick Controls} >
|
||||
\uicontrol {Custom Button} to create a reusable menu bar button
|
||||
that we call \e CustomButton.
|
||||
|
||||
The button can have the following states: checked, hover, pressed, and
|
||||
normal. We construct the button using different images for the button
|
||||
background, frame, and front. We then add states in the \uicontrol States
|
||||
view for each of the button states. In each state, we turn the visibility
|
||||
of the appropriate images on or off in the button properties, to change
|
||||
the appearance of the button.
|
||||
|
||||
\image sidemenu-custombutton-states.png "CustomButton QML type states"
|
||||
|
||||
To change the button text when the button state changes, we bind the
|
||||
text property to the state of the button in the \uicontrol Properties view.
|
||||
When \e control is selected in the \uicontrol Navigator, we select the
|
||||
\uicontrol Settings menu for the \uicontrol Text property, and then select
|
||||
\uicontrol {Set Binding}. In the \uicontrol {Binding Editor}, we set the
|
||||
binding to \c control.state.
|
||||
|
||||
\image sidemenu-custombutton-property-bindings.png
|
||||
|
||||
We want the buttons to be checkable, so we set the
|
||||
\l {AbstractButton::}{checkable} property to \c true.
|
||||
|
||||
We now select \uicontrol {Set when Condition} in the \uicontrol Settings menu
|
||||
for the states to bind the properties to the states using \c when
|
||||
conditions. First, we specify that a button instance enters the \e checked
|
||||
state when the \l {AbstractButton::}{checked} property is set to \c true.
|
||||
This is how the code will look in the \uicontrol {Text Editor}:
|
||||
|
||||
\quotefromfile SideMenu/CustomButton.qml
|
||||
\skipto states: [
|
||||
\printuntil when
|
||||
|
||||
We then bind the \e hover state to the \l {Control::}{hovered} property
|
||||
being set to \c true, while the \c checked and
|
||||
\l {AbstractButton::}{pressed} properties are set to \c false:
|
||||
|
||||
\dots
|
||||
\skipto State {
|
||||
\printuntil when
|
||||
|
||||
Finally, the button state is set to \e normal, when all the properties are
|
||||
set to \c false:
|
||||
|
||||
\dots
|
||||
\skipto State {
|
||||
\printuntil when
|
||||
|
||||
We can now use CustomButton instances to create a menu bar.
|
||||
|
||||
\section1 Constructing a Menu Bar
|
||||
|
||||
We construct the menu bar in the \e {MainFile.ui.qml} file using the
|
||||
\uicontrol {Form Editor}. The CustomButton type is listed in
|
||||
\uicontrol Library > \uicontrol {QML Types} >
|
||||
\uicontrol {My QML Components}. We drag and drop several instances of
|
||||
the type to the \uicontrol {Form Editor} and enclose them in a RowLayout
|
||||
type to lay them out as a menu bar.
|
||||
|
||||
\image sidemenu-menubar.png
|
||||
|
||||
We can change the properties of each CustomButton instance separately in
|
||||
the \uicontrol Properties view. We want only one of the menu bar buttons
|
||||
to be checked at any time, so that checking another button automatically
|
||||
unchecks the previously checked one. Therefore, we set the
|
||||
\l {AbstractButton::}{autoExclusive} property to \c true for all
|
||||
button instances.
|
||||
|
||||
In addition, we set the \uicontrol Checked property to \c true for the
|
||||
first button instance on the menu bar to make it appear selected.
|
||||
|
||||
We can now select the \inlineimage run_small.png "Run button"
|
||||
(\uicontrol Run) button to run the application and test our menu bar.
|
||||
|
||||
\section1 Creating a Side Menu
|
||||
|
||||
We can now continue to create a side menu that slides open when users
|
||||
click the burger menu. In the \uicontrol {Form Editor}, we use the
|
||||
\l Text and \l Slider components to create separate submenus for each
|
||||
set of effects we want to apply to the images. We use a background image
|
||||
for the menu background and a BurgerMenu custom QML type for the burger
|
||||
menu icon.
|
||||
|
||||
\image sidemenu-ui.png "SliderMenu type"
|
||||
|
||||
We add states to the \e {SideMenu.qml} file in the \uicontrol {Form Editor}.
|
||||
When the application starts, the side menu is in the \e closed state, which
|
||||
means that it is hidden. When users click the burger menu, the \c onClicked
|
||||
signal handler triggers the transition to the \e opening state and runs an
|
||||
animation. When the animation finishes, the side menu state changes to
|
||||
\e open and the side menu is fully visible.
|
||||
|
||||
When users click the burger menu again, the state changes to \e closing and
|
||||
another animation is run that closes the side menu. When the animation
|
||||
finishes, the side menu returns to the \e closed state.
|
||||
|
||||
We select the \inlineimage plus.png
|
||||
(\uicontrol Add) button in the \uicontrol States view to add the states:
|
||||
|
||||
\image sidemenu-states.png "Side menu states"
|
||||
|
||||
We then select the \inlineimage plus.png
|
||||
button in the \uicontrol Timeline view to add animation
|
||||
for transitions to the \e open and \e close states:
|
||||
|
||||
\image sidemenu-timeline-settings.png "Side menu timeline settings"
|
||||
|
||||
The closing animation is just the opening animation played backwards to
|
||||
hide the side menu. We want the opening animation to be slower than the
|
||||
closing animation, so we specify a shorter duration for the closing
|
||||
animation. This does not affect the duration of the timeline itself.
|
||||
|
||||
We want to change the position of the outline and background images. To
|
||||
start recording the transition from the closed state to the open state,
|
||||
we select \e imageOutline in \uicontrol Navigator. We check that the
|
||||
playhead is at frame 0, and then select the \inlineimage recordfill.png
|
||||
(\uicontrol {Auto Key (K)}) button (or press \key k).
|
||||
|
||||
At frame 0, we set the X coordinate to -423 in \uicontrol Properties >
|
||||
\uicontrol Geometry > \uicontrol Position. We then move the playhead
|
||||
to frame 1000 and set the X coordinate to 0.
|
||||
|
||||
When we deselect the record button to stop recording the timeline, the
|
||||
new timeline appears in the view.
|
||||
|
||||
\image sidemenu-timeline.png "Timeline view"
|
||||
|
||||
We then record the transition of the \e imageBackground image. At frame
|
||||
0, we set the X coordinate to -424 again. We then move the playhead to
|
||||
frame 400 and select \uicontrol {Insert Keyframe} in the \uicontrol Settings
|
||||
menu of the X coordinate. We keep the value of the X coordinate -424. We
|
||||
then move the playhead to frame 1000 and set the X coordinate to 0.
|
||||
|
||||
We select \inlineimage animation.png "Timeline Settings button"
|
||||
to open the \uicontrol {Timeline Settings} dialog. In the
|
||||
\uicontrol {Transitions to states} field, we select the state to
|
||||
switch to when the animation finishes. In the lower part of the
|
||||
dialog, we bind the states that don't have animations to fixed frames.
|
||||
|
||||
For more information about using the timeline, see \l {Creating Animations}.
|
||||
|
||||
\section1 Connecting the Burger Menu to Actions
|
||||
|
||||
In \e {SideMenu.qml}, we use connections to bind the action of clicking
|
||||
the burger menu to the signal handler for triggering the opening or
|
||||
closing animation, depending on the current state. We create the connections
|
||||
in the \uicontrol Connections view.
|
||||
|
||||
\image sidemenu-connections.png
|
||||
|
||||
We use property changes to disable the burger menu until the animation
|
||||
finishes and to hide and show the side menu:
|
||||
|
||||
\quotefromfile SideMenu/SideMenu.qml
|
||||
\skipto State {
|
||||
\printuntil },
|
||||
|
||||
The side menu is fully visible and accepts input only in the \e open state.
|
||||
|
||||
For more information about connecting objects to signals, see
|
||||
\l {Connecting Objects to Signals}.
|
||||
|
||||
\section1 Applying Effects
|
||||
|
||||
We nest the effects in an effects stack and bind them to the \l Slider type
|
||||
instances. The effects apply to all the images in the example application,
|
||||
not just the currently open one.
|
||||
|
||||
We use property bindings to connect the controls in the slider menu to
|
||||
\l {Qt Graphical Effects}{graphical effects}. To have access to the
|
||||
properties from all the slider type instances, we export them as aliases
|
||||
in \e SliderMenu.ui.qml. We select \uicontrol {Export Property as Alias}
|
||||
in the \uicontrol Settings menu of the \uicontrol Value property in
|
||||
\uicontrol Properties > \uicontrol Slider.
|
||||
|
||||
We use the \uicontrol {Form Editor} to create the effect stack in the
|
||||
\e {EffectStack.qml} file:
|
||||
|
||||
\image sidemenu-effects-stack.png "Effects stack in the Navigator"
|
||||
|
||||
We use the \l Image type as the last item in the stack to display images
|
||||
that we apply the effects to. We export the image source property as an
|
||||
alias to be able to switch the image inside the stack.
|
||||
|
||||
For more information about the available Qt graphical effects, see
|
||||
\l {Applying Visual Effects}.
|
||||
*/
|
||||
196
doc/qtdesignstudio/examples/doc/webinardemo.qdoc
Normal file
@@ -0,0 +1,196 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
\example WebinarDemo
|
||||
\ingroup studioexamples
|
||||
\brief Contains sources for the From Photoshop to Prototype video tutorial.
|
||||
|
||||
\title Webinar Demo
|
||||
|
||||
\e {Webinar Demo} contains the source files for the
|
||||
\e {From Photoshop to Prototype with Qt Design Studio}
|
||||
webinar that shows how to export designs from Adobe Photoshop
|
||||
to \QDS and to edit them to create a UI.
|
||||
|
||||
The following sections describe some of the main points of the webinar.
|
||||
Select the \uicontrol Tutorials tab to watch the webinar video for the
|
||||
full details.
|
||||
|
||||
\section1 Exporting from Adobe Photoshop
|
||||
|
||||
We use Adobe Photoshop to design our application and \QB to export our
|
||||
artwork to \QDS as PNG images and custom QML types.
|
||||
|
||||
Before we can begin, we must set up \QB as instructed in
|
||||
\l{Exporting Designs from Adobe Photoshop}.
|
||||
|
||||
We organize our artwork in Photoshop using artboards as instructed in
|
||||
\l{Organizing Assets}.
|
||||
|
||||
\QB automatically proposes identifiers for all groups and layers. The ids
|
||||
will be used as filenames in \QDS. We want to change some of them in the
|
||||
\uicontrol {QML ID} field, so that we can easily find them in \QDS. We
|
||||
must keep in mind that the ids must be unique, that they must begin with
|
||||
a lower-case letter or an underscore character, and that only letters,
|
||||
numbers, and underscore characters are allowed.
|
||||
|
||||
Each artboard is exported automatically as a component. That is, a separate
|
||||
QML file that contains all the artwork on the artboard. We determine whether
|
||||
each group or layer is exported as a component or a child item. Child items
|
||||
will be exported as PNG files, with references to them in the component file
|
||||
that contains them.
|
||||
|
||||
We can export some components as QML types that provide the functionality
|
||||
that we want. To use the types in \QDS, we need to add import statements
|
||||
that pull in the modules that contain the types. We can even specify
|
||||
properties for the types to export, so that we won't have to do that in
|
||||
\QDS.
|
||||
|
||||
\section2 Creating a Reference Image
|
||||
|
||||
\image webinardemo-qb-layoutref.png "Settings for exporting stackLayout artboard"
|
||||
|
||||
We want to create a reference image of the UI that has no
|
||||
functionality, but shows all the UI controls as we designed them in
|
||||
Adobe Photoshop. We design all the controls visible on the
|
||||
\e layoutReference separately on other artboards, and therefore we can
|
||||
select \uicontrol Merged in the \uicontrol {Export As} field to merge
|
||||
them all into one image when this artboard is exported.
|
||||
|
||||
\section2 Creating the UI Main Page
|
||||
|
||||
We want to use the \e backgroundGradient artboard as the main page of
|
||||
the UI. Initially, it will contain a gradient image that we
|
||||
will build the UI on in \QDS.
|
||||
|
||||
We set the gradient image on the artboard to \uicontrol Child in the
|
||||
\uicontrol {Export As} field to export it as a PNG file that is referred
|
||||
to from the main page.
|
||||
|
||||
\section2 Using Stack Layout
|
||||
|
||||
\image webinardemo-qb-stacklayout.png "Settings for exporting stackLayout artboard"
|
||||
|
||||
For the stackLayoutFrame layer, we want to use a \l StackLayout QML type,
|
||||
which provides a stack of items where only one item is visible at a time.
|
||||
In the \uicontrol {QML Type} field, we enter \e StackLayout.
|
||||
|
||||
To be able to use the type, we enter the statement that imports the
|
||||
Qt Quick Layouts module, which contains the type, in the
|
||||
\uicontrol {Add Imports} field: \c {QtQuick.Layouts 1.3}.
|
||||
|
||||
We will add content to the stack layout in \QDS.
|
||||
|
||||
\section2 Using Qt Studio Effects
|
||||
|
||||
\image webinardemo-qb-fastblur.png "Settings for exporting blurEffect layer"
|
||||
|
||||
We want to apply the \l {FastBlur} effect to the smallPopup UI control.
|
||||
In the artboard, we have a blurEffect layer that we want to export as a
|
||||
FastBlurItem QML type. In the \uicontrol {QML Type} field, we enter
|
||||
\e FastBlurItem.
|
||||
|
||||
To be able to use the type, we added the statement that imports the
|
||||
Qt Quick Studio Effects module: \c {QtQuick.Studio.Effects 1.0}.
|
||||
|
||||
We specify that the artwork to which we want to apply the effect is a
|
||||
child of the effect. We then specify the radius property for the effect,
|
||||
in the \uicontrol {QML Properties} field. We can modify the property in
|
||||
\QDS.
|
||||
|
||||
\image webinardemo-blureffect.png "FastBlurItem QML item in Design mode"
|
||||
|
||||
\section2 Creating a Menu with Reusable Buttons
|
||||
|
||||
The \e miniMenu artboard contains menu buttons that we will use to toggle
|
||||
popup dialogs in the UI. We want to be able to reuse the buttons
|
||||
and to change their appearance depending on whether they are on or off.
|
||||
Therefore, we select \uicontrol Component in the \uicontrol {Export As}
|
||||
field for each button to export them as separate components that we can
|
||||
modify in \QDS.
|
||||
|
||||
Within the artboard, we export each icon as a child and the background as
|
||||
merged. This merges the background art together while it keeps the icons
|
||||
separate, so that we can switch the icons depending on the state of the
|
||||
button. We will implement this functionality in \QDS.
|
||||
|
||||
\section2 Preparing for Animation
|
||||
|
||||
We want to animate the contents of the \e largePopup artboard in \QDS, so
|
||||
we export each group and layer as a child.
|
||||
|
||||
\section2 Exporting Artwork
|
||||
|
||||
When we have specified settings for all the artboards and the groups and
|
||||
layers in them, we select \uicontrol Export to copy the assets and metadata
|
||||
to the export path we specified.
|
||||
|
||||
\section1 Importing Artwork
|
||||
|
||||
After using \QB in Adobe Photoshop to export our artwork, we import it into
|
||||
a project that we create in \QDS, as instructed in \l{Importing Designs}.
|
||||
|
||||
If we need to make changes in Photoshop later and export our artwork again,
|
||||
\QDS will try to merge our changes during the import, so that none of the
|
||||
changes we mage in \QDS are lost.
|
||||
|
||||
\section1 Using Imported Components
|
||||
|
||||
The \e {LayoutReference.ui.qml} file contains a reference image of the
|
||||
UI we will create. We use the imported components to create the
|
||||
UI in the \e {MainApp.ui.qml} file. The imported components are
|
||||
listed in \uicontrol Library > \uicontrol {QML Types} >
|
||||
\uicontrol {My QML Components}, and we can drag and drop them to the
|
||||
\uicontrol {Form Editor}.
|
||||
|
||||
\image webinardemo-mainappui.png "Main app UI in Design mode"
|
||||
|
||||
To view the structure of a particular component, we right-click it in the
|
||||
\uicontrol {Form Editor} and select \uicontrol {Go into Component} in the
|
||||
context menu. Any changes we make to a component are immediately visible in
|
||||
all the other components where it appears.
|
||||
|
||||
We can view the QML code for each component in the \uicontrol {Text Editor}.
|
||||
|
||||
We can now use states and the timeline to animate the components in the UI.
|
||||
|
||||
\section2 Animating Components
|
||||
|
||||
We open the \e {Largepopup.ui.qml} file in the Design mode to add animation
|
||||
to it. In the \uicontrol States view, we add the \e opening, \e open,
|
||||
\e closing, and \e closed states for the popup.
|
||||
|
||||
\image webinardemo-states.png "Popup states in the States view"
|
||||
|
||||
For more information about using states, see \l {Creating Animations}.
|
||||
|
||||
We then use the \uicontrol Timeline view to add animations that are run
|
||||
when moving from one state to another.
|
||||
|
||||
\image webinardemo-timeline.png "Popup animations in the Timeline view"
|
||||
|
||||
For more information about using the timeline, see \l {Creating Animations}.
|
||||
*/
|
||||
@@ -0,0 +1,44 @@
|
||||
import QmlProject 1.1
|
||||
|
||||
Project {
|
||||
mainFile: "EBikeDesign.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"
|
||||
directory: "."
|
||||
}
|
||||
|
||||
Environment {
|
||||
QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf"
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR: "1"
|
||||
}
|
||||
|
||||
/* List of plugin directories passed to QML runtime */
|
||||
importPaths: [ "imports", "backend"]
|
||||
|
||||
/* Required for deployment */
|
||||
targetDirectory: "/opt/ebikeDesign"
|
||||
}
|
||||
214
doc/qtdesignstudio/examples/sidemenu/CustomButton.qml
Normal file
@@ -0,0 +1,214 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Design Studio.
|
||||
**
|
||||
** $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.10
|
||||
import QtQuick.Templates 2.1 as T
|
||||
import SideMenu 1.0
|
||||
|
||||
T.Button {
|
||||
id: control
|
||||
width: 180
|
||||
height: 70
|
||||
|
||||
font: Constants.font
|
||||
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||
contentItem.implicitHeight + topPadding + bottomPadding)
|
||||
leftPadding: 4
|
||||
rightPadding: 4
|
||||
|
||||
text: control.state
|
||||
property alias text1Text: text1.text
|
||||
autoExclusive: false
|
||||
checkable: true
|
||||
|
||||
|
||||
Image {
|
||||
id: background
|
||||
x: 15
|
||||
y: 17
|
||||
source: "assets/inactive_button.png"
|
||||
}
|
||||
|
||||
Image {
|
||||
id: contentItem
|
||||
x: -1
|
||||
y: 0
|
||||
visible: true
|
||||
source: "assets/hover_button.png"
|
||||
}
|
||||
|
||||
Image {
|
||||
id: image2
|
||||
x: 0
|
||||
y: -1
|
||||
visible: true
|
||||
source: "assets/active_button.png"
|
||||
}
|
||||
|
||||
Text {
|
||||
id: text1
|
||||
x: -1
|
||||
y: 16
|
||||
width: 163
|
||||
height: 16
|
||||
color: "#ffffff"
|
||||
text: "PRESSED"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.weight: Font.ExtraLight
|
||||
font.family: "IBM Plex Sans"
|
||||
font.pixelSize: 12
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "checked"
|
||||
when: control.checked
|
||||
|
||||
PropertyChanges {
|
||||
target: background
|
||||
x: 16
|
||||
y: 16
|
||||
width: 156
|
||||
visible: false
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: contentItem
|
||||
visible: false
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: image2
|
||||
x: 0
|
||||
y: 0
|
||||
visible: true
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: text1
|
||||
x: 0
|
||||
y: 16
|
||||
width: 162
|
||||
height: 16
|
||||
text: "CHECKED"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "hover"
|
||||
when: control.hovered && !control.checked && !control.pressed
|
||||
|
||||
PropertyChanges {
|
||||
target: image2
|
||||
x: 0
|
||||
visible: false
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: background
|
||||
x: 16
|
||||
y: 16
|
||||
visible: false
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: contentItem
|
||||
visible: true
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: text1
|
||||
x: -1
|
||||
y: 16
|
||||
width: 162
|
||||
height: 16
|
||||
color: "#d07533"
|
||||
text: "HOVER"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
State {
|
||||
name: "normal"
|
||||
when: !control.pressed && !control.checked &&!control.hovered
|
||||
|
||||
|
||||
PropertyChanges {
|
||||
target: image2
|
||||
visible: false
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: contentItem
|
||||
visible: false
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: background
|
||||
visible: true
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: text1
|
||||
x: 15
|
||||
y: 33
|
||||
width: 163
|
||||
height: 16
|
||||
color: "#d07533"
|
||||
text: "NORMAL"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
234
doc/qtdesignstudio/examples/sidemenu/SideMenu.qml
Normal file
@@ -0,0 +1,234 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Design Studio.
|
||||
**
|
||||
** $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.8
|
||||
import QtQuick.Timeline 1.0
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
Item {
|
||||
id: root
|
||||
width: 350
|
||||
height: 1080
|
||||
property alias slidermenuSlider_4BValue: slidermenu.slider_4BValue
|
||||
property alias slidermenuSlider_4AValue: slidermenu.slider_4AValue
|
||||
property alias slidermenuSlider_3CValue: slidermenu.slider_3CValue
|
||||
property alias slidermenuSlider_3BValue: slidermenu.slider_3BValue
|
||||
property alias slidermenuSlider_3AValue: slidermenu.slider_3AValue
|
||||
property alias slidermenuSlider_1BValue: slidermenu.slider_1BValue
|
||||
property alias slidermenuSlider_1CValue: slidermenu.slider_1CValue
|
||||
property alias slidermenuSlider_2BValue: slidermenu.slider_2BValue
|
||||
property alias slidermenuSlider_2AValue: slidermenu.slider_2AValue
|
||||
property alias slidermenuSlider_1AValue: slidermenu.slider_1AValue
|
||||
|
||||
state: "closed"
|
||||
|
||||
Image {
|
||||
id: sideMenuAsset
|
||||
x: 0
|
||||
y: 0
|
||||
visible: false
|
||||
source: "assets/rectangle_3_195_205.png"
|
||||
}
|
||||
|
||||
Image {
|
||||
id: imageOutline
|
||||
x: -423
|
||||
y: 0
|
||||
height: 1079
|
||||
source: "assets/empty_rect.png"
|
||||
}
|
||||
|
||||
Image {
|
||||
id: imageBackground
|
||||
x: 0
|
||||
y: 0
|
||||
source: "assets/rectangle_3_195_205.png"
|
||||
|
||||
SliderMenu {
|
||||
id: slidermenu
|
||||
width: 349
|
||||
height: 1079
|
||||
slider_1AValue: -0.3
|
||||
}
|
||||
}
|
||||
|
||||
BurgerMenu {
|
||||
id: burger_menu
|
||||
x: 22
|
||||
y: 20
|
||||
}
|
||||
|
||||
Timeline {
|
||||
id: timeline
|
||||
enabled: true
|
||||
animations: [
|
||||
TimelineAnimation {
|
||||
id: timelineAnimation
|
||||
property: "currentFrame"
|
||||
pingPong: false
|
||||
duration: 300
|
||||
from: 0
|
||||
loops: 1
|
||||
to: 1000
|
||||
//alwaysRunToEnd: true
|
||||
running: false
|
||||
onFinished: root.state = "open"
|
||||
},
|
||||
TimelineAnimation {
|
||||
id: timelineAnimation2
|
||||
property: "currentFrame"
|
||||
pingPong: false
|
||||
duration: 700
|
||||
from: 1000
|
||||
loops: 1
|
||||
to: 0
|
||||
//alwaysRunToEnd: true
|
||||
running: false
|
||||
onFinished: root.state = "closed"
|
||||
}
|
||||
]
|
||||
endFrame: 1000
|
||||
startFrame: 0
|
||||
|
||||
KeyframeGroup {
|
||||
target: imageOutline
|
||||
property: "x"
|
||||
Keyframe {
|
||||
easing.bezierCurve: [0.337, 0.229, 0.758, 0.282, 1, 1]
|
||||
frame: 1000
|
||||
value: 0
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
frame: 1
|
||||
value: -348
|
||||
}
|
||||
}
|
||||
|
||||
KeyframeGroup {
|
||||
target: imageBackground
|
||||
property: "x"
|
||||
Keyframe {
|
||||
frame: 402
|
||||
value: -423
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
frame: 0
|
||||
value: -424
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
easing.bezierCurve: [0.337, 0.229, 0.758, 0.282, 1, 1]
|
||||
frame: 1000
|
||||
value: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: burger_menu
|
||||
onClicked: {
|
||||
root.state = "opening"
|
||||
}
|
||||
enabled: root.state === "closed"
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: burger_menu
|
||||
onClicked: {
|
||||
root.state = "closing"
|
||||
}
|
||||
enabled: root.state === "open"
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "opening"
|
||||
|
||||
PropertyChanges {
|
||||
target: timelineAnimation
|
||||
running: true
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: burger_menu
|
||||
enabled: false
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: slidermenu
|
||||
visible: false
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "open"
|
||||
},
|
||||
State {
|
||||
name: "closing"
|
||||
PropertyChanges {
|
||||
target: timelineAnimation2
|
||||
running: true
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: burger_menu
|
||||
enabled: false
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "closed"
|
||||
PropertyChanges {
|
||||
target: slidermenu
|
||||
visible: false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
41
doc/qtdesignstudio/examples/sidemenu/SideMenu.qmlproject
Normal file
@@ -0,0 +1,41 @@
|
||||
/* File generated by Qt Creator */
|
||||
|
||||
import QmlProject 1.1
|
||||
|
||||
Project {
|
||||
mainFile: "MainFile.ui.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: "."
|
||||
}
|
||||
|
||||
Environment {
|
||||
QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf"
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR: "1"
|
||||
}
|
||||
|
||||
/* List of plugin directories passed to QML runtime */
|
||||
importPaths: [ "imports" ]
|
||||
|
||||
/* Required for deployment */
|
||||
targetDirectory: "/tmp/SideMenu"
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/* File generated by Qt Creator */
|
||||
|
||||
import QmlProject 1.1
|
||||
|
||||
Project {
|
||||
mainFile: "MainApp.ui.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: "."
|
||||
}
|
||||
|
||||
Environment {
|
||||
QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf"
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR: "1"
|
||||
}
|
||||
|
||||
/* List of plugin directories passed to QML runtime */
|
||||
importPaths: [ "imports" ]
|
||||
|
||||
/* Required for deployment */
|
||||
targetDirectory: "/opt/WebinarDemo"
|
||||
}
|
||||
@@ -31,9 +31,13 @@
|
||||
|
||||
\title Exporting Artwork from Design Tools
|
||||
|
||||
You need to use \QB for exporting the 2D assets from design tools,
|
||||
whereas you can directly import 3D assets saved in widely-used 3D
|
||||
graphics formats. For best results when importing 3D assets, follow
|
||||
You need to use \QB to first export 2D assets from design tools and then
|
||||
import them. When working with 3D assets, you can use the export functions
|
||||
provided by the 3D graphics tools to save the assets in widely-used 3D
|
||||
graphics formats, and then use \QB to import them. You can download \QB
|
||||
from the \l{https://marketplace.qt.io/}{Qt Marketplace}.
|
||||
|
||||
For best results when importing 3D assets, follow
|
||||
the guidelines for creating and exporting them.
|
||||
|
||||
\list
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Bridge documentation.
|
||||
@@ -32,10 +32,12 @@
|
||||
|
||||
\title Setting Up \QBPS
|
||||
|
||||
\QBPS is delivered as an Adobe extension (ZXP) package and requires Adobe
|
||||
Photoshop version 20.0.0, or later to be installed. The \QBPS installation
|
||||
process differs depending on whether you use ZXPInstaller and whether you
|
||||
are installing on Windows or \macos.
|
||||
You can download \QBPS from the \l{https://marketplace.qt.io/}
|
||||
{Qt Marketplace}. It is delivered as an Adobe extension (ZXP)
|
||||
package and requires Adobe Photoshop version 20.0.0, or later
|
||||
to be installed. The \QBPS installation process differs depending
|
||||
on whether you use ZXPInstaller and whether you are installing on
|
||||
Windows or \macos.
|
||||
|
||||
\section1 Installing with ZXPInstaller
|
||||
|
||||
@@ -44,8 +46,7 @@
|
||||
\list 1
|
||||
\li Download and install \l{http://zxpinstaller.com/}{ZXPInstaller}.
|
||||
\li Start ZXPInstaller.
|
||||
\li Drag and drop the \QBPS ZXP package from the \c photoshop_bridge
|
||||
directory in the installation directory of \QDS to ZXPInstaller.
|
||||
\li Drag and drop the \QBPS ZXP package to ZXPInstaller.
|
||||
\li Follow the instructions of the installation program.
|
||||
\endlist
|
||||
|
||||
@@ -59,9 +60,8 @@
|
||||
To install \QBPS on Windows without using ZXPInstaller:
|
||||
|
||||
\list 1
|
||||
\li Copy the \QBPS ZXP package from the \c photoshop_bridge directory
|
||||
in the installation directory of \QDS to the \c Documents directory
|
||||
in your user directory.
|
||||
\li Copy the \QBPS ZXP package to the \c Documents directory in your
|
||||
user directory.
|
||||
\li Open Windows PowerShell.
|
||||
\li Enter the following commands:
|
||||
\badcode
|
||||
@@ -77,9 +77,7 @@
|
||||
To install \QBPS on \macos without using ZXPInstaller:
|
||||
|
||||
\list 1
|
||||
\li Copy the \QBPS ZXP package from the \c photoshop_bridge
|
||||
directory in the installation directory of \QDS to your
|
||||
\c Documents directory.
|
||||
\li Copy the \QBPS ZXP package to your \c Documents directory.
|
||||
\li Open Terminal.
|
||||
\li Enter the following commands:
|
||||
\badcode
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
|
||||
Place different parts of the UI, such as menus and pop-ups, on separate
|
||||
artboards to be able to export them as components or children and to
|
||||
import them as QML and PNG files that you can drag and drop to the working
|
||||
area in \QDS Design mode while creating a UI.
|
||||
import them as QML and PNG files that you can drag and drop to the
|
||||
\uicontrol {Form Editor} in \QDS Design mode while creating a UI.
|
||||
|
||||
\QDS offers predefined sets of UI controls that you can modify according
|
||||
to your needs. You can export your own controls as QML types, Qt Quick
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Bridge documentation.
|
||||
@@ -32,13 +32,13 @@
|
||||
|
||||
\title Setting Up \QBSK
|
||||
|
||||
\QBSK is delivered with \QDS as a Sketch plugin that you can install to
|
||||
Sketch.
|
||||
You can download \QBSK from the \l{https://marketplace.qt.io/}
|
||||
{Qt Marketplace}. It is delivered as a Sketch plugin that you
|
||||
can install to Sketch.
|
||||
|
||||
\note Install the Sketch app before installing the plugin.
|
||||
|
||||
To install the \QBSK plugin to Sketch, double-click the \QBSK plugin in the
|
||||
\c sketch_bridge directory in the installation directory of \QDS.
|
||||
To install the \QBSK plugin to Sketch, double-click the executable file.
|
||||
|
||||
The plugin is available at \uicontrol Plugins > \uicontrol {\QB}.
|
||||
*/
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
Place different parts of the UI, such as menus and pop-ups, on separate
|
||||
artboards to be able to export them as components or children and to
|
||||
import them as QML files and images that you can drag and drop to the
|
||||
working area in \QDS Design mode while creating a UI.
|
||||
\uicontrol {Form Editor} in \QDS Design mode while creating a UI.
|
||||
|
||||
\section2 Using Layers and Groups
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
\l {Qt Quick Shapes QML Types}, with some additional properties.
|
||||
|
||||
You can drag-and-drop the following studio components from the
|
||||
\uicontrol Library to the canvas or the \uicontrol Navigator:
|
||||
\uicontrol Library to the \uicontrol {Form Editor} or the
|
||||
\uicontrol Navigator:
|
||||
|
||||
\list
|
||||
\li \l Arc adds an arc that begins and ends at given positions.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Bridge documentation.
|
||||
@@ -31,12 +31,15 @@
|
||||
|
||||
\title Importing 2D Assets
|
||||
|
||||
You can download \QB from the \l{https://marketplace.qt.io/}{Qt Marketplace}.
|
||||
|
||||
\image studio-imported-assets.png "Artwork imported into Qt Design Studio"
|
||||
|
||||
You can import assets that you exported with \QB to a \QDS project as image
|
||||
and QML files and edit them in the Design mode. If you make changes to your
|
||||
design in the design tool, you can merge the changes into existing QML files
|
||||
without overwriting the changes you have made in \QDS.
|
||||
\QB enables you to export assets and then import them to a \QDS project
|
||||
as image and QML files for editing in the \uicontrol {Form Editor}. If you
|
||||
make changes to your design in the design tool, you can merge the changes
|
||||
into existing QML files without overwriting the changes you have made in
|
||||
\QDS.
|
||||
|
||||
\note Attempting to import assets exported on another system might fail.
|
||||
|
||||
@@ -84,12 +87,11 @@
|
||||
The imported assets are displayed in the \uicontrol Assets tab in the
|
||||
\uicontrol Library as PNG images. The components that you specified in
|
||||
the design tool are displayed in the \uicontrol {My QML Components} tab,
|
||||
as well as in the \uicontrol Project tab of the \uicontrol Navigator as
|
||||
separate QML files.
|
||||
as well as in the \uicontrol Projects view as separate QML files.
|
||||
|
||||
\note The layer that was the bottom layer in the design tool becames the top
|
||||
layer in the \uicontrol Navigator to reflect the QML code model. You
|
||||
can view the QML code in the \uicontrol {Text Editor} tab.
|
||||
can view the QML code in the \uicontrol {Text Editor}.
|
||||
|
||||
If asset importer conflicts, warnings, and errors are displayed in the
|
||||
\uicontrol {Asset Import} dialog while importing, fix the issues in
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
exporting the 2D assets from design tools, whereas you can directly import
|
||||
3D assets saved in widely-used 3D graphics formats.
|
||||
|
||||
You can download \QB from the \l{https://marketplace.qt.io/}{Qt Marketplace}.
|
||||
|
||||
\list
|
||||
\li \l{Importing 2D Assets}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
\code
|
||||
singleton Values 1.0 Values.qml
|
||||
\endcode
|
||||
\li Open \e Values.qml in the \uicontrol {Text Editor} tab for editing.
|
||||
\li Open \e Values.qml in the \uicontrol {Text Editor} for editing.
|
||||
\li Add the following code to the top of the file to register the
|
||||
QObject-derived class that you will use to expose the global
|
||||
properties as a singleton type:
|
||||
|
||||
@@ -31,9 +31,10 @@
|
||||
\QDS provides a set of Qt Quick Studio effects that inherit the types in the
|
||||
\l {Qt Graphical Effects} module. To apply a visual effect to a component,
|
||||
you must place the component inside the effect. First drag-and-drop an
|
||||
effect from \uicontrol Library > \uicontrol Effects to the the canvas or
|
||||
the \uicontrol Navigator, and then drag-and-drop the component to the
|
||||
effect. For some effects, you need two source components.
|
||||
effect from \uicontrol Library > \uicontrol Effects to the the
|
||||
\uicontrol {Form Editor} or the \uicontrol Navigator, and then drag-and-drop
|
||||
the component to the effect. For some effects, you need two source
|
||||
components.
|
||||
|
||||
The following table summarizes the available effects and contains links to
|
||||
the documentation of the inherited QML type.
|
||||
|
||||
@@ -45,25 +45,16 @@
|
||||
scene did not contain them, you can add the corresponding Qt Quick 3D
|
||||
types from the \uicontrol Library.
|
||||
|
||||
You can use the manipulator mode toolbar buttons (2) to show the move, rotate,
|
||||
or scale manipulator in the rendered scene when an item is selected and
|
||||
to determine what happens when you drag the selected item. Select the
|
||||
\uicontrol {Toggle Local/Global Orientation} button (3) to determine whether
|
||||
the manipulators affect only the local transforms of the item or whether
|
||||
they transform with respect to the global space.
|
||||
You can use the toolbar buttons (2) to show the \e transformation
|
||||
gizmo in the \uicontrol {3D Editor} when an item is selected
|
||||
and to determine what happens when you drag the selected item.
|
||||
Transformation refers to moving, rotating, or scaling of an object.
|
||||
Select the \uicontrol {Toggle Local/Global Orientation} button (3) to
|
||||
determine whether the gizmos affect only the local transformations of the
|
||||
item or whether they transform with respect to the global space.
|
||||
|
||||
\image studio-3d-editor.png "3D Editor"
|
||||
|
||||
For example, in local orientation mode, selecting an unrotated cube inside
|
||||
a rotated group in the move mode shows rotated axes. Dragging on the red
|
||||
arrow of the move manipulator affects only the x position of the item.
|
||||
|
||||
In global mode, the manipulators always transform with respect to the global
|
||||
space. In the example above, switching to global mode will show the red
|
||||
arrow for the move manipulator aligned with the screen (assuming an
|
||||
unrotated camera). Dragging on the red arrow may affect two or three of the
|
||||
position values for the selected item in order to move it in global space.
|
||||
|
||||
The \e pivot of the component is used as the origin for position, scale,
|
||||
and rotation operations. You can set a \l{Setting Transform Properties}
|
||||
{local pivot offset} for an item in the \uicontrol Properties view to
|
||||
@@ -153,6 +144,23 @@
|
||||
|
||||
To freely rotate the item, select the gray circle.
|
||||
|
||||
\section1 Using Global and Local Orientation
|
||||
|
||||
To switch between global and local orientation, select \uicontrol
|
||||
{Toggle Local/Global Orientation}.
|
||||
|
||||
In global orientation mode, transformation of a selected object is presented
|
||||
with respect to the global space. For example, while the move tool is
|
||||
selected, selecting a cube will show its move gizmo aligned with the axes
|
||||
of global space. Dragging on the red arrow of the gizmo moves the object in
|
||||
the global x direction.
|
||||
|
||||
In local orientation mode, the position of a selected object is shown
|
||||
according to local axes specific to the selected object. For example,
|
||||
selecting a rotated cube will show its axes rotated, and not aligned with
|
||||
the axes of global space. Dragging on the red arrow of the gizmo
|
||||
moves the object in the local x direction in relation to the object.
|
||||
|
||||
\section1 Scaling Items
|
||||
|
||||
\image studio-3d-editor-scale.png "3D editor in scale mode"
|
||||
|
||||
@@ -36,10 +36,11 @@
|
||||
|
||||
\title Importing 3D Assets
|
||||
|
||||
You can import files you created using 3D graphics applications and stored
|
||||
in several widely-used formats, such as .blend, .dae, .fbx, .glb, .gltf,
|
||||
.obj, .uia, or .uip. For a list of formats supported by each \l{Qt Quick 3D}
|
||||
version, see the module documentation.
|
||||
You can download \QB from the \l{https://marketplace.qt.io/}{Qt Marketplace}.
|
||||
It enables you to import files you created using 3D graphics applications
|
||||
and stored in several widely-used formats, such as .blend, .dae, .fbx, .glb,
|
||||
.gltf, .obj, .uia, or .uip. For a list of formats supported by each
|
||||
\l{Qt Quick 3D} version, see the module documentation.
|
||||
|
||||
For more information about exporting 3D graphics from Maya, see
|
||||
\l{Exporting from Maya}.
|
||||
@@ -68,5 +69,5 @@
|
||||
\endlist
|
||||
|
||||
You can open the imported files in the Design mode for editing in the
|
||||
\l{Editing 3D Scenes}{3D editor}.
|
||||
\l{Editing 3D Scenes}{3D Editor}.
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Design Studio documentation.
|
||||
@@ -54,8 +54,8 @@
|
||||
\endcode
|
||||
|
||||
To select an icon in the \uicontrol {ISO Icon Browser} in \QDS, select
|
||||
the ISO icon in the \uicontrol Navigator or on the canvas, and then
|
||||
select \uicontrol {Choose Icon} in the context menu.
|
||||
the ISO icon in the \uicontrol Navigator or \uicontrol {Form Editor},
|
||||
and then select \uicontrol {Choose Icon} in the context menu.
|
||||
|
||||
\image iso-icon-browser.png
|
||||
*/
|
||||
|
||||
@@ -36,6 +36,11 @@ Product {
|
||||
|
||||
cpp.cxxFlags: {
|
||||
var flags = [];
|
||||
if (qbs.toolchain.contains("clang")
|
||||
&& Utilities.versionCompare(cpp.compilerVersion, "10") >= 0) {
|
||||
// Triggers a lot in Qt.
|
||||
flags.push("-Wno-deprecated-copy", "-Wno-constant-logical-operand");
|
||||
}
|
||||
if (qbs.toolchain.contains("gcc") && !qbs.toolchain.contains("clang")) {
|
||||
flags.push("-Wno-noexcept-type");
|
||||
if (Utilities.versionCompare(cpp.compilerVersion, "9") >= 0)
|
||||
|
||||
@@ -3,6 +3,7 @@ var File = require("qbs.File")
|
||||
var FileInfo = require("qbs.FileInfo")
|
||||
var MinimumLLVMVersion = "8.0.0" // CLANG-UPGRADE-CHECK: Adapt minimum version numbers.
|
||||
var Process = require("qbs.Process")
|
||||
var Utilities = require("qbs.Utilities")
|
||||
|
||||
function readOutput(executable, args)
|
||||
{
|
||||
@@ -108,6 +109,8 @@ function formattingLibs(llvmConfig, qtcFunctions, targetOS)
|
||||
return [];
|
||||
|
||||
var clangVersion = version(llvmConfig)
|
||||
if (Utilities.versionCompare(clangVersion, "10") >= 0)
|
||||
return [];
|
||||
var libs = []
|
||||
if (qtcFunctions.versionIsAtLeast(clangVersion, MinimumLLVMVersion)) {
|
||||
if (qtcFunctions.versionIsAtLeast(clangVersion, "8.0.0")) {
|
||||
|
||||
@@ -64,7 +64,8 @@ Module {
|
||||
return incl != llvmIncludeDir;
|
||||
})
|
||||
property stringList llvmToolingCxxFlags: clangProbe.llvmToolingCxxFlags
|
||||
property bool toolingEnabled: !Environment.getEnv("QTC_DISABLE_CLANG_REFACTORING")
|
||||
property bool toolingEnabled: Utilities.versionCompare(llvmVersion, "10") < 0
|
||||
&& !Environment.getEnv("QTC_DISABLE_CLANG_REFACTORING")
|
||||
|
||||
validate: {
|
||||
if (!clangProbe.found) {
|
||||
|
||||
@@ -98,10 +98,10 @@ BASENAME = $$(INSTALL_BASENAME)
|
||||
isEmpty(BASENAME): BASENAME = qt-creator-$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)
|
||||
|
||||
linux {
|
||||
appstream.files = dist/org.qt-project.qtcreator.appdata.xml
|
||||
appstream.files = share/metainfo/org.qt-project.qtcreator.appdata.xml
|
||||
appstream.path = $$QTC_PREFIX/share/metainfo/
|
||||
|
||||
desktop.files = dist/org.qt-project.qtcreator.desktop
|
||||
desktop.files = share/applications/org.qt-project.qtcreator.desktop
|
||||
desktop.path = $$QTC_PREFIX/share/applications/
|
||||
|
||||
INSTALLS += appstream desktop
|
||||
|
||||
@@ -146,7 +146,19 @@ def build_qtcreator(args, paths):
|
||||
common.check_print_call(['cmake', '--install', '.', '--prefix', paths.dev_install,
|
||||
'--component', 'Devel'],
|
||||
paths.build)
|
||||
|
||||
if not args.no_docs:
|
||||
common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install,
|
||||
'--component', 'qtc_docs_qtcreator'],
|
||||
paths.build)
|
||||
common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install,
|
||||
'--component', 'html_docs_qtcreator'],
|
||||
paths.build)
|
||||
common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install,
|
||||
'--component', 'html_docs_qtcreator-dev'],
|
||||
paths.build)
|
||||
common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install,
|
||||
'--component', 'html_docs_qtcreator-dev'],
|
||||
paths.build)
|
||||
def build_wininterrupt(args, paths):
|
||||
if not common.is_windows_platform():
|
||||
return
|
||||
|
||||
@@ -48,6 +48,9 @@ def get_arguments():
|
||||
parser.add_argument('--output-path', help='Output path for resulting 7zip files')
|
||||
parser.add_argument('--add-path', help='Adds a CMAKE_PREFIX_PATH to the build',
|
||||
action='append', dest='prefix_paths', default=[])
|
||||
parser.add_argument('--add-config', help=('Adds the argument to the CMake configuration call. '
|
||||
'Use "--add-config=-DSOMEVAR=SOMEVALUE" if the argument begins with a dash.'),
|
||||
action='append', dest='config_args', default=[])
|
||||
parser.add_argument('--deploy', help='Installs the "Dependencies" component of the plugin.',
|
||||
action='store_true', default=False)
|
||||
parser.add_argument('--debug', help='Enable debug builds', action='store_true', default=False)
|
||||
@@ -82,6 +85,7 @@ def build(args, paths):
|
||||
with open(os.path.join(paths.result, args.name + '.7z.git_sha'), 'w') as f:
|
||||
f.write(ide_revision)
|
||||
|
||||
cmake_args += args.config_args
|
||||
common.check_print_call(cmake_args + [paths.src], paths.build)
|
||||
common.check_print_call(['cmake', '--build', '.'], paths.build)
|
||||
common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, '--strip'],
|
||||
|
||||
@@ -1 +1,11 @@
|
||||
add_subdirectory(qtcreator)
|
||||
|
||||
if (NOT APPLE AND NOT WIN32)
|
||||
install(
|
||||
DIRECTORY
|
||||
applications
|
||||
metainfo
|
||||
DESTINATION
|
||||
share
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1658,7 +1658,7 @@ class DumperBase():
|
||||
#with self.timer('metaObjectType-' + self.currentIName):
|
||||
metaObjectPtr = extractStaticMetaObjectPtrFromType(typeobj)
|
||||
|
||||
if not metaObjectPtr:
|
||||
if not metaObjectPtr and not self.isWindowsTarget():
|
||||
# measured: 200 ms (example had one level of inheritance)
|
||||
#with self.timer('metaObjectCall-' + self.currentIName):
|
||||
metaObjectPtr = extractMetaObjectPtrFromAddress()
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
pragma Singleton
|
||||
import QtQuick 2.12
|
||||
import QtQuickDesignerTheme 1.0
|
||||
|
||||
QtObject {
|
||||
id: values
|
||||
@@ -80,54 +81,42 @@ QtObject {
|
||||
|
||||
// Theme Colors
|
||||
|
||||
// Dark Theme Defaults
|
||||
property string themeControlBackground: "#242424"
|
||||
property string themeControlOutline: "#404040"
|
||||
property string themeTextColor: "#ffffff"
|
||||
property string themeDisabledTextColor: "#909090"
|
||||
|
||||
property string themePanelBackground: "#2a2a2a"
|
||||
property string themeHoverHighlight: "#313131"
|
||||
property string themeColumnBackground: "#363636"
|
||||
property string themeFocusEdit: "#444444"
|
||||
property string themeFocusDrag: "#565656"
|
||||
|
||||
property string themeControlBackgroundPressed: "#606060"
|
||||
property string themeControlBackgroundChecked: "#565656"
|
||||
|
||||
property string themeInteraction: "#029de0"
|
||||
|
||||
property string themeSliderActiveTrack: "#606060"
|
||||
property string themeSliderInactiveTrack: "#404040"
|
||||
property string themeSliderHandle: "#505050"
|
||||
|
||||
property string themeSliderActiveTrackHover: "#7f7f7f"
|
||||
property string themeSliderInactiveTrackHover: "#505050"
|
||||
property string themeSliderHandleHover: "#606060"
|
||||
|
||||
property string themeSliderActiveTrackFocus: "#aaaaaa"
|
||||
property string themeSliderInactiveTrackFocus: "#606060"
|
||||
property string themeSliderHandleFocus: values.themeInteraction
|
||||
|
||||
property string themeErrorColor: "#df3a3a"
|
||||
// COLORS NOW COME FROM THE THEME FILES
|
||||
property string themeControlBackground: Theme.color(Theme.DScontrolBackground)
|
||||
property string themeControlOutline: Theme.color(Theme.DScontrolOutline)
|
||||
property string themeTextColor: Theme.color(Theme.DStextColor)
|
||||
property string themeDisabledTextColor: Theme.color(Theme.DSdisabledTextColor)
|
||||
property string themePanelBackground: Theme.color(Theme.DSpanelBackground)
|
||||
property string themeHoverHighlight: Theme.color(Theme.DShoverHighlight)
|
||||
property string themeColumnBackground: Theme.color(Theme.DScolumnBackground)
|
||||
property string themeFocusEdit: Theme.color(Theme.DSfocusEdit)
|
||||
property string themeFocusDrag: Theme.color(Theme.DSfocusDrag)
|
||||
property string themeControlBackgroundPressed: Theme.color(Theme.DScontrolBackgroundPressed)
|
||||
property string themeControlBackgroundChecked: Theme.color(Theme.DScontrolBackgroundChecked)
|
||||
property string themeInteraction: Theme.color(Theme.DSinteraction)
|
||||
property string themeSliderActiveTrack: Theme.color(Theme.DSsliderActiveTrack)
|
||||
property string themeSliderInactiveTrack: Theme.color(Theme.DSsliderInactiveTrack)
|
||||
property string themeSliderHandle: Theme.color(Theme.DSsliderHandle)
|
||||
property string themeSliderActiveTrackHover: Theme.color(Theme.DSactiveTrackHover)
|
||||
property string themeSliderInactiveTrackHover: Theme.color(Theme.DSsliderInactiveTrackHover)
|
||||
property string themeSliderHandleHover: Theme.color(Theme.DSsliderHandleHover)
|
||||
property string themeSliderActiveTrackFocus: Theme.color(Theme.DSsliderActiveTrackFocus)
|
||||
property string themeSliderInactiveTrackFocus:Theme.color(Theme.DSsliderInactiveTrackFocus)
|
||||
property string themeSliderHandleFocus: Theme.color(Theme.DSsliderHandleFocus)
|
||||
property string themeErrorColor: Theme.color(Theme.DSerrorColor)
|
||||
|
||||
// NEW NEW NEW NEW NEW
|
||||
property string themeControlBackgroundDisabled: "#363636"
|
||||
property string themeControlOutlineDisabled: "#404040"
|
||||
property string themeTextColorDisabled: "#606060"
|
||||
|
||||
property string themeTextSelectionColor: "#029de0"
|
||||
property string themeTextSelectedTextColor: "#ffffff"
|
||||
|
||||
property string themeScrollBarTrack: "#404040"
|
||||
property string themeScrollBarHandle: "#505050"
|
||||
|
||||
property string themeControlBackgroundInteraction: "#404040" // TODO Name. Right now themeFocusEdit is used for all 'edit' states. Is that correct? Different color!
|
||||
|
||||
property string themeTranslationIndicatorBorder: "#7f7f7f"
|
||||
|
||||
property string themeSectionHeadBackground: "#191919"
|
||||
property string themeControlBackgroundDisabled: Theme.color(Theme.DScontrolBackgroundDisabled)
|
||||
property string themeControlOutlineDisabled: Theme.color(Theme.DScontrolOutlineDisabled)
|
||||
property string themeTextColorDisabled: Theme.color(Theme.DStextColorDisabled)
|
||||
property string themeTextSelectionColor: Theme.color(Theme.DStextSelectionColor)
|
||||
property string themeTextSelectedTextColor:Theme.color(Theme.DStextSelectedTextColor)
|
||||
property string themeScrollBarTrack: Theme.color(Theme.DSscrollBarTrack)
|
||||
property string themeScrollBarHandle: Theme.color(Theme.DSscrollBarHandle)
|
||||
property string themeControlBackgroundInteraction: Theme.color(Theme.DScontrolBackgroundInteraction) // TODO Name. Right now themeFocusEdit is used for all 'edit' states. Is that correct? Different color!
|
||||
property string themeTranslationIndicatorBorder: Theme.color(Theme.DStranlsationIndicatorBorder)
|
||||
property string themeSectionHeadBackground: Theme.color(Theme.DSsectionHeadBackground)
|
||||
|
||||
// Taken out of Constants.js
|
||||
property string themeChangedStateText: "#99ccff"
|
||||
property string themeChangedStateText: Theme.color(Theme.DSchangedStateText)
|
||||
}
|
||||
|
||||
@@ -22,6 +22,43 @@ backgroundColorDisabled=ff444444
|
||||
qmlDesignerButtonColor=ff3c3e40
|
||||
|
||||
[Colors]
|
||||
|
||||
;DS controls theme START
|
||||
DScontrolBackground=ff404040
|
||||
DScontrolOutline=ff595959
|
||||
DStextColor=ffffffff
|
||||
DSdisabledTextColor=ff909090
|
||||
DSpanelBackground=ff454444
|
||||
DShoverHighlight=ff313131
|
||||
DScolumnBackground=ff363636
|
||||
DSfocusEdit=ff444444
|
||||
DSfocusDrag=ff565656
|
||||
DScontrolBackgroundPressed=ff7a7a7a
|
||||
DScontrolBackgroundChecked=ff565656
|
||||
DSinteraction=ff3f91c4
|
||||
DSsliderActiveTrack=ff7a7a7a
|
||||
DSsliderInactiveTrack=ff4d4d4d
|
||||
DSsliderHandle=ff505050
|
||||
DSsliderActiveTrackHover=ff7f7f7f
|
||||
DSsliderInactiveTrackHover=ff505050
|
||||
DSsliderHandleHover=ff7a7a7a
|
||||
DSsliderActiveTrackFocus=ffaaaaaa
|
||||
DSsliderInactiveTrackFocus=ff7a7a7a
|
||||
DSsliderHandleFocus=ff3f91c4
|
||||
DSerrorColor=ffdf3a3a
|
||||
DScontrolBackgroundDisabled=ff363636
|
||||
DScontrolOutlineDisabled=ff4d4d4d
|
||||
DStextColorDisabled=ff7a7a7a
|
||||
DStextSelectionColor=ff3f91c4
|
||||
DStextSelectedTextColor=ffffffff
|
||||
DSscrollBarTrack=ff4d4d4d
|
||||
DSscrollBarHandle=ff505050
|
||||
DScontrolBackgroundInteraction=ff4d4d4d
|
||||
DStranslationIndicatorBorder=ff7f7f7f
|
||||
DSsectionHeadBackground=ff424242
|
||||
DSchangedStateText=ff99ccff
|
||||
;DS controls theme END
|
||||
|
||||
BackgroundColorAlternate=alternateBackground
|
||||
BackgroundColorDark=shadowBackground
|
||||
BackgroundColorHover=hoverBackground
|
||||
|
||||
@@ -13,6 +13,43 @@ splitterColor=ff151515
|
||||
qmlDesignerButtonColor=ff4c4e50
|
||||
|
||||
[Colors]
|
||||
|
||||
;DS controls theme START
|
||||
DScontrolBackground=ff404040
|
||||
DScontrolOutline=ff595959
|
||||
DStextColor=ffffffff
|
||||
DSdisabledTextColor=ff909090
|
||||
DSpanelBackground=ff454444
|
||||
DShoverHighlight=ff313131
|
||||
DScolumnBackground=ff363636
|
||||
DSfocusEdit=ff444444
|
||||
DSfocusDrag=ff565656
|
||||
DScontrolBackgroundPressed=ff7a7a7a
|
||||
DScontrolBackgroundChecked=ff565656
|
||||
DSinteraction=ff3f91c4
|
||||
DSsliderActiveTrack=ff7a7a7a
|
||||
DSsliderInactiveTrack=ff4d4d4d
|
||||
DSsliderHandle=ff505050
|
||||
DSsliderActiveTrackHover=ff7f7f7f
|
||||
DSsliderInactiveTrackHover=ff505050
|
||||
DSsliderHandleHover=ff7a7a7a
|
||||
DSsliderActiveTrackFocus=ffaaaaaa
|
||||
DSsliderInactiveTrackFocus=ff7a7a7a
|
||||
DSsliderHandleFocus=ff3f91c4
|
||||
DSerrorColor=ffdf3a3a
|
||||
DScontrolBackgroundDisabled=ff363636
|
||||
DScontrolOutlineDisabled=ff4d4d4d
|
||||
DStextColorDisabled=ff7a7a7a
|
||||
DStextSelectionColor=ff3f91c4
|
||||
DStextSelectedTextColor=ffffffff
|
||||
DSscrollBarTrack=ff4d4d4d
|
||||
DSscrollBarHandle=ff505050
|
||||
DScontrolBackgroundInteraction=ff4d4d4d
|
||||
DStranslationIndicatorBorder=ff7f7f7f
|
||||
DSsectionHeadBackground=ff424242
|
||||
DSchangedStateText=ff99ccff
|
||||
;DS controls theme END
|
||||
|
||||
BackgroundColorAlternate=ff3d3d3d
|
||||
BackgroundColorDark=shadowBackground
|
||||
BackgroundColorHover=ff515151
|
||||
|
||||
406
share/qtcreator/themes/design-dark.creatortheme
Normal file
@@ -0,0 +1,406 @@
|
||||
[General]
|
||||
ThemeName=Design Dark
|
||||
PreferredStyles=Fusion
|
||||
DefaultTextEditorColorScheme=creator-dark.xml
|
||||
|
||||
[Palette]
|
||||
shadowBackground=ff191919
|
||||
text=ffdadada
|
||||
textDisabled=60a4a6a8
|
||||
selectedBackgroundText=aa1f75cc
|
||||
toolBarItem=ffb3b3b3
|
||||
toolBarItemDisabled=ff686868
|
||||
fancyBarsNormalTextColor=ffd0d0d0
|
||||
fancyBarsBoldTextColor=b6fbfdff
|
||||
hoverBackground=ff404244
|
||||
selectedBackground=ff111111
|
||||
normalBackground=ff262728
|
||||
alternateBackground=ff353637
|
||||
error=ffdf4f4f
|
||||
warning=ffecbc1c
|
||||
splitter=ff474747
|
||||
textColorLink=ff007af4
|
||||
textColorLinkVisited=ffa57aff
|
||||
backgroundColorDisabled=ff444444
|
||||
|
||||
|
||||
|
||||
|
||||
[Colors]
|
||||
;DS controls theme START
|
||||
DScontrolBackground=ff242424
|
||||
DScontrolOutline=ff404040
|
||||
DStextColor=ffffffff
|
||||
DSdisabledTextColor=ff909090
|
||||
DSpanelBackground=ff2a2a2a
|
||||
DShoverHighlight=ff313131
|
||||
DScolumnBackground=ff363636
|
||||
DSfocusEdit=ff444444
|
||||
DSfocusDrag=ff565656
|
||||
DScontrolBackgroundPressed=ff606060
|
||||
DScontrolBackgroundChecked=ff565656
|
||||
DSinteraction=ff0492c9
|
||||
DSsliderActiveTrack=ff606060
|
||||
DSsliderInactiveTrack=ff404040
|
||||
DSsliderHandle=ff505050
|
||||
DSsliderActiveTrackHover=ff7f7f7f
|
||||
DSsliderInactiveTrackHover=ff505050
|
||||
DSsliderHandleHover=ff606060
|
||||
DSsliderActiveTrackFocus=ffaaaaaa
|
||||
DSsliderInactiveTrackFocus=ff606060
|
||||
DSsliderHandleFocus=ff0492c9
|
||||
DSerrorColor=ffdf3a3a
|
||||
DScontrolBackgroundDisabled=ff363636
|
||||
DScontrolOutlineDisabled=ff404040
|
||||
DStextColorDisabled=ff606060
|
||||
DStextSelectionColor=ff0492c9
|
||||
DStextSelectedTextColor=ffffffff
|
||||
DSscrollBarTrack=ff404040
|
||||
DSscrollBarHandle=ff505050
|
||||
DScontrolBackgroundInteraction=ff404040
|
||||
DStranslationIndicatorBorder=ff7f7f7f
|
||||
DSsectionHeadBackground=ff191919
|
||||
DSchangedStateText=ff99ccff
|
||||
;DS controls theme END
|
||||
|
||||
BackgroundColorAlternate=alternateBackground
|
||||
BackgroundColorDark=shadowBackground
|
||||
BackgroundColorHover=hoverBackground
|
||||
BackgroundColorNormal=normalBackground
|
||||
BackgroundColorDisabled=backgroundColorDisabled
|
||||
BackgroundColorSelected=selectedBackground
|
||||
BadgeLabelBackgroundColorChecked=ffe0e0e0
|
||||
BadgeLabelBackgroundColorUnchecked=ff808080
|
||||
BadgeLabelTextColorChecked=ff606060
|
||||
BadgeLabelTextColorUnchecked=ffffffff
|
||||
CanceledSearchTextColor=ff0000
|
||||
ComboBoxArrowColor=toolBarItem
|
||||
ComboBoxArrowColorDisabled=toolBarItemDisabled
|
||||
ComboBoxTextColor=fancyBarsNormalTextColor
|
||||
DetailsButtonBackgroundColorHover=22ffffff
|
||||
DetailsWidgetBackgroundColor=18ffffff
|
||||
DockWidgetResizeHandleColor=splitter
|
||||
DoubleTabWidget1stSeparatorColor=splitter
|
||||
DoubleTabWidget1stTabActiveTextColor=text
|
||||
DoubleTabWidget1stTabBackgroundColor=ff505050
|
||||
DoubleTabWidget1stTabInactiveTextColor=text
|
||||
DoubleTabWidget2ndSeparatorColor=toolBarItemDisabled
|
||||
DoubleTabWidget2ndTabActiveTextColor=text
|
||||
DoubleTabWidget2ndTabBackgroundColor=selectedBackground
|
||||
DoubleTabWidget2ndTabInactiveTextColor=text
|
||||
EditorPlaceholderColor=normalBackground
|
||||
FancyToolBarSeparatorColor=toolBarItemDisabled
|
||||
FancyTabBarBackgroundColor=shadowBackground
|
||||
FancyTabBarSelectedBackgroundColor=ff000000
|
||||
FancyTabWidgetDisabledSelectedTextColor=toolBarItemDisabled
|
||||
FancyTabWidgetDisabledUnselectedTextColor=toolBarItemDisabled
|
||||
FancyTabWidgetEnabledSelectedTextColor=fancyBarsBoldTextColor
|
||||
FancyTabWidgetEnabledUnselectedTextColor=fancyBarsBoldTextColor
|
||||
FancyToolButtonHoverColor=hoverBackground
|
||||
FancyToolButtonSelectedColor=selectedBackground
|
||||
FutureProgressBackgroundColor=shadowBackground
|
||||
IconsBaseColor=toolBarItem
|
||||
IconsDisabledColor=toolBarItemDisabled
|
||||
IconsInfoColor=ff3099dc
|
||||
IconsInfoToolBarColor=ff71b2db
|
||||
IconsWarningColor=warning
|
||||
IconsWarningToolBarColor=fff2d76e
|
||||
IconsErrorColor=error
|
||||
IconsErrorToolBarColor=ffdb6f71
|
||||
IconsRunColor=ff6da838
|
||||
IconsRunToolBarColor=ff93be6c
|
||||
IconsStopColor=ffee6969
|
||||
IconsStopToolBarColor=ffe27f7f
|
||||
IconsInterruptColor=ff587ff7
|
||||
IconsInterruptToolBarColor=ff6a7bc3
|
||||
IconsDebugColor=toolBarItem
|
||||
IconsNavigationArrowsColor=ffebc322
|
||||
IconsBuildHammerHandleColor=ffb06112
|
||||
IconsBuildHammerHeadColor=ff828384
|
||||
IconsModeWelcomeActiveColor=ff1f6c97
|
||||
IconsModeEditActiveColor=ff99aaef
|
||||
IconsModeDesignActiveColor=ffbb6000
|
||||
IconsModeDebugActiveColor=ff99aaef
|
||||
IconsModeProjectActiveColor=ff1f6c97
|
||||
IconsModeAnalyzeActiveColor=ff43adee
|
||||
IconsModeHelpActiveColor=fff4be04
|
||||
IconsCodeModelKeywordColor=ff777777
|
||||
IconsCodeModelClassColor=ffc0b550
|
||||
IconsCodeModelStructColor=ff53b053
|
||||
IconsCodeModelFunctionColor=ffd34373
|
||||
IconsCodeModelVariableColor=ff2bbbcc
|
||||
IconsCodeModelEnumColor=ffc0b550
|
||||
IconsCodeModelMacroColor=ff476ba0
|
||||
IconsCodeModelAttributeColor=ff316511
|
||||
IconsCodeModelUniformColor=ff994899
|
||||
IconsCodeModelVaryingColor=ffa08833
|
||||
IconsCodeModelOverlayBackgroundColor=70000000
|
||||
IconsCodeModelOverlayForegroundColor=ffd0d0d0
|
||||
InfoBarBackground=ff505000
|
||||
InfoBarText=text
|
||||
MenuBarEmptyAreaBackgroundColor=shadowBackground
|
||||
MenuBarItemBackgroundColor=shadowBackground
|
||||
MenuBarItemTextColorDisabled=textDisabled
|
||||
MenuBarItemTextColorNormal=text
|
||||
MenuItemTextColorDisabled=textDisabled
|
||||
MenuItemTextColorNormal=text
|
||||
MiniProjectTargetSelectorBackgroundColor=shadowBackground
|
||||
MiniProjectTargetSelectorBorderColor=shadowBackground
|
||||
MiniProjectTargetSelectorSummaryBackgroundColor=shadowBackground
|
||||
MiniProjectTargetSelectorTextColor=fancyBarsNormalTextColor
|
||||
PanelStatusBarBackgroundColor=shadowBackground
|
||||
PanelsWidgetSeparatorLineColor=000000
|
||||
PanelTextColorDark=text
|
||||
PanelTextColorMid=ffa0a0a0
|
||||
PanelTextColorLight=text
|
||||
ProgressBarColorError=error
|
||||
ProgressBarColorFinished=dda4d576
|
||||
ProgressBarColorNormal=ff999999
|
||||
ProgressBarTitleColor=fancyBarsBoldTextColor
|
||||
ProgressBarBackgroundColor=a0606060
|
||||
SplitterColor=splitter
|
||||
TextColorDisabled=textDisabled
|
||||
TextColorError=ffff4040
|
||||
TextColorHighlight=ffff0000
|
||||
TextColorHighlightBackground=8a7f2c
|
||||
TextColorLink=textColorLink
|
||||
TextColorLinkVisited=textColorLinkVisited
|
||||
TextColorNormal=text
|
||||
ToggleButtonBackgroundColor=shadowBackground
|
||||
ToolBarBackgroundColor=shadowBackground
|
||||
TreeViewArrowColorNormal=hoverBackground
|
||||
TreeViewArrowColorSelected=text
|
||||
|
||||
OutputPanes_DebugTextColor=text
|
||||
OutputPanes_ErrorMessageTextColor=ffff6c6c
|
||||
OutputPanes_MessageOutput=ff008787
|
||||
OutputPanes_NormalMessageTextColor=ff008787
|
||||
OutputPanes_StdErrTextColor=ffff6666
|
||||
OutputPanes_StdOutTextColor=text
|
||||
OutputPanes_WarningMessageTextColor=fff3c300
|
||||
OutputPanes_TestPassTextColor=ff00b400
|
||||
OutputPanes_TestFailTextColor=ffcf4848
|
||||
OutputPanes_TestXFailTextColor=ff28dc28
|
||||
OutputPanes_TestXPassTextColor=ffdc2828
|
||||
OutputPanes_TestSkipTextColor=ff828282
|
||||
OutputPanes_TestWarnTextColor=ffc8c800
|
||||
OutputPanes_TestFatalTextColor=ffc82828
|
||||
OutputPanes_TestDebugTextColor=ff329696
|
||||
OutputPaneButtonFlashColor=error
|
||||
OutputPaneToggleButtonTextColorChecked=fancyBarsNormalTextColor
|
||||
OutputPaneToggleButtonTextColorUnchecked=fancyBarsNormalTextColor
|
||||
|
||||
Debugger_LogWindow_LogInput=ff00acac
|
||||
Debugger_LogWindow_LogStatus=ff00875a
|
||||
Debugger_LogWindow_LogTime=ffbf0303
|
||||
|
||||
Debugger_WatchItem_ValueNormal=text
|
||||
Debugger_WatchItem_ValueInvalid=textDisabled
|
||||
Debugger_WatchItem_ValueChanged=ffff6666
|
||||
|
||||
Debugger_Breakpoint_TextMarkColor=ffff4040
|
||||
|
||||
Welcome_TextColor=text
|
||||
Welcome_ForegroundPrimaryColor=ff999999
|
||||
Welcome_ForegroundSecondaryColor=ff808080
|
||||
Welcome_BackgroundColor=normalBackground
|
||||
Welcome_ButtonBackgroundColor=normalBackground
|
||||
Welcome_DividerColor=ff555555
|
||||
Welcome_HoverColor=ff444444
|
||||
Welcome_LinkColor=ff7fc63c
|
||||
Welcome_DisabledLinkColor=textDisabled
|
||||
|
||||
Timeline_TextColor=text
|
||||
Timeline_BackgroundColor1=normalBackground
|
||||
Timeline_BackgroundColor2=ff444444
|
||||
Timeline_DividerColor=ff555555
|
||||
Timeline_HighlightColor=ff3099dc
|
||||
Timeline_PanelBackgroundColor=ff808080
|
||||
Timeline_PanelHeaderColor=alternateBackground
|
||||
Timeline_HandleColor=alternateBackground
|
||||
Timeline_RangeColor=selectedBackground
|
||||
|
||||
VcsBase_FileStatusUnknown_TextColor=text
|
||||
VcsBase_FileAdded_TextColor=ff00ff00
|
||||
VcsBase_FileModified_TextColor=ff8ee0ff
|
||||
VcsBase_FileDeleted_TextColor=fffff6c6c
|
||||
VcsBase_FileRenamed_TextColor=ffffa500
|
||||
VcsBase_FileUnmerged_TextColor=ffff4040
|
||||
|
||||
Bookmarks_TextMarkColor=ff8080ff
|
||||
|
||||
TextEditor_SearchResult_ScrollBarColor=ff00c000
|
||||
TextEditor_CurrentLine_ScrollBarColor=ffffffff
|
||||
|
||||
ProjectExplorer_TaskError_TextMarkColor=error
|
||||
ProjectExplorer_TaskWarn_TextMarkColor=warning
|
||||
|
||||
CodeModel_Error_TextMarkColor=error
|
||||
CodeModel_Warning_TextMarkColor=warning
|
||||
|
||||
|
||||
;Designer Main colors
|
||||
|
||||
; Design View panel backgrounds - Library, Form Viewer, Properties, States, Timeline & Connections. - lOOKS LIKE IS NO LONGER USED.
|
||||
QmlDesigner_BackgroundColor=ff4c4e50
|
||||
;QmlDesigner_BackgroundColor=ffd3299a
|
||||
|
||||
|
||||
; Design View selected items - Navigator Selection, Timeline Property Selection, TImeline bar, property text highlighted
|
||||
QmlDesigner_HighlightColor=ff0492c9
|
||||
|
||||
|
||||
|
||||
; live selection color for the form editors smart guides.
|
||||
;QmlDesigner_FormEditorSelectionColor=ff4ba2ff
|
||||
QmlDesigner_FormEditorSelectionColor=ffd3299a
|
||||
|
||||
|
||||
;color for lable text in form editor
|
||||
QmlDesigner_FormEditorForegroundColor=ffdadada
|
||||
;QmlDesigner_FormEditorForegroundColor=ffd3299a
|
||||
|
||||
|
||||
|
||||
|
||||
;new colors
|
||||
|
||||
;background color for main form view, library, navigator, properties, connections
|
||||
;QmlDesigner_BackgroundColorDarkAlternate=ff4c4e50
|
||||
QmlDesigner_BackgroundColorDarkAlternate=ff262626
|
||||
|
||||
;filter outlines, override W/H outlines, properties spinbox background, timeline separators.
|
||||
;QmlDesigner_BackgroundColorDarker=ff262728
|
||||
QmlDesigner_BackgroundColorDarker=ff191919
|
||||
|
||||
;properties outlines, states thumbnail outlines, add state button outlines.
|
||||
;QmlDesigner_BorderColor=splitter
|
||||
QmlDesigner_BorderColor=ff353535
|
||||
|
||||
;background sqaures for components, effects, etc. Handles for scrollbars, type background in properties.
|
||||
;QmlDesigner_ButtonColor=ff595b5c
|
||||
QmlDesigner_ButtonColor=ff353535
|
||||
|
||||
|
||||
;non - selected tabs, text color for selected tabs.
|
||||
;QmlDesigner_TabDark=shadowBackground
|
||||
QmlDesigner_TabDark=ff111111
|
||||
|
||||
|
||||
;active tab backgrounds and non selected tab text.
|
||||
QmlDesigner_TabLight=text
|
||||
;QmlDesigner_TabLight=ff262626
|
||||
|
||||
;extra_new_colors
|
||||
|
||||
|
||||
QmlDesigner_FormeditorBackgroundColor=ff000000
|
||||
|
||||
QmlDesigner_AlternateBackgroundColor=ffc14fc1
|
||||
|
||||
QmlDesigner_ScrollBarHandleColor=ff595b5c
|
||||
|
||||
|
||||
|
||||
;palette colors
|
||||
|
||||
;outline colors on the combo box, zoom slider, flowtag button, dialog outlines, on loading project the whole screen flashes this color
|
||||
;PaletteWindow=normalBackground
|
||||
PaletteWindow=ff262626
|
||||
|
||||
|
||||
|
||||
; item text for search results panel and application output panel, twirl down triangles in edit mode, text editor.
|
||||
PaletteWindowText=text
|
||||
;PaletteWindowText=ffd3299a
|
||||
|
||||
|
||||
;Search bar background, edit view project list background, style combo box background
|
||||
PaletteBase=normalBackground
|
||||
;PaletteBase=ff191919
|
||||
|
||||
|
||||
|
||||
;can't see where this is used.
|
||||
PaletteAlternateBase=alternateBackground
|
||||
;PaletteAlternateBase=ffd3299a
|
||||
|
||||
|
||||
|
||||
;flow tag backgrounds, import combobox background, edit mode scrollbars
|
||||
;PaletteButton=shadowBackground
|
||||
PaletteButton=ff262626
|
||||
|
||||
|
||||
|
||||
;alternate text in the search and application output panel - NO LONGER SEEMS TO DO ANYTHING
|
||||
PaletteBrightText=ffff3333
|
||||
;PaletteBrightText=ffd3299a
|
||||
|
||||
|
||||
; text inside dropdown combo boxes, styles, connections.
|
||||
PaletteText=text
|
||||
;PaletteText=ffd3299a
|
||||
|
||||
|
||||
|
||||
;text for flowtags, import dropdown, ticks for tick boxes.
|
||||
PaletteButtonText=text
|
||||
;PaletteButtonText=ffd3299a
|
||||
|
||||
|
||||
PaletteButtonTextDisabled=textDisabled
|
||||
|
||||
|
||||
;background color for the tool tip hover background
|
||||
PaletteToolTipBase=selectedBackground
|
||||
;PaletteToolTipBase=ffd3299a
|
||||
|
||||
|
||||
;the selection highlight on the dropdown combo box in the file selection top menu and connections panel and tab mode selector dropdowns
|
||||
PaletteHighlight=selectedBackgroundText
|
||||
|
||||
|
||||
; outline of warning in editor mode, underline of "open a document" page in the edit mode
|
||||
PaletteDark=shadowBackground
|
||||
;PaletteDark=ffd3299a
|
||||
|
||||
|
||||
;selected text highlight in edit and design studio modes
|
||||
PaletteHighlightedText=ffffffff
|
||||
;PaletteHighlightedText=ffd3299a
|
||||
|
||||
|
||||
; text for for floating tool tips
|
||||
PaletteToolTipText=text
|
||||
;PaletteToolTipText=ffd3299a
|
||||
|
||||
|
||||
PaletteLink=textColorLink
|
||||
PaletteLinkVisited=textColorLinkVisited
|
||||
PaletteWindowDisabled=backgroundColorDisabled
|
||||
PaletteWindowTextDisabled=textDisabled
|
||||
PaletteBaseDisabled=backgroundColorDisabled
|
||||
PaletteTextDisabled=textDisabled
|
||||
|
||||
[Flags]
|
||||
ComboBoxDrawTextShadow=false
|
||||
DerivePaletteFromTheme=true
|
||||
DrawIndicatorBranch=true
|
||||
DrawSearchResultWidgetFrame=false
|
||||
DrawTargetSelectorBottom=false
|
||||
DrawToolBarHighlights=false
|
||||
DrawToolBarBorders=false
|
||||
ApplyThemePaletteGlobally=true
|
||||
FlatToolBars=true
|
||||
FlatSideBarIcons=true
|
||||
FlatProjectsMode=true
|
||||
FlatMenuBar=true
|
||||
ToolBarIconShadow=true
|
||||
WindowColorAsBase=false
|
||||
DarkUserInterface=true
|
||||
|
||||
[Gradients]
|
||||
DetailsWidgetHeaderGradient\1\color=00000000
|
||||
DetailsWidgetHeaderGradient\1\pos=1
|
||||
DetailsWidgetHeaderGradient\size=1
|
||||
305
share/qtcreator/themes/design-light.creatortheme
Normal file
@@ -0,0 +1,305 @@
|
||||
[General]
|
||||
ThemeName=Design Light
|
||||
PreferredStyles=Fusion
|
||||
|
||||
|
||||
[Palette]
|
||||
shadowBackground=ffd1cfcf
|
||||
text=ff000000
|
||||
textDisabled=55000000
|
||||
selectedBackgroundText=aa1f75cc
|
||||
toolBarItem=a0010508
|
||||
toolBarItemDisabled=38000000
|
||||
fancyBarsNormalTextColor=ff000000
|
||||
fancyBarsBoldTextColor=a0010508
|
||||
hoverBackground=1a000000
|
||||
selectedBackground=ffffffff
|
||||
normalBackground=ffffffff
|
||||
alternateBackground=ff515151
|
||||
stop_error=ffec7373
|
||||
run_success=ff52c23b
|
||||
error=ffdf4f4f
|
||||
warning=ffecbc1c
|
||||
splitter=ffbdbebf
|
||||
qmlDesignerButtonColor=fff8f8f8
|
||||
textColorLink=ff007af4
|
||||
textColorLinkVisited=ffa57aff
|
||||
backgroundColorDisabled=ff444444
|
||||
|
||||
[Colors]
|
||||
;DS controls theme START
|
||||
DScontrolBackground=ffffffff
|
||||
DScontrolOutline=ff777777
|
||||
DStextColor=ff242424
|
||||
DSdisabledTextColor=ff505050
|
||||
DSpanelBackground=fff2f2f2
|
||||
DShoverHighlight=ffe6e6e6
|
||||
DScolumnBackground=ffaaaaaa
|
||||
DSfocusEdit=ffeaeaea
|
||||
DSfocusDrag=ffd1d1d1
|
||||
DScontrolBackgroundPressed=ff505050
|
||||
DScontrolBackgroundChecked=ff5e5e5e
|
||||
DSinteraction=ff0492c9
|
||||
DSsliderActiveTrack=ff363636
|
||||
DSsliderInactiveTrack=ffe6e6e6
|
||||
DSsliderHandle=ff777777
|
||||
DSsliderActiveTrackHover=ff7f7f7f
|
||||
DSsliderInactiveTrackHover=ff5e5e5e
|
||||
DSsliderHandleHover=ff505050
|
||||
DSsliderActiveTrackFocus=ff363636
|
||||
DSsliderInactiveTrackFocus=ff505050
|
||||
DSsliderHandleFocus=ff0492c9
|
||||
DSerrorColor=ffdf3a3a
|
||||
DScontrolBackgroundDisabled=ffaaaaaa
|
||||
DScontrolOutlineDisabled=ff777777
|
||||
DStextColorDisabled=ff505050
|
||||
DStextSelectionColor=ff0492c9
|
||||
DStextSelectedTextColor=ffffffff
|
||||
DSscrollBarTrack=ff777777
|
||||
DSscrollBarHandle=ff505050
|
||||
DScontrolBackgroundInteraction=ff777777
|
||||
DStranslationIndicatorBorder=ffebebeb
|
||||
DSsectionHeadBackground=ffebebeb
|
||||
DSchangedStateText=ff99ccff
|
||||
;DS controls theme END
|
||||
|
||||
BackgroundColorAlternate=alternateBackground
|
||||
BackgroundColorDark=shadowBackground
|
||||
BackgroundColorHover=hoverBackground
|
||||
BackgroundColorNormal=normalBackground
|
||||
BackgroundColorDisabled=ff444444
|
||||
BackgroundColorSelected=selectedBackground
|
||||
BadgeLabelBackgroundColorChecked=ffe0e0e0
|
||||
BadgeLabelBackgroundColorUnchecked=ff808080
|
||||
BadgeLabelTextColorChecked=ff606060
|
||||
BadgeLabelTextColorUnchecked=ffffffff
|
||||
CanceledSearchTextColor=ff0000
|
||||
ComboBoxArrowColor=toolBarItem
|
||||
ComboBoxArrowColorDisabled=toolBarItemDisabled
|
||||
ComboBoxTextColor=fancyBarsNormalTextColor
|
||||
DetailsButtonBackgroundColorHover=b4ffffff
|
||||
DetailsWidgetBackgroundColor=28ffffff
|
||||
DockWidgetResizeHandleColor=splitter
|
||||
DoubleTabWidget1stSeparatorColor=ffff0000
|
||||
DoubleTabWidget1stTabActiveTextColor=ff000000
|
||||
DoubleTabWidget1stTabBackgroundColor=ffff0000
|
||||
DoubleTabWidget1stTabInactiveTextColor=ff555555
|
||||
DoubleTabWidget2ndSeparatorColor=ffff0000
|
||||
DoubleTabWidget2ndTabActiveTextColor=ffffffff
|
||||
DoubleTabWidget2ndTabBackgroundColor=ffff0000
|
||||
DoubleTabWidget2ndTabInactiveTextColor=ff000000
|
||||
EditorPlaceholderColor=fff4f4f4
|
||||
FancyToolBarSeparatorColor=toolBarItemDisabled
|
||||
FancyTabBarBackgroundColor=shadowBackground
|
||||
FancyTabBarSelectedBackgroundColor=selectedBackground
|
||||
FancyTabWidgetDisabledSelectedTextColor=toolBarItemDisabled
|
||||
FancyTabWidgetDisabledUnselectedTextColor=toolBarItemDisabled
|
||||
FancyTabWidgetEnabledSelectedTextColor=fancyBarsBoldTextColor
|
||||
FancyTabWidgetEnabledUnselectedTextColor=fancyBarsBoldTextColor
|
||||
FancyToolButtonHoverColor=hoverBackground
|
||||
FancyToolButtonSelectedColor=selectedBackground
|
||||
FutureProgressBackgroundColor=shadowBackground
|
||||
IconsBaseColor=toolBarItem
|
||||
IconsDisabledColor=toolBarItemDisabled
|
||||
IconsInfoColor=ff3099dc
|
||||
IconsInfoToolBarColor=ff3099dc
|
||||
IconsWarningColor=warning
|
||||
IconsWarningToolBarColor=ffecbc1c
|
||||
IconsErrorColor=error
|
||||
IconsErrorToolBarColor=ffdf4f4f
|
||||
IconsRunColor=run_success
|
||||
IconsRunToolBarColor=run_success
|
||||
IconsStopColor=stop_error
|
||||
IconsStopToolBarColor=stop_error
|
||||
IconsInterruptColor=ff587ff7
|
||||
IconsInterruptToolBarColor=ff6a7bc3
|
||||
IconsDebugColor=toolBarItem
|
||||
IconsNavigationArrowsColor=ff3dabe6
|
||||
IconsBuildHammerHandleColor=ffc26b14
|
||||
IconsBuildHammerHeadColor=ff868687
|
||||
IconsModeWelcomeActiveColor=ff5caa15
|
||||
IconsModeEditActiveColor=ff6a6add
|
||||
IconsModeDesignActiveColor=ffbb6000
|
||||
IconsModeDebugActiveColor=ff6a6add
|
||||
IconsModeProjectActiveColor=ff5caa15
|
||||
IconsModeAnalyzeActiveColor=ff43adee
|
||||
IconsModeHelpActiveColor=fffaa838
|
||||
IconsCodeModelKeywordColor=ff777777
|
||||
IconsCodeModelClassColor=ffc0b550
|
||||
IconsCodeModelStructColor=ff53b053
|
||||
IconsCodeModelFunctionColor=ffd34373
|
||||
IconsCodeModelVariableColor=ff2bbbcc
|
||||
IconsCodeModelEnumColor=ffc0b550
|
||||
IconsCodeModelMacroColor=ff476ba0
|
||||
IconsCodeModelAttributeColor=ff316511
|
||||
IconsCodeModelUniformColor=ff994899
|
||||
IconsCodeModelVaryingColor=ffa08833
|
||||
IconsCodeModelOverlayBackgroundColor=70ffffff
|
||||
IconsCodeModelOverlayForegroundColor=ff232425
|
||||
InfoBarBackground=ffffffe1
|
||||
InfoBarText=text
|
||||
MenuBarEmptyAreaBackgroundColor=shadowBackground
|
||||
MenuBarItemBackgroundColor=shadowBackground
|
||||
MenuBarItemTextColorDisabled=textDisabled
|
||||
MenuBarItemTextColorNormal=text
|
||||
MenuItemTextColorDisabled=textDisabled
|
||||
MenuItemTextColorNormal=text
|
||||
MiniProjectTargetSelectorBackgroundColor=shadowBackground
|
||||
MiniProjectTargetSelectorBorderColor=shadowBackground
|
||||
MiniProjectTargetSelectorSummaryBackgroundColor=shadowBackground
|
||||
MiniProjectTargetSelectorTextColor=fancyBarsNormalTextColor
|
||||
PanelStatusBarBackgroundColor=shadowBackground
|
||||
PanelsWidgetSeparatorLineColor=000000
|
||||
PanelTextColorDark=text
|
||||
PanelTextColorMid=ff666666
|
||||
PanelTextColorLight=fancyBarsNormalTextColor
|
||||
ProgressBarColorError=error
|
||||
ProgressBarColorFinished=run_success
|
||||
ProgressBarColorNormal=ff888888
|
||||
ProgressBarTitleColor=fancyBarsBoldTextColor
|
||||
ProgressBarBackgroundColor=28000000
|
||||
SplitterColor=splitter
|
||||
TextColorDisabled=textDisabled
|
||||
TextColorError=ffff4040
|
||||
TextColorHighlight=ffff0000
|
||||
TextColorHighlightBackground=ffef0b
|
||||
TextColorLink=ff007af4
|
||||
TextColorLinkVisited=ffa57aff
|
||||
TextColorNormal=text
|
||||
ToggleButtonBackgroundColor=shadowBackground
|
||||
ToolBarBackgroundColor=shadowBackground
|
||||
TreeViewArrowColorNormal=hoverBackground
|
||||
TreeViewArrowColorSelected=text
|
||||
|
||||
OutputPanes_DebugTextColor=text
|
||||
OutputPanes_ErrorMessageTextColor=ffaa0000
|
||||
OutputPanes_MessageOutput=ff0000aa
|
||||
OutputPanes_NormalMessageTextColor=ff0000aa
|
||||
OutputPanes_StdErrTextColor=ffaa0000
|
||||
OutputPanes_StdOutTextColor=ff000000
|
||||
OutputPanes_WarningMessageTextColor=ff808000
|
||||
OutputPanes_TestPassTextColor=ff009900
|
||||
OutputPanes_TestFailTextColor=ffa00000
|
||||
OutputPanes_TestXFailTextColor=ff28f028
|
||||
OutputPanes_TestXPassTextColor=fff02828
|
||||
OutputPanes_TestSkipTextColor=ff787878
|
||||
OutputPanes_TestWarnTextColor=ffd0bb00
|
||||
OutputPanes_TestFatalTextColor=ff640000
|
||||
OutputPanes_TestDebugTextColor=ff329696
|
||||
OutputPaneButtonFlashColor=ffff0000
|
||||
OutputPaneToggleButtonTextColorChecked=fancyBarsNormalTextColor
|
||||
OutputPaneToggleButtonTextColorUnchecked=fancyBarsNormalTextColor
|
||||
|
||||
Debugger_LogWindow_LogInput=ff00acac
|
||||
Debugger_LogWindow_LogStatus=ff00875a
|
||||
Debugger_LogWindow_LogTime=ffbf0303
|
||||
|
||||
Debugger_WatchItem_ValueNormal=text
|
||||
Debugger_WatchItem_ValueInvalid=textDisabled
|
||||
Debugger_WatchItem_ValueChanged=ffbf0303
|
||||
|
||||
Debugger_Breakpoint_TextMarkColor=ffff4040
|
||||
|
||||
Welcome_TextColor=ff000000
|
||||
Welcome_ForegroundPrimaryColor=ff404244
|
||||
Welcome_ForegroundSecondaryColor=ff727476
|
||||
Welcome_BackgroundColor=normalBackground
|
||||
Welcome_ButtonBackgroundColor=normalBackground
|
||||
Welcome_DividerColor=ffd6d6d6
|
||||
Welcome_HoverColor=fff6f6f6
|
||||
Welcome_LinkColor=ff5caa15
|
||||
Welcome_DisabledLinkColor=textDisabled
|
||||
|
||||
Timeline_TextColor=text
|
||||
Timeline_BackgroundColor1=normalBackground
|
||||
Timeline_BackgroundColor2=fff6f6f6
|
||||
Timeline_DividerColor=ffd6d6d6
|
||||
Timeline_HighlightColor=ff3099dc
|
||||
Timeline_PanelBackgroundColor=ffd6d6d6
|
||||
Timeline_PanelHeaderColor=ff888888
|
||||
Timeline_HandleColor=ff888888
|
||||
Timeline_RangeColor=selectedBackground
|
||||
|
||||
VcsBase_FileStatusUnknown_TextColor=ff000000
|
||||
VcsBase_FileAdded_TextColor=ff00aa00
|
||||
VcsBase_FileModified_TextColor=ff0000ee
|
||||
VcsBase_FileDeleted_TextColor=ff800000
|
||||
VcsBase_FileRenamed_TextColor=ffd77d00
|
||||
VcsBase_FileUnmerged_TextColor=ffee0000
|
||||
|
||||
Bookmarks_TextMarkColor=ffa0a0ff
|
||||
|
||||
TextEditor_SearchResult_ScrollBarColor=ff00c000
|
||||
TextEditor_CurrentLine_ScrollBarColor=ff404040
|
||||
|
||||
ProjectExplorer_TaskError_TextMarkColor=error
|
||||
ProjectExplorer_TaskWarn_TextMarkColor=warning
|
||||
|
||||
CodeModel_Error_TextMarkColor=error
|
||||
CodeModel_Warning_TextMarkColor=warning
|
||||
|
||||
;new colors
|
||||
QmlDesigner_BackgroundColor=qmlDesignerButtonColor
|
||||
QmlDesigner_HighlightColor=ff0492c9
|
||||
QmlDesigner_FormEditorSelectionColor=ffd3299a
|
||||
QmlDesigner_FormEditorForegroundColor=ffffffff
|
||||
QmlDesigner_BackgroundColorDarkAlternate=qmlDesignerButtonColor
|
||||
QmlDesigner_BackgroundColorDarker=fff5f5f5
|
||||
QmlDesigner_BorderColor=splitter
|
||||
QmlDesigner_ButtonColor=f0f0f0
|
||||
QmlDesigner_TabDark=ff63676b
|
||||
QmlDesigner_TabLight=ffffffff
|
||||
QmlDesigner_FormeditorBackgroundColor=qmlDesignerButtonColor
|
||||
QmlDesigner_AlternateBackgroundColor=qmlDesignerButtonColor
|
||||
|
||||
;extra_new_colors
|
||||
QmlDesigner_FormeditorBackgroundColor=ff000000
|
||||
QmlDesigner_AlternateBackgroundColor=ffc14fc1
|
||||
QmlDesigner_ScrollBarHandleColor=ff8b8e8f
|
||||
|
||||
;palette colors
|
||||
|
||||
PaletteWindow=selectedBackground
|
||||
PaletteWindowText=text
|
||||
PaletteBase=normalBackground
|
||||
PaletteAlternateBase=alternateBackground
|
||||
PaletteButton=selectedBackground
|
||||
PaletteBrightText=selectedBackgroundText
|
||||
PaletteText=text
|
||||
PaletteButtonText=text
|
||||
PaletteButtonTextDisabled=textDisabled
|
||||
PaletteToolTipBase=selectedBackground
|
||||
|
||||
PaletteHighlight=ff0492c9
|
||||
|
||||
PaletteDark=shadowBackground
|
||||
PaletteHighlightedText=ffffffff
|
||||
PaletteToolTipText=text
|
||||
PaletteLink=textColorLink
|
||||
PaletteLinkVisited=textColorLinkVisited
|
||||
PaletteWindowDisabled=backgroundColorDisabled
|
||||
PaletteWindowTextDisabled=textDisabled
|
||||
PaletteBaseDisabled=backgroundColorDisabled
|
||||
PaletteTextDisabled=textDisabled
|
||||
|
||||
[Flags]
|
||||
ComboBoxDrawTextShadow=false
|
||||
DerivePaletteFromTheme=true
|
||||
DrawIndicatorBranch=true
|
||||
DrawSearchResultWidgetFrame=false
|
||||
DrawTargetSelectorBottom=false
|
||||
DrawToolBarHighlights=false
|
||||
DrawToolBarBorders=true
|
||||
ApplyThemePaletteGlobally=true
|
||||
FlatToolBars=true
|
||||
FlatSideBarIcons=true
|
||||
FlatProjectsMode=false
|
||||
FlatMenuBar=true
|
||||
ToolBarIconShadow=false
|
||||
WindowColorAsBase=false
|
||||
DarkUserInterface=false
|
||||
|
||||
[Gradients]
|
||||
DetailsWidgetHeaderGradient\1\color=00000000
|
||||
DetailsWidgetHeaderGradient\1\pos=1
|
||||
DetailsWidgetHeaderGradient\size=1
|
||||
@@ -4,85 +4,65 @@ PreferredStyles=Fusion
|
||||
DefaultTextEditorColorScheme=creator-dark.xml
|
||||
|
||||
[Palette]
|
||||
|
||||
;color for the mode toolbar, un-selected tabs, toolbars for each panel, scroll bar backgrounds and active tab panels, text for the non selected tabs.
|
||||
;shadowBackground=ff404244
|
||||
shadowBackground=ff191919
|
||||
|
||||
|
||||
;main text color
|
||||
;text=ffd0d0d0
|
||||
text=ffdadada
|
||||
|
||||
;disabled text
|
||||
textDisabled=60a4a6a8
|
||||
|
||||
;background for selected text
|
||||
selectedBackgroundText=aa1f75cc
|
||||
|
||||
;icons, spinbox ticks,
|
||||
;toolBarItem=b6fbfdff
|
||||
toolBarItem=ffb3b3b3
|
||||
|
||||
|
||||
; all disabled icons and the separators between icons
|
||||
;toolBarItemDisabled=60a4a6a8
|
||||
toolBarItemDisabled=ff686868
|
||||
|
||||
|
||||
|
||||
;text for dropdown selectors in the panel menus, file selection and text for all pop out panels such as issues, search results, etc.
|
||||
fancyBarsNormalTextColor=ffd0d0d0
|
||||
;fancyBarsNormalTextColor=ffd3299a
|
||||
|
||||
|
||||
|
||||
;text for the mode sidebar menu.
|
||||
fancyBarsBoldTextColor=b6fbfdff
|
||||
;fancyBarsBoldTextColor=b6d3299a
|
||||
|
||||
|
||||
|
||||
;also the color for the scroll bar handles and inside rectangle for the Type text box, and the working area timeline ruler.
|
||||
;also the background selection rectangle for icons and selection highlight for bounding box.
|
||||
;hoverBackground=22ffffff
|
||||
hoverBackground=ff404244
|
||||
|
||||
|
||||
|
||||
;blended background color for controls 1 spinboxes, background selection square for snapping modes, publish as alias icon.
|
||||
;color for filter background and overwrite width and height boxes
|
||||
;selectedBackground=66000000
|
||||
selectedBackground=ff111111
|
||||
|
||||
|
||||
;background for default "open a document" screen in the edit mode,
|
||||
;normalBackground=ff2E2F30
|
||||
normalBackground=ff262728
|
||||
|
||||
|
||||
|
||||
;not used anywhere i can see
|
||||
alternateBackground=ff353637
|
||||
|
||||
|
||||
error=ffdf4f4f
|
||||
warning=ffecbc1c
|
||||
|
||||
|
||||
;dividng lines between all the panels
|
||||
;splitter=ff06080A
|
||||
splitter=ff474747
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
textColorLink=ff007af4
|
||||
textColorLinkVisited=ffa57aff
|
||||
backgroundColorDisabled=ff444444
|
||||
|
||||
|
||||
|
||||
|
||||
[Colors]
|
||||
;DS controls theme START
|
||||
DScontrolBackground=ff242424
|
||||
DScontrolOutline=ff404040
|
||||
DStextColor=ffffffff
|
||||
DSdisabledTextColor=ff909090
|
||||
DSpanelBackground=ff2a2a2a
|
||||
DShoverHighlight=ff313131
|
||||
DScolumnBackground=ff363636
|
||||
DSfocusEdit=ff444444
|
||||
DSfocusDrag=ff565656
|
||||
DScontrolBackgroundPressed=ff606060
|
||||
DScontrolBackgroundChecked=ff565656
|
||||
DSinteraction=ff0492c9
|
||||
DSsliderActiveTrack=ff606060
|
||||
DSsliderInactiveTrack=ff404040
|
||||
DSsliderHandle=ff505050
|
||||
DSsliderActiveTrackHover=ff7f7f7f
|
||||
DSsliderInactiveTrackHover=ff505050
|
||||
DSsliderHandleHover=ff606060
|
||||
DSsliderActiveTrackFocus=ffaaaaaa
|
||||
DSsliderInactiveTrackFocus=ff606060
|
||||
DSsliderHandleFocus=ff0492c9
|
||||
DSerrorColor=ffdf3a3a
|
||||
DScontrolBackgroundDisabled=ff363636
|
||||
DScontrolOutlineDisabled=ff404040
|
||||
DStextColorDisabled=ff606060
|
||||
DStextSelectionColor=ff0492c9
|
||||
DStextSelectedTextColor=ffffffff
|
||||
DSscrollBarTrack=ff404040
|
||||
DSscrollBarHandle=ff505050
|
||||
DScontrolBackgroundInteraction=ff404040
|
||||
DStranslationIndicatorBorder=ff7f7f7f
|
||||
DSsectionHeadBackground=ff191919
|
||||
DSchangedStateText=ff99ccff
|
||||
;DS controls theme END
|
||||
|
||||
BackgroundColorAlternate=alternateBackground
|
||||
BackgroundColorDark=shadowBackground
|
||||
BackgroundColorHover=hoverBackground
|
||||
@@ -267,8 +247,7 @@ QmlDesigner_BackgroundColor=ff4c4e50
|
||||
|
||||
|
||||
; Design View selected items - Navigator Selection, Timeline Property Selection, TImeline bar, property text highlighted
|
||||
QmlDesigner_HighlightColor=ff3f91c4
|
||||
;QmlDesigner_HighlightColor=ffd3299a
|
||||
QmlDesigner_HighlightColor=ff0492c9
|
||||
|
||||
|
||||
|
||||
@@ -314,11 +293,9 @@ QmlDesigner_TabLight=text
|
||||
|
||||
;extra_new_colors
|
||||
|
||||
; color for the form editor background
|
||||
;QmlDesigner_FormeditorBackgroundColor=qmlDesignerButtonColor
|
||||
|
||||
QmlDesigner_FormeditorBackgroundColor=ff000000
|
||||
|
||||
;QmlDesigner_AlternateBackgroundColor=qmlDesignerButtonColor
|
||||
QmlDesigner_AlternateBackgroundColor=ffc14fc1
|
||||
|
||||
QmlDesigner_ScrollBarHandleColor=ff595b5c
|
||||
@@ -361,7 +338,6 @@ PaletteBrightText=ffff3333
|
||||
;PaletteBrightText=ffd3299a
|
||||
|
||||
|
||||
;
|
||||
; text inside dropdown combo boxes, styles, connections.
|
||||
PaletteText=text
|
||||
;PaletteText=ffd3299a
|
||||
@@ -383,7 +359,6 @@ PaletteToolTipBase=selectedBackground
|
||||
|
||||
;the selection highlight on the dropdown combo box in the file selection top menu and connections panel and tab mode selector dropdowns
|
||||
PaletteHighlight=selectedBackgroundText
|
||||
;PaletteHighlight=ffd3299a
|
||||
|
||||
|
||||
; outline of warning in editor mode, underline of "open a document" page in the edit mode
|
||||
|
||||
@@ -26,6 +26,43 @@ backgroundColorDisabled=ff444444
|
||||
qmlDesignerButtonColor=ff4c4e50
|
||||
|
||||
[Colors]
|
||||
|
||||
;DS controls theme START
|
||||
DScontrolBackground=ff404040
|
||||
DScontrolOutline=ff595959
|
||||
DStextColor=ffffffff
|
||||
DSdisabledTextColor=ff909090
|
||||
DSpanelBackground=ff454444
|
||||
DShoverHighlight=ff313131
|
||||
DScolumnBackground=ff363636
|
||||
DSfocusEdit=ff444444
|
||||
DSfocusDrag=ff565656
|
||||
DScontrolBackgroundPressed=ff7a7a7a
|
||||
DScontrolBackgroundChecked=ff565656
|
||||
DSinteraction=ff1d545c
|
||||
DSsliderActiveTrack=ff7a7a7a
|
||||
DSsliderInactiveTrack=ff4d4d4d
|
||||
DSsliderHandle=ff505050
|
||||
DSsliderActiveTrackHover=ff7f7f7f
|
||||
DSsliderInactiveTrackHover=ff505050
|
||||
DSsliderHandleHover=ff7a7a7a
|
||||
DSsliderActiveTrackFocus=ffaaaaaa
|
||||
DSsliderInactiveTrackFocus=ff7a7a7a
|
||||
DSsliderHandleFocus=ff1d545c
|
||||
DSerrorColor=ffdf3a3a
|
||||
DScontrolBackgroundDisabled=ff363636
|
||||
DScontrolOutlineDisabled=ff4d4d4d
|
||||
DStextColorDisabled=ff7a7a7a
|
||||
DStextSelectionColor=ff1d545c
|
||||
DStextSelectedTextColor=ffffffff
|
||||
DSscrollBarTrack=ff4d4d4d
|
||||
DSscrollBarHandle=ff505050
|
||||
DScontrolBackgroundInteraction=ff4d4d4d
|
||||
DStranslationIndicatorBorder=ff7f7f7f
|
||||
DSsectionHeadBackground=ff424242
|
||||
DSchangedStateText=ff99ccff
|
||||
;DS controls theme END
|
||||
|
||||
BackgroundColorAlternate=alternateBackground
|
||||
BackgroundColorDark=shadowBackground
|
||||
BackgroundColorHover=hoverBackground
|
||||
@@ -202,7 +239,7 @@ CodeModel_Error_TextMarkColor=error
|
||||
CodeModel_Warning_TextMarkColor=warning
|
||||
|
||||
QmlDesigner_BackgroundColor=qmlDesignerButtonColor
|
||||
QmlDesigner_HighlightColor=ff3f91c4
|
||||
QmlDesigner_HighlightColor=ff1d545c
|
||||
QmlDesigner_FormEditorSelectionColor=ff4ba2ff
|
||||
QmlDesigner_FormEditorForegroundColor=ffffffff
|
||||
QmlDesigner_BackgroundColorDarkAlternate=qmlDesignerButtonColor
|
||||
|
||||
@@ -22,6 +22,43 @@ warning=ffecbc1c
|
||||
qmlDesignerButtonColor=fff8f8f8
|
||||
|
||||
[Colors]
|
||||
|
||||
;DS controls theme START
|
||||
DScontrolBackground=ffffffff
|
||||
DScontrolOutline=ff777777
|
||||
DStextColor=ff242424
|
||||
DSdisabledTextColor=ff505050
|
||||
DSpanelBackground=fff2f2f2
|
||||
DShoverHighlight=ffe6e6e6
|
||||
DScolumnBackground=ffaaaaaa
|
||||
DSfocusEdit=ffeaeaea
|
||||
DSfocusDrag=ffd1d1d1
|
||||
DScontrolBackgroundPressed=ff505050
|
||||
DScontrolBackgroundChecked=ff5e5e5e
|
||||
DSinteraction=ff0492c9
|
||||
DSsliderActiveTrack=ff363636
|
||||
DSsliderInactiveTrack=ffe6e6e6
|
||||
DSsliderHandle=ff777777
|
||||
DSsliderActiveTrackHover=ff7f7f7f
|
||||
DSsliderInactiveTrackHover=ff5e5e5e
|
||||
DSsliderHandleHover=ff505050
|
||||
DSsliderActiveTrackFocus=ff363636
|
||||
DSsliderInactiveTrackFocus=ff505050
|
||||
DSsliderHandleFocus=ff0492c9
|
||||
DSerrorColor=ffdf3a3a
|
||||
DScontrolBackgroundDisabled=ffaaaaaa
|
||||
DScontrolOutlineDisabled=ff777777
|
||||
DStextColorDisabled=ff505050
|
||||
DStextSelectionColor=ff0492c9
|
||||
DStextSelectedTextColor=ffffffff
|
||||
DSscrollBarTrack=ff777777
|
||||
DSscrollBarHandle=ff505050
|
||||
DScontrolBackgroundInteraction=ff777777
|
||||
DStranslationIndicatorBorder=ffebebeb
|
||||
DSsectionHeadBackground=ffebebeb
|
||||
DSchangedStateText=ff99ccff
|
||||
;DS controls theme END
|
||||
|
||||
BackgroundColorAlternate=alternateBackground
|
||||
BackgroundColorDark=shadowBackground
|
||||
BackgroundColorHover=hoverBackground
|
||||
|
||||
@@ -20,6 +20,43 @@ splitter=ff313131
|
||||
qmlDesignerButtonColor=ff4c4e50
|
||||
|
||||
[Colors]
|
||||
|
||||
;DS controls theme START
|
||||
DScontrolBackground=ff404040
|
||||
DScontrolOutline=ff595959
|
||||
DStextColor=ffffffff
|
||||
DSdisabledTextColor=ff909090
|
||||
DSpanelBackground=ff454444
|
||||
DShoverHighlight=ff313131
|
||||
DScolumnBackground=ff363636
|
||||
DSfocusEdit=ff444444
|
||||
DSfocusDrag=ff565656
|
||||
DScontrolBackgroundPressed=ff7a7a7a
|
||||
DScontrolBackgroundChecked=ff565656
|
||||
DSinteraction=ff3f91c4
|
||||
DSsliderActiveTrack=ff7a7a7a
|
||||
DSsliderInactiveTrack=ff4d4d4d
|
||||
DSsliderHandle=ff505050
|
||||
DSsliderActiveTrackHover=ff7f7f7f
|
||||
DSsliderInactiveTrackHover=ff505050
|
||||
DSsliderHandleHover=ff7a7a7a
|
||||
DSsliderActiveTrackFocus=ffaaaaaa
|
||||
DSsliderInactiveTrackFocus=ff7a7a7a
|
||||
DSsliderHandleFocus=ff3f91c4
|
||||
DSerrorColor=ffdf3a3a
|
||||
DScontrolBackgroundDisabled=ff363636
|
||||
DScontrolOutlineDisabled=ff4d4d4d
|
||||
DStextColorDisabled=ff7a7a7a
|
||||
DStextSelectionColor=ff3f91c4
|
||||
DStextSelectedTextColor=ffffffff
|
||||
DSscrollBarTrack=ff4d4d4d
|
||||
DSscrollBarHandle=ff505050
|
||||
DScontrolBackgroundInteraction=ff4d4d4d
|
||||
DStranslationIndicatorBorder=ff7f7f7f
|
||||
DSsectionHeadBackground=ff424242
|
||||
DSchangedStateText=ff99ccff
|
||||
;DS controls theme END
|
||||
|
||||
BackgroundColorAlternate=alternateBackground
|
||||
BackgroundColorDark=shadowBackground
|
||||
BackgroundColorHover=hoverBackground
|
||||
|
||||
@@ -44,168 +44,6 @@ else()
|
||||
VERBATIM)
|
||||
endif()
|
||||
|
||||
function(_extract_ts_data_from_targets outprefix)
|
||||
set(_sources "")
|
||||
set(_includes "")
|
||||
|
||||
set(_targets "${ARGN}")
|
||||
list(REMOVE_DUPLICATES _targets)
|
||||
|
||||
foreach(t IN ITEMS ${_targets})
|
||||
if (TARGET "${t}")
|
||||
get_target_property(_skip_translation "${t}" QT_SKIP_TRANSLATION)
|
||||
get_target_property(_source_dir "${t}" SOURCE_DIR)
|
||||
get_target_property(_interface_include_dirs "${t}" INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property(_include_dirs "${t}" INCLUDE_DIRECTORIES)
|
||||
get_target_property(_source_files "${t}" SOURCES)
|
||||
get_target_property(_extra_translations "${t}" QT_EXTRA_TRANSLATIONS)
|
||||
|
||||
if (NOT _skip_translation)
|
||||
if(_include_dirs)
|
||||
list(APPEND _includes ${_include_dirs})
|
||||
endif()
|
||||
|
||||
if(_interface_include_dirs)
|
||||
list(APPEND _interface_includes ${_include_dirs})
|
||||
endif()
|
||||
|
||||
set(_target_sources "")
|
||||
if(_source_files)
|
||||
list(APPEND _target_sources ${_source_files})
|
||||
endif()
|
||||
if(_extra_translations)
|
||||
list(APPEND _target_sources ${_extra_translations})
|
||||
endif()
|
||||
foreach(s IN ITEMS ${_target_sources})
|
||||
get_filename_component(_abs_source "${s}" ABSOLUTE BASE_DIR "${_source_dir}")
|
||||
list(APPEND _sources "${_abs_source}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set("${outprefix}_sources" "${_sources}" PARENT_SCOPE)
|
||||
set("${outprefix}_includes" "${_includes}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_create_ts_custom_target name)
|
||||
cmake_parse_arguments(_arg "" "FILE_PREFIX;TS_TARGET_PREFIX" "LANGUAGES;SOURCES;INCLUDES" ${ARGN})
|
||||
if (_arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Invalid parameters to _create_ts_custom_target: ${_arg_UNPARSED_ARGUMENTS}.")
|
||||
endif()
|
||||
|
||||
if (NOT _arg_TS_TARGET_PREFIX)
|
||||
set(_arg_TS_TARGET_PREFIX "ts_")
|
||||
endif()
|
||||
|
||||
set(ts_languages ${_arg_LANGUAGES})
|
||||
if (NOT ts_languages)
|
||||
set(ts_languages "${name}")
|
||||
endif()
|
||||
|
||||
foreach(l IN ITEMS ${ts_languages})
|
||||
list(APPEND ts_files "${CMAKE_CURRENT_SOURCE_DIR}/${_arg_FILE_PREFIX}_${l}.ts")
|
||||
endforeach()
|
||||
|
||||
set(_sources "${_arg_SOURCES}")
|
||||
list(SORT _sources)
|
||||
|
||||
set(_includes "${_arg_INCLUDES}")
|
||||
|
||||
list(REMOVE_DUPLICATES _sources)
|
||||
list(REMOVE_DUPLICATES _includes)
|
||||
|
||||
list(REMOVE_ITEM _sources "")
|
||||
list(REMOVE_ITEM _includes "")
|
||||
|
||||
set(_prepended_includes)
|
||||
foreach(include IN LISTS _includes)
|
||||
list(APPEND _prepended_includes "-I${include}")
|
||||
endforeach()
|
||||
set(_includes "${_prepended_includes}")
|
||||
|
||||
string(REPLACE ";" "\n" _sources_str "${_sources}")
|
||||
string(REPLACE ";" "\n" _includes_str "${_includes}")
|
||||
|
||||
set(ts_file_list "${CMAKE_CURRENT_BINARY_DIR}/ts_${name}.lst")
|
||||
file(WRITE "${ts_file_list}" "${_sources_str}\n${_includes_str}\n")
|
||||
|
||||
add_custom_target("${_arg_TS_TARGET_PREFIX}${name}"
|
||||
COMMAND Qt5::lupdate -locations relative -no-ui-lines -no-sort "@${ts_file_list}" -ts ${ts_files}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Generate .ts files"
|
||||
DEPENDS ${_sources}
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
|
||||
function(add_translation_targets file_prefix)
|
||||
if (NOT TARGET Qt5::lrelease)
|
||||
# No Qt translation tools were found: Skip this directory
|
||||
message(WARNING "No Qt translation tools found, skipping translation targets. Add find_package(Qt5 COMPONENTS LinguistTools) to CMake to enable.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
cmake_parse_arguments(_arg ""
|
||||
"OUTPUT_DIRECTORY;INSTALL_DESTINATION;TS_TARGET_PREFIX;QM_TARGET_PREFIX;ALL_QM_TARGET"
|
||||
"LANGUAGES;TARGETS;SOURCES;INCLUDES" ${ARGN})
|
||||
if (_arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Invalid parameters to add_translation_targets: ${_arg_UNPARSED_ARGUMENTS}.")
|
||||
endif()
|
||||
|
||||
if (NOT _arg_TS_TARGET_PREFIX)
|
||||
set(_arg_TS_TARGET_PREFIX "ts_")
|
||||
endif()
|
||||
|
||||
if (NOT _arg_QM_TARGET_PREFIX)
|
||||
set(_arg_QM_TARGET_PREFIX "generate_qm_file_")
|
||||
endif()
|
||||
|
||||
if (NOT _arg_ALL_QM_TARGET)
|
||||
set(_arg_ALL_QM_TARGET "generate_qm_files")
|
||||
endif()
|
||||
|
||||
if (NOT _arg_OUTPUT_DIRECTORY)
|
||||
set(_arg_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
if (NOT _arg_INSTALL_DESTINATION)
|
||||
message(FATAL_ERROR "Please provide a INSTALL_DESTINATION to add_translation_targets")
|
||||
endif()
|
||||
|
||||
_extract_ts_data_from_targets(_to_process "${_arg_TARGETS}")
|
||||
|
||||
_create_ts_custom_target(untranslated
|
||||
FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}"
|
||||
SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES})
|
||||
|
||||
if (NOT TARGET "${_arg_ALL_QM_TARGET}")
|
||||
add_custom_target("${_arg_ALL_QM_TARGET}" ALL COMMENT "Generate .qm-files")
|
||||
endif()
|
||||
|
||||
foreach(l IN ITEMS ${_arg_LANGUAGES})
|
||||
set(_ts_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_prefix}_${l}.ts")
|
||||
set(_qm_file "${_arg_OUTPUT_DIRECTORY}/${file_prefix}_${l}.qm")
|
||||
|
||||
_create_ts_custom_target("${l}" FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}"
|
||||
SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES})
|
||||
|
||||
add_custom_command(OUTPUT "${_qm_file}"
|
||||
COMMAND Qt5::lrelease "${_ts_file}" -qm "${_qm_file}"
|
||||
MAIN_DEPENDENCY "${_ts_file}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Generate .qm file"
|
||||
VERBATIM)
|
||||
add_custom_target("${_arg_QM_TARGET_PREFIX}${l}" DEPENDS "${_qm_file}")
|
||||
install(FILES "${_qm_file}" DESTINATION ${_arg_INSTALL_DESTINATION})
|
||||
|
||||
add_dependencies("${_arg_ALL_QM_TARGET}" "${_arg_QM_TARGET_PREFIX}${l}")
|
||||
endforeach()
|
||||
|
||||
_create_ts_custom_target(all LANGUAGES ${_arg_LANGUAGES} FILE_PREFIX "${file_prefix}"
|
||||
SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES})
|
||||
endfunction()
|
||||
|
||||
### collect targets to include in documentation:
|
||||
add_translation_targets(qtcreator
|
||||
LANGUAGES ${languages}
|
||||
OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${IDE_DATA_PATH}/translations"
|
||||
|
||||
@@ -49,6 +49,10 @@ if (NOT DEFINED add_qtc_plugin)
|
||||
include(\${CMAKE_CURRENT_LIST_DIR}/QtCreatorAPI.cmake)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED add_translation_targets)
|
||||
include(\${CMAKE_CURRENT_LIST_DIR}/QtCreatorTranslations.cmake)
|
||||
endif()
|
||||
|
||||
if (NOT TARGET QtCreator::Core)
|
||||
include(\${CMAKE_CURRENT_LIST_DIR}/QtCreatorTargets.cmake)
|
||||
endif()
|
||||
@@ -61,6 +65,7 @@ export(EXPORT QtCreator
|
||||
|
||||
file(COPY
|
||||
${PROJECT_SOURCE_DIR}/cmake/QtCreatorIDEBranding.cmake
|
||||
${PROJECT_SOURCE_DIR}/cmake/QtCreatorTranslations.cmake
|
||||
${PROJECT_SOURCE_DIR}/cmake/QtCreatorAPI.cmake
|
||||
DESTINATION ${CMAKE_BINARY_DIR}/cmake
|
||||
)
|
||||
@@ -69,6 +74,7 @@ file(COPY
|
||||
install(
|
||||
FILES
|
||||
${PROJECT_SOURCE_DIR}/cmake/QtCreatorIDEBranding.cmake
|
||||
${PROJECT_SOURCE_DIR}/cmake/QtCreatorTranslations.cmake
|
||||
${PROJECT_SOURCE_DIR}/cmake/QtCreatorAPI.cmake
|
||||
${CMAKE_BINARY_DIR}/cmake/QtCreatorConfig.cmake
|
||||
DESTINATION lib/cmake/QtCreator
|
||||
|
||||
@@ -153,13 +153,10 @@ add_custom_target(copy_clang_to_builddir ALL
|
||||
|
||||
# For the developer build directory
|
||||
add_custom_command(TARGET copy_clang_to_builddir POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-E make_directory
|
||||
"${PROJECT_BINARY_DIR}/${IDE_LIBEXEC_PATH}/clang/lib/clang/${CLANG_VERSION}"
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-E copy_directory
|
||||
"${LLVM_LIBRARY_DIR}/clang/${CLANG_VERSION}/include"
|
||||
"${PROJECT_BINARY_DIR}/${IDE_LIBEXEC_PATH}/clang/lib/clang/${CLANG_VERSION}"
|
||||
"${PROJECT_BINARY_DIR}/${IDE_LIBEXEC_PATH}/clang/lib/clang/${CLANG_VERSION}/include"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
|
||||
@@ -872,7 +872,6 @@ int Lexer::scanString(ScanStringMode mode)
|
||||
{
|
||||
QChar quote = (mode == TemplateContinuation) ? QChar(TemplateHead) : QChar(mode);
|
||||
bool multilineStringLiteral = false;
|
||||
bool escaped = false;
|
||||
|
||||
const QChar *startCode = _codePtr - 1;
|
||||
// in case we just parsed a \r, we need to reset this flag to get things working
|
||||
@@ -881,23 +880,16 @@ int Lexer::scanString(ScanStringMode mode)
|
||||
|
||||
if (_engine) {
|
||||
while (_codePtr <= _endPtr) {
|
||||
if (escaped) { // former char started an escape sequence
|
||||
escaped = false;
|
||||
_char = *_codePtr++;
|
||||
++_currentColumnNumber;
|
||||
continue;
|
||||
}
|
||||
if (isLineTerminator()) {
|
||||
if ((quote == QLatin1Char('`') || qmlMode()))
|
||||
if ((quote == QLatin1Char('`') || qmlMode())) {
|
||||
--_currentLineNumber;
|
||||
break;
|
||||
}
|
||||
_errorCode = IllegalCharacter;
|
||||
_errorMessage = QCoreApplication::translate("QmlParser", "Stray newline in string literal");
|
||||
return T_ERROR;
|
||||
} else if (_char == QLatin1Char('\\')) {
|
||||
if (mode != DoubleQuote && mode != SingleQuote)
|
||||
break;
|
||||
else // otherwise we need to handle an escape sequence
|
||||
escaped = true;
|
||||
break;
|
||||
} else if (_char == '$' && quote == QLatin1Char('`')) {
|
||||
break;
|
||||
} else if (_char == quote) {
|
||||
@@ -923,6 +915,7 @@ int Lexer::scanString(ScanStringMode mode)
|
||||
|
||||
// rewind by one char, so things gets scanned correctly
|
||||
--_codePtr;
|
||||
--_currentColumnNumber;
|
||||
|
||||
_validTokenText = true;
|
||||
_tokenText = QString(startCode, _codePtr - startCode);
|
||||
|
||||