diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..9dbb2391 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [uwerat] diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 632d8313..01734143 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -104,6 +104,7 @@ jobs: cc: "gcc", cxx: "g++", archiver: "7z a", + # generators: "Ninja Multi-Config", generators: "Ninja", env: { DISPLAY: ":1" }, cmake: @@ -340,7 +341,7 @@ jobs: version: "6.5.0" target: "desktop" install-deps: "true" - modules: "qtwebengine" + modules: "qtwebengine qtshadertools" cached: ${{ steps.cache-qt-6-2.outputs.cache-hit }} setup-python: "false" tools: "" @@ -431,22 +432,22 @@ jobs: killall iotdashboard killall Xvfb - #- name: Configure ( CMake Integration Test ) - # shell: bash - # run: | - # mkdir qskinny_build_test - # cmake \ - # -S qskinny_source/examples/iotdashboard_smoketest \ - # -B qskinny_build_test \ - # -G "${{ matrix.config.generators }}" \ - # -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \ - # -DCMAKE_PREFIX_PATH:PATH="${{ matrix.config.cmake.qtprefixpath }}" \ - # -D${{ matrix.config.cmake.qtdirkey }}:PATH="${{ matrix.config.cmake.qtdirvalue }}" \ - # -DQSkinny_DIR:PATH=$GITHUB_WORKSPACE/qskinny_install/lib/cmake/QSkinny -# - #- name: Build ( CMake Integration Test ) - # shell: bash - # run: cmake --build qskinny_build_test --config ${{ matrix.config.build_type }} + - name: Configure ( CMake Integration Test ) + shell: bash + run: | + mkdir qskinny_build_test + cmake \ + -S qskinny_source/examples/iotdashboard_smoketest \ + -B qskinny_build_test \ + -G "${{ matrix.config.generators }}" \ + -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \ + -DCMAKE_PREFIX_PATH:PATH="${{ matrix.config.cmake.qtprefixpath }}" \ + -D${{ matrix.config.cmake.qtdirkey }}:PATH="${{ matrix.config.cmake.qtdirvalue }}" \ + -DQSkinny_DIR:PATH=$GITHUB_WORKSPACE/qskinny_install/lib/cmake/QSkinny + + - name: Build ( CMake Integration Test ) + shell: bash + run: cmake --build qskinny_build_test --config ${{ matrix.config.build_type }} # - name: Pack # shell: bash diff --git a/.gitignore b/.gitignore index 32698b35..5369b42e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ Makefile .qmake.stash .uuid +build obj moc rcc @@ -15,3 +16,5 @@ qskinny.pro.user html tags .vscode +.cache +compile_commands.json \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e45367a..539979e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ @@ -7,14 +7,14 @@ cmake_minimum_required(VERSION 3.16.3) macro(qsk_setup_options) - option(BUILD_PEDANTIC "Enable pedantic compile flags ( only GNU/CLANG )" OFF) - option(BUILD_QSKDLL "Build libs ( not plugins ) as shared library" ON) - option(BUILD_QML_EXPORT "Exporting QSkinny to QML" ON) + option(BUILD_PEDANTIC "Enable pedantic compile flags ( only GNU/CLANG )" OFF) + option(BUILD_QSKDLL "Build libs ( not plugins ) as shared library" ON) + option(BUILD_QML_EXPORT "Exporting QSkinny to QML" ON) - option(BUILD_TOOLS "Build qskinny tools" ON) + option(BUILD_TOOLS "Build qskinny tools" ON) option(BUILD_INPUTCONTEXT "Build virtual keyboard support" ON) - option(BUILD_EXAMPLES "Build qskinny examples" ON) - option(BUILD_PLAYGROUND "Build qskinny playground" ON) + option(BUILD_EXAMPLES "Build qskinny examples" ON) + option(BUILD_PLAYGROUND "Build qskinny playground" ON) # we actually want to use cmake_dependent_option - minimum cmake version ?? @@ -62,8 +62,18 @@ macro(qsk_setup_build) endmacro() macro(qsk_setup_install) - # we have to provide and install a QSkinnyConfig.cmake - # TODO ... + + # package vars + set(PACKAGE_NAME ${PROJECT_NAME}) + set(PACKAGE_VERSION ${CMAKE_PROJECT_VERSION}) + set(PACKAGE_NAMESPACE Qsk::) + set(PACKAGE_LOCATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) + + # install paths for headers and libraries + string(TOLOWER "${PROJECT_NAME}" PACKAGE_DIR) + set(QSK_INSTALL_HEADERS ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_DIR}) + set(QSK_INSTALL_LIBS ${CMAKE_INSTALL_LIBDIR}/${PACKAGE_DIR}) + endmacro() ############################################################################ @@ -75,12 +85,15 @@ project(QSkinny HOMEPAGE_URL "https://github.com/uwerat/qskinny" VERSION 0.8.0) +set(QSK_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}) +set(QSK_CMAKE_DIR ${QSK_SOURCE_DIR}/cmake) + qsk_setup_options() include(GNUInstallDirs) # loading helper macros -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +list(APPEND CMAKE_MODULE_PATH ${QSK_CMAKE_DIR}) include("QskConfigMacros") include("QskFindMacros") @@ -93,6 +106,31 @@ qsk_setup_install() add_subdirectory(src) add_subdirectory(skins) +include(CMakePackageConfigHelpers) + +# write QSkinnyConfigVersion.cmake file for cmake import +write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}ConfigVersion.cmake + VERSION ${PACKAGE_VERSION} + COMPATIBILITY AnyNewerVersion) + +# Copy QSkinnyConfig.cmake to build dir +configure_file(${QSK_CMAKE_DIR}/${PACKAGE_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}Config.cmake + COPYONLY) + +# install QSkinnyConfig.cmake and QSkinnyConfigVersion.cmake +# file to lib/cmake/QSkinny directory +install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}ConfigVersion.cmake + DESTINATION + ${PACKAGE_LOCATION} + COMPONENT + Devel) + +# Build other libraries if(BUILD_QML_EXPORT) add_subdirectory(qmlexport) endif() diff --git a/COPYING b/COPYING deleted file mode 100644 index 797a2daf..00000000 --- a/COPYING +++ /dev/null @@ -1,9 +0,0 @@ -Copyright (C) 2016 Uwe Rathmann - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. 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. - 3. Neither the name of the copyright holder 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 HOLDER 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. diff --git a/LICENSES b/LICENSES new file mode 100644 index 00000000..af85ab72 --- /dev/null +++ b/LICENSES @@ -0,0 +1,21 @@ +Project: QSkinny + +Homepage: https://github.com/uwerat/qskinny +Maintainer: Uwe Rathmann ( uwe@qskinny.org ) + +SPDX-License-Identifier: BSD-3-Clause +Copyright (C) The authors + +3rdparty code: + +a) HCT color system + + Code: https://github.com/material-foundation/material-color-utilities + SPDX-License-Identifier: Apache License 2.0 + Copyright (C) 2021 Google LLC + +b) Cassowary constraint solving algorithm + + Code: https://github.com/nucleic/kiwi + SPDX-License-Identifier: BSD 3-Clause "New" or "Revised" License + Copyright (c) 2013, Nucleic Development Team diff --git a/README.md b/README.md index fe3abc94..22db8c1f 100644 --- a/README.md +++ b/README.md @@ -22,26 +22,18 @@ The code already provides a solid fundament for an automotive GUI with currently ~300K lines of pure C++ code. As expected it results in a good startup performance and a low memory footprint. -Nontheless QSkinny is lacking in areas like documentation or appealing -default skins. The QML API has not been completed after reaching a -proof of concept state. Furthermore the current selection of the implemented -controls is limited to the needs of the driving projects. +Nontheless QSkinny is lacking in areas like documentation. +The QML API has not been completed after reaching a proof of concept state. QSkinny is supposed to run on all platforms being supported by Qt/Quick. -But so far only Linux is actively tested. -It might support all versions Qt >= 5.15, but you can rely on: +It might support other versions of Qt, but you can rely on: - Qt 5.15 -- current long term supported ( LTS ) version of Qt +- current long term supported ( LTS ) version of Qt ( at the moment Qt 6.5.x ) - current version of Qt -On debian bullseye these packages need to be installed: `build-essential -qt-qmake qtbase5-dev qtbase5-private-dev qtdeclarative5-dev -qtdeclarative5-private-dev libqt5svg5-dev`. - -> Optional: When enabling the `hunspell` feature the following package needs to be installed: `libhunspell-dev` - -> Optional: When enabling the `pinyin` feature the following package needs to be installed: `libimepinyin-dev` +How to build, install and use QSkinny is described in this +[tutorial](doc/tutorials/03-writing-your-first-application.asciidoc). If you want to know more about QSkinny - or even like to give it a specific direction - please contact support@qskinny.org. diff --git a/cmake/QSkinnyConfig.cmake b/cmake/QSkinnyConfig.cmake new file mode 100644 index 00000000..8520eeb3 --- /dev/null +++ b/cmake/QSkinnyConfig.cmake @@ -0,0 +1,3 @@ +include("${CMAKE_CURRENT_LIST_DIR}/QSkinnyTargets.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/QSkinnyTools.cmake" OPTIONAL) +include("${CMAKE_CURRENT_LIST_DIR}/QSkinnyQmlExportTargets.cmake" OPTIONAL) diff --git a/cmake/QskTools.cmake b/cmake/QSkinnyTools.cmake similarity index 94% rename from cmake/QskTools.cmake rename to cmake/QSkinnyTools.cmake index ab6bc25b..119ca7c3 100644 --- a/cmake/QskTools.cmake +++ b/cmake/QSkinnyTools.cmake @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/cmake/QskBuildFunctions.cmake b/cmake/QskBuildFunctions.cmake index 38fee091..ca679293 100644 --- a/cmake/QskBuildFunctions.cmake +++ b/cmake/QskBuildFunctions.cmake @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ @@ -7,6 +7,10 @@ function(qsk_add_executable target) if(QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6) qt6_add_executable(${ARGV}) + + # we manually export our APIs to QML - might change in the future + set_target_properties(${target} PROPERTIES + QT_QML_MODULE_NO_IMPORT_SCAN 1) else() add_executable(${ARGV}) endif() @@ -65,7 +69,7 @@ function(qsk_add_plugin target TYPE CLASS_NAME) set_target_properties( ${target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/${TYPE}) - install(TARGETS ${target} DESTINATION "plugins/${TYPE}" ) + install(TARGETS ${target} DESTINATION "${QSK_INSTALL_LIBS}/plugins/${TYPE}" ) set_target_properties(${target} PROPERTIES INSTALL_RPATH "\${ORIGIN}/../../lib" ) @@ -99,3 +103,19 @@ function(qsk_add_example target) target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_LIST_DIR}) endfunction() + +function(qsk_add_shaders target) + + cmake_parse_arguments( arg "" "" "FILES" ${ARGN} ) + + # assuming that OUTPUTS is not set in ARGV + foreach( file IN LISTS arg_FILES ) + get_filename_component(qsbname "${file}" NAME) + string(REPLACE "-vulkan" "" qsbname "${qsbname}" ) + list(APPEND outfiles "${qsbname}.qsb") + endforeach() + + qt6_add_shaders( ${target} "qskshaders" BATCHABLE PRECOMPILE QUIET + PREFIX "/qskinny/shaders" ${ARGV} OUTPUTS ${outfiles} ) + +endfunction() diff --git a/cmake/QskConfigMacros.cmake b/cmake/QskConfigMacros.cmake index 0d373c18..6b9261cc 100644 --- a/cmake/QskConfigMacros.cmake +++ b/cmake/QskConfigMacros.cmake @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ @@ -118,6 +118,7 @@ macro(qsk_initialize_build_flags) add_compile_options( -Wall -Wextra ) else() # add_compile_options(/W4 /WX) + add_compile_options(/MP) endif() endmacro() diff --git a/cmake/QskFindMacros.cmake b/cmake/QskFindMacros.cmake index 035e9514..f2791254 100644 --- a/cmake/QskFindMacros.cmake +++ b/cmake/QskFindMacros.cmake @@ -1,17 +1,19 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ macro(qsk_setup_Qt) - # Often users have several Qt installations on their system and - # need to be able to explicitly the one to be used. Let's see if - # standard cmake features are good enough or if we need to introduce - # something sort of additional option. TODO ... - + # relying on cmake heuristics to select a specific Qt version is no good idea. + # using -DCMAKE_PREFIX_PATH="..." is highly recommended find_package(QT "5.15" NAMES Qt6 Qt5 REQUIRED COMPONENTS Quick) + if(QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6) + # we need the qsb tool for Qt6 + find_package(Qt6 REQUIRED COMPONENTS ShaderTools) + endif() + if ( QT_FOUND ) # Would like to have a status message about where the Qt installation diff --git a/doc/tutorials/03-writing-your-first-application.asciidoc b/doc/tutorials/03-writing-your-first-application.asciidoc index b912e892..cd16d942 100644 --- a/doc/tutorials/03-writing-your-first-application.asciidoc +++ b/doc/tutorials/03-writing-your-first-application.asciidoc @@ -10,22 +10,40 @@ layout: docs === Building the QSkinny repository -In this chapter we will write a simple QSkinny application on Linux from scratch. -As a prerequisite, a recent Qt version (>= 5.6) should be available and the directory of -its `qmake` binary in the current `$PATH`. On debian bullseye we need to install -these packages `build-essential qt-qmake qtbase5-dev qtbase5-private-dev -qtdeclarative5-dev qtdeclarative5-private-dev libqt5svg5-dev`. +In this chapter we will write a simple QSkinny application on Linux from scratch in C++ with Qt6. +As a prerequisite, a supported Qt6 version should be available. + +On debian bullseye we need to install these packages +`build-essential cmake qtbase6-dev qtbase6-private-dev qtdeclarative6-dev qtdeclarative6-private-dev libqt6svg-dev qt6-shadertools`. + +Optional packages for the virtual keyboard are `libhunspell-dev libimepinyin-dev` Then we can build and install QSkinny to `/opt/qskinny` with the following commands: -[source,xml] +[source,shell] .... -cd /home/user/dev/ -git clone https://github.com/uwerat/qskinny.git -cd qskinny -PREFIX=/opt/qskinny qmake -r -make -sudo make install +$ git clone https://github.com/uwerat/qskinny.git # clone +$ cd qskinny +$ mkdir build && cd build +$ cmake .. +$ cmake --build . +$ sudo cmake --install . --prefix "/opt/qskinny" +.... + + +Considering that you want to use a specific Qt version that is installed below "/path/to/qt" +you have 2 options: + +[source,shell] +.... +$ cmake .. -DCMAKE_PREFIX_PATH=/path/to/qt +.... + +or + +[source,shell] +.... +$ /path/to/qt/bin/qt-cmake .. .... === Compiling our first app @@ -50,52 +68,62 @@ int main( int argc, char* argv[] ) .... For now this will just create an empty window (the `QskWindow`) without any controls. -Next, we need to create a `myapp.pro` file in our `myapp` directory. +Next, we need to create a `CMakeLists.txt` file in our `myapp` directory. -.myapp.pro -[source,xml] +.CMakeLists.txt +[source,cmake] .... -TEMPLATE = app -TARGET = myapp +cmake_minimum_required(VERSION 3.27) -QT *= quick +project(myapp + VERSION 1.0.0 + LANGUAGES CXX) -QSK_ROOT=/opt/qskinny +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) -INCLUDEPATH += $${QSK_ROOT}/include -LIBS += -L$${QSK_ROOT}/lib -lqskinny +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -QMAKE_RPATHDIR *= $${QSK_ROOT}/lib +find_package(Qt6 REQUIRED COMPONENTS Quick) +find_package(QSkinny REQUIRED) -SOURCES += \ - main.cpp +add_executable(myapp + src/main.cpp) + +target_link_libraries(myapp PRIVATE + Qt6::Quick + Qsk::QSkinny) .... Now we can compile our app: -[source,xml] +[source,shell] .... -cd myapp -qmake -make +$ cd myapp +$ mkdir build && cd build +$ cmake ../ && make .... When running myapp it needs to find the skin plugins. Setting QT_PLUGIN_PATH is one -option ( see https://doc.qt.io/qt-5/deployment-plugins.html ): +option ( see https://doc.qt.io/qt/deployment-plugins.html ): -[source,xml] +[source,shell] .... -QT_PLUGIN_PATH=/opt/qskinny/plugins ./myapp +$ QT_PLUGIN_PATH=/opt/qskinny/plugins ./myapp .... This should show just an empty window. === Adding UI controls -Now that we have our app running, we can add some UI controls to it by extending the `main.cpp` file we created earlier. We will add some additional include directives, and then create a horizontal layout containing two push buttons. The layout with the two buttons will be shown in the window. Below is the complete updated source file: +Now that we have our app running, we can add some UI controls to it by extending the `main.cpp` file we created earlier. +We will add some additional include directives, and then create a horizontal layout containing two push buttons. +The layout with the two buttons will be shown in the window. Below is the complete updated source file: .main.cpp -[source] +[source, cpp] .... #include #include @@ -107,9 +135,17 @@ int main( int argc, char* argv[] ) { QGuiApplication app( argc, argv ); - auto* horizontalBox = new QskLinearBox( Qt::Horizontal ); - auto* button1 = new QskPushButton( "button 1", horizontalBox ); - auto* button2 = new QskPushButton( "button 2", horizontalBox ); + auto box = new QskLinearBox( Qt::Horizontal ); + + /* + some design systems work with transparencies ( f.e Fluent2 ) + and we need to have a control providing a solid base color + as bottom layer. + */ + box->setPanel( true ); + + (void) new QskPushButton( "Button 1", box ); + (void) new QskPushButton( "Button 2", box ); QskWindow window; window.addItem( horizontalBox ); diff --git a/doc/tutorials/08-qskinny-and-qml.asciidoc b/doc/tutorials/08-qskinny-and-qml.asciidoc index ef521bc4..9af57645 100644 --- a/doc/tutorials/08-qskinny-and-qml.asciidoc +++ b/doc/tutorials/08-qskinny-and-qml.asciidoc @@ -18,7 +18,16 @@ When using a QSkinny control, all the methods exposed as either properties, slots or invokables can be used in QML. For example, the QSkinny control `QskLinearBox` defines the following properties: -[source] +.CMakeLists.txt +[source,cmake] +.... +target_link_libraries(myapp PRIVATE + ... + Qsk::QmlExport) +... +.... + +[source,cpp] .... class QSK_EXPORT QskLinearBox : public QskIndexedLayoutBox { diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index a9951719..e9419b42 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/examples/boxes/Box.cpp b/examples/boxes/Box.cpp index e4a336ba..991a8651 100644 --- a/examples/boxes/Box.cpp +++ b/examples/boxes/Box.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/boxes/Box.h b/examples/boxes/Box.h index ffc85ad0..ede059c5 100644 --- a/examples/boxes/Box.h +++ b/examples/boxes/Box.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/boxes/CMakeLists.txt b/examples/boxes/CMakeLists.txt index 9ad84b97..3618cb1d 100644 --- a/examples/boxes/CMakeLists.txt +++ b/examples/boxes/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/examples/boxes/main.cpp b/examples/boxes/main.cpp index a7ca9108..cfb52c1e 100644 --- a/examples/boxes/main.cpp +++ b/examples/boxes/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/buttons/CMakeLists.txt b/examples/buttons/CMakeLists.txt index 5e6d8ffa..520b2fb3 100644 --- a/examples/buttons/CMakeLists.txt +++ b/examples/buttons/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/examples/buttons/main.cpp b/examples/buttons/main.cpp index 517976d9..ecf1f8ce 100644 --- a/examples/buttons/main.cpp +++ b/examples/buttons/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/desktop/CMakeLists.txt b/examples/desktop/CMakeLists.txt index 92141750..5a99225b 100644 --- a/examples/desktop/CMakeLists.txt +++ b/examples/desktop/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/examples/desktop/main.cpp b/examples/desktop/main.cpp index 5d1351bb..f5d37909 100644 --- a/examples/desktop/main.cpp +++ b/examples/desktop/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/frames/CMakeLists.txt b/examples/frames/CMakeLists.txt index 467cc3b5..18b1081a 100644 --- a/examples/frames/CMakeLists.txt +++ b/examples/frames/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/examples/frames/Frame.cpp b/examples/frames/Frame.cpp index 45f2b170..ecbfcb1f 100644 --- a/examples/frames/Frame.cpp +++ b/examples/frames/Frame.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/frames/Frame.h b/examples/frames/Frame.h index 44a631e8..b7cba2c9 100644 --- a/examples/frames/Frame.h +++ b/examples/frames/Frame.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/frames/main.cpp b/examples/frames/main.cpp index 2dd76ba4..72af953a 100644 --- a/examples/frames/main.cpp +++ b/examples/frames/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/CMakeLists.txt b/examples/gallery/CMakeLists.txt index e229a560..4941b1ff 100644 --- a/examples/gallery/CMakeLists.txt +++ b/examples/gallery/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/examples/gallery/Page.cpp b/examples/gallery/Page.cpp index 757e60b6..1b32a3db 100644 --- a/examples/gallery/Page.cpp +++ b/examples/gallery/Page.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/Page.h b/examples/gallery/Page.h index 6a825e9e..774a0628 100644 --- a/examples/gallery/Page.h +++ b/examples/gallery/Page.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/button/ButtonPage.cpp b/examples/gallery/button/ButtonPage.cpp index 047802af..7ba35788 100644 --- a/examples/gallery/button/ButtonPage.cpp +++ b/examples/gallery/button/ButtonPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/button/ButtonPage.h b/examples/gallery/button/ButtonPage.h index ed805bb6..ee94ecce 100644 --- a/examples/gallery/button/ButtonPage.h +++ b/examples/gallery/button/ButtonPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/dialog/DialogPage.cpp b/examples/gallery/dialog/DialogPage.cpp index 0e9e7946..d2dccd1e 100644 --- a/examples/gallery/dialog/DialogPage.cpp +++ b/examples/gallery/dialog/DialogPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/dialog/DialogPage.h b/examples/gallery/dialog/DialogPage.h index ca52dcdf..46a42cb8 100644 --- a/examples/gallery/dialog/DialogPage.h +++ b/examples/gallery/dialog/DialogPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/inputs/InputPage.cpp b/examples/gallery/inputs/InputPage.cpp index 3e19e1ee..efc52e11 100644 --- a/examples/gallery/inputs/InputPage.cpp +++ b/examples/gallery/inputs/InputPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/inputs/InputPage.h b/examples/gallery/inputs/InputPage.h index 6e0357ec..1899a679 100644 --- a/examples/gallery/inputs/InputPage.h +++ b/examples/gallery/inputs/InputPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/label/LabelPage.cpp b/examples/gallery/label/LabelPage.cpp index 4754b3ce..f009b098 100644 --- a/examples/gallery/label/LabelPage.cpp +++ b/examples/gallery/label/LabelPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/label/LabelPage.h b/examples/gallery/label/LabelPage.h index 89f31d6c..b25cc549 100644 --- a/examples/gallery/label/LabelPage.h +++ b/examples/gallery/label/LabelPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/listbox/ListBoxPage.cpp b/examples/gallery/listbox/ListBoxPage.cpp index 4393e32e..455d2afc 100644 --- a/examples/gallery/listbox/ListBoxPage.cpp +++ b/examples/gallery/listbox/ListBoxPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/listbox/ListBoxPage.h b/examples/gallery/listbox/ListBoxPage.h index 0fc44927..5bc55248 100644 --- a/examples/gallery/listbox/ListBoxPage.h +++ b/examples/gallery/listbox/ListBoxPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/main.cpp b/examples/gallery/main.cpp index cf2e19c5..17a91c07 100644 --- a/examples/gallery/main.cpp +++ b/examples/gallery/main.cpp @@ -1,9 +1,8 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ -#include "QskLinearBox.h" #include "label/LabelPage.h" #include "progressbar/ProgressBarPage.h" #include "inputs/InputPage.h" @@ -16,6 +15,7 @@ #include #include +#include "QskLinearBox.h" #include #include #include diff --git a/examples/gallery/progressbar/ProgressBarPage.cpp b/examples/gallery/progressbar/ProgressBarPage.cpp index 8655343b..668f4996 100644 --- a/examples/gallery/progressbar/ProgressBarPage.cpp +++ b/examples/gallery/progressbar/ProgressBarPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/progressbar/ProgressBarPage.h b/examples/gallery/progressbar/ProgressBarPage.h index 7f18c15a..82c883c5 100644 --- a/examples/gallery/progressbar/ProgressBarPage.h +++ b/examples/gallery/progressbar/ProgressBarPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/selector/SelectorPage.cpp b/examples/gallery/selector/SelectorPage.cpp index 6a1c4d88..32797ba6 100644 --- a/examples/gallery/selector/SelectorPage.cpp +++ b/examples/gallery/selector/SelectorPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/gallery/selector/SelectorPage.h b/examples/gallery/selector/SelectorPage.h index 740921f0..c51678be 100644 --- a/examples/gallery/selector/SelectorPage.h +++ b/examples/gallery/selector/SelectorPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/glabels/CMakeLists.txt b/examples/glabels/CMakeLists.txt index e9e9ca76..a69cbeb2 100644 --- a/examples/glabels/CMakeLists.txt +++ b/examples/glabels/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/examples/glabels/main.cpp b/examples/glabels/main.cpp index 0885bc30..c8c1c09b 100644 --- a/examples/glabels/main.cpp +++ b/examples/glabels/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/iotdashboard/MainItem.h b/examples/iotdashboard/MainItem.h index feb6ef5d..388c2541 100644 --- a/examples/iotdashboard/MainItem.h +++ b/examples/iotdashboard/MainItem.h @@ -1,3 +1,8 @@ +/****************************************************************************** + * Copyright (C) 2021 Edelhirsch Software GmbH + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + #pragma once #include diff --git a/examples/iotdashboard_smoketest/.gitignore b/examples/iotdashboard_smoketest/.gitignore new file mode 100644 index 00000000..09a75fee --- /dev/null +++ b/examples/iotdashboard_smoketest/.gitignore @@ -0,0 +1,2 @@ +build +iotdashboard \ No newline at end of file diff --git a/examples/iotdashboard_smoketest/CMakeLists.txt b/examples/iotdashboard_smoketest/CMakeLists.txt new file mode 100644 index 00000000..8f8a0c5f --- /dev/null +++ b/examples/iotdashboard_smoketest/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.18) + +project(iotdashboard_smoketest) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC OFF) +set(CMAKE_GLOBAL_AUTOGEN_TARGET OFF) + +find_package(QSkinny REQUIRED) + +# TODO we don't delivery the qsk macros +function(qsk_add_executable target) + if(QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6) + qt6_add_executable(${ARGV}) + else() + add_executable(${ARGV}) + endif() +endfunction() + +# TODO we don't delivery the qsk macros +function(qsk_add_example target) + cmake_parse_arguments(PARSE_ARGV 1 arg "MANUAL_FINALIZATION" "" "") + add_executable(${target} WIN32 MACOSX_BUNDLE ${arg_UNPARSED_ARGUMENTS} ) + target_link_libraries(${target} PRIVATE Qsk::QSkinny ) + target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_LIST_DIR}) +endfunction() + +find_package(Qt6 COMPONENTS Core QUIET) +if (NOT Qt6_FOUND) + find_package(Qt5 5.15 REQUIRED COMPONENTS Core Gui OpenGL Quick Svg Widgets) + find_package(Qt5 5.15 OPTIONAL_COMPONENTS QuickWidgets WebEngine WebEngineCore) + + function(qt_add_executable) + add_executable(${ARGV}) + endfunction(qt_add_executable) +else() + find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL Quick QuickWidgets Svg Widgets) + find_package(Qt6 OPTIONAL_COMPONENTS QuickWidgets WebEngineCore WebEngineQuick) +endif() + +add_subdirectory(../iotdashboard ${CMAKE_CURRENT_BINARY_DIR}/../iotdashboard) + +# TODO we don't delivery the support library +get_target_property(iotdashboard_COMPILE_DEFINITIONS iotdashboard COMPILE_DEFINITIONS) +list(FILTER iotdashboard_COMPILE_DEFINITIONS EXCLUDE REGEX [[^USE_SHORTCUTS=1$]]) +set_property(TARGET iotdashboard PROPERTY COMPILE_DEFINITIONS ${iotdashboard_COMPILE_DEFINITIONS}) diff --git a/examples/layouts/ButtonBox.cpp b/examples/layouts/ButtonBox.cpp index c63cf67b..c3eb5329 100644 --- a/examples/layouts/ButtonBox.cpp +++ b/examples/layouts/ButtonBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/ButtonBox.h b/examples/layouts/ButtonBox.h index 45622593..6464356f 100644 --- a/examples/layouts/ButtonBox.h +++ b/examples/layouts/ButtonBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/CMakeLists.txt b/examples/layouts/CMakeLists.txt index a4b57bc3..9b80459c 100644 --- a/examples/layouts/CMakeLists.txt +++ b/examples/layouts/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/examples/layouts/DynamicConstraintsPage.cpp b/examples/layouts/DynamicConstraintsPage.cpp index 06fce56d..a05c88af 100644 --- a/examples/layouts/DynamicConstraintsPage.cpp +++ b/examples/layouts/DynamicConstraintsPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/DynamicConstraintsPage.h b/examples/layouts/DynamicConstraintsPage.h index 773fa8d2..6e583747 100644 --- a/examples/layouts/DynamicConstraintsPage.h +++ b/examples/layouts/DynamicConstraintsPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/FlowLayoutPage.cpp b/examples/layouts/FlowLayoutPage.cpp index 8fba6a29..07baff86 100644 --- a/examples/layouts/FlowLayoutPage.cpp +++ b/examples/layouts/FlowLayoutPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/FlowLayoutPage.h b/examples/layouts/FlowLayoutPage.h index a75f99cf..9500f8d5 100644 --- a/examples/layouts/FlowLayoutPage.h +++ b/examples/layouts/FlowLayoutPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/GridLayoutPage.cpp b/examples/layouts/GridLayoutPage.cpp index 22b28867..e3f791c1 100644 --- a/examples/layouts/GridLayoutPage.cpp +++ b/examples/layouts/GridLayoutPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/GridLayoutPage.h b/examples/layouts/GridLayoutPage.h index f1748c48..9690d752 100644 --- a/examples/layouts/GridLayoutPage.h +++ b/examples/layouts/GridLayoutPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/LinearLayoutPage.cpp b/examples/layouts/LinearLayoutPage.cpp index 71ffe6a5..3b348aa4 100644 --- a/examples/layouts/LinearLayoutPage.cpp +++ b/examples/layouts/LinearLayoutPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/LinearLayoutPage.h b/examples/layouts/LinearLayoutPage.h index b0c32786..0facf930 100644 --- a/examples/layouts/LinearLayoutPage.h +++ b/examples/layouts/LinearLayoutPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/StackLayoutPage.cpp b/examples/layouts/StackLayoutPage.cpp index 39241fb4..7d593c95 100644 --- a/examples/layouts/StackLayoutPage.cpp +++ b/examples/layouts/StackLayoutPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/StackLayoutPage.h b/examples/layouts/StackLayoutPage.h index 3e90a82b..cf75d298 100644 --- a/examples/layouts/StackLayoutPage.h +++ b/examples/layouts/StackLayoutPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/SwipeViewPage.cpp b/examples/layouts/SwipeViewPage.cpp index 9ce05c65..328bd2e0 100644 --- a/examples/layouts/SwipeViewPage.cpp +++ b/examples/layouts/SwipeViewPage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/SwipeViewPage.h b/examples/layouts/SwipeViewPage.h index 02ce94dd..c608824e 100644 --- a/examples/layouts/SwipeViewPage.h +++ b/examples/layouts/SwipeViewPage.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/TestRectangle.cpp b/examples/layouts/TestRectangle.cpp index a0b85c83..e1232206 100644 --- a/examples/layouts/TestRectangle.cpp +++ b/examples/layouts/TestRectangle.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/TestRectangle.h b/examples/layouts/TestRectangle.h index 0cbd64a3..c451bdb4 100644 --- a/examples/layouts/TestRectangle.h +++ b/examples/layouts/TestRectangle.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/layouts/main.cpp b/examples/layouts/main.cpp index 5af6b1e2..971429fa 100644 --- a/examples/layouts/main.cpp +++ b/examples/layouts/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/mycontrols/CMakeLists.txt b/examples/mycontrols/CMakeLists.txt index 0d566205..193f34d4 100644 --- a/examples/mycontrols/CMakeLists.txt +++ b/examples/mycontrols/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/examples/mycontrols/MySkin.cpp b/examples/mycontrols/MySkin.cpp index 9fcaef8e..fadc8d79 100644 --- a/examples/mycontrols/MySkin.cpp +++ b/examples/mycontrols/MySkin.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/mycontrols/MySkin.h b/examples/mycontrols/MySkin.h index e28b08af..1c01e1ff 100644 --- a/examples/mycontrols/MySkin.h +++ b/examples/mycontrols/MySkin.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/mycontrols/MyToggleButton.cpp b/examples/mycontrols/MyToggleButton.cpp index 33cd7b9e..4619e1c3 100644 --- a/examples/mycontrols/MyToggleButton.cpp +++ b/examples/mycontrols/MyToggleButton.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/mycontrols/MyToggleButton.h b/examples/mycontrols/MyToggleButton.h index 634e3a7c..ccee81ef 100644 --- a/examples/mycontrols/MyToggleButton.h +++ b/examples/mycontrols/MyToggleButton.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/mycontrols/MyToggleButtonSkinlet.cpp b/examples/mycontrols/MyToggleButtonSkinlet.cpp index ec846467..115f5ac9 100644 --- a/examples/mycontrols/MyToggleButtonSkinlet.cpp +++ b/examples/mycontrols/MyToggleButtonSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/mycontrols/MyToggleButtonSkinlet.h b/examples/mycontrols/MyToggleButtonSkinlet.h index ce35dc6d..ad57e5d4 100644 --- a/examples/mycontrols/MyToggleButtonSkinlet.h +++ b/examples/mycontrols/MyToggleButtonSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/mycontrols/main.cpp b/examples/mycontrols/main.cpp index e8795648..c57914f7 100644 --- a/examples/mycontrols/main.cpp +++ b/examples/mycontrols/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/qvgviewer/CMakeLists.txt b/examples/qvgviewer/CMakeLists.txt index 2c11863f..2ff2c0d8 100644 --- a/examples/qvgviewer/CMakeLists.txt +++ b/examples/qvgviewer/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/examples/qvgviewer/MainWindow.cpp b/examples/qvgviewer/MainWindow.cpp index 1a53bef4..bd32d95f 100644 --- a/examples/qvgviewer/MainWindow.cpp +++ b/examples/qvgviewer/MainWindow.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/qvgviewer/MainWindow.h b/examples/qvgviewer/MainWindow.h index 458d4601..aca9d988 100644 --- a/examples/qvgviewer/MainWindow.h +++ b/examples/qvgviewer/MainWindow.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/qvgviewer/main.cpp b/examples/qvgviewer/main.cpp index b5b6af36..9dc3ede2 100644 --- a/examples/qvgviewer/main.cpp +++ b/examples/qvgviewer/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/tabview/CMakeLists.txt b/examples/tabview/CMakeLists.txt index 0de6ffef..70e4c967 100644 --- a/examples/tabview/CMakeLists.txt +++ b/examples/tabview/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/examples/tabview/CustomSlider.cpp b/examples/tabview/CustomSlider.cpp index de9c56cb..aedfec13 100644 --- a/examples/tabview/CustomSlider.cpp +++ b/examples/tabview/CustomSlider.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/tabview/CustomSlider.h b/examples/tabview/CustomSlider.h index a3935b49..628a171e 100644 --- a/examples/tabview/CustomSlider.h +++ b/examples/tabview/CustomSlider.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/tabview/CustomSliderSkinlet.cpp b/examples/tabview/CustomSliderSkinlet.cpp index 3dc52ae8..af511854 100644 --- a/examples/tabview/CustomSliderSkinlet.cpp +++ b/examples/tabview/CustomSliderSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/tabview/CustomSliderSkinlet.h b/examples/tabview/CustomSliderSkinlet.h index 369c5456..deb23a6f 100644 --- a/examples/tabview/CustomSliderSkinlet.h +++ b/examples/tabview/CustomSliderSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/tabview/OtherSlider.cpp b/examples/tabview/OtherSlider.cpp index 97c93b8c..b8c7f157 100644 --- a/examples/tabview/OtherSlider.cpp +++ b/examples/tabview/OtherSlider.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/tabview/OtherSlider.h b/examples/tabview/OtherSlider.h index ebdb4ed3..0cb01910 100644 --- a/examples/tabview/OtherSlider.h +++ b/examples/tabview/OtherSlider.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/tabview/main.cpp b/examples/tabview/main.cpp index 020fe49f..1311650d 100644 --- a/examples/tabview/main.cpp +++ b/examples/tabview/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/examples/thumbnails/CMakeLists.txt b/examples/thumbnails/CMakeLists.txt index 8476ae68..4d9b7ef8 100644 --- a/examples/thumbnails/CMakeLists.txt +++ b/examples/thumbnails/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/examples/thumbnails/main.cpp b/examples/thumbnails/main.cpp index 4c577de0..98e0f78a 100644 --- a/examples/thumbnails/main.cpp +++ b/examples/thumbnails/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/inputcontext/CMakeLists.txt b/inputcontext/CMakeLists.txt index 0201a65e..0c1a7490 100644 --- a/inputcontext/CMakeLists.txt +++ b/inputcontext/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ @@ -19,8 +19,8 @@ if(ENABLE_PINYIN) qsk_setup_Pinyin() list(APPEND SOURCES - ${CMAKE_SOURCE_DIR}/src/inputpanel/QskPinyinTextPredictor.h - ${CMAKE_SOURCE_DIR}/src/inputpanel/QskPinyinTextPredictor.cpp + ${QSK_SOURCE_DIR}/src/inputpanel/QskPinyinTextPredictor.h + ${QSK_SOURCE_DIR}/src/inputpanel/QskPinyinTextPredictor.cpp ) endif() @@ -28,8 +28,8 @@ if(ENABLE_HUNSPELL) qsk_setup_Hunspell() list(APPEND SOURCES - ${CMAKE_SOURCE_DIR}/src/inputpanel/QskHunspellTextPredictor.h - ${CMAKE_SOURCE_DIR}/src/inputpanel/QskHunspellTextPredictor.cpp + ${QSK_SOURCE_DIR}/src/inputpanel/QskHunspellTextPredictor.h + ${QSK_SOURCE_DIR}/src/inputpanel/QskHunspellTextPredictor.cpp ) endif() diff --git a/inputcontext/QskInputContextGlobal.h b/inputcontext/QskInputContextGlobal.h index 2e1437e6..acc2d3eb 100644 --- a/inputcontext/QskInputContextGlobal.h +++ b/inputcontext/QskInputContextGlobal.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/inputcontext/QskInputContextPlugin.cpp b/inputcontext/QskInputContextPlugin.cpp index 8d7d9e0e..18412cf3 100644 --- a/inputcontext/QskInputContextPlugin.cpp +++ b/inputcontext/QskInputContextPlugin.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/anchors/AnchorBox.cpp b/playground/anchors/AnchorBox.cpp index 86101900..27127230 100644 --- a/playground/anchors/AnchorBox.cpp +++ b/playground/anchors/AnchorBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/anchors/AnchorBox.h b/playground/anchors/AnchorBox.h index f44093ce..3a501daa 100644 --- a/playground/anchors/AnchorBox.h +++ b/playground/anchors/AnchorBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/anchors/CMakeLists.txt b/playground/anchors/CMakeLists.txt index 56dbb69f..02fdc7dd 100644 --- a/playground/anchors/CMakeLists.txt +++ b/playground/anchors/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/playground/anchors/main.cpp b/playground/anchors/main.cpp index 695b61d2..0675cd99 100644 --- a/playground/anchors/main.cpp +++ b/playground/anchors/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/charts/CMakeLists.txt b/playground/charts/CMakeLists.txt index bcbd2f24..7284c940 100644 --- a/playground/charts/CMakeLists.txt +++ b/playground/charts/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # This file may be used under the terms of the 3-clause BSD License ############################################################################ diff --git a/playground/charts/ChartSample.cpp b/playground/charts/ChartSample.cpp index f2e6a4f6..5db412a5 100644 --- a/playground/charts/ChartSample.cpp +++ b/playground/charts/ChartSample.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/charts/ChartSample.h b/playground/charts/ChartSample.h index 710128bd..08618283 100644 --- a/playground/charts/ChartSample.h +++ b/playground/charts/ChartSample.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/charts/ChartView.cpp b/playground/charts/ChartView.cpp index cbdc66cc..527f2a05 100644 --- a/playground/charts/ChartView.cpp +++ b/playground/charts/ChartView.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ diff --git a/playground/charts/ChartView.h b/playground/charts/ChartView.h index 808c6bd6..f947f5b5 100644 --- a/playground/charts/ChartView.h +++ b/playground/charts/ChartView.h @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #pragma once diff --git a/playground/charts/CircularChart.cpp b/playground/charts/CircularChart.cpp index 46b92ef1..c7f3b485 100644 --- a/playground/charts/CircularChart.cpp +++ b/playground/charts/CircularChart.cpp @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "CircularChart.h" diff --git a/playground/charts/CircularChart.h b/playground/charts/CircularChart.h index d51106be..b6f914aa 100644 --- a/playground/charts/CircularChart.h +++ b/playground/charts/CircularChart.h @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #pragma once diff --git a/playground/charts/CircularChartSkinlet.cpp b/playground/charts/CircularChartSkinlet.cpp index 79dc7217..736479a9 100644 --- a/playground/charts/CircularChartSkinlet.cpp +++ b/playground/charts/CircularChartSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/charts/CircularChartSkinlet.h b/playground/charts/CircularChartSkinlet.h index 5bc403d6..f9b43611 100644 --- a/playground/charts/CircularChartSkinlet.h +++ b/playground/charts/CircularChartSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/charts/StackedChart.cpp b/playground/charts/StackedChart.cpp index 9d984985..8fe9b7ae 100644 --- a/playground/charts/StackedChart.cpp +++ b/playground/charts/StackedChart.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ diff --git a/playground/charts/StackedChart.h b/playground/charts/StackedChart.h index 9efef84e..6ddc9270 100644 --- a/playground/charts/StackedChart.h +++ b/playground/charts/StackedChart.h @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #pragma once diff --git a/playground/charts/main.cpp b/playground/charts/main.cpp index 90ab4688..d9c14a88 100644 --- a/playground/charts/main.cpp +++ b/playground/charts/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ diff --git a/playground/dialogbuttons/CMakeLists.txt b/playground/dialogbuttons/CMakeLists.txt index 0f0bc6c3..68fa1e01 100644 --- a/playground/dialogbuttons/CMakeLists.txt +++ b/playground/dialogbuttons/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/playground/dialogbuttons/Window.cpp b/playground/dialogbuttons/Window.cpp index 0db8b6cb..99a53c2b 100644 --- a/playground/dialogbuttons/Window.cpp +++ b/playground/dialogbuttons/Window.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/dialogbuttons/Window.h b/playground/dialogbuttons/Window.h index 6636595a..7c559595 100644 --- a/playground/dialogbuttons/Window.h +++ b/playground/dialogbuttons/Window.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/dialogbuttons/main.cpp b/playground/dialogbuttons/main.cpp index b1d677d4..6d4c275c 100644 --- a/playground/dialogbuttons/main.cpp +++ b/playground/dialogbuttons/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/dials/CMakeLists.txt b/playground/dials/CMakeLists.txt index b62b68ca..a7da047e 100644 --- a/playground/dials/CMakeLists.txt +++ b/playground/dials/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/playground/dials/Dashboard.cpp b/playground/dials/Dashboard.cpp index d2cfa22a..bf107885 100644 --- a/playground/dials/Dashboard.cpp +++ b/playground/dials/Dashboard.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/dials/Dashboard.h b/playground/dials/Dashboard.h index 36db2c2f..19df011f 100644 --- a/playground/dials/Dashboard.h +++ b/playground/dials/Dashboard.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/dials/Dial.cpp b/playground/dials/Dial.cpp index a88f510a..7c842183 100644 --- a/playground/dials/Dial.cpp +++ b/playground/dials/Dial.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/dials/Dial.h b/playground/dials/Dial.h index bcc2152f..6bd58de7 100644 --- a/playground/dials/Dial.h +++ b/playground/dials/Dial.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/dials/DialSkinlet.cpp b/playground/dials/DialSkinlet.cpp index 243145fe..a00175e2 100644 --- a/playground/dials/DialSkinlet.cpp +++ b/playground/dials/DialSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/dials/DialSkinlet.h b/playground/dials/DialSkinlet.h index 6c261b0e..a24365af 100644 --- a/playground/dials/DialSkinlet.h +++ b/playground/dials/DialSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/dials/MainWindow.h b/playground/dials/MainWindow.h index f45b6733..7cf65ab2 100644 --- a/playground/dials/MainWindow.h +++ b/playground/dials/MainWindow.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/dials/SkinFactory.cpp b/playground/dials/SkinFactory.cpp index d0eac4a4..c03ef792 100644 --- a/playground/dials/SkinFactory.cpp +++ b/playground/dials/SkinFactory.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/dials/SkinFactory.h b/playground/dials/SkinFactory.h index 6bb0f2fa..8d6209df 100644 --- a/playground/dials/SkinFactory.h +++ b/playground/dials/SkinFactory.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/dials/main.cpp b/playground/dials/main.cpp index 40624dd4..be866f01 100644 --- a/playground/dials/main.cpp +++ b/playground/dials/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/gradients/CMakeLists.txt b/playground/gradients/CMakeLists.txt index 26e4030b..cdbe015b 100644 --- a/playground/gradients/CMakeLists.txt +++ b/playground/gradients/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/playground/gradients/GradientQuickShape.cpp b/playground/gradients/GradientQuickShape.cpp index 6def8fe2..4261920a 100644 --- a/playground/gradients/GradientQuickShape.cpp +++ b/playground/gradients/GradientQuickShape.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/gradients/GradientQuickShape.h b/playground/gradients/GradientQuickShape.h index 013b7702..8053af39 100644 --- a/playground/gradients/GradientQuickShape.h +++ b/playground/gradients/GradientQuickShape.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/gradients/GradientView.cpp b/playground/gradients/GradientView.cpp index b16a0b41..b067955e 100644 --- a/playground/gradients/GradientView.cpp +++ b/playground/gradients/GradientView.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -170,7 +170,7 @@ QSGNode* GradientView::updatePaintNode( QskBoxShapeMetrics shape; shape.setRadius( 80 ); - if ( !QskBox::isGradientSupported( shape, m_gradient ) ) + if ( !QskBoxRenderer::isGradientSupported( shape, m_gradient ) ) { delete oldNode; return nullptr; diff --git a/playground/gradients/GradientView.h b/playground/gradients/GradientView.h index ed32af8e..89be3177 100644 --- a/playground/gradients/GradientView.h +++ b/playground/gradients/GradientView.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/gradients/main.cpp b/playground/gradients/main.cpp index a6ffaaaf..38f91695 100644 --- a/playground/gradients/main.cpp +++ b/playground/gradients/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/CMakeLists.txt b/playground/grids/CMakeLists.txt index 43132f1e..02021e7a 100644 --- a/playground/grids/CMakeLists.txt +++ b/playground/grids/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/playground/grids/GridAccessor.cpp b/playground/grids/GridAccessor.cpp index 273677eb..31c530f1 100644 --- a/playground/grids/GridAccessor.cpp +++ b/playground/grids/GridAccessor.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/GridAccessor.h b/playground/grids/GridAccessor.h index eaf827f2..f11fac74 100644 --- a/playground/grids/GridAccessor.h +++ b/playground/grids/GridAccessor.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/GridGraphics.cpp b/playground/grids/GridGraphics.cpp index 88d60a9c..1d73cbd2 100644 --- a/playground/grids/GridGraphics.cpp +++ b/playground/grids/GridGraphics.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/GridGraphics.h b/playground/grids/GridGraphics.h index 62be9c3b..30d00c83 100644 --- a/playground/grids/GridGraphics.h +++ b/playground/grids/GridGraphics.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/GridQuick.cpp b/playground/grids/GridQuick.cpp index 186156b8..f185860c 100644 --- a/playground/grids/GridQuick.cpp +++ b/playground/grids/GridQuick.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/GridQuick.h b/playground/grids/GridQuick.h index d7e8a02c..667fedee 100644 --- a/playground/grids/GridQuick.h +++ b/playground/grids/GridQuick.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/GridSkinny.cpp b/playground/grids/GridSkinny.cpp index 89e1d46a..d93068f0 100644 --- a/playground/grids/GridSkinny.cpp +++ b/playground/grids/GridSkinny.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/GridSkinny.h b/playground/grids/GridSkinny.h index 856d42d5..ed3e09d0 100644 --- a/playground/grids/GridSkinny.h +++ b/playground/grids/GridSkinny.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/GridWidgets.cpp b/playground/grids/GridWidgets.cpp index d989ca9e..bf1b9b7f 100644 --- a/playground/grids/GridWidgets.cpp +++ b/playground/grids/GridWidgets.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/GridWidgets.h b/playground/grids/GridWidgets.h index 9cd38f9a..4da2c3bd 100644 --- a/playground/grids/GridWidgets.h +++ b/playground/grids/GridWidgets.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/TestBox.cpp b/playground/grids/TestBox.cpp index a0086459..67aecd58 100644 --- a/playground/grids/TestBox.cpp +++ b/playground/grids/TestBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/TestBox.h b/playground/grids/TestBox.h index d22e37c1..8bd29c17 100644 --- a/playground/grids/TestBox.h +++ b/playground/grids/TestBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/grids/main.cpp b/playground/grids/main.cpp index 7ab3e575..faacad20 100644 --- a/playground/grids/main.cpp +++ b/playground/grids/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/images/CMakeLists.txt b/playground/images/CMakeLists.txt index 5db9372a..06fa0f77 100644 --- a/playground/images/CMakeLists.txt +++ b/playground/images/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/playground/images/Image.cpp b/playground/images/Image.cpp index 85c2d333..af083d9e 100644 --- a/playground/images/Image.cpp +++ b/playground/images/Image.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/images/Image.h b/playground/images/Image.h index 92c57e25..51be747a 100644 --- a/playground/images/Image.h +++ b/playground/images/Image.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/images/main.cpp b/playground/images/main.cpp index 6502590f..5db79527 100644 --- a/playground/images/main.cpp +++ b/playground/images/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/inputpanel/CMakeLists.txt b/playground/inputpanel/CMakeLists.txt index cd631634..dde327f3 100644 --- a/playground/inputpanel/CMakeLists.txt +++ b/playground/inputpanel/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/playground/inputpanel/main.cpp b/playground/inputpanel/main.cpp index 9948a048..eabc5362 100644 --- a/playground/inputpanel/main.cpp +++ b/playground/inputpanel/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/invoker/CMakeLists.txt b/playground/invoker/CMakeLists.txt index c9ec4a9f..5fe2155e 100644 --- a/playground/invoker/CMakeLists.txt +++ b/playground/invoker/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/playground/invoker/Callback.cpp b/playground/invoker/Callback.cpp index a485788a..1149aaf5 100644 --- a/playground/invoker/Callback.cpp +++ b/playground/invoker/Callback.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/invoker/Callback.h b/playground/invoker/Callback.h index 4da0c273..c2f185d2 100644 --- a/playground/invoker/Callback.h +++ b/playground/invoker/Callback.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/invoker/Invoker.cpp b/playground/invoker/Invoker.cpp index c959a230..0346dc3b 100644 --- a/playground/invoker/Invoker.cpp +++ b/playground/invoker/Invoker.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/invoker/Invoker.h b/playground/invoker/Invoker.h index 0f4ab012..3d826486 100644 --- a/playground/invoker/Invoker.h +++ b/playground/invoker/Invoker.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/invoker/main.cpp b/playground/invoker/main.cpp index 06292bb0..e296d19d 100644 --- a/playground/invoker/main.cpp +++ b/playground/invoker/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/plots/CMakeLists.txt b/playground/plots/CMakeLists.txt index 9cc36159..66349be3 100644 --- a/playground/plots/CMakeLists.txt +++ b/playground/plots/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # This file may be used under the terms of the 3-clause BSD License ############################################################################ diff --git a/playground/plots/Plot.cpp b/playground/plots/Plot.cpp index c5723e24..5ba1b9cb 100644 --- a/playground/plots/Plot.cpp +++ b/playground/plots/Plot.cpp @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "Plot.h" diff --git a/playground/plots/Plot.h b/playground/plots/Plot.h index eac16e0b..5af34fca 100644 --- a/playground/plots/Plot.h +++ b/playground/plots/Plot.h @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #pragma once diff --git a/playground/plots/PlotCursor.cpp b/playground/plots/PlotCursor.cpp index dddb0b54..88591408 100644 --- a/playground/plots/PlotCursor.cpp +++ b/playground/plots/PlotCursor.cpp @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "PlotCursor.h" diff --git a/playground/plots/PlotCursor.h b/playground/plots/PlotCursor.h index 1c784693..cb310507 100644 --- a/playground/plots/PlotCursor.h +++ b/playground/plots/PlotCursor.h @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #pragma once diff --git a/playground/plots/PlotCursorSkinlet.cpp b/playground/plots/PlotCursorSkinlet.cpp index e0660937..48095c24 100644 --- a/playground/plots/PlotCursorSkinlet.cpp +++ b/playground/plots/PlotCursorSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/plots/PlotCursorSkinlet.h b/playground/plots/PlotCursorSkinlet.h index b3e03b77..17ac04cb 100644 --- a/playground/plots/PlotCursorSkinlet.h +++ b/playground/plots/PlotCursorSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/plots/PlotSkin.cpp b/playground/plots/PlotSkin.cpp index 968d0565..4ff8b1d2 100644 --- a/playground/plots/PlotSkin.cpp +++ b/playground/plots/PlotSkin.cpp @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "PlotSkin.h" diff --git a/playground/plots/PlotSkin.h b/playground/plots/PlotSkin.h index 946344c3..0a6dbf03 100644 --- a/playground/plots/PlotSkin.h +++ b/playground/plots/PlotSkin.h @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #pragma once diff --git a/playground/plots/QskPlotCorridor.cpp b/playground/plots/QskPlotCorridor.cpp index a7144e52..21f6d90b 100644 --- a/playground/plots/QskPlotCorridor.cpp +++ b/playground/plots/QskPlotCorridor.cpp @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "QskPlotCorridor.h" diff --git a/playground/plots/QskPlotCorridor.h b/playground/plots/QskPlotCorridor.h index b375482d..1492ba87 100644 --- a/playground/plots/QskPlotCorridor.h +++ b/playground/plots/QskPlotCorridor.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ diff --git a/playground/plots/QskPlotCorridorData.cpp b/playground/plots/QskPlotCorridorData.cpp index 55b40c57..d6f72b3e 100644 --- a/playground/plots/QskPlotCorridorData.cpp +++ b/playground/plots/QskPlotCorridorData.cpp @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "QskPlotCorridorData.h" diff --git a/playground/plots/QskPlotCorridorData.h b/playground/plots/QskPlotCorridorData.h index 3fac0b7a..54c9c2f5 100644 --- a/playground/plots/QskPlotCorridorData.h +++ b/playground/plots/QskPlotCorridorData.h @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #pragma once diff --git a/playground/plots/QskPlotCorridorSkinlet.cpp b/playground/plots/QskPlotCorridorSkinlet.cpp index e7ab51bf..cebd749a 100644 --- a/playground/plots/QskPlotCorridorSkinlet.cpp +++ b/playground/plots/QskPlotCorridorSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/plots/QskPlotCorridorSkinlet.h b/playground/plots/QskPlotCorridorSkinlet.h index e79e8b32..59a4a2d6 100644 --- a/playground/plots/QskPlotCorridorSkinlet.h +++ b/playground/plots/QskPlotCorridorSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/plots/QskPlotCurve.cpp b/playground/plots/QskPlotCurve.cpp index d39c2b42..02f3fb02 100644 --- a/playground/plots/QskPlotCurve.cpp +++ b/playground/plots/QskPlotCurve.cpp @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "QskPlotCurve.h" diff --git a/playground/plots/QskPlotCurve.h b/playground/plots/QskPlotCurve.h index cf5c77e3..f42d56cd 100644 --- a/playground/plots/QskPlotCurve.h +++ b/playground/plots/QskPlotCurve.h @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #pragma once diff --git a/playground/plots/QskPlotCurveData.cpp b/playground/plots/QskPlotCurveData.cpp index 66b76ac9..029e0242 100644 --- a/playground/plots/QskPlotCurveData.cpp +++ b/playground/plots/QskPlotCurveData.cpp @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "QskPlotCurveData.h" diff --git a/playground/plots/QskPlotCurveData.h b/playground/plots/QskPlotCurveData.h index fe802566..47f76626 100644 --- a/playground/plots/QskPlotCurveData.h +++ b/playground/plots/QskPlotCurveData.h @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #pragma once diff --git a/playground/plots/QskPlotCurveSkinlet.cpp b/playground/plots/QskPlotCurveSkinlet.cpp index 0731c94f..64f92b7e 100644 --- a/playground/plots/QskPlotCurveSkinlet.cpp +++ b/playground/plots/QskPlotCurveSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/plots/QskPlotCurveSkinlet.h b/playground/plots/QskPlotCurveSkinlet.h index 070487ba..65c48f7d 100644 --- a/playground/plots/QskPlotCurveSkinlet.h +++ b/playground/plots/QskPlotCurveSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/plots/QskPlotGrid.cpp b/playground/plots/QskPlotGrid.cpp index 06d27cd2..3db5f80d 100644 --- a/playground/plots/QskPlotGrid.cpp +++ b/playground/plots/QskPlotGrid.cpp @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "QskPlotGrid.h" diff --git a/playground/plots/QskPlotGrid.h b/playground/plots/QskPlotGrid.h index 4b4ce25b..8c4d8834 100644 --- a/playground/plots/QskPlotGrid.h +++ b/playground/plots/QskPlotGrid.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ diff --git a/playground/plots/QskPlotGridSkinlet.cpp b/playground/plots/QskPlotGridSkinlet.cpp index ebd490c2..c328d2e2 100644 --- a/playground/plots/QskPlotGridSkinlet.cpp +++ b/playground/plots/QskPlotGridSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/plots/QskPlotGridSkinlet.h b/playground/plots/QskPlotGridSkinlet.h index 2ab51f80..a0c114c9 100644 --- a/playground/plots/QskPlotGridSkinlet.h +++ b/playground/plots/QskPlotGridSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/plots/QskPlotItem.cpp b/playground/plots/QskPlotItem.cpp index de829694..929972e8 100644 --- a/playground/plots/QskPlotItem.cpp +++ b/playground/plots/QskPlotItem.cpp @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "QskPlotItem.h" diff --git a/playground/plots/QskPlotItem.h b/playground/plots/QskPlotItem.h index 6ae96c86..3f343d8a 100644 --- a/playground/plots/QskPlotItem.h +++ b/playground/plots/QskPlotItem.h @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #pragma once diff --git a/playground/plots/QskPlotNamespace.h b/playground/plots/QskPlotNamespace.h index 30644ba7..34202ab1 100644 --- a/playground/plots/QskPlotNamespace.h +++ b/playground/plots/QskPlotNamespace.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/plots/QskPlotView.cpp b/playground/plots/QskPlotView.cpp index 887c6418..18fc60e0 100644 --- a/playground/plots/QskPlotView.cpp +++ b/playground/plots/QskPlotView.cpp @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "QskPlotView.h" diff --git a/playground/plots/QskPlotView.h b/playground/plots/QskPlotView.h index 37a7ae9d..53243a9e 100644 --- a/playground/plots/QskPlotView.h +++ b/playground/plots/QskPlotView.h @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #pragma once diff --git a/playground/plots/QskPlotViewSkinlet.cpp b/playground/plots/QskPlotViewSkinlet.cpp index db3878d2..f3f1aaf4 100644 --- a/playground/plots/QskPlotViewSkinlet.cpp +++ b/playground/plots/QskPlotViewSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/plots/QskPlotViewSkinlet.h b/playground/plots/QskPlotViewSkinlet.h index f861b6e1..37d54f68 100644 --- a/playground/plots/QskPlotViewSkinlet.h +++ b/playground/plots/QskPlotViewSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/plots/main.cpp b/playground/plots/main.cpp index f2612e44..7d8ced9d 100644 --- a/playground/plots/main.cpp +++ b/playground/plots/main.cpp @@ -1,6 +1,6 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "Plot.h" diff --git a/playground/shadows/ArcPage.cpp b/playground/shadows/ArcPage.cpp new file mode 100644 index 00000000..3ed5c5e4 --- /dev/null +++ b/playground/shadows/ArcPage.cpp @@ -0,0 +1,109 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#include "ArcPage.h" +#include "ShadowedArc.h" +#include "Slider.h" + +#include + +namespace +{ + class ControlPanel : public QskGridBox + { + Q_OBJECT + + public: + ControlPanel( ShadowedArc* arc, QQuickItem* parent = nullptr ) + : QskGridBox( parent ) + { + setMargins( 5 ); + setSpacing( 10 ); + + { + auto slider = new Slider( "Start", 0, 360, 10, arc->startAngle() ); + connect( slider, &Slider::valueChanged, arc, &ShadowedArc::setStartAngle ); + + addItem( slider, 0, 0 ); + } + { + auto slider = new Slider( "Span", -360, 360, 10, arc->spanAngle() ); + connect( slider, &Slider::valueChanged, arc, &ShadowedArc::setSpanAngle ); + + addItem( slider, 0, 1 ); + } + { + auto slider = new Slider( "Extent", 0, 100, 1, arc->thickness() ); + connect( slider, &Slider::valueChanged, arc, &ShadowedArc::setThickness ); + + addItem( slider, 1, 0 ); + } + { + auto slider = new Slider( "Border", 0, 10, 1, arc->borderWidth() ); + connect( slider, &Slider::valueChanged, arc, &ShadowedArc::setBorderWidth ); + + addItem( slider, 1, 1); + } + { + auto slider = new Slider( "Spread Radius", -10, 50, 1, arc->spreadRadius() ); + connect( slider, &Slider::valueChanged, arc, &ShadowedArc::setSpreadRadius ); + + addItem( slider, 2, 0 ); + } + { + auto slider = new Slider( "Blur Radius", 0, 50, 1, arc->blurRadius() ); + connect( slider, &Slider::valueChanged, arc, &ShadowedArc::setBlurRadius ); + + addItem( slider, 2, 1 ); + } + { + auto slider = new Slider( "Offset X", -50, 50, 1, arc->offsetX() ); + connect( slider, &Slider::valueChanged, arc, &ShadowedArc::setOffsetX ); + + addItem( slider, 3, 0 ); + + } + { + auto slider = new Slider( "Offset Y", -50, 50, 1, arc->offsetY() ); + connect( slider, &Slider::valueChanged, arc, &ShadowedArc::setOffsetY ); + + addItem( slider, 3, 1 ); + } + } + }; +} + +ArcPage::ArcPage( QQuickItem* parent ) + : QskLinearBox( Qt::Vertical, parent ) +{ + auto arc = new ShadowedArc(); + arc->setMargins( 40 ); // some extra space for testing the offsets + + { + // initial settings + arc->setStartAngle( 45.0 ); + arc->setSpanAngle( 270.0 ); + arc->setThickness( 10.0 ); + + arc->setFillColor( Qt::darkRed ); + + arc->setBorderWidth( 0 ); + arc->setBorderColor( Qt::darkYellow ); + + arc->setShadowColor( Qt::black ); + arc->setSpreadRadius( 0.0 ); + arc->setBlurRadius( 4.0 ); + arc->setOffsetX( 2.0 ); + arc->setOffsetY( 2.0 ); + } + + auto panel = new ControlPanel( arc ); + panel->setSizePolicy( Qt::Vertical, QskSizePolicy::Fixed ); + + addItem( panel ); + addItem( arc ); +} + +#include "ArcPage.moc" diff --git a/playground/shadows/ArcPage.h b/playground/shadows/ArcPage.h new file mode 100644 index 00000000..e5ee9010 --- /dev/null +++ b/playground/shadows/ArcPage.h @@ -0,0 +1,14 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#pragma once + +#include + +class ArcPage : public QskLinearBox +{ + public: + ArcPage( QQuickItem* parent = nullptr ); +}; diff --git a/playground/shadows/BoxPage.cpp b/playground/shadows/BoxPage.cpp new file mode 100644 index 00000000..9c82c3cb --- /dev/null +++ b/playground/shadows/BoxPage.cpp @@ -0,0 +1,73 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#include "BoxPage.h" +#include "ShadowedBox.h" +#include "Slider.h" + +#include +#include + +namespace +{ + class ControlPanel : public QskLinearBox + { + public: + ControlPanel( ShadowedBox* box, QQuickItem* parent = nullptr ) + : QskLinearBox( Qt::Vertical, parent ) + { + { + auto slider = new Slider( "Offset X", -50, 50, 1, box->offsetX() ); + connect( slider, &Slider::valueChanged, box, &ShadowedBox::setOffsetX ); + + addItem( slider ); + } + { + auto slider = new Slider( "Offset Y", -50, 50, 1, box->offsetY() ); + connect( slider, &Slider::valueChanged, box, &ShadowedBox::setOffsetY ); + + addItem( slider ); + } + { + auto slider = new Slider( "Spread Radius", -10, 50, 1, box->spreadRadius() ); + connect( slider, &Slider::valueChanged, box, &ShadowedBox::setSpreadRadius ); + + addItem( slider ); + } + { + auto slider = new Slider( "Blur Radius", 0, 50, 1, box->blurRadius() ); + connect( slider, &Slider::valueChanged, box, &ShadowedBox::setBlurRadius ); + + addItem( slider ); + } + { + auto slider = new Slider( "Opacity", 0, 1, 0.01, box->opacity() ); + connect( slider, &Slider::valueChanged, box, &ShadowedBox::setOpacity ); + + addItem( slider ); + } + } + }; +} + +BoxPage::BoxPage( QQuickItem* parent ) + : QskLinearBox( Qt::Vertical, parent ) +{ + auto box = new ShadowedBox(); + box->setMargins( 40 ); // some extra space for testing the offsets + + { + box->setOffsetX( 10 ); + box->setOffsetY( 10 ); + box->setSpreadRadius( 0 ); + box->setBlurRadius( 5 ); + } + + auto panel = new ControlPanel( box ); + panel->setSizePolicy( Qt::Vertical, QskSizePolicy::Fixed ); + + addItem( panel ); + addItem( box ); +} diff --git a/playground/shadows/BoxPage.h b/playground/shadows/BoxPage.h new file mode 100644 index 00000000..77fe50f1 --- /dev/null +++ b/playground/shadows/BoxPage.h @@ -0,0 +1,19 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#pragma once + +#include + +class QskSlider; + +class BoxPage : public QskLinearBox +{ + public: + BoxPage( QQuickItem* parent = nullptr ); + + private: + void addSlider( int row, const QString&, QskSlider* ); +}; diff --git a/playground/shadows/CMakeLists.txt b/playground/shadows/CMakeLists.txt index 0d3466d7..30b2ad1e 100644 --- a/playground/shadows/CMakeLists.txt +++ b/playground/shadows/CMakeLists.txt @@ -1,6 +1,9 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ -qsk_add_example(shadows ShadowedBox.h ShadowedBox.cpp main.cpp) +qsk_add_example(shadows + BoxPage.h BoxPage.cpp ShadowedBox.h ShadowedBox.cpp + ArcPage.h ArcPage.cpp ShadowedArc.h ShadowedArc.cpp + Slider.h Slider.cpp main.cpp) diff --git a/playground/shadows/ShadowedArc.cpp b/playground/shadows/ShadowedArc.cpp new file mode 100644 index 00000000..bb209f3f --- /dev/null +++ b/playground/shadows/ShadowedArc.cpp @@ -0,0 +1,269 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#include "ShadowedArc.h" + +#include +#include +#include +#include + +#include +#include + +QSK_SUBCONTROL( ShadowedArc, Arc ) + +namespace +{ + class Skinlet : public QskSkinlet + { + using Inherited = QskSkinlet; + + public: + enum NodeRoles { ArcRole }; + + Skinlet( QskSkin* skin = nullptr ); + + QRectF subControlRect( const QskSkinnable*, + const QRectF&, QskAspect::Subcontrol ) const override; + + QSGNode* updateSubNode( const QskSkinnable*, + quint8 nodeRole, QSGNode* ) const override; + + private: + QSGNode* updateArcNode( const ShadowedArc*, QSGNode* node ) const; + }; + + Skinlet::Skinlet( QskSkin* skin ) + : QskSkinlet( skin ) + { + setNodeRoles( { ArcRole } ); + } + + QRectF Skinlet::subControlRect( const QskSkinnable* skinnable, + const QRectF& contentsRect, QskAspect::Subcontrol subControl ) const + { + if ( subControl == ShadowedArc::Arc ) + return contentsRect; + + return Inherited::subControlRect( skinnable, contentsRect, subControl ); + } + + QSGNode* Skinlet::updateSubNode( + const QskSkinnable* skinnable, quint8 nodeRole, QSGNode* node ) const + { + if ( nodeRole == ArcRole ) + { + auto arc = static_cast< const ShadowedArc* >( skinnable ); + return updateArcNode( arc, node ); + } + + return Inherited::updateSubNode( skinnable, nodeRole, node ); + } + + QSGNode* Skinlet::updateArcNode( const ShadowedArc* arc, QSGNode* node ) const + { + using Q = ShadowedArc; + + const auto rect = arc->subControlRect( Q::Arc ); + if ( rect.isEmpty() ) + return nullptr; + + auto arcNode = QskSGNode::ensureNode< QskArcNode >( node ); + + const auto metrics = arc->arcMetricsHint( Q::Arc ); + const auto fillGradient = arc->gradientHint( Q::Arc ); + + const auto borderColor = arc->color( Q::Arc | QskAspect::Border ); + const auto borderWidth = arc->metric( Q::Arc | QskAspect::Border ); + + const auto shadowColor = arc->shadowColorHint( Q::Arc ); + const auto shadowMetrics = arc->shadowMetricsHint( Q::Arc ); + + arcNode->setArcData( rect, metrics, borderWidth, borderColor, + fillGradient, shadowColor, shadowMetrics); + + return arcNode; + } +} + +ShadowedArc::ShadowedArc( QQuickItem* parent ) + : Inherited( parent ) +{ + auto skinlet = new Skinlet(); + skinlet->setOwnedBySkinnable( true ); + + setSkinlet( skinlet ); + + // initial settings + + setArcMetrics( { 0.0, 360.0, 1.0, Qt::RelativeSize } ); + + setFillColor( Qt::darkRed ); + + setBorderWidth( 0 ); + setBorderColor( Qt::gray ); + + setShadowColor( Qt::black ); + setShadowMetrics( { 0, 0, QPointF( 0, 0 ), Qt::AbsoluteSize } ); +} + +ShadowedArc::~ShadowedArc() +{ +} + +void ShadowedArc::setThickness( qreal thickness ) +{ + auto metrics = arcMetrics(); + metrics.setThickness( thickness ); + + setArcMetrics( metrics ); +} + +qreal ShadowedArc::thickness() const +{ + return arcMetrics().thickness(); +} + +void ShadowedArc::setBorderWidth( qreal width ) +{ + width = std::max( width, 0.0 ); + setMetric( Arc | QskAspect::Border, width ); +} + +qreal ShadowedArc::borderWidth() const +{ + return metric( Arc | QskAspect::Border ); +} + +void ShadowedArc::setStartAngle( qreal degrees ) +{ + auto metrics = arcMetrics(); + metrics.setStartAngle( degrees ); + + setArcMetrics( metrics ); +} + +qreal ShadowedArc::startAngle() const +{ + return arcMetrics().startAngle(); +} + +void ShadowedArc::setSpanAngle( qreal degrees ) +{ + auto metrics = arcMetrics(); + metrics.setSpanAngle( degrees ); + + setArcMetrics( metrics ); +} + +qreal ShadowedArc::spanAngle() const +{ + return arcMetrics().spanAngle(); +} + +void ShadowedArc::setOffsetX( qreal dx ) +{ + auto metrics = shadowMetrics(); + metrics.setOffsetX( dx ); + + setShadowMetrics( metrics ); +} + +qreal ShadowedArc::offsetX() const +{ + return shadowMetrics().offset().x(); +} + +void ShadowedArc::setOffsetY( qreal dy ) +{ + auto metrics = shadowMetrics(); + metrics.setOffsetY( dy ); + + setShadowMetrics( metrics ); +} + +qreal ShadowedArc::offsetY() const +{ + return shadowMetrics().offset().y(); +} + +void ShadowedArc::setSpreadRadius( qreal radius ) +{ + auto metrics = shadowMetrics(); + metrics.setSpreadRadius( radius ); + + setShadowMetrics( metrics ); +} + +qreal ShadowedArc::spreadRadius() const +{ + return shadowMetrics().spreadRadius(); +} + +void ShadowedArc::setBlurRadius( qreal radius ) +{ + auto metrics = shadowMetrics(); + metrics.setBlurRadius( radius ); + + setShadowMetrics( metrics ); +} + +qreal ShadowedArc::blurRadius() const +{ + return shadowMetrics().blurRadius(); +} + +void ShadowedArc::setFillColor( const QColor& color ) +{ + setColor( Arc, color ); +} + +QColor ShadowedArc::fillColor() const +{ + return color( Arc ); +} + +void ShadowedArc::setShadowColor( const QColor& color ) +{ + setShadowColorHint( Arc, color ); +} + +QColor ShadowedArc::shadowColor() const +{ + return shadowColorHint( Arc ); +} + +void ShadowedArc::setBorderColor( const QColor& color ) +{ + setColor( Arc | QskAspect::Border, color ); +} + +QColor ShadowedArc::borderColor() const +{ + return color( Arc | QskAspect::Border ); +} + +QskShadowMetrics ShadowedArc::shadowMetrics() const +{ + return shadowMetricsHint( Arc ); +} + +void ShadowedArc::setShadowMetrics( const QskShadowMetrics& metrics ) +{ + setShadowMetricsHint( Arc, metrics ); +} + +QskArcMetrics ShadowedArc::arcMetrics() const +{ + return arcMetricsHint( Arc ); +} + +void ShadowedArc::setArcMetrics( const QskArcMetrics& metrics ) +{ + setArcMetricsHint( Arc, metrics ); +} + +#include "moc_ShadowedArc.cpp" diff --git a/playground/shadows/ShadowedArc.h b/playground/shadows/ShadowedArc.h new file mode 100644 index 00000000..c8f486d3 --- /dev/null +++ b/playground/shadows/ShadowedArc.h @@ -0,0 +1,64 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#pragma once + +#include + +class QskShadowMetrics; +class QskArcMetrics; + +class ShadowedArc : public QskControl +{ + Q_OBJECT + + using Inherited = QskControl; + + public: + QSK_SUBCONTROLS( Arc ) + + ShadowedArc( QQuickItem* parent = nullptr ); + ~ShadowedArc() override; + + qreal thickness() const; + qreal borderWidth() const; + + qreal startAngle() const; + qreal spanAngle() const; + + qreal offsetX() const; + qreal offsetY() const; + + qreal spreadRadius() const; + qreal blurRadius() const; + + QColor borderColor() const; + QColor fillColor() const; + QColor shadowColor() const; + + public Q_SLOTS: + void setThickness( qreal ); + void setBorderWidth( qreal ); + + void setStartAngle( qreal ); + void setSpanAngle( qreal ); + + void setOffsetX( qreal ); + void setOffsetY( qreal ); + + void setSpreadRadius( qreal ); + void setBlurRadius( qreal ); + + void setBorderColor( const QColor& ); + void setFillColor( const QColor& ); + void setShadowColor( const QColor& ); + + private: + QskShadowMetrics shadowMetrics() const; + void setShadowMetrics( const QskShadowMetrics& ); + + QskArcMetrics arcMetrics() const; + void setArcMetrics( const QskArcMetrics& ); +}; diff --git a/playground/shadows/ShadowedBox.cpp b/playground/shadows/ShadowedBox.cpp index 2431e80e..dac3502d 100644 --- a/playground/shadows/ShadowedBox.cpp +++ b/playground/shadows/ShadowedBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -14,21 +14,10 @@ ShadowedBox::ShadowedBox( QQuickItem* parentItem ) : QskBox( true, parentItem ) { - QColor c( Qt::darkRed ); -#if 0 - c.setAlpha( 100 ); -#endif - - setGradientHint( Panel, c ); + setGradientHint( Panel, Qt::darkRed ); setBoxShapeHint( Panel, QskBoxShapeMetrics( 40, 0, 15, 0 ) ); setBoxBorderMetricsHint( Panel, 0 ); - -#if 0 - setBoxBorderMetricsHint( Panel, 10 ); - setBoxBorderColorsHint( Panel, Qt::blue ); -#endif - setShadowColorHint( Panel, Qt::black ); } diff --git a/playground/shadows/ShadowedBox.h b/playground/shadows/ShadowedBox.h index 5cc898d6..d0aaa88b 100644 --- a/playground/shadows/ShadowedBox.h +++ b/playground/shadows/ShadowedBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/shadows/Slider.cpp b/playground/shadows/Slider.cpp new file mode 100644 index 00000000..b6f4b8fc --- /dev/null +++ b/playground/shadows/Slider.cpp @@ -0,0 +1,47 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#include "Slider.h" + +#include +#include + +#include + +Slider::Slider( const QString& text, qreal min, qreal max, + qreal step, qreal value, QQuickItem* parent ) + : QskLinearBox( Qt::Horizontal, parent ) +{ + m_label = new QskTextLabel( text, this ); + m_label->setSizePolicy( Qt::Horizontal, QskSizePolicy::Fixed ); + + m_slider = new QskSlider( this ); + m_slider->setBoundaries( min, max ); + m_slider->setStepSize( step ); + m_slider->setSnap( true ); + m_slider->setValue( value ); + + m_valueLabel = new QskTextLabel( this ); + m_valueLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter ); + updateLabel( value ); + + const QFontMetricsF fm( m_valueLabel->font() ); + m_valueLabel->setFixedWidth( fm.horizontalAdvance( "-100" ) ); + + connect( m_slider, &QskSlider::valueChanged, this, &Slider::updateLabel ); + connect( m_slider, &QskSlider::valueChanged, this, &Slider::valueChanged ); +} + +void Slider::updateLabel( qreal value ) +{ + m_valueLabel->setText( QString::number( value ) ); +} + +void Slider::setValue( qreal value ) +{ + m_slider->setValue( value ); +} + +#include "moc_Slider.cpp" diff --git a/playground/shadows/Slider.h b/playground/shadows/Slider.h new file mode 100644 index 00000000..7698c323 --- /dev/null +++ b/playground/shadows/Slider.h @@ -0,0 +1,37 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#pragma once + +#include + +class QskSlider; +class QskTextLabel; + +class Slider : public QskLinearBox +{ + Q_OBJECT + + using Inherited = QskLinearBox; + + public: + Slider( const QString&, qreal min, qreal max, qreal step, + qreal value, QQuickItem* parent = nullptr ); + + qreal value() const; + + Q_SIGNALS: + void valueChanged( qreal ); + + public Q_SLOTS: + void setValue( qreal ); + + private: + void updateLabel( qreal ); + + QskTextLabel* m_label = nullptr; + QskSlider* m_slider = nullptr; + QskTextLabel* m_valueLabel = nullptr; +}; diff --git a/playground/shadows/main.cpp b/playground/shadows/main.cpp index 2d6d6de9..d3f110fc 100644 --- a/playground/shadows/main.cpp +++ b/playground/shadows/main.cpp @@ -1,131 +1,33 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ -#include "ShadowedBox.h" +#include "BoxPage.h" +#include "ArcPage.h" #include #include -#include -#include -#include -#include +#include +#include #include #include -#include -class BoxPanel : public QskBox +namespace { - public: - BoxPanel( QQuickItem* parent = nullptr ) - : QskBox( parent ) + class TabView : public QskTabView { - setAutoLayoutChildren( true ); - setPadding( 60 ); + public: + TabView() + { + //setTabBarEdge( Qt::LeftEdge ); - setPanel( true ); - setGradientHint( QskBox::Panel, QGradient::SnowAgain ); - } -}; - -class Slider : public QskSlider -{ - public: - Slider( qreal min, qreal max, qreal step, qreal value, QQuickItem* parent = nullptr ) - : QskSlider( parent ) - { - setBoundaries( min, max ); - setStepSize( step ); - setSnap( true ); - setValue( value ); - } -}; - -class ValueLabel : public QskTextLabel -{ - public: - ValueLabel( QQuickItem* parent = nullptr ) - : QskTextLabel( parent ) - { - setFixedWidth( QFontMetrics( font() ).horizontalAdvance( "-100" ) ); - setAlignment( Qt::AlignLeft | Qt::AlignVCenter ); - } - - void setValue( qreal value ) - { - setText( QString::number( value ) ); - } -}; - -class GridBox : public QskGridBox -{ - public: - GridBox( QQuickItem* parent = nullptr ) - : QskGridBox( parent ) - { - setPanel( true ); - setPadding( 5 ); - setColumnStretchFactor( 1, 1 ); - - auto sliderX = new Slider( -50, 50, 1, 10 ); - auto sliderY = new Slider( -50, 50, 1, 10 ); - auto sliderSpread = new Slider( 0, 50, 1, 0 ); - auto sliderBlur = new Slider( 0, 50, 1, 10 ); - auto sliderOpacity = new Slider( 0, 1, 0.01, 1 ); - - auto panel = new BoxPanel(); - - int row = 0; - - addSlider( row++, "Offset X", sliderX ); - addSlider( row++, "Offset Y", sliderY ); - addSlider( row++, "Spread Radius", sliderSpread ); - addSlider( row++, "Blur Radius", sliderBlur ); - addSlider( row++, "Opacity", sliderOpacity ); - - addItem( panel, row, 0, -1, -1 ); - - auto box = new ShadowedBox( panel ); - - box->setOffsetX( sliderX->value() ); - box->setOffsetY( sliderY->value() ); - box->setSpreadRadius( sliderSpread->value() ); - box->setBlurRadius( sliderBlur->value() ); - box->setOpacity( sliderOpacity->value() ); - - connect( sliderX, &QskSlider::valueChanged, - box, &ShadowedBox::setOffsetX ); - - connect( sliderY, &QskSlider::valueChanged, - box, &ShadowedBox::setOffsetY ); - - connect( sliderSpread, &QskSlider::valueChanged, - box, &ShadowedBox::setSpreadRadius ); - - connect( sliderBlur, &QskSlider::valueChanged, - box, &ShadowedBox::setBlurRadius ); - - connect( sliderOpacity, &QskSlider::valueChanged, - box, &ShadowedBox::setOpacity ); - } - - private: - void addSlider( int row, const QString& text, QskSlider* slider ) - { - addItem( new QskTextLabel( text ), row, 0 ); - addItem( slider, row, 1 ); - - auto label = new ValueLabel(); - label->setValue( slider->value() ); - - addItem( label, row, 2 ); - - connect( slider, &QskSlider::valueChanged, - label, [label]( qreal value ) { label->setText( QString::number( value ) ); } ); - } -}; + addTab( "Arc Shadow", new ArcPage() ); + addTab( "Box Shadow", new BoxPage() ); + } + }; +} int main( int argc, char* argv[] ) { @@ -138,7 +40,7 @@ int main( int argc, char* argv[] ) SkinnyShortcut::enable( SkinnyShortcut::AllShortcuts ); QskWindow window; - window.addItem( new GridBox() ); + window.addItem( new TabView() ); window.resize( 600, 600 ); window.show(); diff --git a/playground/shapes/CMakeLists.txt b/playground/shapes/CMakeLists.txt index 89122dc9..b02b0265 100644 --- a/playground/shapes/CMakeLists.txt +++ b/playground/shapes/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/playground/shapes/GeometricShape.cpp b/playground/shapes/GeometricShape.cpp index 92935093..99932352 100644 --- a/playground/shapes/GeometricShape.cpp +++ b/playground/shapes/GeometricShape.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/shapes/GeometricShape.h b/playground/shapes/GeometricShape.h index 3e521a49..ee8296c5 100644 --- a/playground/shapes/GeometricShape.h +++ b/playground/shapes/GeometricShape.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/shapes/ShapeItem.cpp b/playground/shapes/ShapeItem.cpp index 9f1f9421..73771ec9 100644 --- a/playground/shapes/ShapeItem.cpp +++ b/playground/shapes/ShapeItem.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/shapes/ShapeItem.h b/playground/shapes/ShapeItem.h index b8d15300..edab674c 100644 --- a/playground/shapes/ShapeItem.h +++ b/playground/shapes/ShapeItem.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/shapes/Stroke.cpp b/playground/shapes/Stroke.cpp index d72090d7..96c7c9e5 100644 --- a/playground/shapes/Stroke.cpp +++ b/playground/shapes/Stroke.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/shapes/Stroke.h b/playground/shapes/Stroke.h index 85cd0464..e8b63ded 100644 --- a/playground/shapes/Stroke.h +++ b/playground/shapes/Stroke.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/shapes/Window.cpp b/playground/shapes/Window.cpp index 72a30f39..13eb59fd 100644 --- a/playground/shapes/Window.cpp +++ b/playground/shapes/Window.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/shapes/Window.h b/playground/shapes/Window.h index 10858ba5..112f59c2 100644 --- a/playground/shapes/Window.h +++ b/playground/shapes/Window.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/shapes/main.cpp b/playground/shapes/main.cpp index e253cf51..3348afa9 100644 --- a/playground/shapes/main.cpp +++ b/playground/shapes/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/playground/webview/CMakeLists.txt b/playground/webview/CMakeLists.txt index 54529c22..eea87839 100644 --- a/playground/webview/CMakeLists.txt +++ b/playground/webview/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/playground/webview/main.cpp b/playground/webview/main.cpp index 17aa9b59..f4a4294b 100644 --- a/playground/webview/main.cpp +++ b/playground/webview/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/qmlexport/CMakeLists.txt b/qmlexport/CMakeLists.txt index ef245952..e1b78483 100644 --- a/qmlexport/CMakeLists.txt +++ b/qmlexport/CMakeLists.txt @@ -1,16 +1,27 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ -set(HEADERS QskQmlGlobal.h QskShortcutQml.h QskLayoutQml.h QskMainQml.h QskQml.h) -set(SOURCES QskShortcutQml.cpp QskLayoutQml.cpp QskMainQml.cpp QskQml.cpp) +set(HEADERS + QskQmlGlobal.h + QskShortcutQml.h + QskLayoutQml.h + QskMainQml.h + QskQml.h) + +set(SOURCES + QskShortcutQml.cpp + QskLayoutQml.cpp + QskMainQml.cpp + QskQml.cpp) set(target qskqmlexport) qsk_add_library(${target} SHARED ${SOURCES} ${HEADERS}) target_link_libraries(${target} PRIVATE qskinny) -target_include_directories(${target} PUBLIC ${CMAKE_CURRENT_LIST_DIR}) +target_include_directories(${target} PUBLIC + $) set_target_properties(${target} PROPERTIES PUBLIC_HEADER QskQml.h) if(BUILD_QSKDLL) @@ -20,6 +31,34 @@ if(BUILD_QSKDLL) VERSION ${CMAKE_PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} ) endif() -set_target_properties(${target} PROPERTIES FOLDER libs) +# packaging +set(PACKAGE_NAME QmlExport) +set(PACKAGE_TARGET_FILENAME QSkinny${PACKAGE_NAME}Targets.cmake) +set(QSKQE_INSTALL_HEADERS "${CMAKE_INSTALL_INCLUDEDIR}/${target}") -install(TARGETS ${target} ) +set_target_properties(${target} PROPERTIES FOLDER libs) +set_target_properties(${target} PROPERTIES EXPORT_NAME QmlExport) + +install(TARGETS ${target} EXPORT ${PACKAGE_TARGET_FILENAME} + LIBRARY DESTINATION ${QSK_INSTALL_LIBS} + ARCHIVE DESTINATION ${QSK_INSTALL_LIBS} + RUNTIME DESTINATION ${QSK_INSTALL_LIBS} + INCLUDES DESTINATION ${QSK_INSTALL_HEADERS} + PUBLIC_HEADER DESTINATION ${QSK_INSTALL_HEADERS}) + +export(EXPORT ${PACKAGE_TARGET_FILENAME} + NAMESPACE ${PACKAGE_NAMESPACE}) + +install(EXPORT ${PACKAGE_TARGET_FILENAME} + FILE + ${PACKAGE_TARGET_FILENAME} + NAMESPACE + ${PACKAGE_NAMESPACE} + DESTINATION + ${PACKAGE_LOCATION}) + +if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + install(FILES $ + DESTINATION + ${QSK_INSTALL_LIBS} OPTIONAL) +endif() diff --git a/qmlexport/QskLayoutQml.cpp b/qmlexport/QskLayoutQml.cpp index 72a1b018..d089504e 100644 --- a/qmlexport/QskLayoutQml.cpp +++ b/qmlexport/QskLayoutQml.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/qmlexport/QskLayoutQml.h b/qmlexport/QskLayoutQml.h index c8c92be2..89ed3ee0 100644 --- a/qmlexport/QskLayoutQml.h +++ b/qmlexport/QskLayoutQml.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/qmlexport/QskMainQml.cpp b/qmlexport/QskMainQml.cpp index 54d0d640..05cb69e8 100644 --- a/qmlexport/QskMainQml.cpp +++ b/qmlexport/QskMainQml.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/qmlexport/QskMainQml.h b/qmlexport/QskMainQml.h index e3b0e779..438a4e6e 100644 --- a/qmlexport/QskMainQml.h +++ b/qmlexport/QskMainQml.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/qmlexport/QskQml.cpp b/qmlexport/QskQml.cpp index b8abaf2a..b8c2c20a 100644 --- a/qmlexport/QskQml.cpp +++ b/qmlexport/QskQml.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -252,6 +253,7 @@ void QskQml::registerTypes() registerGadget< QskBoxBorderMetrics >(); registerGadget< QskBoxShapeMetrics >(); + registerGadget< QskGraduationMetrics >(); registerGadget< QskShadowMetrics >(); registerGadget< QskIntervalF >(); registerGadget< QskLayoutMetrics >(); diff --git a/qmlexport/QskQml.h b/qmlexport/QskQml.h index 6a65b8c2..90c7f216 100644 --- a/qmlexport/QskQml.h +++ b/qmlexport/QskQml.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/qmlexport/QskQml.hpp b/qmlexport/QskQml.hpp index ef252500..dff4db9a 100644 --- a/qmlexport/QskQml.hpp +++ b/qmlexport/QskQml.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/qmlexport/QskQmlGlobal.h b/qmlexport/QskQmlGlobal.h index 13141da7..7c937466 100644 --- a/qmlexport/QskQmlGlobal.h +++ b/qmlexport/QskQmlGlobal.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/qmlexport/QskShortcutQml.cpp b/qmlexport/QskShortcutQml.cpp index 6b0a450a..51600216 100644 --- a/qmlexport/QskShortcutQml.cpp +++ b/qmlexport/QskShortcutQml.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/qmlexport/QskShortcutQml.h b/qmlexport/QskShortcutQml.h index 9783879a..5ecc4067 100644 --- a/qmlexport/QskShortcutQml.h +++ b/qmlexport/QskShortcutQml.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/fluent2/QskFluent2Global.h b/skins/fluent2/QskFluent2Global.h index 0a58068e..f99a52f2 100644 --- a/skins/fluent2/QskFluent2Global.h +++ b/skins/fluent2/QskFluent2Global.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2023 Edelhirsch Software GmbH + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/fluent2/QskFluent2Skin.cpp b/skins/fluent2/QskFluent2Skin.cpp index 4f5de05d..240c23d7 100644 --- a/skins/fluent2/QskFluent2Skin.cpp +++ b/skins/fluent2/QskFluent2Skin.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2023 Edelhirsch Software GmbH + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -646,9 +646,18 @@ void Editor::setupFocusIndicatorColors( QskAspect::Section section, const QskFluent2Theme& theme ) { using Q = QskFocusIndicator; + using A = QskAspect; + const auto& pal = theme.palette; - setBoxBorderColors( Q::Panel | section, pal.strokeColor.focus.outer ); + const auto aspect = Q::Panel | section; + const auto color = pal.strokeColor.focus.outer; + + setBoxBorderColors( aspect, color ); + setBoxBorderColors( aspect | Q::Disabled, QskRgb::toTransparent( color, 0 ) ); + + setAnimation( Q::Panel | A::Color, 200 ); + setAnimation( Q::Panel | A::Color | Q::Disabled, 500 ); } void Editor::setupListViewMetrics() diff --git a/skins/fluent2/QskFluent2Skin.h b/skins/fluent2/QskFluent2Skin.h index 2678dba4..c0be6488 100644 --- a/skins/fluent2/QskFluent2Skin.h +++ b/skins/fluent2/QskFluent2Skin.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2023 Edelhirsch Software GmbH + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/fluent2/QskFluent2SkinFactory.cpp b/skins/fluent2/QskFluent2SkinFactory.cpp index 8b393b73..b9beb18d 100644 --- a/skins/fluent2/QskFluent2SkinFactory.cpp +++ b/skins/fluent2/QskFluent2SkinFactory.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2023 Edelhirsch Software GmbH + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/fluent2/QskFluent2SkinFactory.h b/skins/fluent2/QskFluent2SkinFactory.h index 3b081862..2f5bf8fa 100644 --- a/skins/fluent2/QskFluent2SkinFactory.h +++ b/skins/fluent2/QskFluent2SkinFactory.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2023 Edelhirsch Software GmbH + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/fluent2/QskFluent2Theme.cpp b/skins/fluent2/QskFluent2Theme.cpp index f7c20d30..490bf2e0 100644 --- a/skins/fluent2/QskFluent2Theme.cpp +++ b/skins/fluent2/QskFluent2Theme.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2023 Edelhirsch Software GmbH + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/fluent2/QskFluent2Theme.h b/skins/fluent2/QskFluent2Theme.h index a4d18feb..74d2925f 100644 --- a/skins/fluent2/QskFluent2Theme.h +++ b/skins/fluent2/QskFluent2Theme.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2023 Edelhirsch Software GmbH + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/material3/CMakeLists.txt b/skins/material3/CMakeLists.txt index a76dfaba..cce742e0 100644 --- a/skins/material3/CMakeLists.txt +++ b/skins/material3/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/skins/material3/QskMaterial3Global.h b/skins/material3/QskMaterial3Global.h index 5280e12c..ab63d841 100644 --- a/skins/material3/QskMaterial3Global.h +++ b/skins/material3/QskMaterial3Global.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/material3/QskMaterial3Skin.cpp b/skins/material3/QskMaterial3Skin.cpp index 8443dbf5..e548d72c 100644 --- a/skins/material3/QskMaterial3Skin.cpp +++ b/skins/material3/QskMaterial3Skin.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2022 Edelhirsch Software GmbH + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/material3/QskMaterial3Skin.h b/skins/material3/QskMaterial3Skin.h index 2dbdcbc9..99ecc035 100644 --- a/skins/material3/QskMaterial3Skin.h +++ b/skins/material3/QskMaterial3Skin.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2022 Edelhirsch Software GmbH + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/material3/QskMaterial3SkinFactory.cpp b/skins/material3/QskMaterial3SkinFactory.cpp index 541db64d..16c2f6dd 100644 --- a/skins/material3/QskMaterial3SkinFactory.cpp +++ b/skins/material3/QskMaterial3SkinFactory.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/material3/QskMaterial3SkinFactory.h b/skins/material3/QskMaterial3SkinFactory.h index 292b8b1a..927bd032 100644 --- a/skins/material3/QskMaterial3SkinFactory.h +++ b/skins/material3/QskMaterial3SkinFactory.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/squiek/CMakeLists.txt b/skins/squiek/CMakeLists.txt index e8674ede..e7c873f6 100644 --- a/skins/squiek/CMakeLists.txt +++ b/skins/squiek/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ diff --git a/skins/squiek/QskSquiekGlobal.h b/skins/squiek/QskSquiekGlobal.h index 659f344a..8ff5e4f7 100644 --- a/skins/squiek/QskSquiekGlobal.h +++ b/skins/squiek/QskSquiekGlobal.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/squiek/QskSquiekSkin.cpp b/skins/squiek/QskSquiekSkin.cpp index 19530b32..c2e888c5 100644 --- a/skins/squiek/QskSquiekSkin.cpp +++ b/skins/squiek/QskSquiekSkin.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -555,12 +555,19 @@ void Editor::setupProgressRing() void Editor::setupFocusIndicator() { using Q = QskFocusIndicator; + using A = QskAspect; setPadding( Q::Panel, 5 ); setBoxBorderMetrics( Q::Panel, 2 ); setBoxShape( Q::Panel, 4 ); setGradient( Q::Panel, Qt::transparent ); + setBoxBorderColors( Q::Panel, m_pal.highlighted ); + setBoxBorderColors( Q::Panel | Q::Disabled, + QskRgb::toTransparent( m_pal.highlighted, 0 ) ); + + setAnimation( Q::Panel | A::Color, 200 ); + setAnimation( Q::Panel | A::Color | Q::Disabled, 500 ); } void Editor::setupSeparator() diff --git a/skins/squiek/QskSquiekSkin.h b/skins/squiek/QskSquiekSkin.h index fad53065..0036a35f 100644 --- a/skins/squiek/QskSquiekSkin.h +++ b/skins/squiek/QskSquiekSkin.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/squiek/QskSquiekSkinFactory.cpp b/skins/squiek/QskSquiekSkinFactory.cpp index 937c771c..d2c4711d 100644 --- a/skins/squiek/QskSquiekSkinFactory.cpp +++ b/skins/squiek/QskSquiekSkinFactory.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/skins/squiek/QskSquiekSkinFactory.h b/skins/squiek/QskSquiekSkinFactory.h index 06b845c1..42b71c86 100644 --- a/skins/squiek/QskSquiekSkinFactory.h +++ b/skins/squiek/QskSquiekSkinFactory.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 59ba35fa..351997f7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ @@ -99,6 +99,7 @@ list(APPEND SOURCES list(APPEND HEADERS nodes/QskArcNode.h + nodes/QskArcShadowNode.h nodes/QskBasicLinesNode.h nodes/QskBoxNode.h nodes/QskBoxClipNode.h @@ -115,10 +116,12 @@ list(APPEND HEADERS nodes/QskGraduationNode.h nodes/QskGraduationRenderer.h nodes/QskGraphicNode.h + nodes/QskTreeNode.h nodes/QskLinesNode.h nodes/QskPaintedNode.h nodes/QskPlainTextRenderer.h nodes/QskRichTextRenderer.h + nodes/QskSceneTexture.h nodes/QskSGNode.h nodes/QskStrokeNode.h nodes/QskStippledLineRenderer.h @@ -136,6 +139,7 @@ list(APPEND PRIVATE_HEADERS list(APPEND SOURCES nodes/QskArcNode.cpp + nodes/QskArcShadowNode.cpp nodes/QskBasicLinesNode.cpp nodes/QskBoxNode.cpp nodes/QskBoxClipNode.cpp @@ -156,10 +160,12 @@ list(APPEND SOURCES nodes/QskPlainTextRenderer.cpp nodes/QskRectangleNode.cpp nodes/QskRichTextRenderer.cpp + nodes/QskSceneTexture.cpp nodes/QskSGNode.cpp nodes/QskStrokeNode.cpp nodes/QskStippledLineRenderer.cpp nodes/QskShapeNode.cpp + nodes/QskTreeNode.cpp nodes/QskGradientMaterial.cpp nodes/QskTextNode.cpp nodes/QskTextRenderer.cpp @@ -167,7 +173,24 @@ list(APPEND SOURCES nodes/QskVertex.cpp ) -qt_add_resources(SOURCES nodes/shaders.qrc) +if (QT_VERSION_MAJOR VERSION_LESS 6) + qt_add_resources(SOURCES nodes/shaders.qrc) +else() + list(APPEND SHADERS + nodes/shaders/arcshadow-vulkan.vert + nodes/shaders/arcshadow-vulkan.frag + nodes/shaders/boxshadow-vulkan.vert + nodes/shaders/boxshadow-vulkan.frag + nodes/shaders/crisplines-vulkan.vert + nodes/shaders/crisplines-vulkan.frag + nodes/shaders/gradientconic-vulkan.vert + nodes/shaders/gradientconic-vulkan.frag + nodes/shaders/gradientlinear-vulkan.vert + nodes/shaders/gradientlinear-vulkan.frag + nodes/shaders/gradientradial-vulkan.vert + nodes/shaders/gradientradial-vulkan.frag + ) +endif() list(APPEND HEADERS controls/QskAbstractButton.h @@ -467,6 +490,10 @@ if(BUILD_QSKDLL) set_target_properties(${target} PROPERTIES DEFINE_SYMBOL QSK_MAKEDLL) endif() +if (QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6) + qsk_add_shaders( ${target} FILES ${SHADERS} ) +endif() + target_include_directories(${target} PUBLIC $ $ @@ -476,6 +503,10 @@ target_include_directories(${target} PUBLIC $ $) +target_include_directories(${target} + INTERFACE + $) + target_link_libraries(${target} PUBLIC Qt::Core Qt::CorePrivate Qt::Quick Qt::QuickPrivate) @@ -492,7 +523,7 @@ if(ENABLE_PINYIN) target_link_libraries(${target} PRIVATE pinyin Fcitx5::Utils) target_include_directories(${target} - PUBLIC $) + PUBLIC $) endif() set_target_properties(${target} PROPERTIES FOLDER libs) @@ -503,7 +534,36 @@ set_target_properties(${target} list(TRANSFORM HEADERS PREPEND "${CMAKE_CURRENT_LIST_DIR}/") set_target_properties(${target} PROPERTIES PUBLIC_HEADER "${HEADERS}") +set_target_properties(${target} PROPERTIES EXPORT_NAME ${PROJECT_NAME}) set_target_properties(${target} PROPERTIES VERSION ${CMAKE_PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} ) -install(TARGETS ${target} ) +# packaging +set(PACKAGE_NAME ${PROJECT_NAME}) + +# setup destination file paths for qskinny target +install(TARGETS ${target} EXPORT ${PACKAGE_NAME}Targets + LIBRARY DESTINATION ${QSK_INSTALL_LIBS} + ARCHIVE DESTINATION ${QSK_INSTALL_LIBS} + RUNTIME DESTINATION ${QSK_INSTALL_LIBS} + INCLUDES DESTINATION ${QSK_INSTALL_HEADERS} + PUBLIC_HEADER DESTINATION ${QSK_INSTALL_HEADERS}) + +# export QSkinnyTargets namespace +export(EXPORT ${PACKAGE_NAME}Targets + NAMESPACE ${PACKAGE_NAMESPACE}) + +# install QSkinnyTargets under QSkinny namespace +install(EXPORT ${PACKAGE_NAME}Targets + FILE + ${PACKAGE_NAME}Targets.cmake + NAMESPACE + ${PACKAGE_NAMESPACE} + DESTINATION + ${PACKAGE_LOCATION}) + +if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + install(FILES $ + DESTINATION + ${QSK_INSTALL_LIBS} OPTIONAL) +endif() diff --git a/src/common/QskArcMetrics.cpp b/src/common/QskArcMetrics.cpp index 938a0ab9..956508ce 100644 --- a/src/common/QskArcMetrics.cpp +++ b/src/common/QskArcMetrics.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskArcMetrics.h b/src/common/QskArcMetrics.h index 6197f3a9..fe80ed46 100644 --- a/src/common/QskArcMetrics.h +++ b/src/common/QskArcMetrics.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskAspect.cpp b/src/common/QskAspect.cpp index a5d901c1..67c0a69a 100644 --- a/src/common/QskAspect.cpp +++ b/src/common/QskAspect.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskAspect.h b/src/common/QskAspect.h index 7b67eb36..badad39a 100644 --- a/src/common/QskAspect.h +++ b/src/common/QskAspect.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskBoxBorderColors.cpp b/src/common/QskBoxBorderColors.cpp index 75a39ec3..9bde095b 100644 --- a/src/common/QskBoxBorderColors.cpp +++ b/src/common/QskBoxBorderColors.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskBoxBorderColors.h b/src/common/QskBoxBorderColors.h index 64fe383b..9cbad86a 100644 --- a/src/common/QskBoxBorderColors.h +++ b/src/common/QskBoxBorderColors.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskBoxBorderMetrics.cpp b/src/common/QskBoxBorderMetrics.cpp index 6bb4d1e0..1272f87e 100644 --- a/src/common/QskBoxBorderMetrics.cpp +++ b/src/common/QskBoxBorderMetrics.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskBoxBorderMetrics.h b/src/common/QskBoxBorderMetrics.h index 807bf546..333c58c0 100644 --- a/src/common/QskBoxBorderMetrics.h +++ b/src/common/QskBoxBorderMetrics.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskBoxHints.cpp b/src/common/QskBoxHints.cpp index 08fd8a76..851078c7 100644 --- a/src/common/QskBoxHints.cpp +++ b/src/common/QskBoxHints.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskBoxHints.h b/src/common/QskBoxHints.h index 969c89cb..7da0ed65 100644 --- a/src/common/QskBoxHints.h +++ b/src/common/QskBoxHints.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskBoxShapeMetrics.cpp b/src/common/QskBoxShapeMetrics.cpp index 06a39ba1..3441d0fa 100644 --- a/src/common/QskBoxShapeMetrics.cpp +++ b/src/common/QskBoxShapeMetrics.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskBoxShapeMetrics.h b/src/common/QskBoxShapeMetrics.h index dec4d914..2252be63 100644 --- a/src/common/QskBoxShapeMetrics.h +++ b/src/common/QskBoxShapeMetrics.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskFunctions.cpp b/src/common/QskFunctions.cpp index 5b40280f..892c9a84 100644 --- a/src/common/QskFunctions.cpp +++ b/src/common/QskFunctions.cpp @@ -1,3 +1,8 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + #include "QskFunctions.h" #include diff --git a/src/common/QskFunctions.h b/src/common/QskFunctions.h index 1ac3e3d9..38f85add 100644 --- a/src/common/QskFunctions.h +++ b/src/common/QskFunctions.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskGlobal.h b/src/common/QskGlobal.h index 44b20eed..408d6e2b 100644 --- a/src/common/QskGlobal.h +++ b/src/common/QskGlobal.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskGradient.cpp b/src/common/QskGradient.cpp index 31e18a0a..3a66b5e8 100644 --- a/src/common/QskGradient.cpp +++ b/src/common/QskGradient.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskGradient.h b/src/common/QskGradient.h index 441aaa4f..7e5fd665 100644 --- a/src/common/QskGradient.h +++ b/src/common/QskGradient.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskGradientDirection.cpp b/src/common/QskGradientDirection.cpp index 900377b5..18f58521 100644 --- a/src/common/QskGradientDirection.cpp +++ b/src/common/QskGradientDirection.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskGradientDirection.h b/src/common/QskGradientDirection.h index 4ba3e1ad..68cc99a5 100644 --- a/src/common/QskGradientDirection.h +++ b/src/common/QskGradientDirection.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskGradientStop.cpp b/src/common/QskGradientStop.cpp index ab255c67..451fa70c 100644 --- a/src/common/QskGradientStop.cpp +++ b/src/common/QskGradientStop.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -273,6 +273,25 @@ QskGradientStops qskInterpolatedGradientStops( return qskInterpolatedStops( from, to, ratio ); } +QColor qskInterpolatedColorAt( const QskGradientStops& stops, qreal pos ) noexcept +{ + if ( stops.isEmpty() ) + return QColor(); + + pos = qBound( 0.0, pos, 1.0 ); + + if ( pos <= stops.first().position() ) + return stops.first().color(); + + for ( int i = 1; i < stops.count(); i++ ) + { + if ( pos <= stops[i].position() ) + return qskInterpolatedColor( stops, i - 1, i, pos ); + } + + return stops.last().color(); +} + QskGradientStops qskExtractedGradientStops( const QskGradientStops& stops, qreal from, qreal to ) { @@ -421,4 +440,3 @@ QGradientStops qskToQGradientStops( const QskGradientStops& stops ) return qStops; } - diff --git a/src/common/QskGradientStop.h b/src/common/QskGradientStop.h index 2b265d66..ae6bed02 100644 --- a/src/common/QskGradientStop.h +++ b/src/common/QskGradientStop.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -120,6 +120,8 @@ QSK_EXPORT QDebug operator<<( QDebug, const QskGradientStop& ); typedef QVector< QskGradientStop > QskGradientStops; +QSK_EXPORT QColor qskInterpolatedColorAt( const QskGradientStops&, qreal pos ) noexcept; + QSK_EXPORT bool qskIsMonochrome( const QskGradientStops& ) noexcept; QSK_EXPORT bool qskIsVisible( const QskGradientStops& ) noexcept; diff --git a/src/common/QskGraduation.cpp b/src/common/QskGraduation.cpp index e9680550..3d20132d 100644 --- a/src/common/QskGraduation.cpp +++ b/src/common/QskGraduation.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskGraduation.h b/src/common/QskGraduation.h index 08d24449..9bb6e9b2 100644 --- a/src/common/QskGraduation.h +++ b/src/common/QskGraduation.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskGraduationMetrics.cpp b/src/common/QskGraduationMetrics.cpp index e2ef5378..4feb8941 100644 --- a/src/common/QskGraduationMetrics.cpp +++ b/src/common/QskGraduationMetrics.cpp @@ -1,3 +1,8 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + #include "QskGraduationMetrics.h" #include diff --git a/src/common/QskGraduationMetrics.h b/src/common/QskGraduationMetrics.h index 73582eff..26c2b546 100644 --- a/src/common/QskGraduationMetrics.h +++ b/src/common/QskGraduationMetrics.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskHctColor.h b/src/common/QskHctColor.h index 4d7541b3..dbe5fe17 100644 --- a/src/common/QskHctColor.h +++ b/src/common/QskHctColor.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskIntervalF.cpp b/src/common/QskIntervalF.cpp index 5b31268b..9e579a33 100644 --- a/src/common/QskIntervalF.cpp +++ b/src/common/QskIntervalF.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskIntervalF.h b/src/common/QskIntervalF.h index 72b7fb44..fdbf4289 100644 --- a/src/common/QskIntervalF.h +++ b/src/common/QskIntervalF.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskLabelData.cpp b/src/common/QskLabelData.cpp index c4ae86ba..0d33a79a 100644 --- a/src/common/QskLabelData.cpp +++ b/src/common/QskLabelData.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskLabelData.h b/src/common/QskLabelData.h index 2ed156a6..0ce779a4 100644 --- a/src/common/QskLabelData.h +++ b/src/common/QskLabelData.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskMargins.cpp b/src/common/QskMargins.cpp index 5aa5f98e..80927e24 100644 --- a/src/common/QskMargins.cpp +++ b/src/common/QskMargins.cpp @@ -1,3 +1,8 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + #include "QskMargins.h" #include diff --git a/src/common/QskMargins.h b/src/common/QskMargins.h index bc433294..faa43f9a 100644 --- a/src/common/QskMargins.h +++ b/src/common/QskMargins.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskMetaFunction.cpp b/src/common/QskMetaFunction.cpp index 0eb31d39..56d04080 100644 --- a/src/common/QskMetaFunction.cpp +++ b/src/common/QskMetaFunction.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskMetaFunction.h b/src/common/QskMetaFunction.h index 75880caf..d521574b 100644 --- a/src/common/QskMetaFunction.h +++ b/src/common/QskMetaFunction.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskMetaFunction.hpp b/src/common/QskMetaFunction.hpp index e8905ab5..386c6a46 100644 --- a/src/common/QskMetaFunction.hpp +++ b/src/common/QskMetaFunction.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -47,11 +47,8 @@ class QskMetaFunction::FunctionCall : public QtPrivate::QSlotObjectBase namespace QskMetaFunctionCall { - using FunctionCall = QskMetaFunction::FunctionCall; - using namespace QtPrivate; - template< typename Function, typename Args, typename R > - class StaticFunctionCall : public FunctionCall + class StaticFunctionCall : public QskMetaFunction::FunctionCall { using MetaCall = StaticFunctionCall< Function, Args, R >; @@ -74,7 +71,7 @@ namespace QskMetaFunctionCall } case Call: { - typedef FunctionPointer< Function > FuncType; + using FuncType = QtPrivate::FunctionPointer< Function >; FuncType::template call< Args, R >( static_cast< MetaCall* >( functionCall )->m_function, object, args ); @@ -100,7 +97,7 @@ namespace QskMetaFunctionCall }; template< typename Function, typename Args, typename R > - class MemberFunctionCall : public FunctionCall + class MemberFunctionCall : public QskMetaFunction::FunctionCall { using MetaCall = MemberFunctionCall< Function, Args, R >; @@ -123,7 +120,7 @@ namespace QskMetaFunctionCall } case Call: { - typedef FunctionPointer< Function > FuncType; + using FuncType = QtPrivate::FunctionPointer< Function >; FuncType::template call< Args, R >( static_cast< MetaCall* >( functionCall )->m_function, @@ -144,7 +141,7 @@ namespace QskMetaFunctionCall }; template< typename Function, int N, typename Args, typename R > - class FunctorFunctionCall : public FunctionCall + class FunctorFunctionCall : public QskMetaFunction::FunctionCall { using MetaCall = FunctorFunctionCall< Function, N, Args, R >; @@ -167,7 +164,11 @@ namespace QskMetaFunctionCall } case Call: { - typedef Functor< Function, N > FuncType; +#if QT_VERSION < QT_VERSION_CHECK( 6, 7, 0 ) + using FuncType = QtPrivate::Functor< Function, N >; +#else + using FuncType = QtPrivate::Callable< Function, Args >; +#endif FuncType::template call< Args, R >( static_cast< MetaCall* >( functionCall )->m_function, object, args ); diff --git a/src/common/QskMetaInvokable.cpp b/src/common/QskMetaInvokable.cpp index 2dce0046..1f73633d 100644 --- a/src/common/QskMetaInvokable.cpp +++ b/src/common/QskMetaInvokable.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskMetaInvokable.h b/src/common/QskMetaInvokable.h index 1cfd2ddf..8dca8b0d 100644 --- a/src/common/QskMetaInvokable.h +++ b/src/common/QskMetaInvokable.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskNamespace.h b/src/common/QskNamespace.h index 0d48523e..0129e81f 100644 --- a/src/common/QskNamespace.h +++ b/src/common/QskNamespace.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskObjectCounter.cpp b/src/common/QskObjectCounter.cpp index 0ec9ee4c..e8a014cb 100644 --- a/src/common/QskObjectCounter.cpp +++ b/src/common/QskObjectCounter.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskObjectCounter.h b/src/common/QskObjectCounter.h index cabc57e2..57a8c233 100644 --- a/src/common/QskObjectCounter.h +++ b/src/common/QskObjectCounter.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskPlacementPolicy.cpp b/src/common/QskPlacementPolicy.cpp index e32c4246..fa59d56a 100644 --- a/src/common/QskPlacementPolicy.cpp +++ b/src/common/QskPlacementPolicy.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskPlacementPolicy.h b/src/common/QskPlacementPolicy.h index 6ace326c..22b56ade 100644 --- a/src/common/QskPlacementPolicy.h +++ b/src/common/QskPlacementPolicy.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskPlatform.cpp b/src/common/QskPlatform.cpp index 018ef40a..c54c29eb 100644 --- a/src/common/QskPlatform.cpp +++ b/src/common/QskPlatform.cpp @@ -1,3 +1,8 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + #include "QskPlatform.h" #include diff --git a/src/common/QskPlatform.h b/src/common/QskPlatform.h index e7e6e061..48be41b3 100644 --- a/src/common/QskPlatform.h +++ b/src/common/QskPlatform.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskRgbValue.cpp b/src/common/QskRgbValue.cpp index 360392b9..66b354f0 100644 --- a/src/common/QskRgbValue.cpp +++ b/src/common/QskRgbValue.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskRgbValue.h b/src/common/QskRgbValue.h index a8317a91..163aefd4 100644 --- a/src/common/QskRgbValue.h +++ b/src/common/QskRgbValue.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskShadowMetrics.cpp b/src/common/QskShadowMetrics.cpp index fe37abd4..b5331dc9 100644 --- a/src/common/QskShadowMetrics.cpp +++ b/src/common/QskShadowMetrics.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskShadowMetrics.h b/src/common/QskShadowMetrics.h index efd9c137..bb85a117 100644 --- a/src/common/QskShadowMetrics.h +++ b/src/common/QskShadowMetrics.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskSizePolicy.cpp b/src/common/QskSizePolicy.cpp index d0cd8aa9..70d40108 100644 --- a/src/common/QskSizePolicy.cpp +++ b/src/common/QskSizePolicy.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskSizePolicy.h b/src/common/QskSizePolicy.h index 2b0f51f0..d7e01cea 100644 --- a/src/common/QskSizePolicy.h +++ b/src/common/QskSizePolicy.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskStateCombination.h b/src/common/QskStateCombination.h index 1cf6016a..10fdf835 100644 --- a/src/common/QskStateCombination.h +++ b/src/common/QskStateCombination.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskStippleMetrics.cpp b/src/common/QskStippleMetrics.cpp index 6b4d0520..dc921367 100644 --- a/src/common/QskStippleMetrics.cpp +++ b/src/common/QskStippleMetrics.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskStippleMetrics.h b/src/common/QskStippleMetrics.h index a637faf1..a3cd0947 100644 --- a/src/common/QskStippleMetrics.h +++ b/src/common/QskStippleMetrics.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskTextColors.cpp b/src/common/QskTextColors.cpp index e75e0ef8..4130cf8c 100644 --- a/src/common/QskTextColors.cpp +++ b/src/common/QskTextColors.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskTextColors.h b/src/common/QskTextColors.h index c7fa6799..02cb4975 100644 --- a/src/common/QskTextColors.h +++ b/src/common/QskTextColors.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskTextOptions.cpp b/src/common/QskTextOptions.cpp index f4c678c9..53f64e2f 100644 --- a/src/common/QskTextOptions.cpp +++ b/src/common/QskTextOptions.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskTextOptions.h b/src/common/QskTextOptions.h index 984da585..cd88c6f8 100644 --- a/src/common/QskTextOptions.h +++ b/src/common/QskTextOptions.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskTickmarks.cpp b/src/common/QskTickmarks.cpp index d9f744fa..ac75892d 100644 --- a/src/common/QskTickmarks.cpp +++ b/src/common/QskTickmarks.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/common/QskTickmarks.h b/src/common/QskTickmarks.h index a90915cd..953b7627 100644 --- a/src/common/QskTickmarks.h +++ b/src/common/QskTickmarks.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskAbstractButton.cpp b/src/controls/QskAbstractButton.cpp index 53853649..54d25943 100644 --- a/src/controls/QskAbstractButton.cpp +++ b/src/controls/QskAbstractButton.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskAbstractButton.h b/src/controls/QskAbstractButton.h index 8a458ad4..6d081a48 100644 --- a/src/controls/QskAbstractButton.h +++ b/src/controls/QskAbstractButton.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskAnimationHint.cpp b/src/controls/QskAnimationHint.cpp index 2d0dda05..86160f61 100644 --- a/src/controls/QskAnimationHint.cpp +++ b/src/controls/QskAnimationHint.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskAnimationHint.h b/src/controls/QskAnimationHint.h index 0d906cfa..56a5d5e6 100644 --- a/src/controls/QskAnimationHint.h +++ b/src/controls/QskAnimationHint.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskAnimator.cpp b/src/controls/QskAnimator.cpp index 78b7f34e..bc1609be 100644 --- a/src/controls/QskAnimator.cpp +++ b/src/controls/QskAnimator.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskAnimator.h b/src/controls/QskAnimator.h index f7e6dd89..9c3a0a88 100644 --- a/src/controls/QskAnimator.h +++ b/src/controls/QskAnimator.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskBoundedControl.cpp b/src/controls/QskBoundedControl.cpp index 85cfde81..a25df91c 100644 --- a/src/controls/QskBoundedControl.cpp +++ b/src/controls/QskBoundedControl.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskBoundedControl.h b/src/controls/QskBoundedControl.h index d36e9f86..ec89efc6 100644 --- a/src/controls/QskBoundedControl.h +++ b/src/controls/QskBoundedControl.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskBoundedInput.cpp b/src/controls/QskBoundedInput.cpp index e5275a45..288c4061 100644 --- a/src/controls/QskBoundedInput.cpp +++ b/src/controls/QskBoundedInput.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskBoundedInput.h b/src/controls/QskBoundedInput.h index 7bcbcfae..1ac0a017 100644 --- a/src/controls/QskBoundedInput.h +++ b/src/controls/QskBoundedInput.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskBoundedRangeInput.cpp b/src/controls/QskBoundedRangeInput.cpp index 051ebf95..5c2ebe54 100644 --- a/src/controls/QskBoundedRangeInput.cpp +++ b/src/controls/QskBoundedRangeInput.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskBoundedRangeInput.h b/src/controls/QskBoundedRangeInput.h index 6b4c2dfa..990fb188 100644 --- a/src/controls/QskBoundedRangeInput.h +++ b/src/controls/QskBoundedRangeInput.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskBoundedValueInput.cpp b/src/controls/QskBoundedValueInput.cpp index ba72ab73..54e5af1b 100644 --- a/src/controls/QskBoundedValueInput.cpp +++ b/src/controls/QskBoundedValueInput.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskBoundedValueInput.h b/src/controls/QskBoundedValueInput.h index 97794303..e5af6617 100644 --- a/src/controls/QskBoundedValueInput.h +++ b/src/controls/QskBoundedValueInput.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskBox.cpp b/src/controls/QskBox.cpp index 242a6db8..3513f967 100644 --- a/src/controls/QskBox.cpp +++ b/src/controls/QskBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskBox.h b/src/controls/QskBox.h index 296654e9..a5f8cac0 100644 --- a/src/controls/QskBox.h +++ b/src/controls/QskBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskBoxSkinlet.cpp b/src/controls/QskBoxSkinlet.cpp index 181af0b7..65749da3 100644 --- a/src/controls/QskBoxSkinlet.cpp +++ b/src/controls/QskBoxSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskBoxSkinlet.h b/src/controls/QskBoxSkinlet.h index 5527ea9d..bb5c34d4 100644 --- a/src/controls/QskBoxSkinlet.h +++ b/src/controls/QskBoxSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskCheckBox.cpp b/src/controls/QskCheckBox.cpp index 14ea7622..f4a62524 100644 --- a/src/controls/QskCheckBox.cpp +++ b/src/controls/QskCheckBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskCheckBox.h b/src/controls/QskCheckBox.h index 12b0a136..f8617f58 100644 --- a/src/controls/QskCheckBox.h +++ b/src/controls/QskCheckBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskCheckBoxSkinlet.cpp b/src/controls/QskCheckBoxSkinlet.cpp index e93bc0ed..2b5531dd 100644 --- a/src/controls/QskCheckBoxSkinlet.cpp +++ b/src/controls/QskCheckBoxSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskCheckBoxSkinlet.h b/src/controls/QskCheckBoxSkinlet.h index 48e085b1..d4dac0b7 100644 --- a/src/controls/QskCheckBoxSkinlet.h +++ b/src/controls/QskCheckBoxSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskComboBox.cpp b/src/controls/QskComboBox.cpp index ef79a486..9e39f602 100644 --- a/src/controls/QskComboBox.cpp +++ b/src/controls/QskComboBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskComboBox.h b/src/controls/QskComboBox.h index 83a9f1ec..76b7df1e 100644 --- a/src/controls/QskComboBox.h +++ b/src/controls/QskComboBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskComboBoxSkinlet.cpp b/src/controls/QskComboBoxSkinlet.cpp index 9f4a4323..fc2da6fa 100644 --- a/src/controls/QskComboBoxSkinlet.cpp +++ b/src/controls/QskComboBoxSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskComboBoxSkinlet.h b/src/controls/QskComboBoxSkinlet.h index a2579e4b..0e4aa4c7 100644 --- a/src/controls/QskComboBoxSkinlet.h +++ b/src/controls/QskComboBoxSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskControl.cpp b/src/controls/QskControl.cpp index 9b3d5113..b2b03bca 100644 --- a/src/controls/QskControl.cpp +++ b/src/controls/QskControl.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -15,6 +15,7 @@ #include "QskSkinlet.h" #include "QskSkinHintTable.h" #include "QskMargins.h" +#include "QskTreeNode.h" #include #include @@ -977,7 +978,7 @@ void QskControl::updateItemPolish() QSGNode* QskControl::updateItemPaintNode( QSGNode* node ) { if ( node == nullptr ) - node = new QSGNode; + node = new QskTreeNode(); updateNode( node ); return node; diff --git a/src/controls/QskControl.h b/src/controls/QskControl.h index ac04e197..41793c87 100644 --- a/src/controls/QskControl.h +++ b/src/controls/QskControl.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskControlPrivate.cpp b/src/controls/QskControlPrivate.cpp index 84cc755f..c8608dc4 100644 --- a/src/controls/QskControlPrivate.cpp +++ b/src/controls/QskControlPrivate.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskControlPrivate.h b/src/controls/QskControlPrivate.h index 9a9dd09a..239201a5 100644 --- a/src/controls/QskControlPrivate.h +++ b/src/controls/QskControlPrivate.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskDirtyItemFilter.cpp b/src/controls/QskDirtyItemFilter.cpp index b0ccbf0f..416f0253 100644 --- a/src/controls/QskDirtyItemFilter.cpp +++ b/src/controls/QskDirtyItemFilter.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskDirtyItemFilter.h b/src/controls/QskDirtyItemFilter.h index 95235c81..60fe2241 100644 --- a/src/controls/QskDirtyItemFilter.h +++ b/src/controls/QskDirtyItemFilter.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskDrawer.cpp b/src/controls/QskDrawer.cpp index 87890a8d..c08cbd69 100644 --- a/src/controls/QskDrawer.cpp +++ b/src/controls/QskDrawer.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskDrawer.h b/src/controls/QskDrawer.h index b6c852f2..7f853d6c 100644 --- a/src/controls/QskDrawer.h +++ b/src/controls/QskDrawer.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskDrawerSkinlet.cpp b/src/controls/QskDrawerSkinlet.cpp index e10f5923..43008870 100644 --- a/src/controls/QskDrawerSkinlet.cpp +++ b/src/controls/QskDrawerSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskDrawerSkinlet.h b/src/controls/QskDrawerSkinlet.h index b6d1c771..e37d7823 100644 --- a/src/controls/QskDrawerSkinlet.h +++ b/src/controls/QskDrawerSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskEvent.cpp b/src/controls/QskEvent.cpp index b3aeae87..b143bcd4 100644 --- a/src/controls/QskEvent.cpp +++ b/src/controls/QskEvent.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskEvent.h b/src/controls/QskEvent.h index 094090e9..0fe85d27 100644 --- a/src/controls/QskEvent.h +++ b/src/controls/QskEvent.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskFlickAnimator.cpp b/src/controls/QskFlickAnimator.cpp index 019a0a5f..ef0fbe7c 100644 --- a/src/controls/QskFlickAnimator.cpp +++ b/src/controls/QskFlickAnimator.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskFlickAnimator.h b/src/controls/QskFlickAnimator.h index 2d4274a4..18ee021c 100644 --- a/src/controls/QskFlickAnimator.h +++ b/src/controls/QskFlickAnimator.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskFocusIndicator.cpp b/src/controls/QskFocusIndicator.cpp index 34380e34..2601cc1a 100644 --- a/src/controls/QskFocusIndicator.cpp +++ b/src/controls/QskFocusIndicator.cpp @@ -1,15 +1,17 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "QskFocusIndicator.h" #include "QskAspect.h" +#include "QskAnimationHint.h" #include "QskEvent.h" #include "QskQuick.h" #include #include +#include QSK_QT_PRIVATE_BEGIN #include @@ -52,6 +54,12 @@ static inline QskAspect::Section qskItemSection( const QQuickItem* item ) return QskAspect::Body; } +static inline bool qskIsEnablingKey( const QKeyEvent* event ) +{ + // what keys do we want have here ??? + return qskIsButtonPressKey( event ) || qskFocusChainIncrement( event ); +} + class QskFocusIndicator::PrivateData { public: @@ -63,8 +71,16 @@ class QskFocusIndicator::PrivateData connections.clear(); } + inline bool isAutoDisabling() const { return duration > 0; } + inline bool isAutoEnabling() const { return false; } + QPointer< QQuickItem > clippingItem; QVector< QMetaObject::Connection > connections; + + int duration = 0; + QBasicTimer timer; + + bool blockAutoRepeatKeyEvents = false; }; QskFocusIndicator::QskFocusIndicator( QQuickItem* parent ) @@ -73,12 +89,177 @@ QskFocusIndicator::QskFocusIndicator( QQuickItem* parent ) { setPlacementPolicy( QskPlacementPolicy::Ignore ); connectWindow( window(), true ); + + setDuration( 4500 ); } QskFocusIndicator::~QskFocusIndicator() { } +void QskFocusIndicator::setDuration( int ms ) +{ + ms = std::max( ms, 0 ); + if ( ms == m_data->duration ) + return; + + m_data->duration = ms; + + if ( m_data->isAutoDisabling() ) + { + if ( auto w = window() ) + w->installEventFilter( this ); + + if ( isEnabled() ) + { + if ( isInitiallyPainted() ) + m_data->timer.start( m_data->duration, this ); + else + setEnabled( false ); + } + + connect( this, &QQuickItem::enabledChanged, + this, &QskFocusIndicator::resetTimer ); + } + else + { + if ( auto w = window() ) + w->removeEventFilter( this ); + + setEnabled( true ); + + disconnect( this, &QQuickItem::enabledChanged, + this, &QskFocusIndicator::resetTimer ); + } + + Q_EMIT durationChanged( ms ); +} + +int QskFocusIndicator::duration() const +{ + return m_data->duration; +} + +void QskFocusIndicator::maybeEnable( bool on ) +{ + if ( !m_data->isAutoEnabling() ) + return; + + if ( on ) + { + if ( auto w = window() ) + { + if ( w->isExposed() && w->isActive() ) + setEnabled( true ); + } + } + else + { + setEnabled( false ); + } +} + +void QskFocusIndicator::resetTimer() +{ + if ( m_data->isAutoDisabling() ) + { + if ( isEnabled() ) + { + const auto hint = animationHint( Panel | QskAspect::Color ); + m_data->timer.start( m_data->duration + hint.duration, this ); + } + else + { + m_data->timer.stop(); + } + } +} + +bool QskFocusIndicator::eventFilter( QObject* object, QEvent* event ) +{ + if( ( object != window() ) || !m_data->isAutoDisabling() ) + return Inherited::eventFilter( object, event ); + + switch( static_cast< int >( event->type() ) ) + { + case QEvent::KeyPress: + case QEvent::KeyRelease: + case QEvent::ShortcutOverride: + { + if ( m_data->timer.isActive() ) + { + // renew the exposed period + m_data->timer.start( m_data->duration, this ); + } + break; + } + } + + switch( static_cast< int >( event->type() ) ) + { + case QEvent::KeyPress: + { + const auto keyEvent = static_cast< QKeyEvent* >( event ); + + if( keyEvent->isAutoRepeat() && m_data->blockAutoRepeatKeyEvents ) + { + /* + We swallow all auto repeated events to avoid running along + the tab chain by accident. + */ + return true; + } + + if ( !isEnabled() && qskIsEnablingKey( keyEvent ) ) + { + setEnabled( true ); + m_data->blockAutoRepeatKeyEvents = true; + return true; + } + + m_data->blockAutoRepeatKeyEvents = false; + break; + } + + case QEvent::KeyRelease: + { + if( m_data->blockAutoRepeatKeyEvents ) + { + if( !static_cast< QKeyEvent* >( event )->isAutoRepeat() ) + m_data->blockAutoRepeatKeyEvents = false; + + return true; + } + + break; + } + + case QEvent::Expose: + case QEvent::FocusIn: + case QEvent::FocusOut: + { + maybeEnable( event->type() != QEvent::FocusOut ); + break; + } + } + + return Inherited::eventFilter( object, event ); +} + +void QskFocusIndicator::timerEvent( QTimerEvent* event ) +{ + if ( m_data->isAutoDisabling() ) + { + if( event->timerId() == m_data->timer.timerId() ) + { + setEnabled( false ); + return; + } + } + + Inherited::timerEvent( event ); +} + bool QskFocusIndicator::contains( const QPointF& ) const { // so that tools like Squish do not see it @@ -213,6 +394,18 @@ void QskFocusIndicator::windowChangeEvent( QskWindowChangeEvent* event ) connectWindow( event->window(), true ); onFocusItemChanged(); + + if ( m_data->isAutoDisabling() ) + { + if ( auto w = event->oldWindow() ) + w->removeEventFilter( this ); + + if( auto w = event->window() ) + { + w->installEventFilter( this ); + maybeEnable( true ); + } + } } void QskFocusIndicator::connectWindow( const QQuickWindow* window, bool on ) diff --git a/src/controls/QskFocusIndicator.h b/src/controls/QskFocusIndicator.h index 7c783d9e..330edd1c 100644 --- a/src/controls/QskFocusIndicator.h +++ b/src/controls/QskFocusIndicator.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -14,17 +14,34 @@ class QSK_EXPORT QskFocusIndicator : public QskControl using Inherited = QskControl; + Q_PROPERTY( int duration READ duration + WRITE setDuration NOTIFY durationChanged ) + public: QSK_SUBCONTROLS( Panel ) QskFocusIndicator( QQuickItem* parent = nullptr ); ~QskFocusIndicator() override; + /* + duration until the indicator goes into disabled state after being enabled. + A duration of 0 disables automatic state changes. + */ + void setDuration( int ms ); + int duration() const; + bool contains( const QPointF& ) const override; QRectF clipRect() const override; + bool eventFilter( QObject*, QEvent* ) override; + + Q_SIGNALS: + void durationChanged( int ); + protected: void windowChangeEvent( QskWindowChangeEvent* ) override; + void timerEvent( QTimerEvent* ) override; + virtual QRectF focusRect() const; void updateFocusFrame(); @@ -35,6 +52,9 @@ class QSK_EXPORT QskFocusIndicator : public QskControl void onFocusItemChanged(); void onFocusItemDestroyed(); + void resetTimer(); + void maybeEnable( bool ); + void connectWindow( const QQuickWindow*, bool on ); QVector< QMetaObject::Connection > connectItem( const QQuickItem* ); diff --git a/src/controls/QskFocusIndicatorSkinlet.cpp b/src/controls/QskFocusIndicatorSkinlet.cpp index 5c196aff..96988a9b 100644 --- a/src/controls/QskFocusIndicatorSkinlet.cpp +++ b/src/controls/QskFocusIndicatorSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskFocusIndicatorSkinlet.h b/src/controls/QskFocusIndicatorSkinlet.h index e58e5663..f76c4cb0 100644 --- a/src/controls/QskFocusIndicatorSkinlet.h +++ b/src/controls/QskFocusIndicatorSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskGesture.cpp b/src/controls/QskGesture.cpp index ef4b177a..efb4765e 100644 --- a/src/controls/QskGesture.cpp +++ b/src/controls/QskGesture.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskGesture.h b/src/controls/QskGesture.h index 7432c6b4..847f6200 100644 --- a/src/controls/QskGesture.h +++ b/src/controls/QskGesture.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskGestureRecognizer.cpp b/src/controls/QskGestureRecognizer.cpp index 099307ab..9afb4e64 100644 --- a/src/controls/QskGestureRecognizer.cpp +++ b/src/controls/QskGestureRecognizer.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskGestureRecognizer.h b/src/controls/QskGestureRecognizer.h index c4ac00dc..38c1ca96 100644 --- a/src/controls/QskGestureRecognizer.h +++ b/src/controls/QskGestureRecognizer.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskGraphicLabel.cpp b/src/controls/QskGraphicLabel.cpp index ff593e2c..39a1802a 100644 --- a/src/controls/QskGraphicLabel.cpp +++ b/src/controls/QskGraphicLabel.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskGraphicLabel.h b/src/controls/QskGraphicLabel.h index 14268c8d..12a12881 100644 --- a/src/controls/QskGraphicLabel.h +++ b/src/controls/QskGraphicLabel.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskGraphicLabelSkinlet.cpp b/src/controls/QskGraphicLabelSkinlet.cpp index 4959a8c6..2f156432 100644 --- a/src/controls/QskGraphicLabelSkinlet.cpp +++ b/src/controls/QskGraphicLabelSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskGraphicLabelSkinlet.h b/src/controls/QskGraphicLabelSkinlet.h index 9700e0c3..dbc64e1a 100644 --- a/src/controls/QskGraphicLabelSkinlet.h +++ b/src/controls/QskGraphicLabelSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskHintAnimator.cpp b/src/controls/QskHintAnimator.cpp index cec53ccd..2b0c8df6 100644 --- a/src/controls/QskHintAnimator.cpp +++ b/src/controls/QskHintAnimator.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskHintAnimator.h b/src/controls/QskHintAnimator.h index 6c645202..6708e2bd 100644 --- a/src/controls/QskHintAnimator.h +++ b/src/controls/QskHintAnimator.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskInputGrabber.cpp b/src/controls/QskInputGrabber.cpp index 81219392..187f5cc8 100644 --- a/src/controls/QskInputGrabber.cpp +++ b/src/controls/QskInputGrabber.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskInputGrabber.h b/src/controls/QskInputGrabber.h index 8ef0cb78..1fe83fe3 100644 --- a/src/controls/QskInputGrabber.h +++ b/src/controls/QskInputGrabber.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskListView.cpp b/src/controls/QskListView.cpp index b74e0c38..ede7038f 100644 --- a/src/controls/QskListView.cpp +++ b/src/controls/QskListView.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskListView.h b/src/controls/QskListView.h index 8023cfcf..82a7cfe4 100644 --- a/src/controls/QskListView.h +++ b/src/controls/QskListView.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskListViewSkinlet.cpp b/src/controls/QskListViewSkinlet.cpp index 77907d75..2017da67 100644 --- a/src/controls/QskListViewSkinlet.cpp +++ b/src/controls/QskListViewSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskListViewSkinlet.h b/src/controls/QskListViewSkinlet.h index c16cc637..fad76b21 100644 --- a/src/controls/QskListViewSkinlet.h +++ b/src/controls/QskListViewSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskMainView.cpp b/src/controls/QskMainView.cpp index cad52776..a02fc60c 100644 --- a/src/controls/QskMainView.cpp +++ b/src/controls/QskMainView.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskMainView.h b/src/controls/QskMainView.h index c0160e6c..35950c68 100644 --- a/src/controls/QskMainView.h +++ b/src/controls/QskMainView.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskMenu.cpp b/src/controls/QskMenu.cpp index e3af5707..e690332b 100644 --- a/src/controls/QskMenu.cpp +++ b/src/controls/QskMenu.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -60,6 +60,13 @@ QskMenu::QskMenu( QQuickItem* parent ) : Inherited( parent ) , m_data( new PrivateData ) { +#if 1 + /* + The overlay is clipped from the drop down fading effect. + Until it is fixed we simply disable it. TODO ... + */ + setOverlay( false ); +#endif setModal( true ); setPopupFlag( QskPopup::CloseOnPressOutside, true ); diff --git a/src/controls/QskMenu.h b/src/controls/QskMenu.h index b0042455..88670ec6 100644 --- a/src/controls/QskMenu.h +++ b/src/controls/QskMenu.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskMenuSkinlet.cpp b/src/controls/QskMenuSkinlet.cpp index dae18d89..7ee5bf81 100644 --- a/src/controls/QskMenuSkinlet.cpp +++ b/src/controls/QskMenuSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskMenuSkinlet.h b/src/controls/QskMenuSkinlet.h index 34a3c0b5..1751aa8f 100644 --- a/src/controls/QskMenuSkinlet.h +++ b/src/controls/QskMenuSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskObjectTree.cpp b/src/controls/QskObjectTree.cpp index dfb8a18c..8ad73138 100644 --- a/src/controls/QskObjectTree.cpp +++ b/src/controls/QskObjectTree.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskObjectTree.h b/src/controls/QskObjectTree.h index 9ad04570..b112e6e8 100644 --- a/src/controls/QskObjectTree.h +++ b/src/controls/QskObjectTree.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPageIndicator.cpp b/src/controls/QskPageIndicator.cpp index a16eddf8..fcf94251 100644 --- a/src/controls/QskPageIndicator.cpp +++ b/src/controls/QskPageIndicator.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPageIndicator.h b/src/controls/QskPageIndicator.h index 0f82fce2..3d18d534 100644 --- a/src/controls/QskPageIndicator.h +++ b/src/controls/QskPageIndicator.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPageIndicatorSkinlet.cpp b/src/controls/QskPageIndicatorSkinlet.cpp index 11424045..15906504 100644 --- a/src/controls/QskPageIndicatorSkinlet.cpp +++ b/src/controls/QskPageIndicatorSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPageIndicatorSkinlet.h b/src/controls/QskPageIndicatorSkinlet.h index 078061f2..3a935392 100644 --- a/src/controls/QskPageIndicatorSkinlet.h +++ b/src/controls/QskPageIndicatorSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPanGestureRecognizer.cpp b/src/controls/QskPanGestureRecognizer.cpp index 859b8d91..9d9eee04 100644 --- a/src/controls/QskPanGestureRecognizer.cpp +++ b/src/controls/QskPanGestureRecognizer.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPanGestureRecognizer.h b/src/controls/QskPanGestureRecognizer.h index ba3bb121..448524cc 100644 --- a/src/controls/QskPanGestureRecognizer.h +++ b/src/controls/QskPanGestureRecognizer.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPopup.cpp b/src/controls/QskPopup.cpp index c11ad127..41e0111c 100644 --- a/src/controls/QskPopup.cpp +++ b/src/controls/QskPopup.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPopup.h b/src/controls/QskPopup.h index caf66346..94feb773 100644 --- a/src/controls/QskPopup.h +++ b/src/controls/QskPopup.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPopupSkinlet.cpp b/src/controls/QskPopupSkinlet.cpp index b989dc1e..47f2fbef 100644 --- a/src/controls/QskPopupSkinlet.cpp +++ b/src/controls/QskPopupSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPopupSkinlet.h b/src/controls/QskPopupSkinlet.h index ecd3a758..7e37298d 100644 --- a/src/controls/QskPopupSkinlet.h +++ b/src/controls/QskPopupSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskProgressBar.cpp b/src/controls/QskProgressBar.cpp index 92a964ce..16b17f63 100644 --- a/src/controls/QskProgressBar.cpp +++ b/src/controls/QskProgressBar.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskProgressBar.h b/src/controls/QskProgressBar.h index f1f1b613..df844df8 100644 --- a/src/controls/QskProgressBar.h +++ b/src/controls/QskProgressBar.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskProgressBarSkinlet.cpp b/src/controls/QskProgressBarSkinlet.cpp index 92be1c09..74fe9e69 100644 --- a/src/controls/QskProgressBarSkinlet.cpp +++ b/src/controls/QskProgressBarSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskProgressBarSkinlet.h b/src/controls/QskProgressBarSkinlet.h index a3f36cd1..581630bc 100644 --- a/src/controls/QskProgressBarSkinlet.h +++ b/src/controls/QskProgressBarSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskProgressIndicator.cpp b/src/controls/QskProgressIndicator.cpp index 9cf220e4..7dd8d11e 100644 --- a/src/controls/QskProgressIndicator.cpp +++ b/src/controls/QskProgressIndicator.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskProgressIndicator.h b/src/controls/QskProgressIndicator.h index 77d49002..4df628f7 100644 --- a/src/controls/QskProgressIndicator.h +++ b/src/controls/QskProgressIndicator.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskProgressIndicatorSkinlet.cpp b/src/controls/QskProgressIndicatorSkinlet.cpp index 04d98efb..d686377d 100644 --- a/src/controls/QskProgressIndicatorSkinlet.cpp +++ b/src/controls/QskProgressIndicatorSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskProgressIndicatorSkinlet.h b/src/controls/QskProgressIndicatorSkinlet.h index b99a53da..e1299adc 100644 --- a/src/controls/QskProgressIndicatorSkinlet.h +++ b/src/controls/QskProgressIndicatorSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskProgressRing.cpp b/src/controls/QskProgressRing.cpp index 9734ccab..dcc1d8d6 100644 --- a/src/controls/QskProgressRing.cpp +++ b/src/controls/QskProgressRing.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2023 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskProgressRing.h b/src/controls/QskProgressRing.h index e4ce68e2..90d0048c 100644 --- a/src/controls/QskProgressRing.h +++ b/src/controls/QskProgressRing.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2023 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskProgressRingSkinlet.cpp b/src/controls/QskProgressRingSkinlet.cpp index fa5c7ca5..86e90329 100644 --- a/src/controls/QskProgressRingSkinlet.cpp +++ b/src/controls/QskProgressRingSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2023 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskProgressRingSkinlet.h b/src/controls/QskProgressRingSkinlet.h index 009640ee..767930b1 100644 --- a/src/controls/QskProgressRingSkinlet.h +++ b/src/controls/QskProgressRingSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2023 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPushButton.cpp b/src/controls/QskPushButton.cpp index 862872f2..3d866cc7 100644 --- a/src/controls/QskPushButton.cpp +++ b/src/controls/QskPushButton.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPushButton.h b/src/controls/QskPushButton.h index d3699905..93515034 100644 --- a/src/controls/QskPushButton.h +++ b/src/controls/QskPushButton.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPushButtonSkinlet.cpp b/src/controls/QskPushButtonSkinlet.cpp index 43f94fea..7f19d782 100644 --- a/src/controls/QskPushButtonSkinlet.cpp +++ b/src/controls/QskPushButtonSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskPushButtonSkinlet.h b/src/controls/QskPushButtonSkinlet.h index b2d2583c..852bfd98 100644 --- a/src/controls/QskPushButtonSkinlet.h +++ b/src/controls/QskPushButtonSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskQuick.cpp b/src/controls/QskQuick.cpp index 6a8f045f..3c153188 100644 --- a/src/controls/QskQuick.cpp +++ b/src/controls/QskQuick.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -12,11 +12,21 @@ QSK_QT_PRIVATE_BEGIN #include +#include +#include QSK_QT_PRIVATE_END #include #include +QRhi* qskRenderingHardwareInterface( const QQuickWindow* window ) +{ + if ( auto w = const_cast< QQuickWindow* >( window ) ) + return QQuickWindowPrivate::get( w )->rhi; + + return nullptr; +} + QRectF qskItemRect( const QQuickItem* item ) { auto d = QQuickItemPrivate::get( item ); @@ -387,6 +397,48 @@ const QSGNode* qskPaintNode( const QQuickItem* item ) return QQuickItemPrivate::get( item )->paintNode; } +const QSGRootNode* qskScenegraphAnchorNode( const QQuickItem* item ) +{ + if ( item == nullptr ) + return nullptr; + + return QQuickItemPrivate::get( item )->rootNode(); +} + +const QSGRootNode* qskScenegraphAnchorNode( const QQuickWindow* window ) +{ + if ( auto w = const_cast< QQuickWindow* >( window ) ) + { + if ( auto renderer = QQuickWindowPrivate::get( w )->renderer ) + return renderer->rootNode(); + } + + return nullptr; +} + +void qskSetScenegraphAnchor( QQuickItem* item, bool on ) +{ + /* + For setting up a subtree renderer ( f.e in QskSceneTexture ) we need + to insert a QSGRootNode above the paintNode. + + ( In Qt this feature is exlusively used in the Qt/Quick Effects module + what lead to the not very intuitive name "refFromEffectItem" ) + + refFromEffectItem also allows to insert a opacity node of 0 to + hide the subtree from the main renderer by setting its parameter to + true. We have QskItemNode to achieve the same. + */ + if ( item ) + { + auto d = QQuickItemPrivate::get( item ); + if ( on ) + d->refFromEffectItem( false ); + else + d->derefFromEffectItem( false ); + } +} + QSizeF qskEffectiveSizeHint( const QQuickItem* item, Qt::SizeHint whichHint, const QSizeF& constraint ) { diff --git a/src/controls/QskQuick.h b/src/controls/QskQuick.h index 6b2ae2df..31024855 100644 --- a/src/controls/QskQuick.h +++ b/src/controls/QskQuick.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -14,17 +14,20 @@ class QskSizePolicy; -class QQuickItem; class QSGNode; class QSGTransformNode; +class QSGRootNode; class QRectF; +class QRhi; + template< typename T > class QList; /* - Exporting methods from QQuickItemPrivate, that should be part - of QQuickItem. + Exporting useful methods from QQuickItemPrivate/QQuickWindowPrivate */ +QSK_EXPORT QRhi* qskRenderingHardwareInterface( const QQuickWindow* ); + QSK_EXPORT bool qskIsItemInDestructor( const QQuickItem* ); QSK_EXPORT bool qskIsItemComplete( const QQuickItem* ); QSK_EXPORT bool qskIsAncestorOf( const QQuickItem* item, const QQuickItem* child ); @@ -71,6 +74,10 @@ QSK_EXPORT void qskInputMethodSetVisible( const QQuickItem*, bool ); QSK_EXPORT const QSGTransformNode* qskItemNode( const QQuickItem* ); QSK_EXPORT const QSGNode* qskPaintNode( const QQuickItem* ); +QSK_EXPORT const QSGRootNode* qskScenegraphAnchorNode( const QQuickItem* ); +QSK_EXPORT const QSGRootNode* qskScenegraphAnchorNode( const QQuickWindow* ); +QSK_EXPORT void qskSetScenegraphAnchor( QQuickItem*, bool on, bool hide = false ); + QSK_EXPORT void qskItemUpdateRecursive( QQuickItem* ); QSK_EXPORT bool qskGrabMouse( QQuickItem* ); diff --git a/src/controls/QskQuickItem.cpp b/src/controls/QskQuickItem.cpp index 76d786ac..aa106f08 100644 --- a/src/controls/QskQuickItem.cpp +++ b/src/controls/QskQuickItem.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskQuickItem.h b/src/controls/QskQuickItem.h index 1b519a24..02f1807f 100644 --- a/src/controls/QskQuickItem.h +++ b/src/controls/QskQuickItem.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskQuickItemPrivate.cpp b/src/controls/QskQuickItemPrivate.cpp index 6f9fc3a2..bdfcb19e 100644 --- a/src/controls/QskQuickItemPrivate.cpp +++ b/src/controls/QskQuickItemPrivate.cpp @@ -1,9 +1,10 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "QskQuickItemPrivate.h" +#include "QskTreeNode.h" #include "QskSetup.h" static inline void qskSendEventTo( QObject* object, QEvent::Type type ) @@ -240,11 +241,13 @@ void QskQuickItemPrivate::cleanupNodes() } } +QSGTransformNode* QskQuickItemPrivate::createTransformNode() +{ + return new QskItemNode(); +} + /* Can we do something useful with overloading: - - QQuickItemPrivate::createTransformNode - QQuickItemPrivate::transformChanged - - TODO ... */ diff --git a/src/controls/QskQuickItemPrivate.h b/src/controls/QskQuickItemPrivate.h index 0d7f41e6..615b3df3 100644 --- a/src/controls/QskQuickItemPrivate.h +++ b/src/controls/QskQuickItemPrivate.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -23,13 +23,13 @@ class QskQuickItemPrivate : public QQuickItemPrivate public: void applyUpdateFlags( QskQuickItem::UpdateFlags ); + QSGTransformNode* createTransformNode() override; protected: virtual void layoutConstraintChanged(); virtual void implicitSizeChanged(); private: - void cleanupNodes(); void mirrorChange() override; diff --git a/src/controls/QskRadioBox.cpp b/src/controls/QskRadioBox.cpp index 70707591..482e3704 100644 --- a/src/controls/QskRadioBox.cpp +++ b/src/controls/QskRadioBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskRadioBox.h b/src/controls/QskRadioBox.h index 973f4c48..70cbcd9c 100644 --- a/src/controls/QskRadioBox.h +++ b/src/controls/QskRadioBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskRadioBoxSkinlet.cpp b/src/controls/QskRadioBoxSkinlet.cpp index 5accb744..2bc73a19 100644 --- a/src/controls/QskRadioBoxSkinlet.cpp +++ b/src/controls/QskRadioBoxSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskRadioBoxSkinlet.h b/src/controls/QskRadioBoxSkinlet.h index f934c5ec..3a777c3c 100644 --- a/src/controls/QskRadioBoxSkinlet.h +++ b/src/controls/QskRadioBoxSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskScrollArea.cpp b/src/controls/QskScrollArea.cpp index 971848a1..6f4602c7 100644 --- a/src/controls/QskScrollArea.cpp +++ b/src/controls/QskScrollArea.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskScrollArea.h b/src/controls/QskScrollArea.h index 957c29a8..e9139694 100644 --- a/src/controls/QskScrollArea.h +++ b/src/controls/QskScrollArea.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskScrollBox.cpp b/src/controls/QskScrollBox.cpp index a975baed..65c78795 100644 --- a/src/controls/QskScrollBox.cpp +++ b/src/controls/QskScrollBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskScrollBox.h b/src/controls/QskScrollBox.h index c7a64ffd..9b191810 100644 --- a/src/controls/QskScrollBox.h +++ b/src/controls/QskScrollBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskScrollView.cpp b/src/controls/QskScrollView.cpp index 34622005..3627cc99 100644 --- a/src/controls/QskScrollView.cpp +++ b/src/controls/QskScrollView.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskScrollView.h b/src/controls/QskScrollView.h index 4771b394..6b340acf 100644 --- a/src/controls/QskScrollView.h +++ b/src/controls/QskScrollView.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskScrollViewSkinlet.cpp b/src/controls/QskScrollViewSkinlet.cpp index 3ab7848e..05865dc6 100644 --- a/src/controls/QskScrollViewSkinlet.cpp +++ b/src/controls/QskScrollViewSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskScrollViewSkinlet.h b/src/controls/QskScrollViewSkinlet.h index 0bc9d190..7e9feff0 100644 --- a/src/controls/QskScrollViewSkinlet.h +++ b/src/controls/QskScrollViewSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSegmentedBar.cpp b/src/controls/QskSegmentedBar.cpp index 058b728f..94b094c2 100644 --- a/src/controls/QskSegmentedBar.cpp +++ b/src/controls/QskSegmentedBar.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSegmentedBar.h b/src/controls/QskSegmentedBar.h index d65735a7..e32cbf5b 100644 --- a/src/controls/QskSegmentedBar.h +++ b/src/controls/QskSegmentedBar.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSegmentedBarSkinlet.cpp b/src/controls/QskSegmentedBarSkinlet.cpp index 17dc78ec..602587d7 100644 --- a/src/controls/QskSegmentedBarSkinlet.cpp +++ b/src/controls/QskSegmentedBarSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSegmentedBarSkinlet.h b/src/controls/QskSegmentedBarSkinlet.h index 15fa1d39..b63a319c 100644 --- a/src/controls/QskSegmentedBarSkinlet.h +++ b/src/controls/QskSegmentedBarSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSeparator.cpp b/src/controls/QskSeparator.cpp index c7802be7..14bacf42 100644 --- a/src/controls/QskSeparator.cpp +++ b/src/controls/QskSeparator.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSeparator.h b/src/controls/QskSeparator.h index 1453a273..b7365777 100644 --- a/src/controls/QskSeparator.h +++ b/src/controls/QskSeparator.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSeparatorSkinlet.cpp b/src/controls/QskSeparatorSkinlet.cpp index 0c2c1117..a117f328 100644 --- a/src/controls/QskSeparatorSkinlet.cpp +++ b/src/controls/QskSeparatorSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSeparatorSkinlet.h b/src/controls/QskSeparatorSkinlet.h index 35b035ca..09274471 100644 --- a/src/controls/QskSeparatorSkinlet.h +++ b/src/controls/QskSeparatorSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSetup.cpp b/src/controls/QskSetup.cpp index 37e4edc4..8fcf0319 100644 --- a/src/controls/QskSetup.cpp +++ b/src/controls/QskSetup.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSetup.h b/src/controls/QskSetup.h index 26da9732..1ea4c7f0 100644 --- a/src/controls/QskSetup.h +++ b/src/controls/QskSetup.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskShortcutMap.cpp b/src/controls/QskShortcutMap.cpp index c7d518ec..147924f6 100644 --- a/src/controls/QskShortcutMap.cpp +++ b/src/controls/QskShortcutMap.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskShortcutMap.h b/src/controls/QskShortcutMap.h index 69b895ee..3d547f33 100644 --- a/src/controls/QskShortcutMap.h +++ b/src/controls/QskShortcutMap.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSimpleListBox.cpp b/src/controls/QskSimpleListBox.cpp index 2e818059..c94acc47 100644 --- a/src/controls/QskSimpleListBox.cpp +++ b/src/controls/QskSimpleListBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSimpleListBox.h b/src/controls/QskSimpleListBox.h index 360e522d..86f94e64 100644 --- a/src/controls/QskSimpleListBox.h +++ b/src/controls/QskSimpleListBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkin.cpp b/src/controls/QskSkin.cpp index a791eb05..e93fbec6 100644 --- a/src/controls/QskSkin.cpp +++ b/src/controls/QskSkin.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkin.h b/src/controls/QskSkin.h index ba6a6206..5bd9d799 100644 --- a/src/controls/QskSkin.h +++ b/src/controls/QskSkin.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinFactory.cpp b/src/controls/QskSkinFactory.cpp index 7f9ecbc3..9d1ab835 100644 --- a/src/controls/QskSkinFactory.cpp +++ b/src/controls/QskSkinFactory.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinFactory.h b/src/controls/QskSkinFactory.h index da2e8d2f..a6fc67d8 100644 --- a/src/controls/QskSkinFactory.h +++ b/src/controls/QskSkinFactory.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinHintTable.cpp b/src/controls/QskSkinHintTable.cpp index 4a830278..cd0d1482 100644 --- a/src/controls/QskSkinHintTable.cpp +++ b/src/controls/QskSkinHintTable.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinHintTable.h b/src/controls/QskSkinHintTable.h index 0bdf0683..006ec57f 100644 --- a/src/controls/QskSkinHintTable.h +++ b/src/controls/QskSkinHintTable.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinHintTableEditor.cpp b/src/controls/QskSkinHintTableEditor.cpp index cd92d991..a89ed995 100644 --- a/src/controls/QskSkinHintTableEditor.cpp +++ b/src/controls/QskSkinHintTableEditor.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinHintTableEditor.h b/src/controls/QskSkinHintTableEditor.h index 8b9aa13d..b91255c4 100644 --- a/src/controls/QskSkinHintTableEditor.h +++ b/src/controls/QskSkinHintTableEditor.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinManager.cpp b/src/controls/QskSkinManager.cpp index 33864821..ae4cc662 100644 --- a/src/controls/QskSkinManager.cpp +++ b/src/controls/QskSkinManager.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinManager.h b/src/controls/QskSkinManager.h index fd88e450..74563854 100644 --- a/src/controls/QskSkinManager.h +++ b/src/controls/QskSkinManager.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinStateChanger.h b/src/controls/QskSkinStateChanger.h index 906fdbae..4aaba3cc 100644 --- a/src/controls/QskSkinStateChanger.h +++ b/src/controls/QskSkinStateChanger.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinTransition.cpp b/src/controls/QskSkinTransition.cpp index dc6ee00c..8b6776a0 100644 --- a/src/controls/QskSkinTransition.cpp +++ b/src/controls/QskSkinTransition.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinTransition.h b/src/controls/QskSkinTransition.h index 6fc13f1b..79598897 100644 --- a/src/controls/QskSkinTransition.h +++ b/src/controls/QskSkinTransition.h @@ -1,3 +1,8 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + #ifndef QSK_SKIN_TRANSITION_H #define QSK_SKIN_TRANSITION_H diff --git a/src/controls/QskSkinlet.cpp b/src/controls/QskSkinlet.cpp index e6351519..93b86dce 100644 --- a/src/controls/QskSkinlet.cpp +++ b/src/controls/QskSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -231,7 +231,7 @@ static inline QSGNode* qskUpdateArcNode( return nullptr; auto arcNode = QskSGNode::ensureNode< QskArcNode >( node ); - arcNode->setArcData( rect, metrics, borderWidth, borderColor, gradient ); + arcNode->setArcData( rect, metrics, borderWidth, borderColor, gradient, {}, {} ); return arcNode; } @@ -547,11 +547,11 @@ QSGNode* QskSkinlet::updateArcNode( const QskSkinnable* skinnable, } QSGNode* QskSkinlet::updateArcNode( - const QskSkinnable* skinnable, QSGNode* node, const QRectF& rect, + const QskSkinnable* skinnable, QSGNode* node, const QRectF& rect, qreal borderWidth, const QColor& borderColor, const QskGradient& fillGradient, const QskArcMetrics& metrics ) { - return qskUpdateArcNode( skinnable, node, rect, + return qskUpdateArcNode( skinnable, node, rect, borderWidth, borderColor, fillGradient, metrics ); } @@ -594,7 +594,7 @@ QSGNode* QskSkinlet::updateArcNode( const QskSkinnable* skinnable, } QSGNode* QskSkinlet::updateLineNode( const QskSkinnable* skinnable, - QSGNode* node, const QLineF& line, QskAspect::Subcontrol subControl ) + QSGNode* node, const QLineF& line, QskAspect::Subcontrol subControl ) { auto lineStipple = skinnable->stippleMetricsHint( subControl ); if ( !lineStipple.isValid() ) diff --git a/src/controls/QskSkinlet.h b/src/controls/QskSkinlet.h index 3cfc7db0..e4a76de6 100644 --- a/src/controls/QskSkinlet.h +++ b/src/controls/QskSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinnable.cpp b/src/controls/QskSkinnable.cpp index e82f51b3..3931dd9d 100644 --- a/src/controls/QskSkinnable.cpp +++ b/src/controls/QskSkinnable.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSkinnable.h b/src/controls/QskSkinnable.h index 94886960..bed91135 100644 --- a/src/controls/QskSkinnable.h +++ b/src/controls/QskSkinnable.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSlider.cpp b/src/controls/QskSlider.cpp index 15f6184c..d92366c3 100644 --- a/src/controls/QskSlider.cpp +++ b/src/controls/QskSlider.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSlider.h b/src/controls/QskSlider.h index 68413b0b..88418d80 100644 --- a/src/controls/QskSlider.h +++ b/src/controls/QskSlider.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSliderSkinlet.cpp b/src/controls/QskSliderSkinlet.cpp index 3adda86c..9dbc720b 100644 --- a/src/controls/QskSliderSkinlet.cpp +++ b/src/controls/QskSliderSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSliderSkinlet.h b/src/controls/QskSliderSkinlet.h index 3795c0b2..170e13c6 100644 --- a/src/controls/QskSliderSkinlet.h +++ b/src/controls/QskSliderSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSpinBox.cpp b/src/controls/QskSpinBox.cpp index 9959cac7..56ae6e7f 100644 --- a/src/controls/QskSpinBox.cpp +++ b/src/controls/QskSpinBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSpinBox.h b/src/controls/QskSpinBox.h index 5837e951..518537c1 100644 --- a/src/controls/QskSpinBox.h +++ b/src/controls/QskSpinBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSpinBoxSkinlet.cpp b/src/controls/QskSpinBoxSkinlet.cpp index b0394f30..8970f703 100644 --- a/src/controls/QskSpinBoxSkinlet.cpp +++ b/src/controls/QskSpinBoxSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSpinBoxSkinlet.h b/src/controls/QskSpinBoxSkinlet.h index 81fc3fdb..1a0710b1 100644 --- a/src/controls/QskSpinBoxSkinlet.h +++ b/src/controls/QskSpinBoxSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskStatusIndicator.cpp b/src/controls/QskStatusIndicator.cpp index 643d2fe4..09a67a34 100644 --- a/src/controls/QskStatusIndicator.cpp +++ b/src/controls/QskStatusIndicator.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskStatusIndicator.h b/src/controls/QskStatusIndicator.h index b08e8e54..a99ddc52 100644 --- a/src/controls/QskStatusIndicator.h +++ b/src/controls/QskStatusIndicator.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskStatusIndicatorSkinlet.cpp b/src/controls/QskStatusIndicatorSkinlet.cpp index 50a512b3..9cb2e7d7 100644 --- a/src/controls/QskStatusIndicatorSkinlet.cpp +++ b/src/controls/QskStatusIndicatorSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskStatusIndicatorSkinlet.h b/src/controls/QskStatusIndicatorSkinlet.h index 1f128d3a..782b97e8 100644 --- a/src/controls/QskStatusIndicatorSkinlet.h +++ b/src/controls/QskStatusIndicatorSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSubWindow.cpp b/src/controls/QskSubWindow.cpp index 229b4000..90833ef6 100644 --- a/src/controls/QskSubWindow.cpp +++ b/src/controls/QskSubWindow.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSubWindow.h b/src/controls/QskSubWindow.h index 42afd11b..a23932b0 100644 --- a/src/controls/QskSubWindow.h +++ b/src/controls/QskSubWindow.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSubWindowArea.cpp b/src/controls/QskSubWindowArea.cpp index 7829a214..5e7db643 100644 --- a/src/controls/QskSubWindowArea.cpp +++ b/src/controls/QskSubWindowArea.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSubWindowArea.h b/src/controls/QskSubWindowArea.h index 171fb7ec..3400ab2e 100644 --- a/src/controls/QskSubWindowArea.h +++ b/src/controls/QskSubWindowArea.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSubWindowAreaSkinlet.cpp b/src/controls/QskSubWindowAreaSkinlet.cpp index 32dc81f8..4c66656d 100644 --- a/src/controls/QskSubWindowAreaSkinlet.cpp +++ b/src/controls/QskSubWindowAreaSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSubWindowAreaSkinlet.h b/src/controls/QskSubWindowAreaSkinlet.h index 99c2ac22..d93929a5 100644 --- a/src/controls/QskSubWindowAreaSkinlet.h +++ b/src/controls/QskSubWindowAreaSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSubWindowSkinlet.cpp b/src/controls/QskSubWindowSkinlet.cpp index 84e9a571..ff69abeb 100644 --- a/src/controls/QskSubWindowSkinlet.cpp +++ b/src/controls/QskSubWindowSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSubWindowSkinlet.h b/src/controls/QskSubWindowSkinlet.h index fd2bc5dc..fb1f1187 100644 --- a/src/controls/QskSubWindowSkinlet.h +++ b/src/controls/QskSubWindowSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSwipeView.cpp b/src/controls/QskSwipeView.cpp index 545c416f..a1e94a09 100644 --- a/src/controls/QskSwipeView.cpp +++ b/src/controls/QskSwipeView.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSwipeView.h b/src/controls/QskSwipeView.h index 390634e0..5135a840 100644 --- a/src/controls/QskSwipeView.h +++ b/src/controls/QskSwipeView.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSwitchButton.cpp b/src/controls/QskSwitchButton.cpp index c0b28d3c..b0dd5800 100644 --- a/src/controls/QskSwitchButton.cpp +++ b/src/controls/QskSwitchButton.cpp @@ -1,3 +1,8 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + #include "QskSwitchButton.h" QSK_SUBCONTROL( QskSwitchButton, Handle ) diff --git a/src/controls/QskSwitchButton.h b/src/controls/QskSwitchButton.h index 067d2638..cc32faed 100644 --- a/src/controls/QskSwitchButton.h +++ b/src/controls/QskSwitchButton.h @@ -1,3 +1,8 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + #ifndef QSK_SWITCH_BUTTON_H #define QSK_SWITCH_BUTTON_H diff --git a/src/controls/QskSwitchButtonSkinlet.cpp b/src/controls/QskSwitchButtonSkinlet.cpp index 9de85d8b..e755c8c6 100644 --- a/src/controls/QskSwitchButtonSkinlet.cpp +++ b/src/controls/QskSwitchButtonSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskSwitchButtonSkinlet.h b/src/controls/QskSwitchButtonSkinlet.h index 653ec469..f9926d0e 100644 --- a/src/controls/QskSwitchButtonSkinlet.h +++ b/src/controls/QskSwitchButtonSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTabBar.cpp b/src/controls/QskTabBar.cpp index 919e829e..eb0eaff8 100644 --- a/src/controls/QskTabBar.cpp +++ b/src/controls/QskTabBar.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTabBar.h b/src/controls/QskTabBar.h index 922582ce..e80c24fd 100644 --- a/src/controls/QskTabBar.h +++ b/src/controls/QskTabBar.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTabButton.cpp b/src/controls/QskTabButton.cpp index b1ea1977..71e0fd11 100644 --- a/src/controls/QskTabButton.cpp +++ b/src/controls/QskTabButton.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTabButton.h b/src/controls/QskTabButton.h index 95b1394f..422c744f 100644 --- a/src/controls/QskTabButton.h +++ b/src/controls/QskTabButton.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTabButtonSkinlet.cpp b/src/controls/QskTabButtonSkinlet.cpp index 0299d5c6..109f0a99 100644 --- a/src/controls/QskTabButtonSkinlet.cpp +++ b/src/controls/QskTabButtonSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTabButtonSkinlet.h b/src/controls/QskTabButtonSkinlet.h index d7940996..5b0f7337 100644 --- a/src/controls/QskTabButtonSkinlet.h +++ b/src/controls/QskTabButtonSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTabView.cpp b/src/controls/QskTabView.cpp index 100a55f8..5a2a6285 100644 --- a/src/controls/QskTabView.cpp +++ b/src/controls/QskTabView.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTabView.h b/src/controls/QskTabView.h index c625576e..9df69c6d 100644 --- a/src/controls/QskTabView.h +++ b/src/controls/QskTabView.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTabViewSkinlet.cpp b/src/controls/QskTabViewSkinlet.cpp index 8946f167..3cb2835f 100644 --- a/src/controls/QskTabViewSkinlet.cpp +++ b/src/controls/QskTabViewSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTabViewSkinlet.h b/src/controls/QskTabViewSkinlet.h index 057e19eb..6427fd1e 100644 --- a/src/controls/QskTabViewSkinlet.h +++ b/src/controls/QskTabViewSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTextInput.cpp b/src/controls/QskTextInput.cpp index 92e79076..91491377 100644 --- a/src/controls/QskTextInput.cpp +++ b/src/controls/QskTextInput.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTextInput.h b/src/controls/QskTextInput.h index e676156e..f26e6a6b 100644 --- a/src/controls/QskTextInput.h +++ b/src/controls/QskTextInput.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTextInputSkinlet.cpp b/src/controls/QskTextInputSkinlet.cpp index 99b57fe4..8f0e1b4c 100644 --- a/src/controls/QskTextInputSkinlet.cpp +++ b/src/controls/QskTextInputSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTextInputSkinlet.h b/src/controls/QskTextInputSkinlet.h index ac12198a..946c6d32 100644 --- a/src/controls/QskTextInputSkinlet.h +++ b/src/controls/QskTextInputSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTextLabel.cpp b/src/controls/QskTextLabel.cpp index 370c6b26..d5fd6d24 100644 --- a/src/controls/QskTextLabel.cpp +++ b/src/controls/QskTextLabel.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTextLabel.h b/src/controls/QskTextLabel.h index b6e766b0..4911a8dd 100644 --- a/src/controls/QskTextLabel.h +++ b/src/controls/QskTextLabel.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTextLabelSkinlet.cpp b/src/controls/QskTextLabelSkinlet.cpp index a981386c..3826afeb 100644 --- a/src/controls/QskTextLabelSkinlet.cpp +++ b/src/controls/QskTextLabelSkinlet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskTextLabelSkinlet.h b/src/controls/QskTextLabelSkinlet.h index 85752cab..1aa53f1c 100644 --- a/src/controls/QskTextLabelSkinlet.h +++ b/src/controls/QskTextLabelSkinlet.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskVariantAnimator.cpp b/src/controls/QskVariantAnimator.cpp index 61b8a57c..7518cc9a 100644 --- a/src/controls/QskVariantAnimator.cpp +++ b/src/controls/QskVariantAnimator.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskVariantAnimator.h b/src/controls/QskVariantAnimator.h index ea438e62..0f86e78a 100644 --- a/src/controls/QskVariantAnimator.h +++ b/src/controls/QskVariantAnimator.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/controls/QskWindow.cpp b/src/controls/QskWindow.cpp index f46c6da5..431e9da9 100644 --- a/src/controls/QskWindow.cpp +++ b/src/controls/QskWindow.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -416,6 +416,20 @@ void QskWindow::keyReleaseEvent( QKeyEvent* event ) void QskWindow::exposeEvent( QExposeEvent* event ) { +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + if ( qskRenderingHardwareInterface( this ) ) + { + /* + Actually our code supports Qt5 RHI ( f9c08c34fb2cc64546bbe6ce9d359f416e934961 ), + but Qt5 does not come with the qsb tool out of the box. Then we run into + problems with compiling the shader code from the makefiles. + But why should anyone use the experimental Qt5 RHI implementations + instead of using Qt6 ... + */ + qFatal( "the experimental Qt5 RHI implementation is not supported:\n" + "\tuse Qt6 or run the default OpenGL backend." ); + } +#endif ensureFocus( Qt::OtherFocusReason ); layoutItems(); diff --git a/src/controls/QskWindow.h b/src/controls/QskWindow.h index 07320b65..1dca9609 100644 --- a/src/controls/QskWindow.h +++ b/src/controls/QskWindow.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskDialog.cpp b/src/dialogs/QskDialog.cpp index d75b5b4e..c3f21a97 100644 --- a/src/dialogs/QskDialog.cpp +++ b/src/dialogs/QskDialog.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskDialog.h b/src/dialogs/QskDialog.h index 51c0fe3f..988e9162 100644 --- a/src/dialogs/QskDialog.h +++ b/src/dialogs/QskDialog.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskDialogButton.cpp b/src/dialogs/QskDialogButton.cpp index 82553680..d3ccde3b 100644 --- a/src/dialogs/QskDialogButton.cpp +++ b/src/dialogs/QskDialogButton.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskDialogButton.h b/src/dialogs/QskDialogButton.h index 44f3c902..7fd1f0ae 100644 --- a/src/dialogs/QskDialogButton.h +++ b/src/dialogs/QskDialogButton.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskDialogButtonBox.cpp b/src/dialogs/QskDialogButtonBox.cpp index 47cfc75a..f71290c6 100644 --- a/src/dialogs/QskDialogButtonBox.cpp +++ b/src/dialogs/QskDialogButtonBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskDialogButtonBox.h b/src/dialogs/QskDialogButtonBox.h index db9dc42c..620a0be8 100644 --- a/src/dialogs/QskDialogButtonBox.h +++ b/src/dialogs/QskDialogButtonBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskDialogSubWindow.cpp b/src/dialogs/QskDialogSubWindow.cpp index 5643fec7..22dd751f 100644 --- a/src/dialogs/QskDialogSubWindow.cpp +++ b/src/dialogs/QskDialogSubWindow.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskDialogSubWindow.h b/src/dialogs/QskDialogSubWindow.h index c0cff1d7..2a045e90 100644 --- a/src/dialogs/QskDialogSubWindow.h +++ b/src/dialogs/QskDialogSubWindow.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskDialogWindow.cpp b/src/dialogs/QskDialogWindow.cpp index 99014d6c..e8c2ea25 100644 --- a/src/dialogs/QskDialogWindow.cpp +++ b/src/dialogs/QskDialogWindow.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskDialogWindow.h b/src/dialogs/QskDialogWindow.h index 40e7ada7..6b81e05f 100644 --- a/src/dialogs/QskDialogWindow.h +++ b/src/dialogs/QskDialogWindow.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskMessageSubWindow.cpp b/src/dialogs/QskMessageSubWindow.cpp index 966247ae..ad9fde29 100644 --- a/src/dialogs/QskMessageSubWindow.cpp +++ b/src/dialogs/QskMessageSubWindow.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskMessageSubWindow.h b/src/dialogs/QskMessageSubWindow.h index 54d844ad..fe4cb75b 100644 --- a/src/dialogs/QskMessageSubWindow.h +++ b/src/dialogs/QskMessageSubWindow.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskMessageWindow.cpp b/src/dialogs/QskMessageWindow.cpp index c5195b26..e22d3e55 100644 --- a/src/dialogs/QskMessageWindow.cpp +++ b/src/dialogs/QskMessageWindow.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskMessageWindow.h b/src/dialogs/QskMessageWindow.h index 8965946e..1a65fca3 100644 --- a/src/dialogs/QskMessageWindow.h +++ b/src/dialogs/QskMessageWindow.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskSelectionSubWindow.cpp b/src/dialogs/QskSelectionSubWindow.cpp index 3f24e187..91a22f38 100644 --- a/src/dialogs/QskSelectionSubWindow.cpp +++ b/src/dialogs/QskSelectionSubWindow.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskSelectionSubWindow.h b/src/dialogs/QskSelectionSubWindow.h index e36390dd..a8373bfa 100644 --- a/src/dialogs/QskSelectionSubWindow.h +++ b/src/dialogs/QskSelectionSubWindow.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskSelectionWindow.cpp b/src/dialogs/QskSelectionWindow.cpp index b95542c5..f14674e3 100644 --- a/src/dialogs/QskSelectionWindow.cpp +++ b/src/dialogs/QskSelectionWindow.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/dialogs/QskSelectionWindow.h b/src/dialogs/QskSelectionWindow.h index b14727c0..c54e9879 100644 --- a/src/dialogs/QskSelectionWindow.h +++ b/src/dialogs/QskSelectionWindow.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskColorFilter.cpp b/src/graphic/QskColorFilter.cpp index f8049754..d99fa073 100644 --- a/src/graphic/QskColorFilter.cpp +++ b/src/graphic/QskColorFilter.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskColorFilter.h b/src/graphic/QskColorFilter.h index c45b10c8..9f72e3e4 100644 --- a/src/graphic/QskColorFilter.h +++ b/src/graphic/QskColorFilter.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphic.cpp b/src/graphic/QskGraphic.cpp index c6326790..791e79ae 100644 --- a/src/graphic/QskGraphic.cpp +++ b/src/graphic/QskGraphic.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphic.h b/src/graphic/QskGraphic.h index b45aa937..bd678397 100644 --- a/src/graphic/QskGraphic.h +++ b/src/graphic/QskGraphic.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphicIO.cpp b/src/graphic/QskGraphicIO.cpp index 8678d9ea..77d21785 100644 --- a/src/graphic/QskGraphicIO.cpp +++ b/src/graphic/QskGraphicIO.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphicIO.h b/src/graphic/QskGraphicIO.h index c5d6fdf5..f4c40be7 100644 --- a/src/graphic/QskGraphicIO.h +++ b/src/graphic/QskGraphicIO.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphicImageProvider.cpp b/src/graphic/QskGraphicImageProvider.cpp index f5111caa..9a1c8f7b 100644 --- a/src/graphic/QskGraphicImageProvider.cpp +++ b/src/graphic/QskGraphicImageProvider.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphicImageProvider.h b/src/graphic/QskGraphicImageProvider.h index 35f870ce..5a92a3e5 100644 --- a/src/graphic/QskGraphicImageProvider.h +++ b/src/graphic/QskGraphicImageProvider.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphicPaintEngine.cpp b/src/graphic/QskGraphicPaintEngine.cpp index 729361b0..7088d9c6 100644 --- a/src/graphic/QskGraphicPaintEngine.cpp +++ b/src/graphic/QskGraphicPaintEngine.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphicPaintEngine.h b/src/graphic/QskGraphicPaintEngine.h index bb78d7a0..e34d806e 100644 --- a/src/graphic/QskGraphicPaintEngine.h +++ b/src/graphic/QskGraphicPaintEngine.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphicProvider.cpp b/src/graphic/QskGraphicProvider.cpp index edc66ac7..da3767e2 100644 --- a/src/graphic/QskGraphicProvider.cpp +++ b/src/graphic/QskGraphicProvider.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphicProvider.h b/src/graphic/QskGraphicProvider.h index 6c935a4d..2eead705 100644 --- a/src/graphic/QskGraphicProvider.h +++ b/src/graphic/QskGraphicProvider.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphicProviderMap.cpp b/src/graphic/QskGraphicProviderMap.cpp index 2145fade..b60112bf 100644 --- a/src/graphic/QskGraphicProviderMap.cpp +++ b/src/graphic/QskGraphicProviderMap.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphicProviderMap.h b/src/graphic/QskGraphicProviderMap.h index b71f0d56..30952172 100644 --- a/src/graphic/QskGraphicProviderMap.h +++ b/src/graphic/QskGraphicProviderMap.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphicTextureFactory.cpp b/src/graphic/QskGraphicTextureFactory.cpp index 029ee187..24cff214 100644 --- a/src/graphic/QskGraphicTextureFactory.cpp +++ b/src/graphic/QskGraphicTextureFactory.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskGraphicTextureFactory.h b/src/graphic/QskGraphicTextureFactory.h index f31d8573..557e9eaf 100644 --- a/src/graphic/QskGraphicTextureFactory.h +++ b/src/graphic/QskGraphicTextureFactory.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskIcon.cpp b/src/graphic/QskIcon.cpp index 0bd4a5e4..afebe961 100644 --- a/src/graphic/QskIcon.cpp +++ b/src/graphic/QskIcon.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskIcon.h b/src/graphic/QskIcon.h index 681178e8..dbc7845b 100644 --- a/src/graphic/QskIcon.h +++ b/src/graphic/QskIcon.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskPainterCommand.cpp b/src/graphic/QskPainterCommand.cpp index 5a61b209..a6a3db70 100644 --- a/src/graphic/QskPainterCommand.cpp +++ b/src/graphic/QskPainterCommand.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskPainterCommand.h b/src/graphic/QskPainterCommand.h index e7d5ccde..e6dd7ac0 100644 --- a/src/graphic/QskPainterCommand.h +++ b/src/graphic/QskPainterCommand.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskStandardSymbol.cpp b/src/graphic/QskStandardSymbol.cpp index 6898b0df..80e63574 100644 --- a/src/graphic/QskStandardSymbol.cpp +++ b/src/graphic/QskStandardSymbol.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/graphic/QskStandardSymbol.h b/src/graphic/QskStandardSymbol.h index 100ab0b2..c79a6bbb 100644 --- a/src/graphic/QskStandardSymbol.h +++ b/src/graphic/QskStandardSymbol.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskHunspellTextPredictor.cpp b/src/inputpanel/QskHunspellTextPredictor.cpp index a172490c..49a4de9b 100644 --- a/src/inputpanel/QskHunspellTextPredictor.cpp +++ b/src/inputpanel/QskHunspellTextPredictor.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskHunspellTextPredictor.h b/src/inputpanel/QskHunspellTextPredictor.h index 10812ce1..11d7f0b6 100644 --- a/src/inputpanel/QskHunspellTextPredictor.h +++ b/src/inputpanel/QskHunspellTextPredictor.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskInputContext.cpp b/src/inputpanel/QskInputContext.cpp index 1e05eb0c..ec3aa01b 100644 --- a/src/inputpanel/QskInputContext.cpp +++ b/src/inputpanel/QskInputContext.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskInputContext.h b/src/inputpanel/QskInputContext.h index 2c046528..fa284e3e 100644 --- a/src/inputpanel/QskInputContext.h +++ b/src/inputpanel/QskInputContext.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskInputPanel.cpp b/src/inputpanel/QskInputPanel.cpp index 8ced7fea..9625873b 100644 --- a/src/inputpanel/QskInputPanel.cpp +++ b/src/inputpanel/QskInputPanel.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskInputPanel.h b/src/inputpanel/QskInputPanel.h index 79e45c9c..d72e3d7c 100644 --- a/src/inputpanel/QskInputPanel.h +++ b/src/inputpanel/QskInputPanel.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskInputPanelBox.cpp b/src/inputpanel/QskInputPanelBox.cpp index 23ba6879..46cda216 100644 --- a/src/inputpanel/QskInputPanelBox.cpp +++ b/src/inputpanel/QskInputPanelBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskInputPanelBox.h b/src/inputpanel/QskInputPanelBox.h index ac2edbba..aaaa8554 100644 --- a/src/inputpanel/QskInputPanelBox.h +++ b/src/inputpanel/QskInputPanelBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskInputPredictionBar.cpp b/src/inputpanel/QskInputPredictionBar.cpp index 330e4755..fa4c1f98 100644 --- a/src/inputpanel/QskInputPredictionBar.cpp +++ b/src/inputpanel/QskInputPredictionBar.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskInputPredictionBar.h b/src/inputpanel/QskInputPredictionBar.h index 2371f117..b4154f58 100644 --- a/src/inputpanel/QskInputPredictionBar.h +++ b/src/inputpanel/QskInputPredictionBar.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskPinyinTextPredictor.cpp b/src/inputpanel/QskPinyinTextPredictor.cpp index cd066109..e051b634 100644 --- a/src/inputpanel/QskPinyinTextPredictor.cpp +++ b/src/inputpanel/QskPinyinTextPredictor.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskPinyinTextPredictor.h b/src/inputpanel/QskPinyinTextPredictor.h index 8b9e0c08..00196728 100644 --- a/src/inputpanel/QskPinyinTextPredictor.h +++ b/src/inputpanel/QskPinyinTextPredictor.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskTextPredictor.cpp b/src/inputpanel/QskTextPredictor.cpp index c9b5144a..f5cbcf84 100644 --- a/src/inputpanel/QskTextPredictor.cpp +++ b/src/inputpanel/QskTextPredictor.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskTextPredictor.h b/src/inputpanel/QskTextPredictor.h index c17fa125..42e1387d 100644 --- a/src/inputpanel/QskTextPredictor.h +++ b/src/inputpanel/QskTextPredictor.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskVirtualKeyboard.cpp b/src/inputpanel/QskVirtualKeyboard.cpp index c0e7ccf9..1416a587 100644 --- a/src/inputpanel/QskVirtualKeyboard.cpp +++ b/src/inputpanel/QskVirtualKeyboard.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskVirtualKeyboard.h b/src/inputpanel/QskVirtualKeyboard.h index 8e45d455..ca660420 100644 --- a/src/inputpanel/QskVirtualKeyboard.h +++ b/src/inputpanel/QskVirtualKeyboard.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/inputpanel/QskVirtualKeyboardLayouts.cpp b/src/inputpanel/QskVirtualKeyboardLayouts.cpp index 44dfcc50..7d933f60 100644 --- a/src/inputpanel/QskVirtualKeyboardLayouts.cpp +++ b/src/inputpanel/QskVirtualKeyboardLayouts.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskGridBox.cpp b/src/layouts/QskGridBox.cpp index d0e93b99..15c6c2b9 100644 --- a/src/layouts/QskGridBox.cpp +++ b/src/layouts/QskGridBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskGridBox.h b/src/layouts/QskGridBox.h index f177ad49..73a8e1ed 100644 --- a/src/layouts/QskGridBox.h +++ b/src/layouts/QskGridBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskGridLayoutEngine.cpp b/src/layouts/QskGridLayoutEngine.cpp index cc56af13..dacf5ded 100644 --- a/src/layouts/QskGridLayoutEngine.cpp +++ b/src/layouts/QskGridLayoutEngine.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskGridLayoutEngine.h b/src/layouts/QskGridLayoutEngine.h index 37a63ef7..fab552e0 100644 --- a/src/layouts/QskGridLayoutEngine.h +++ b/src/layouts/QskGridLayoutEngine.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskIndexedLayoutBox.cpp b/src/layouts/QskIndexedLayoutBox.cpp index 7fb7a26a..cc219541 100644 --- a/src/layouts/QskIndexedLayoutBox.cpp +++ b/src/layouts/QskIndexedLayoutBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskIndexedLayoutBox.h b/src/layouts/QskIndexedLayoutBox.h index 5098297a..58532f6f 100644 --- a/src/layouts/QskIndexedLayoutBox.h +++ b/src/layouts/QskIndexedLayoutBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskLayoutChain.cpp b/src/layouts/QskLayoutChain.cpp index 9bdbd855..5a086f88 100644 --- a/src/layouts/QskLayoutChain.cpp +++ b/src/layouts/QskLayoutChain.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskLayoutChain.h b/src/layouts/QskLayoutChain.h index 8895f264..2c268407 100644 --- a/src/layouts/QskLayoutChain.h +++ b/src/layouts/QskLayoutChain.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskLayoutElement.cpp b/src/layouts/QskLayoutElement.cpp index 5d768edb..ba02f294 100644 --- a/src/layouts/QskLayoutElement.cpp +++ b/src/layouts/QskLayoutElement.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskLayoutElement.h b/src/layouts/QskLayoutElement.h index 4bebca0b..36a655a7 100644 --- a/src/layouts/QskLayoutElement.h +++ b/src/layouts/QskLayoutElement.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskLayoutEngine2D.cpp b/src/layouts/QskLayoutEngine2D.cpp index 5add6d55..1a49fd7b 100644 --- a/src/layouts/QskLayoutEngine2D.cpp +++ b/src/layouts/QskLayoutEngine2D.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskLayoutEngine2D.h b/src/layouts/QskLayoutEngine2D.h index d468c24c..ed1da76d 100644 --- a/src/layouts/QskLayoutEngine2D.h +++ b/src/layouts/QskLayoutEngine2D.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskLayoutMetrics.cpp b/src/layouts/QskLayoutMetrics.cpp index 01456414..7e5c91f0 100644 --- a/src/layouts/QskLayoutMetrics.cpp +++ b/src/layouts/QskLayoutMetrics.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskLayoutMetrics.h b/src/layouts/QskLayoutMetrics.h index c440daf7..33e440c8 100644 --- a/src/layouts/QskLayoutMetrics.h +++ b/src/layouts/QskLayoutMetrics.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskLinearBox.cpp b/src/layouts/QskLinearBox.cpp index cc4ec382..46291fbf 100644 --- a/src/layouts/QskLinearBox.cpp +++ b/src/layouts/QskLinearBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskLinearBox.h b/src/layouts/QskLinearBox.h index b0b67d84..71fe7a72 100644 --- a/src/layouts/QskLinearBox.h +++ b/src/layouts/QskLinearBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskLinearLayoutEngine.cpp b/src/layouts/QskLinearLayoutEngine.cpp index 3d46a1b8..fecd4855 100644 --- a/src/layouts/QskLinearLayoutEngine.cpp +++ b/src/layouts/QskLinearLayoutEngine.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskLinearLayoutEngine.h b/src/layouts/QskLinearLayoutEngine.h index 799cd021..00543064 100644 --- a/src/layouts/QskLinearLayoutEngine.h +++ b/src/layouts/QskLinearLayoutEngine.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskStackBox.cpp b/src/layouts/QskStackBox.cpp index 2b3eaf54..87b14999 100644 --- a/src/layouts/QskStackBox.cpp +++ b/src/layouts/QskStackBox.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskStackBox.h b/src/layouts/QskStackBox.h index 0ba97e7a..b910c984 100644 --- a/src/layouts/QskStackBox.h +++ b/src/layouts/QskStackBox.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskStackBoxAnimator.cpp b/src/layouts/QskStackBoxAnimator.cpp index 5171537b..5558fd31 100644 --- a/src/layouts/QskStackBoxAnimator.cpp +++ b/src/layouts/QskStackBoxAnimator.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskStackBoxAnimator.h b/src/layouts/QskStackBoxAnimator.h index 8fd0d994..c7b887dc 100644 --- a/src/layouts/QskStackBoxAnimator.h +++ b/src/layouts/QskStackBoxAnimator.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskSubcontrolLayoutEngine.cpp b/src/layouts/QskSubcontrolLayoutEngine.cpp index e00b4835..13ee254f 100644 --- a/src/layouts/QskSubcontrolLayoutEngine.cpp +++ b/src/layouts/QskSubcontrolLayoutEngine.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/layouts/QskSubcontrolLayoutEngine.h b/src/layouts/QskSubcontrolLayoutEngine.h index c1afc485..d2a80ec6 100644 --- a/src/layouts/QskSubcontrolLayoutEngine.h +++ b/src/layouts/QskSubcontrolLayoutEngine.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskArcNode.cpp b/src/nodes/QskArcNode.cpp index a58a72df..e3de5c0a 100644 --- a/src/nodes/QskArcNode.cpp +++ b/src/nodes/QskArcNode.cpp @@ -1,19 +1,31 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "QskArcNode.h" #include "QskArcMetrics.h" +#include "QskArcShadowNode.h" #include "QskMargins.h" #include "QskGradient.h" #include "QskShapeNode.h" #include "QskStrokeNode.h" #include "QskSGNode.h" +#include "QskShadowMetrics.h" #include #include +namespace +{ + enum NodeRole + { + ShadowRole, + FillRole, + BorderRole + }; +} + static inline QskGradient qskEffectiveGradient( const QskGradient& gradient, const QskArcMetrics& metrics ) { @@ -54,6 +66,14 @@ static inline QRectF qskEffectiveRect( return qskValidOrEmptyInnerRect( rect, QskMargins( 0.5 * borderWidth ) ); } +static void qskUpdateChildren( QSGNode* parentNode, quint8 role, QSGNode* node ) +{ + static const QVector< quint8 > roles = { ShadowRole, FillRole, BorderRole }; + + auto oldNode = QskSGNode::findChildNode( parentNode, role ); + QskSGNode::replaceChildNode( roles, role, parentNode, oldNode, node ); +} + QskArcNode::QskArcNode() { } @@ -65,20 +85,24 @@ QskArcNode::~QskArcNode() void QskArcNode::setArcData( const QRectF& rect, const QskArcMetrics& arcMetrics, const QskGradient& fillGradient ) { - setArcData( rect, arcMetrics, 0.0, QColor(), fillGradient ); + setArcData( rect, arcMetrics, 0.0, QColor(), fillGradient, {}, {} ); } void QskArcNode::setArcData( const QRectF& rect, const QskArcMetrics& arcMetrics, - qreal borderWidth, const QColor& borderColor, const QskGradient& fillGradient ) + const qreal borderWidth, const QColor& borderColor, const QskGradient& fillGradient ) { - enum NodeRole - { - FillRole, - BorderRole - }; + setArcData( rect, arcMetrics, borderWidth, borderColor, fillGradient, {}, {} ); +} - const auto metrics = qskEffectiveMetrics( arcMetrics, rect ); - const auto gradient = qskEffectiveGradient( fillGradient, metrics ); +void QskArcNode::setArcData( const QRectF& rect, const QskArcMetrics& arcMetrics, + const qreal borderWidth, const QColor& borderColor, const QskGradient& fillGradient, + const QColor& shadowColor, const QskShadowMetrics& shadowMetrics ) +{ + const auto metricsArc = qskEffectiveMetrics( arcMetrics, rect ); + const auto gradient = qskEffectiveGradient( fillGradient, metricsArc ); + + auto shadowNode = static_cast< QskArcShadowNode* >( + QskSGNode::findChildNode( this, ShadowRole ) ); auto fillNode = static_cast< QskShapeNode* >( QskSGNode::findChildNode( this, FillRole ) ); @@ -89,22 +113,52 @@ void QskArcNode::setArcData( const QRectF& rect, const QskArcMetrics& arcMetrics const auto arcRect = qskEffectiveRect( rect, borderWidth ); if ( arcRect.isEmpty() ) { + delete shadowNode; delete fillNode; delete borderNode; - return; } - const auto path = metrics.painterPath( arcRect ); + const auto isFillNodeVisible = gradient.isVisible() && !metricsArc.isNull(); + const auto isStrokeNodeVisible = borderWidth > 0.0 && borderColor.alpha() > 0; + const auto isShadowNodeVisible = shadowColor.alpha() > 0.0 && isFillNodeVisible; - if ( gradient.isVisible() && !metrics.isNull() ) + const auto path = metricsArc.painterPath( arcRect ); + + if ( isShadowNodeVisible ) + { + if ( shadowNode == nullptr ) + { + shadowNode = new QskArcShadowNode; + QskSGNode::setNodeRole( shadowNode, ShadowRole ); + } + + /* + The shader of the shadow node is for circular arcs and we have some + unwanted scaling issues for the spread/blur values when having ellipsoid + arcs. We might also want to add the spread value to the ends of the arc + and not only to its radius. TODO ... + */ + + const auto sm = shadowMetrics.toAbsolute( arcRect.size() ); + const auto shadowRect = sm.shadowRect( arcRect ); + const auto spreadRadius = sm.spreadRadius() + 0.5 * metricsArc.thickness(); + + shadowNode->setShadowData( shadowRect, spreadRadius, sm.blurRadius(), + metricsArc.startAngle(), metricsArc.spanAngle(), shadowColor ); + } + else + { + delete shadowNode; + shadowNode = nullptr; + } + + if ( isFillNodeVisible ) { if ( fillNode == nullptr ) { fillNode = new QskShapeNode; QskSGNode::setNodeRole( fillNode, FillRole ); - - prependChildNode( fillNode ); } fillNode->updateNode( path, QTransform(), arcRect, gradient ); @@ -112,25 +166,29 @@ void QskArcNode::setArcData( const QRectF& rect, const QskArcMetrics& arcMetrics else { delete fillNode; + fillNode = nullptr; } - if ( borderWidth > 0.0 && borderColor.alpha() > 0 ) + if ( isStrokeNodeVisible ) { if ( borderNode == nullptr ) { borderNode = new QskStrokeNode; QskSGNode::setNodeRole( borderNode, BorderRole ); - - appendChildNode( borderNode ); } QPen pen( borderColor, borderWidth ); pen.setCapStyle( Qt::FlatCap ); - + borderNode->updateNode( path, QTransform(), pen ); } else { delete borderNode; + borderNode = nullptr; } + + qskUpdateChildren(this, ShadowRole, shadowNode); + qskUpdateChildren(this, FillRole, fillNode); + qskUpdateChildren(this, BorderRole, borderNode); } diff --git a/src/nodes/QskArcNode.h b/src/nodes/QskArcNode.h index 1e3e44d1..c4fa330a 100644 --- a/src/nodes/QskArcNode.h +++ b/src/nodes/QskArcNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -10,6 +10,7 @@ class QskArcMetrics; class QskGradient; +class QskShadowMetrics; /* For the moment a QPainterPath/QskShapeNode. @@ -23,8 +24,13 @@ class QSK_EXPORT QskArcNode : public QskShapeNode ~QskArcNode() override; void setArcData( const QRectF&, const QskArcMetrics&, const QskGradient& ); + void setArcData( const QRectF&, const QskArcMetrics&, qreal borderWidth, const QColor& borderColor, const QskGradient& ); + + void setArcData( const QRectF&, const QskArcMetrics&, + qreal borderWidth, const QColor& borderColor, const QskGradient&, + const QColor& shadowColor, const QskShadowMetrics&); }; #endif diff --git a/src/nodes/QskArcShadowNode.cpp b/src/nodes/QskArcShadowNode.cpp new file mode 100644 index 00000000..ed1128b1 --- /dev/null +++ b/src/nodes/QskArcShadowNode.cpp @@ -0,0 +1,368 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#include "QskArcShadowNode.h" + +#include +#include +#include +#include + +#include + +QSK_QT_PRIVATE_BEGIN +#include +QSK_QT_PRIVATE_END + +// QSGMaterialRhiShader became QSGMaterialShader in Qt6 + +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) +#include +using RhiShader = QSGMaterialRhiShader; +#else +using RhiShader = QSGMaterialShader; +#endif + +namespace +{ + class Material final : public QSGMaterial + { + public: + Material(); + +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + QSGMaterialShader* createShader() const override; +#else + QSGMaterialShader* createShader( QSGRendererInterface::RenderMode ) const override; +#endif + + QSGMaterialType* type() const override; + int compare( const QSGMaterial* other ) const override; + + QVector4D m_color { 0, 0, 0, 1 }; + QVector4D m_arc = {}; + + float m_spreadRadius = 0.0f; + float m_blurRadius = 0.0f; + }; +} + +namespace +{ + class ShaderRhi final : public RhiShader + { + public: + ShaderRhi() + { + const QString root( ":/qskinny/shaders/" ); + setShaderFileName( VertexStage, root + "arcshadow.vert.qsb" ); + setShaderFileName( FragmentStage, root + "arcshadow.frag.qsb" ); + } + + bool updateUniformData( RenderState& state, + QSGMaterial* const newMaterial, QSGMaterial* const oldMaterial ) override + { + const auto matOld = static_cast< Material* >( oldMaterial ); + const auto matNew = static_cast< Material* >( newMaterial ); + + Q_ASSERT( state.uniformData()->size() == 108 ); + + auto data = state.uniformData()->data(); + bool changed = false; + + if ( state.isMatrixDirty() ) + { + const auto matrix = state.combinedMatrix(); + memcpy( data + 0, matrix.constData(), 64 ); + + changed = true; + } + + if ( matOld == nullptr || matNew->m_color != matOld->m_color ) + { + memcpy( data + 64, &matNew->m_color, 16 ); + changed = true; + } + + if ( matOld == nullptr || matNew->m_arc != matOld->m_arc ) + { + memcpy( data + 80, &matNew->m_arc, 16 ); + changed = true; + } + + if ( matOld == nullptr || matNew->m_spreadRadius != matOld->m_spreadRadius ) + { + memcpy( data + 96, &matNew->m_spreadRadius, 4 ); + changed = true; + } + + if ( matOld == nullptr || matNew->m_blurRadius != matOld->m_blurRadius ) + { + memcpy( data + 100, &matNew->m_blurRadius, 4 ); + changed = true; + } + + if ( state.isOpacityDirty() ) + { + const float opacity = state.opacity(); + memcpy( data + 104, &opacity, 4 ); + + changed = true; + } + + return changed; + } + }; +} + +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + +namespace +{ + // the old type of shader - specific for OpenGL + + class ShaderGL final : public QSGMaterialShader + { + struct Uniforms + { + int matrix = -1; + int color = -1; + int arc = -1; + int spreadRadius = -1; + int blurRadius = -1; + int opacity = -1; + }; + + public: + ShaderGL() + { + const QString root( ":/qskinny/shaders/" ); + setShaderSourceFile( QOpenGLShader::Vertex, root + "arcshadow.vert" ); + setShaderSourceFile( QOpenGLShader::Fragment, root + "arcshadow.frag" ); + } + + char const* const* attributeNames() const override + { + static char const* const names[] = { "in_vertex", "in_coord", nullptr }; + return names; + } + + void initialize() override + { + QSGMaterialShader::initialize(); + + const auto* const p = program(); + + id.matrix = p->uniformLocation( "matrix" ); + id.color = p->uniformLocation( "color" ); + id.arc = p->uniformLocation( "arc" ); + id.spreadRadius = p->uniformLocation( "spreadRadius" ); + id.blurRadius = p->uniformLocation( "blurRadius" ); + id.opacity = p->uniformLocation( "opacity" ); + } + + void updateState( const QSGMaterialShader::RenderState& state, + QSGMaterial* const newMaterial, QSGMaterial* const oldMaterial ) override + { + auto* const p = program(); + + if ( state.isMatrixDirty() ) + { + p->setUniformValue( id.matrix, state.combinedMatrix() ); + } + + if ( state.isOpacityDirty() ) + { + p->setUniformValue( id.opacity, state.opacity() ); + } + + auto updateMaterial = ( oldMaterial == nullptr ) || + ( newMaterial->compare( oldMaterial ) != 0 ); + + updateMaterial |= state.isCachedMaterialDataDirty(); + + if ( updateMaterial ) + { + const auto* const material = static_cast< const Material* >( newMaterial ); + + p->setUniformValue( id.color, material->m_color ); + p->setUniformValue( id.arc, material->m_arc ); + p->setUniformValue( id.spreadRadius, material->m_spreadRadius ); + p->setUniformValue( id.blurRadius, material->m_blurRadius ); + } + } + + private: + Uniforms id; + }; +} + +#endif + +namespace +{ + Material::Material() + { + setFlag( QSGMaterial::Blending, true ); +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + setFlag( QSGMaterial::SupportsRhiShader, true ); +#endif + } + +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + + QSGMaterialShader* Material::createShader() const + { + if ( !( flags() & QSGMaterial::RhiShaderWanted ) ) + return new ShaderGL(); + + return new ShaderRhi(); + } + +#else + + QSGMaterialShader* Material::createShader( QSGRendererInterface::RenderMode ) const + { + return new ShaderRhi(); + } + +#endif + + QSGMaterialType* Material::type() const + { + static QSGMaterialType staticType; + return &staticType; + } + + int Material::compare( const QSGMaterial* const other ) const + { + auto material = static_cast< const Material* >( other ); + + if ( ( material->m_color == m_color ) + && ( material->m_arc == m_arc ) + && qFuzzyCompare( material->m_spreadRadius, m_spreadRadius ) + && qFuzzyCompare( material->m_blurRadius, m_blurRadius ) ) + { + return 0; + } + + return QSGMaterial::compare( other ); + } +} + +class QskArcShadowNodePrivate final : public QSGGeometryNodePrivate +{ + public: + QskArcShadowNodePrivate() + : geometry( QSGGeometry::defaultAttributes_TexturedPoint2D(), 4 ) + { + } + + QSGGeometry geometry; + Material material; + QRectF rect; +}; + +QskArcShadowNode::QskArcShadowNode() + : QSGGeometryNode( *new QskArcShadowNodePrivate ) +{ + Q_D( QskArcShadowNode ); + + setGeometry( &d->geometry ); + setMaterial( &d->material ); + + d->geometry.setDrawingMode( QSGGeometry::DrawTriangleStrip ); + d->material.setFlag( QSGMaterial::Blending ); +} + +QskArcShadowNode::~QskArcShadowNode() = default; + +void QskArcShadowNode::setShadowData( + const QRectF& rect, qreal spreadRadius, qreal blurRadius, + qreal startAngle, qreal spanAngle, const QColor& color ) +{ + if ( qFuzzyIsNull( spanAngle ) || color.alpha() == 0 ) + { + setBoundingRectangle( {} ); + return; + } + + Q_D( QskArcShadowNode ); + + if ( d->rect != rect ) + { + setBoundingRectangle( rect ); // bounding rectangle includig spread/blur + } + + const auto size = qMin( rect.width(), rect.height() ); + + { +#if 1 + const auto a = color.alphaF(); + const QVector4D c( color.redF() * a, color.greenF() * a, color.blueF() * a, a ); +#else + const QVector4D c( color.redF(), color.greenF(), color.blueF(), color.alphaF() ); +#endif + + if ( d->material.m_color != c ) + { + d->material.m_color = c; + markDirty( QSGNode::DirtyMaterial ); + } + } + + { + const float r = spreadRadius / size; + + if ( d->material.m_spreadRadius != r ) + { + d->material.m_spreadRadius = r; + markDirty( QSGNode::DirtyMaterial ); + } + } + + { + const float r = blurRadius / size; + + if ( d->material.m_blurRadius != r ) + { + d->material.m_blurRadius = r; + markDirty( QSGNode::DirtyMaterial ); + } + } + + { + QVector4D arc( 0.0, 0.0, 1.0, 0.0 ); + + { + const auto a1 = qDegreesToRadians( startAngle + 0.5 * spanAngle ); + const auto a2 = qDegreesToRadians( 0.5 * qAbs( spanAngle ) ); + + arc = QVector4D( ::cos( a1 ), ::sin( a1 ), ::cos( a2 ), ::sin( a2 ) ); + } + + if ( d->material.m_arc != arc ) + { + d->material.m_arc = arc; + markDirty( QSGNode::DirtyMaterial ); + } + } +} + +void QskArcShadowNode::setBoundingRectangle( const QRectF& rect ) +{ + Q_D( QskArcShadowNode ); + + if ( d->rect == rect ) + return; + + d->rect = rect; + + QSGGeometry::updateTexturedRectGeometry( + &d->geometry, d->rect, { -0.5, -0.5, 1.0, 1.0 } ); + d->geometry.markVertexDataDirty(); + + markDirty( QSGNode::DirtyGeometry ); +} diff --git a/src/nodes/QskArcShadowNode.h b/src/nodes/QskArcShadowNode.h new file mode 100644 index 00000000..2a6528fa --- /dev/null +++ b/src/nodes/QskArcShadowNode.h @@ -0,0 +1,32 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#ifndef QSK_ARC_SHADOW_NODE_H +#define QSK_ARC_SHADOW_NODE_H + +#include "QskGlobal.h" +#include + +class QskArcMetrics; +class QskShadowMetrics; + +class QskArcShadowNodePrivate; + +class QskArcShadowNode : public QSGGeometryNode +{ + public: + QskArcShadowNode(); + ~QskArcShadowNode() override; + + void setShadowData( const QRectF&, qreal spreadRadius, qreal blurRadius, + qreal startAngle, qreal spanAngle, const QColor& ); + + private: + void setBoundingRectangle( const QRectF& ); + + Q_DECLARE_PRIVATE( QskArcShadowNode ) +}; + +#endif diff --git a/src/nodes/QskBasicLinesNode.cpp b/src/nodes/QskBasicLinesNode.cpp index 93414295..292a5629 100644 --- a/src/nodes/QskBasicLinesNode.cpp +++ b/src/nodes/QskBasicLinesNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskBasicLinesNode.h b/src/nodes/QskBasicLinesNode.h index cbbe02a2..3d355a7b 100644 --- a/src/nodes/QskBasicLinesNode.h +++ b/src/nodes/QskBasicLinesNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskBoxBasicStroker.cpp b/src/nodes/QskBoxBasicStroker.cpp index 6a034f3c..b893428a 100644 --- a/src/nodes/QskBoxBasicStroker.cpp +++ b/src/nodes/QskBoxBasicStroker.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -143,7 +143,8 @@ namespace class FillMap { public: - inline FillMap( const QskBoxMetrics& metrics, const QskBox::ColorMap& colorMap ) + inline FillMap( const QskBoxMetrics& metrics, + const QskBoxRenderer::ColorMap& colorMap ) : m_colorMap( colorMap ) , m_corners( metrics.corners ) { @@ -183,7 +184,7 @@ namespace m_colorMap.setLine( x1, y1, x2, y2, line ); } - const QskBox::ColorMap& m_colorMap; + const QskBoxRenderer::ColorMap& m_colorMap; const QskBoxMetrics::Corner* m_corners; }; } @@ -378,12 +379,12 @@ QskBoxBasicStroker::QskBoxBasicStroker( const QskBoxMetrics& metrics ) QskBoxBasicStroker::QskBoxBasicStroker( const QskBoxMetrics& metrics, const QskBoxBorderColors& borderColors ) - : QskBoxBasicStroker( metrics, borderColors, QskBox::ColorMap() ) + : QskBoxBasicStroker( metrics, borderColors, QskBoxRenderer::ColorMap() ) { } QskBoxBasicStroker::QskBoxBasicStroker( const QskBoxMetrics& metrics, - const QskBoxBorderColors& borderColors, const QskBox::ColorMap& colorMap ) + const QskBoxBorderColors& borderColors, const QskBoxRenderer::ColorMap& colorMap ) : m_metrics( metrics ) , m_borderColors( borderColors ) , m_colorMap( colorMap ) diff --git a/src/nodes/QskBoxBasicStroker.h b/src/nodes/QskBoxBasicStroker.h index aa6c5005..b43e9fbc 100644 --- a/src/nodes/QskBoxBasicStroker.h +++ b/src/nodes/QskBoxBasicStroker.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -25,7 +25,7 @@ class QskBoxBasicStroker QskBoxBasicStroker( const QskBoxMetrics& ); QskBoxBasicStroker( const QskBoxMetrics&, const QskBoxBorderColors& ); QskBoxBasicStroker( const QskBoxMetrics&, - const QskBoxBorderColors&, const QskBox::ColorMap& ); + const QskBoxBorderColors&, const QskBoxRenderer::ColorMap& ); int fillCount() const; int borderCount() const; @@ -78,7 +78,7 @@ class QskBoxBasicStroker const QskBoxMetrics& m_metrics; const QskBoxBorderColors m_borderColors; - const QskBox::ColorMap m_colorMap; + const QskBoxRenderer::ColorMap m_colorMap; const GeometryLayout m_geometryLayout; const bool m_isColored; diff --git a/src/nodes/QskBoxClipNode.cpp b/src/nodes/QskBoxClipNode.cpp index 7edf1496..d90891b6 100644 --- a/src/nodes/QskBoxClipNode.cpp +++ b/src/nodes/QskBoxClipNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -67,7 +67,7 @@ void QskBoxClipNode::setBox( const QRectF& rect, else { setIsRectangular( false ); - QskBox::renderFillGeometry( rect, shape, border, m_geometry ); + QskBoxRenderer::renderFillGeometry( rect, shape, border, m_geometry ); } /* diff --git a/src/nodes/QskBoxClipNode.h b/src/nodes/QskBoxClipNode.h index 51f773f4..9312334d 100644 --- a/src/nodes/QskBoxClipNode.h +++ b/src/nodes/QskBoxClipNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskBoxColorMap.h b/src/nodes/QskBoxColorMap.h index 0aaf066b..69f04604 100644 --- a/src/nodes/QskBoxColorMap.h +++ b/src/nodes/QskBoxColorMap.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -10,7 +10,7 @@ #include #include -namespace QskBox +namespace QskBoxRenderer { class ColorMap { diff --git a/src/nodes/QskBoxFillNode.cpp b/src/nodes/QskBoxFillNode.cpp index 078e4afe..2da882c5 100644 --- a/src/nodes/QskBoxFillNode.cpp +++ b/src/nodes/QskBoxFillNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -73,7 +73,8 @@ void QskBoxFillNode::updateNode( if ( dirtyMetrics ) { - QskBox::renderFillGeometry( rect, shapeMetrics, borderMetrics, *geometry() ); + QskBoxRenderer::renderFillGeometry( + rect, shapeMetrics, borderMetrics, *geometry() ); markDirty( QSGNode::DirtyGeometry ); geometry()->markVertexDataDirty(); diff --git a/src/nodes/QskBoxFillNode.h b/src/nodes/QskBoxFillNode.h index 9b8875fe..d43b82d7 100644 --- a/src/nodes/QskBoxFillNode.h +++ b/src/nodes/QskBoxFillNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskBoxGradientStroker.cpp b/src/nodes/QskBoxGradientStroker.cpp index 2c90859c..ad2537ca 100644 --- a/src/nodes/QskBoxGradientStroker.cpp +++ b/src/nodes/QskBoxGradientStroker.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -106,7 +106,8 @@ namespace { while ( !m_gradientIterator.isDone() ) { - if ( m_t0 + m_gradientIterator.position() * m_dt > pos ) + const auto pos2 = m_t0 + m_gradientIterator.position() * m_dt; + if ( pos2 > pos && !qFuzzyIsNull( pos2 - pos ) ) return; m_gradientIterator.advance(); @@ -171,7 +172,7 @@ namespace qreal m_t0, m_dt; const QskBoxMetrics::Corner* m_c1, * m_c2, * m_c3; - QskBox::GradientIterator m_gradientIterator; + QskBoxRenderer::GradientIterator m_gradientIterator; }; } @@ -527,7 +528,7 @@ namespace int setLines( const QskGradient& gradient, ColoredLine* lines ) { ContourIterator it( m_metrics, gradient.linearDirection() ); - QskBox::GradientIterator gradientIt( gradient.stops() ); + QskBoxRenderer::GradientIterator gradientIt( gradient.stops() ); ColoredLine* l = lines; @@ -583,7 +584,7 @@ namespace const qreal y1 = m_metrics.innerRect.top(); const qreal y2 = m_metrics.innerRect.bottom(); - QskBox::GradientIterator it( gradient.stops() ); + QskBoxRenderer::GradientIterator it( gradient.stops() ); ColoredLine* l = lines; const auto dir = gradient.linearDirection(); diff --git a/src/nodes/QskBoxGradientStroker.h b/src/nodes/QskBoxGradientStroker.h index 1245497b..1d133802 100644 --- a/src/nodes/QskBoxGradientStroker.h +++ b/src/nodes/QskBoxGradientStroker.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskBoxMetrics.cpp b/src/nodes/QskBoxMetrics.cpp index 0a448020..a0cf0cff 100644 --- a/src/nodes/QskBoxMetrics.cpp +++ b/src/nodes/QskBoxMetrics.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskBoxMetrics.h b/src/nodes/QskBoxMetrics.h index a78b8a1e..cde8508d 100644 --- a/src/nodes/QskBoxMetrics.h +++ b/src/nodes/QskBoxMetrics.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskBoxNode.cpp b/src/nodes/QskBoxNode.cpp index e49de2e0..fbad3b89 100644 --- a/src/nodes/QskBoxNode.cpp +++ b/src/nodes/QskBoxNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -78,14 +78,12 @@ void QskBoxNode::updateNode( const QRectF& rect, } /* - QskBoxRectangleNode supports vertical/horizontal and many tilted - linear gradients. If our gradient doesn't fall into this category - we use a QskBoxFillNode. - - However the border is always done with a QskBoxRectangleNode + QskBoxRectangleNode is more efficient and creates batchable geometries. + So we prefer using it where possible. + Note, that the border is always done with a QskBoxRectangleNode */ - if ( QskBox::isGradientSupported( shape, gradient ) ) + if ( QskBoxRenderer::isGradientSupported( shape, gradient ) ) { rectNode = qskNode< QskBoxRectangleNode >( this, BoxRole ); rectNode->updateNode( rect, shape, borderMetrics, borderColors, gradient ); diff --git a/src/nodes/QskBoxNode.h b/src/nodes/QskBoxNode.h index 41764edb..999fa58c 100644 --- a/src/nodes/QskBoxNode.h +++ b/src/nodes/QskBoxNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskBoxRectangleNode.cpp b/src/nodes/QskBoxRectangleNode.cpp index 9177a503..da7c8a97 100644 --- a/src/nodes/QskBoxRectangleNode.cpp +++ b/src/nodes/QskBoxRectangleNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -171,7 +171,7 @@ void QskBoxRectangleNode::updateNode( const QRectF& rect, { setColoring( coloring ); - QskBox::renderBox( d->rect, shape, borderMetrics, + QskBoxRenderer::renderBox( d->rect, shape, borderMetrics, borderColors, fillGradient, geometry ); } else @@ -179,13 +179,13 @@ void QskBoxRectangleNode::updateNode( const QRectF& rect, if ( hasFill ) { setColoring( fillGradient.rgbStart() ); - QskBox::renderFillGeometry( + QskBoxRenderer::renderFillGeometry( d->rect, shape, QskBoxBorderMetrics(), geometry ); } else { setColoring( borderColors.left().rgbStart() ); - QskBox::renderBorderGeometry( + QskBoxRenderer::renderBorderGeometry( d->rect, shape, borderMetrics, geometry ); } } diff --git a/src/nodes/QskBoxRectangleNode.h b/src/nodes/QskBoxRectangleNode.h index 502f5ced..cae20aab 100644 --- a/src/nodes/QskBoxRectangleNode.h +++ b/src/nodes/QskBoxRectangleNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskBoxRenderer.cpp b/src/nodes/QskBoxRenderer.cpp index d02280c1..3c9c73ea 100644 --- a/src/nodes/QskBoxRenderer.cpp +++ b/src/nodes/QskBoxRenderer.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -67,7 +67,7 @@ static inline bool qskMaybeSpreading( const QskGradient& gradient ) return true; } -bool QskBox::isGradientSupported( +bool QskBoxRenderer::isGradientSupported( const QskBoxShapeMetrics&, const QskGradient& gradient ) { if ( !gradient.isVisible() || gradient.isMonochrome() ) @@ -107,7 +107,7 @@ bool QskBox::isGradientSupported( return false; } -void QskBox::renderBorderGeometry( +void QskBoxRenderer::renderBorderGeometry( const QRectF& rect, const QskBoxShapeMetrics& shape, const QskBoxBorderMetrics& border, QSGGeometry& geometry ) { @@ -121,13 +121,13 @@ void QskBox::renderBorderGeometry( stroker.setBorderLines( lines ); } -void QskBox::renderFillGeometry( +void QskBoxRenderer::renderFillGeometry( const QRectF& rect, const QskBoxShapeMetrics& shape, QSGGeometry& geometry ) { renderFillGeometry( rect, shape, QskBoxBorderMetrics(), geometry ); } -void QskBox::renderFillGeometry( +void QskBoxRenderer::renderFillGeometry( const QRectF& rect, const QskBoxShapeMetrics& shape, const QskBoxBorderMetrics& border, QSGGeometry& geometry ) { @@ -140,7 +140,7 @@ void QskBox::renderFillGeometry( stroker.setFillLines( lines ); } -void QskBox::renderBox( const QRectF& rect, +void QskBoxRenderer::renderBox( const QRectF& rect, const QskBoxShapeMetrics& shape, const QskGradient& gradient, QSGGeometry& geometry ) { @@ -148,7 +148,7 @@ void QskBox::renderBox( const QRectF& rect, QskBoxBorderColors(), gradient, geometry ); } -void QskBox::renderBox( const QRectF& rect, +void QskBoxRenderer::renderBox( const QRectF& rect, const QskBoxShapeMetrics& shape, const QskBoxBorderMetrics& border, const QskBoxBorderColors& borderColors, const QskGradient& gradient, QSGGeometry& geometry ) @@ -159,10 +159,10 @@ void QskBox::renderBox( const QRectF& rect, const auto effectiveGradient = qskEffectiveGradient( metrics.innerRect, gradient ); if ( metrics.innerRect.isEmpty() || - QskBox::ColorMap::isGradientSupported( effectiveGradient, metrics.innerRect ) ) + QskBoxRenderer::ColorMap::isGradientSupported( effectiveGradient, metrics.innerRect ) ) { /* - The gradient can be translated to a QskBox::ColorMap and we can do all + The gradient can be translated to a QskBoxRenderer::ColorMap and we can do all coloring by adding a color info to points of the contour lines. The orientation of contour lines does not depend on the direction of the gradient vector. diff --git a/src/nodes/QskBoxRenderer.h b/src/nodes/QskBoxRenderer.h index 7745b076..1b6face6 100644 --- a/src/nodes/QskBoxRenderer.h +++ b/src/nodes/QskBoxRenderer.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -16,7 +16,7 @@ class QskGradient; class QSGGeometry; class QRectF; -namespace QskBox +namespace QskBoxRenderer { /* Filling the geometry without any color information: diff --git a/src/nodes/QskBoxShadowNode.cpp b/src/nodes/QskBoxShadowNode.cpp index d94d8ad3..cfb0099e 100644 --- a/src/nodes/QskBoxShadowNode.cpp +++ b/src/nodes/QskBoxShadowNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -40,7 +40,7 @@ namespace int compare( const QSGMaterial* other ) const override; - QVector2D m_aspect = QVector2D{ 1, 1 }; + QVector2D m_aspectRatio = QVector2D{ 1, 1 }; QVector4D m_radius = QVector4D{ 0, 0, 0, 0 }; QVector4D m_color = QVector4D{ 0, 0, 0, 1 }; float m_blurExtent = 0.0; @@ -91,9 +91,9 @@ namespace changed = true; } - if ( matOld == nullptr || matNew->m_aspect != matOld->m_aspect ) + if ( matOld == nullptr || matNew->m_aspectRatio != matOld->m_aspectRatio ) { - memcpy( data + 96, &matNew->m_aspect, 8 ); + memcpy( data + 96, &matNew->m_aspectRatio, 8 ); changed = true; } @@ -146,7 +146,7 @@ namespace auto p = program(); m_matrixId = p->uniformLocation( "matrix" ); - m_aspectId = p->uniformLocation( "aspect" ); + m_aspectRatioId = p->uniformLocation( "aspectRatio" ); m_opacityId = p->uniformLocation( "opacity" ); m_blurExtentId = p->uniformLocation( "blurExtent" ); m_radiusId = p->uniformLocation( "radius" ); @@ -173,7 +173,7 @@ namespace { auto material = static_cast< const Material* >( newMaterial ); - p->setUniformValue( m_aspectId, material->m_aspect ); + p->setUniformValue( m_aspectRatioId, material->m_aspectRatio ); p->setUniformValue( m_blurExtentId, material->m_blurExtent); p->setUniformValue( m_radiusId, material->m_radius ); p->setUniformValue( m_colorId, material->m_color ); @@ -183,7 +183,7 @@ namespace private: int m_matrixId = -1; int m_opacityId = -1; - int m_aspectId = -1; + int m_aspectRatioId = -1; int m_blurExtentId = -1; int m_radiusId = -1; int m_colorId = -1; @@ -231,7 +231,7 @@ int Material::compare( const QSGMaterial* other ) const auto material = static_cast< const Material* >( other ); if ( ( material->m_color == m_color ) - && ( material->m_aspect == m_aspect ) + && ( material->m_aspectRatio == m_aspectRatio ) && qFuzzyCompare(material->m_blurExtent, m_blurExtent) && qFuzzyCompare(material->m_radius, m_radius) ) { @@ -284,16 +284,16 @@ void QskBoxShadowNode::setShadowData( d->geometry.markVertexDataDirty(); markDirty( QSGNode::DirtyGeometry ); - QVector2D aspect( 1.0, 1.0 ); + QVector2D aspectRatio( 1.0, 1.0 ); if ( rect.width() >= rect.height() ) - aspect.setX( rect.width() / rect.height() ); + aspectRatio.setX( rect.width() / rect.height() ); else - aspect.setY( rect.height() / rect.width() ); + aspectRatio.setY( rect.height() / rect.width() ); - if ( d->material.m_aspect != aspect ) + if ( d->material.m_aspectRatio != aspectRatio ) { - d->material.m_aspect = aspect; + d->material.m_aspectRatio = aspectRatio; markDirty( QSGNode::DirtyMaterial ); } } diff --git a/src/nodes/QskBoxShadowNode.h b/src/nodes/QskBoxShadowNode.h index b4c71f68..2605a0e2 100644 --- a/src/nodes/QskBoxShadowNode.h +++ b/src/nodes/QskBoxShadowNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskColorRamp.cpp b/src/nodes/QskColorRamp.cpp index b5d059fb..2d0cc7d9 100644 --- a/src/nodes/QskColorRamp.cpp +++ b/src/nodes/QskColorRamp.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskColorRamp.h b/src/nodes/QskColorRamp.h index 68d27135..df105128 100644 --- a/src/nodes/QskColorRamp.h +++ b/src/nodes/QskColorRamp.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskFillNode.cpp b/src/nodes/QskFillNode.cpp index b5fbba51..bdb6ddc5 100644 --- a/src/nodes/QskFillNode.cpp +++ b/src/nodes/QskFillNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskFillNode.h b/src/nodes/QskFillNode.h index 5da3be54..a2d7abac 100644 --- a/src/nodes/QskFillNode.h +++ b/src/nodes/QskFillNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskFillNodePrivate.h b/src/nodes/QskFillNodePrivate.h index 7e79984c..2da5784b 100644 --- a/src/nodes/QskFillNodePrivate.h +++ b/src/nodes/QskFillNodePrivate.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskGradientMaterial.cpp b/src/nodes/QskGradientMaterial.cpp index 7be7d994..1a64f699 100644 --- a/src/nodes/QskGradientMaterial.cpp +++ b/src/nodes/QskGradientMaterial.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -22,7 +22,7 @@ #endif #if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) - #include + #include using RhiShader = QSGMaterialRhiShader; #else using RhiShader = QSGMaterialShader; diff --git a/src/nodes/QskGradientMaterial.h b/src/nodes/QskGradientMaterial.h index 074e1822..77c24dcf 100644 --- a/src/nodes/QskGradientMaterial.h +++ b/src/nodes/QskGradientMaterial.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskGraduationNode.cpp b/src/nodes/QskGraduationNode.cpp index 5221bfc1..46bc22a9 100644 --- a/src/nodes/QskGraduationNode.cpp +++ b/src/nodes/QskGraduationNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskGraduationNode.h b/src/nodes/QskGraduationNode.h index c00f710c..4f3466ad 100644 --- a/src/nodes/QskGraduationNode.h +++ b/src/nodes/QskGraduationNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskGraduationRenderer.cpp b/src/nodes/QskGraduationRenderer.cpp index d596f841..a9616946 100644 --- a/src/nodes/QskGraduationRenderer.cpp +++ b/src/nodes/QskGraduationRenderer.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskGraduationRenderer.h b/src/nodes/QskGraduationRenderer.h index 9354cf98..d765e33d 100644 --- a/src/nodes/QskGraduationRenderer.h +++ b/src/nodes/QskGraduationRenderer.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskGraphicNode.cpp b/src/nodes/QskGraphicNode.cpp index 047fe03f..e2c7b1bd 100644 --- a/src/nodes/QskGraphicNode.cpp +++ b/src/nodes/QskGraphicNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskGraphicNode.h b/src/nodes/QskGraphicNode.h index 32628b2b..07f98057 100644 --- a/src/nodes/QskGraphicNode.h +++ b/src/nodes/QskGraphicNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskLinesNode.cpp b/src/nodes/QskLinesNode.cpp index 1d89715e..e3dc1671 100644 --- a/src/nodes/QskLinesNode.cpp +++ b/src/nodes/QskLinesNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskLinesNode.h b/src/nodes/QskLinesNode.h index 4a1271a6..e54f9d2a 100644 --- a/src/nodes/QskLinesNode.h +++ b/src/nodes/QskLinesNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskPaintedNode.cpp b/src/nodes/QskPaintedNode.cpp index 1b2ff4b3..129a580a 100644 --- a/src/nodes/QskPaintedNode.cpp +++ b/src/nodes/QskPaintedNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskPaintedNode.h b/src/nodes/QskPaintedNode.h index 41835ec6..24a7e975 100644 --- a/src/nodes/QskPaintedNode.h +++ b/src/nodes/QskPaintedNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskPlainTextRenderer.cpp b/src/nodes/QskPlainTextRenderer.cpp index 7b5d5a43..6a4b3053 100644 --- a/src/nodes/QskPlainTextRenderer.cpp +++ b/src/nodes/QskPlainTextRenderer.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -127,16 +127,26 @@ static void qskRenderText( if ( glyphNode == nullptr ) { const bool preferNativeGlyphNode = false; // QskTextOptions? - -#if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) constexpr int renderQuality = -1; // QQuickText::DefaultRenderTypeQuality + +#if QT_VERSION >= QT_VERSION_CHECK( 6, 7, 0 ) + const auto renderType = preferNativeGlyphNode + ? QSGTextNode::QtRendering : QSGTextNode::NativeRendering; + glyphNode = sgContext->createGlyphNode( + renderContext, renderType, renderQuality ); +#elif QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) glyphNode = sgContext->createGlyphNode( renderContext, preferNativeGlyphNode, renderQuality ); #else + Q_UNUSED( renderQuality ); glyphNode = sgContext->createGlyphNode( renderContext, preferNativeGlyphNode ); #endif + +#if QT_VERSION < QT_VERSION_CHECK( 6, 7, 0 ) glyphNode->setOwnerElement( item ); +#endif + glyphNode->setFlags( QSGNode::OwnedByParent | GlyphFlag ); } diff --git a/src/nodes/QskPlainTextRenderer.h b/src/nodes/QskPlainTextRenderer.h index c2835d77..e2f21d25 100644 --- a/src/nodes/QskPlainTextRenderer.h +++ b/src/nodes/QskPlainTextRenderer.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskRectangleNode.cpp b/src/nodes/QskRectangleNode.cpp index 6e51ff29..e05dc871 100644 --- a/src/nodes/QskRectangleNode.cpp +++ b/src/nodes/QskRectangleNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -72,7 +72,7 @@ void QskRectangleNode::updateNode( d->rect = rect; d->shape = effectiveShape; - if ( QskBox::isGradientSupported( effectiveShape, effectiveGradient ) ) + if ( QskBoxRenderer::isGradientSupported( effectiveShape, effectiveGradient ) ) { setColoring( Polychrome ); @@ -82,7 +82,7 @@ void QskRectangleNode::updateNode( */ if ( dirtyMetrics || dirtyColors ) { - QskBox::renderBox( rect, + QskBoxRenderer::renderBox( rect, effectiveShape, effectiveGradient, *geometry() ); geometry()->markVertexDataDirty(); @@ -96,7 +96,7 @@ void QskRectangleNode::updateNode( if ( dirtyMetrics ) { - QskBox::renderFillGeometry( rect, effectiveShape, *geometry() ); + QskBoxRenderer::renderFillGeometry( rect, effectiveShape, *geometry() ); geometry()->markVertexDataDirty(); markDirty( QSGNode::DirtyGeometry ); diff --git a/src/nodes/QskRectangleNode.h b/src/nodes/QskRectangleNode.h index 5bcbec20..5f2993be 100644 --- a/src/nodes/QskRectangleNode.h +++ b/src/nodes/QskRectangleNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskRichTextRenderer.cpp b/src/nodes/QskRichTextRenderer.cpp index d8507710..e6cbd248 100644 --- a/src/nodes/QskRichTextRenderer.cpp +++ b/src/nodes/QskRichTextRenderer.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskRichTextRenderer.h b/src/nodes/QskRichTextRenderer.h index 762dc62e..4e5c4567 100644 --- a/src/nodes/QskRichTextRenderer.h +++ b/src/nodes/QskRichTextRenderer.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskSGNode.cpp b/src/nodes/QskSGNode.cpp index ad26f651..265a4d0f 100644 --- a/src/nodes/QskSGNode.cpp +++ b/src/nodes/QskSGNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskSGNode.h b/src/nodes/QskSGNode.h index 3ebe7e82..9fd5c06c 100644 --- a/src/nodes/QskSGNode.h +++ b/src/nodes/QskSGNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskSceneTexture.cpp b/src/nodes/QskSceneTexture.cpp new file mode 100644 index 00000000..dc359993 --- /dev/null +++ b/src/nodes/QskSceneTexture.cpp @@ -0,0 +1,489 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#include "QskSceneTexture.h" +#include "QskTreeNode.h" + +#include + +QSK_QT_PRIVATE_BEGIN +#include +#include + +#define QT_BUILD_QUICK_LIB // suppress Qt5 warnings +#include +#undef QT_BUILD_QUICK_LIB + +QSK_QT_PRIVATE_END + +/* + With Qt 5.15 Rhi can optionally be enbled by setting "export QSG_RHI=1". + So we need to have a native QOpenGL implementation and one using + the Rhi abstraction layer. For Qt6 we can rely on Rhi. + Once Qt5 support has been dropped we can eliminate this #ifdef jungle + */ + +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) +#include +#endif + +static int qskRenderOrderCompare( const QSGNode* rootNode, + const QSGNode* node1, const QSGNode* node2 ) +{ + if ( rootNode == node1 ) + return 1; + + if ( rootNode == node2 ) + return -1; + + for ( auto node = rootNode->firstChild(); + node != nullptr; node = node->nextSibling() ) + { + const auto ret = qskRenderOrderCompare( node, node1, node2 ); + if ( ret ) + return ret; + } + + return 0; +} + +namespace +{ +#if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) + inline QSGRendererInterface::RenderMode contextRenderMode( + QSGDefaultRenderContext* context ) + { + return context->useDepthBufferFor2D() + ? QSGRendererInterface::RenderMode2D + : QSGRendererInterface::RenderMode2DNoDepthBuffer; + } +#endif + + class Renderer final : public QSGBatchRenderer::Renderer + { + using Inherited = QSGBatchRenderer::Renderer; + + public: + Renderer( QskSceneTexture*, QSGDefaultRenderContext* ); + ~Renderer() override; + +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + inline int textureId() const { return m_fbo ? m_fbo->texture() : 0; } + + inline void renderScene() + { + class Bindable : public QSGBindable + { + public: + Bindable( QOpenGLFramebufferObject* fbo ) : m_fbo( fbo ) {} + void bind() const override { m_fbo->bind(); } + private: + QOpenGLFramebufferObject* m_fbo; + }; + + Inherited::renderScene( Bindable( m_fbo ) ); + } +#endif + + inline QRhiTexture* rhiTexture() const { return m_rhiTexture; } + + inline bool isDirty() const { return m_dirty; } + + void setFinalNode( QSGTransformNode* ); + + void setProjection( const QRectF& ); + void setTextureSize( const QSize& ); + QSize textureSize() const; + + protected: + void nodeChanged( QSGNode*, QSGNode::DirtyState ) override; + void render() override; + + private: + void createTarget( const QSize& ); + void clearTarget(); + void markDirty(); + + QSGTransformNode* m_finalNode = nullptr; + QskSceneTexture* m_texture = nullptr; + +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + QOpenGLFramebufferObject* m_fbo = nullptr; +#endif + +#if QT_VERSION < QT_VERSION_CHECK( 6, 4, 0 ) + struct RenderTarget + { + QRhiRenderTarget* rt = nullptr; + QRhiRenderPassDescriptor* rpDesc = nullptr; + QRhiCommandBuffer* cb = nullptr; + } m_rt; +#endif + QRhiTexture* m_rhiTexture = nullptr; + + bool m_dirty = true; + }; + + Renderer::Renderer( QskSceneTexture* texture, QSGDefaultRenderContext* context ) +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + : Inherited( context ) +#else + : Inherited( context, contextRenderMode( context ) ) +#endif + , m_texture( texture ) + { + setClearColor( Qt::transparent ); + + connect( this, &QSGRenderer::sceneGraphChanged, + this, &Renderer::markDirty ); + } + + Renderer::~Renderer() + { + clearTarget(); + } + + void Renderer::setFinalNode( QSGTransformNode* node ) + { + if ( node != m_finalNode ) + { + m_finalNode = node; + markDirty(); + } + } + + void Renderer::setProjection( const QRectF& rect ) + { + bool flipFramebuffer = true; + bool flipMatrix = false; + + if ( const auto rhi = context()->rhi() ) + { + flipFramebuffer = rhi->isYUpInFramebuffer(); + flipMatrix = !rhi->isYUpInNDC(); + } + + auto r = rect; + + if ( flipFramebuffer ) + { + r.moveTop( r.bottom() ); + r.setHeight( -r.height() ); + } + + MatrixTransformFlags matrixFlags; + + if ( flipMatrix ) + matrixFlags |= QSGAbstractRenderer::MatrixTransformFlipY; + + setProjectionMatrixToRect( r, matrixFlags ); + } + + void Renderer::setTextureSize( const QSize& size ) + { + if ( const auto rhi = context()->rhi() ) + { + if ( m_rt.rt && m_rt.rt->pixelSize() != size ) + clearTarget(); + + if ( m_rt.rt == nullptr ) + createTarget( size ); + } + else + { +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + if ( m_fbo && m_fbo->size() != size ) + clearTarget(); + + if ( m_fbo == nullptr ) + createTarget( size ); +#endif + } + + const QRect r( 0, 0, size.width(), size.height() ); + + setDeviceRect( r ); + setViewportRect( r ); + } + + QSize Renderer::textureSize() const + { +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + if ( m_fbo ) return m_fbo->size(); +#else + if( m_rt.rt ) return m_rt.rt->pixelSize(); +#endif + return QSize(); + } + + void Renderer::render() + { + m_dirty = false; + + qskTryBlockTrailingNodes( m_finalNode, rootNode(), true, false ); + +#if 0 + static int counter = 0; + qDebug() << ++counter; + QSGNodeDumper::dump( rootNode() ); +#endif + Inherited::render(); + qskTryBlockTrailingNodes( m_finalNode, rootNode(), false, false ); + } + + void Renderer::nodeChanged( QSGNode* node, QSGNode::DirtyState state ) + { + /* + No need to update the texture for changes of nodes behind + the final node. + + Unfortunately QQuickWindow does not update the scene graph in + rendering order and we might be called for relevant nodes after + the texture has already been updated. In these situations we + update the texture twice. Not so good ... + */ + if ( qskRenderOrderCompare( rootNode(), node, m_finalNode ) > 0 ) + { + // triggering QSGRenderer::sceneGraphChanged signals + Inherited::nodeChanged( node, state ); + } + } + + void Renderer::markDirty() + { + if ( !m_dirty ) + { + m_dirty = true; + Q_EMIT m_texture->updateRequested(); + } + } + + void Renderer::createTarget( const QSize& size ) + { + if ( const auto rhi = context()->rhi() ) + { + auto flags = QRhiTexture::RenderTarget | QRhiTexture::UsedAsTransferSource; + + m_rhiTexture = rhi->newTexture( QRhiTexture::RGBA8, size, 1, flags ); +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + m_rhiTexture->build(); +#else + m_rhiTexture->create(); +#endif + + QRhiColorAttachment color0( m_rhiTexture ); + auto target = rhi->newTextureRenderTarget( { color0 } ); + + target->setRenderPassDescriptor( + target->newCompatibleRenderPassDescriptor() ); + +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + target->build(); +#else + target->create(); +#endif + + m_rt.rt = target; + m_rt.rpDesc = target->renderPassDescriptor(); + + auto defaultContext = qobject_cast< QSGDefaultRenderContext* >( context() ); + m_rt.cb = defaultContext->currentFrameCommandBuffer(); + +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + setRenderTarget( m_rt.rt ); + setCommandBuffer( m_rt.cb ); + setRenderPassDescriptor( m_rt.rpDesc ); +#endif + } + else + { +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + QOpenGLFramebufferObjectFormat format; + format.setInternalTextureFormat( GL_RGBA8 ); + format.setSamples( 0 ); + format.setAttachment( QOpenGLFramebufferObject::CombinedDepthStencil ); + + m_fbo = new QOpenGLFramebufferObject( size, format ); +#endif + } + } + + void Renderer::clearTarget() + { + if ( const auto rhi = context()->rhi() ) + { + delete m_rt.rt; + m_rt.rt = nullptr; + + delete m_rt.rpDesc; + m_rt.rpDesc = nullptr; + + delete m_rhiTexture; + m_rhiTexture = nullptr; + } + else + { +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + delete m_fbo; + m_fbo = nullptr; +#endif + } + } +} + +class QskSceneTexturePrivate final : public QSGTexturePrivate +{ + public: + QskSceneTexturePrivate( const QQuickWindow* window, QskSceneTexture* texture ) +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + : QSGTexturePrivate() +#else + : QSGTexturePrivate( texture ) +#endif + , devicePixelRatio( window->effectiveDevicePixelRatio() ) + { + Q_UNUSED( texture ); + + // Qt5 needs the extra const_cast + auto dw = QQuickWindowPrivate::get( const_cast< QQuickWindow* >( window ) ); + context = dynamic_cast< QSGDefaultRenderContext* >( dw->context ); + } + +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + int comparisonKey() const override + { + if ( renderer ) + { + if ( renderer->textureId() ) + return renderer->textureId(); + + if ( renderer->rhiTexture() ) + return int( qintptr( renderer->rhiTexture() ) ); + } + + return int( qintptr( this ) ); + } + + QRhiTexture *rhiTexture() const override + { return renderer ? renderer->rhiTexture() : nullptr; } +#endif + + QSize pixelSize() const + { + QSize size( qCeil( rect.width() ), qCeil( rect.height() ) ); + size *= devicePixelRatio; + + const QSize minSize = context->sceneGraphContext()->minimumFBOSize(); + + while ( size.width() < minSize.width() ) + size.rwidth() *= 2; + + while ( size.height() < minSize.height() ) + size.rheight() *= 2; + + return size; + } + + QRectF rect; + const qreal devicePixelRatio; + + Renderer* renderer = nullptr; + QSGDefaultRenderContext* context = nullptr; +}; + +QskSceneTexture::QskSceneTexture( const QQuickWindow* window ) + : Inherited( *new QskSceneTexturePrivate( window, this ) ) +{ + Q_ASSERT( d_func()->context ); +} + +QskSceneTexture::~QskSceneTexture() +{ + delete d_func()->renderer; +} + +QSize QskSceneTexture::textureSize() const +{ + Q_D( const QskSceneTexture ); + return d->renderer ? d->renderer->textureSize() : QSize(); +} + +void QskSceneTexture::render( const QSGRootNode* rootNode, + const QSGTransformNode* finalNode, const QRectF& rect ) +{ + Q_D( QskSceneTexture ); + + d->rect = rect; + + if ( d->renderer == nullptr ) + { + d->renderer = new Renderer( this, d->context ); + d->renderer->setDevicePixelRatio( d->devicePixelRatio ); + } + + d->renderer->setRootNode( const_cast< QSGRootNode* >( rootNode ) ); + d->renderer->setFinalNode( const_cast< QSGTransformNode* >( finalNode ) ); + + d->renderer->setProjection( d->rect ); + d->renderer->setTextureSize( d->pixelSize() ); + d->renderer->renderScene(); +} + +bool QskSceneTexture::isDirty() const +{ + Q_D( const QskSceneTexture ); + return d->renderer ? d->renderer->isDirty() : true; +} + +QRectF QskSceneTexture::normalizedTextureSubRect() const +{ + return QRectF( 0, 1, 1, -1 ); +} + +bool QskSceneTexture::hasAlphaChannel() const +{ + return false; +} + +bool QskSceneTexture::hasMipmaps() const +{ + return false; +} + +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + +void QskSceneTexture::bind() +{ + if ( d_func()->rhiTexture() == nullptr ) + { + auto funcs = QOpenGLContext::currentContext()->functions(); + funcs->glBindTexture( GL_TEXTURE_2D, textureId() ); + + updateBindOptions(); + } +} + +int QskSceneTexture::textureId() const +{ + Q_D( const QskSceneTexture ); + return d->renderer ? d->renderer->textureId() : 0; +} + +#else + +qint64 QskSceneTexture::comparisonKey() const +{ + return qint64( rhiTexture() ); +} + +QRhiTexture* QskSceneTexture::rhiTexture() const +{ + Q_D( const QskSceneTexture ); + return d->renderer ? d->renderer->rhiTexture() : nullptr; +} + +#endif + +#include "moc_QskSceneTexture.cpp" diff --git a/src/nodes/QskSceneTexture.h b/src/nodes/QskSceneTexture.h new file mode 100644 index 00000000..89cc73b5 --- /dev/null +++ b/src/nodes/QskSceneTexture.h @@ -0,0 +1,55 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#ifndef QSK_SCENE_TEXTURE_H +#define QSK_SCENE_TEXTURE_H + +#include "QskGlobal.h" +#include + +class QskSceneTexturePrivate; + +class QSGRootNode; +class QSGTransformNode; +class QQuickWindow; + +class QSK_EXPORT QskSceneTexture : public QSGTexture +{ + Q_OBJECT + + using Inherited = QSGTexture; + + public: + QskSceneTexture( const QQuickWindow* ); + ~QskSceneTexture(); + + void render( const QSGRootNode*, const QSGTransformNode*, const QRectF& ); + + QSize textureSize() const override; + +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + void bind() override; + int textureId() const override; +#else + qint64 comparisonKey() const override; + QRhiTexture* rhiTexture() const override; +#endif + + QRectF normalizedTextureSubRect() const override; + + // satisfy the QSGTexture API + bool hasAlphaChannel() const override; + bool hasMipmaps() const override; + + bool isDirty() const; + + Q_SIGNALS: + void updateRequested(); + + private: + Q_DECLARE_PRIVATE( QskSceneTexture ) +}; + +#endif diff --git a/src/nodes/QskShapeNode.cpp b/src/nodes/QskShapeNode.cpp index 91f9c765..fc6b5f9a 100644 --- a/src/nodes/QskShapeNode.cpp +++ b/src/nodes/QskShapeNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskShapeNode.h b/src/nodes/QskShapeNode.h index 84779627..c5fb24ac 100644 --- a/src/nodes/QskShapeNode.h +++ b/src/nodes/QskShapeNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskStippledLineRenderer.cpp b/src/nodes/QskStippledLineRenderer.cpp index f578f478..a0a7da60 100644 --- a/src/nodes/QskStippledLineRenderer.cpp +++ b/src/nodes/QskStippledLineRenderer.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskStippledLineRenderer.h b/src/nodes/QskStippledLineRenderer.h index acda0bb7..bcf38820 100644 --- a/src/nodes/QskStippledLineRenderer.h +++ b/src/nodes/QskStippledLineRenderer.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskStrokeNode.cpp b/src/nodes/QskStrokeNode.cpp index 29907b8e..fb16c63c 100644 --- a/src/nodes/QskStrokeNode.cpp +++ b/src/nodes/QskStrokeNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ @@ -24,7 +24,7 @@ static inline bool qskIsPenVisible( const QPen& pen ) } else { - if ( pen.color().isValid() || ( pen.color().alpha() == 0 ) ) + if ( !pen.color().isValid() || ( pen.color().alpha() == 0 ) ) return false; } diff --git a/src/nodes/QskStrokeNode.h b/src/nodes/QskStrokeNode.h index 01abaaba..3d168577 100644 --- a/src/nodes/QskStrokeNode.h +++ b/src/nodes/QskStrokeNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskTextNode.cpp b/src/nodes/QskTextNode.cpp index 71d62dcc..11ba3d2b 100644 --- a/src/nodes/QskTextNode.cpp +++ b/src/nodes/QskTextNode.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskTextNode.h b/src/nodes/QskTextNode.h index bf2ec6cd..4289b573 100644 --- a/src/nodes/QskTextNode.h +++ b/src/nodes/QskTextNode.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskTextRenderer.cpp b/src/nodes/QskTextRenderer.cpp index c76f246e..f078a599 100644 --- a/src/nodes/QskTextRenderer.cpp +++ b/src/nodes/QskTextRenderer.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskTextRenderer.h b/src/nodes/QskTextRenderer.h index c876c355..467db7e6 100644 --- a/src/nodes/QskTextRenderer.h +++ b/src/nodes/QskTextRenderer.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskTextureRenderer.cpp b/src/nodes/QskTextureRenderer.cpp index d7279b90..cade0829 100644 --- a/src/nodes/QskTextureRenderer.cpp +++ b/src/nodes/QskTextureRenderer.cpp @@ -1,9 +1,10 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ #include "QskTextureRenderer.h" +#include "QskQuick.h" #include #include @@ -17,7 +18,6 @@ QSK_QT_PRIVATE_BEGIN #include #include -#include QSK_QT_PRIVATE_END #if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) @@ -89,7 +89,7 @@ void QskTextureRenderer::setTextureId( QQuickWindow* window, if ( plainTexture == nullptr ) return; - auto rhi = QQuickWindowPrivate::get( window )->rhi; + auto rhi = qskRenderingHardwareInterface( window ); #if QT_VERSION >= QT_VERSION_CHECK( 6, 4, 0 ) diff --git a/src/nodes/QskTextureRenderer.h b/src/nodes/QskTextureRenderer.h index cd10e806..3b907ab2 100644 --- a/src/nodes/QskTextureRenderer.h +++ b/src/nodes/QskTextureRenderer.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskTreeNode.cpp b/src/nodes/QskTreeNode.cpp new file mode 100644 index 00000000..a3f70f23 --- /dev/null +++ b/src/nodes/QskTreeNode.cpp @@ -0,0 +1,165 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#include "QskTreeNode.h" + +static constexpr auto extraFlag = + static_cast< QSGNode::Flag >( QSGNode::IsVisitableNode << 1 ); + +static inline QSGNode* qskCheckedNode( const QSGNode* node, QSGNode::NodeType type ) +{ + return node && ( node->type() == type ) && ( node->flags() & extraFlag ) + ? const_cast< QSGNode* >( node ) : nullptr; +} + +QskTreeNode::QskTreeNode() +{ + setFlag( extraFlag, true ); +} + +QskTreeNode::QskTreeNode( QSGNodePrivate& d ) + : QSGNode( d, QSGNode::BasicNodeType ) +{ + setFlag( extraFlag, true ); +} + +QskTreeNode::~QskTreeNode() +{ +} + +void QskTreeNode::setSubtreeBlocked( bool on, bool notify ) +{ + if ( on == m_isBlocked ) + return; + + m_isBlocked = on; + + if ( notify ) + markDirty( DirtySubtreeBlocked ); +} + +bool QskTreeNode::isSubtreeBlocked() const +{ + return m_isBlocked; +} + +QskTreeNode* qskTreeNodeCast( QSGNode* node ) +{ + return static_cast< QskTreeNode* >( + qskCheckedNode( node, QSGNode::BasicNodeType ) ); +} + +const QskTreeNode* qskTreeNodeCast( const QSGNode* node ) +{ + return static_cast< QskTreeNode* >( + qskCheckedNode( node, QSGNode::BasicNodeType ) ); +} + + +// == QskItemNode + +QskItemNode::QskItemNode() +{ + setFlag( extraFlag, true ); +} + +QskItemNode::~QskItemNode() +{ +} + +void QskItemNode::setSubtreeBlocked( bool on, bool notify ) +{ + if ( on == m_isBlocked ) + return; + + m_isBlocked = on; + + if ( notify ) + markDirty( DirtySubtreeBlocked ); +} + +bool QskItemNode::isSubtreeBlocked() const +{ + return m_isBlocked; +} + +QskItemNode* qskItemNodeCast( QSGNode* node ) +{ + return static_cast< QskItemNode* >( + qskCheckedNode( node, QSGNode::TransformNodeType ) ); +} + +const QskItemNode* qskItemNodeCast( const QSGNode* node ) +{ + return static_cast< QskItemNode* >( + qskCheckedNode( node, QSGNode::TransformNodeType ) ); +} + +bool qskIsBlockableNode( const QSGNode* node ) +{ + switch( node->type() ) + { + case QSGNode::BasicNodeType: + case QSGNode::TransformNodeType: + return node->flags() & extraFlag; + + default: + return false; + } +} + +bool qskTryBlockNode( QSGNode* node, bool on, bool notify ) +{ + if ( node && ( node->flags() & extraFlag ) ) + { + if ( node->type() == QSGNode::BasicNodeType ) + { + static_cast< QskTreeNode* >( node )->setSubtreeBlocked( on, notify ); + return true; + } + + if ( node->type() == QSGNode::TransformNodeType ) + { + static_cast< QskItemNode* >( node )->setSubtreeBlocked( on, notify ); + return true; + } + } + + return false; +} + +void qskTryBlockTree( QSGNode* node, bool on, bool notify ) +{ + if ( qskTryBlockNode( node, on, notify ) ) + return; + + for ( auto child = node->firstChild(); + child != nullptr; child = child->nextSibling() ) + { + qskTryBlockTree( child, on, notify ); + } +} + +void qskTryBlockTrailingNodes( + QSGNode* node, const QSGNode* ancestorNode, bool on, bool notify ) +{ + qskTryBlockTree( node, on, notify ); + + for ( auto sibling = node->nextSibling(); + sibling != nullptr; sibling = sibling->nextSibling() ) + { + qskTryBlockTree( sibling, on, notify ); + } + + if ( node != ancestorNode ) + { + if ( auto upperNode = node->parent() ) + { + upperNode = upperNode->nextSibling(); + if ( upperNode ) + qskTryBlockTrailingNodes( upperNode, ancestorNode, on, notify ); + } + } +} diff --git a/src/nodes/QskTreeNode.h b/src/nodes/QskTreeNode.h new file mode 100644 index 00000000..ad50ad83 --- /dev/null +++ b/src/nodes/QskTreeNode.h @@ -0,0 +1,63 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + +#ifndef QSK_TREE_NODE_H +#define QSK_TREE_NODE_H + +#include "QskGlobal.h" +#include + +/* + Used as paintNode in all QskControls ( see QskControl::updateItemPaintNode ) + */ +class QSK_EXPORT QskTreeNode final : public QSGNode +{ + public: + QskTreeNode(); + virtual ~QskTreeNode(); + + void setSubtreeBlocked( bool on, bool notify = true ); + bool isSubtreeBlocked() const override; + + protected: + QskTreeNode( QSGNodePrivate& ); + + private: + bool m_isBlocked = false;; +}; + +QSK_EXPORT QskTreeNode* qskTreeNodeCast( QSGNode* ); +QSK_EXPORT const QskTreeNode* qskTreeNodeCast( const QSGNode* ); + +/* + Used by all QskQuickItem as root node ( = itemNode ) of its subtree + ( see qskItemNode in QskQuick.h ) + */ +class QSK_EXPORT QskItemNode final : public QSGTransformNode +{ + public: + QskItemNode(); + virtual ~QskItemNode(); + + void setSubtreeBlocked( bool on, bool notify = true ); + bool isSubtreeBlocked() const override; + + private: + bool m_isBlocked = false;; +}; + +QSK_EXPORT QskItemNode* qskItemNodeCast( QSGNode* ); +QSK_EXPORT const QskItemNode* qskItemNodeCast( const QSGNode* ); + +QSK_EXPORT bool qskIsBlockableNode( const QSGNode* ); +QSK_EXPORT bool qskTryBlockNode( QSGNode*, bool on, bool notify = true ); + +QSK_EXPORT void qskTryBlockTree( QSGNode*, bool on, bool notify = true ); + +// un/block a node and all its successors in the rendering pipeline +QSK_EXPORT void qskTryBlockTrailingNodes( + QSGNode*, const QSGNode* ancestorNode, bool on, bool notify = true ); + +#endif diff --git a/src/nodes/QskVertex.cpp b/src/nodes/QskVertex.cpp index c34bbe6d..a84e83ba 100644 --- a/src/nodes/QskVertex.cpp +++ b/src/nodes/QskVertex.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/QskVertex.h b/src/nodes/QskVertex.h index 400a6a66..0d928a84 100644 --- a/src/nodes/QskVertex.h +++ b/src/nodes/QskVertex.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/src/nodes/shaders.qrc b/src/nodes/shaders.qrc index 82a42748..3919b702 100644 --- a/src/nodes/shaders.qrc +++ b/src/nodes/shaders.qrc @@ -2,28 +2,21 @@ - shaders/boxshadow.vert.qsb - shaders/boxshadow.frag.qsb + shaders/arcshadow.vert + shaders/arcshadow.frag + shaders/boxshadow.vert shaders/boxshadow.frag - shaders/gradientconic.vert.qsb - shaders/gradientconic.frag.qsb shaders/gradientconic.vert shaders/gradientconic.frag - shaders/gradientradial.vert.qsb - shaders/gradientradial.frag.qsb shaders/gradientradial.vert shaders/gradientradial.frag - shaders/gradientlinear.vert.qsb - shaders/gradientlinear.frag.qsb shaders/gradientlinear.vert shaders/gradientlinear.frag - shaders/crisplines.vert.qsb - shaders/crisplines.frag.qsb shaders/crisplines.vert diff --git a/src/nodes/shaders/arcshadow-vulkan.frag b/src/nodes/shaders/arcshadow-vulkan.frag new file mode 100644 index 00000000..49646de3 --- /dev/null +++ b/src/nodes/shaders/arcshadow-vulkan.frag @@ -0,0 +1,46 @@ +#version 440 + +layout( location = 0 ) in vec2 coord; +layout( location = 0 ) out vec4 fragColor; + +layout( std140, binding = 0 ) uniform buf +{ + mat4 matrix; + vec4 color; + + /* + arc.xy: cos/sin of the angle of the midpoint + arc.zw: cos/sin of the angle between midpoint/endpoint + */ + vec4 arc; + + float spreadRadius; + float blurRadius; + + float opacity; +} ubuf; + +mat2 rotation( vec2 v ) { return mat2( v.x, -v.y, v.y, v.x ); } + +void main() +{ + float radius = 0.5 - ubuf.blurRadius - ubuf.spreadRadius; + + float dist = abs( length( coord ) - radius ) - ubuf.spreadRadius; + + if ( ( ubuf.arc.z ) < 1.0 && ( dist < 1.0 ) ) + { + vec2 v = coord * rotation( ubuf.arc.xy ); // x-axial symmetric + v.y = abs( v.y ); + + v *= rotation ( ubuf.arc.wz ); // end point to 90° + if ( v.x < 0.0 ) + { + v.y = max( 0.0, abs( v.y - radius ) - ubuf.spreadRadius ); + dist = max( dist, length( v ) ); + } + } + + float a = 1.0 - smoothstep( 0.0, ubuf.blurRadius, dist ); + fragColor = ubuf.color * a * ubuf.opacity; +} diff --git a/src/nodes/shaders/arcshadow-vulkan.vert b/src/nodes/shaders/arcshadow-vulkan.vert new file mode 100644 index 00000000..4899db18 --- /dev/null +++ b/src/nodes/shaders/arcshadow-vulkan.vert @@ -0,0 +1,21 @@ +#version 440 + +layout( location = 0 ) in vec4 in_vertex; +layout( location = 1 ) in vec2 in_coord; +layout( location = 0 ) out vec2 coord; + +layout( std140, binding = 0 ) uniform buf +{ + mat4 matrix; + vec4 color; + vec4 arc; + float spreadRadius; + float blurRadius; + float opacity; +} ubuf; + +void main() +{ + coord = in_coord; + gl_Position = ubuf.matrix * in_vertex; +} diff --git a/src/nodes/shaders/arcshadow.frag b/src/nodes/shaders/arcshadow.frag new file mode 100644 index 00000000..738b0ed4 --- /dev/null +++ b/src/nodes/shaders/arcshadow.frag @@ -0,0 +1,37 @@ +varying lowp vec2 coord; + +uniform lowp vec4 color; +uniform lowp float spreadRadius; +uniform lowp float blurRadius; +uniform lowp float opacity; + +/* + arc.xy: cos/sin of the angle of the midpoint + arc.zw: cos/sin of the angle between midpoint/endpoint + */ +uniform lowp vec4 arc; + +mat2 rotation( vec2 v ) { return mat2( v.x, -v.y, v.y, v.x ); } + +void main() +{ + float radius = 0.5 - blurRadius - spreadRadius; + + float dist = abs( length( coord ) - radius ) - spreadRadius; + + if ( ( arc.z < 1.0 ) && ( dist < 1.0 ) ) + { + vec2 v = coord * rotation( arc.xy ); // x-axial symmetric + v.y = abs( v.y ); + + v *= rotation( arc.wz ); // end point at 90° + if ( v.x < 0.0 ) + { + v.y = max( 0.0, abs( v.y - radius ) - spreadRadius ); + dist = max( dist, length( v ) ); + } + } + + float a = 1.0 - smoothstep( 0.0, blurRadius, dist ); + gl_FragColor = color * a * opacity; +} diff --git a/src/nodes/shaders/arcshadow.vert b/src/nodes/shaders/arcshadow.vert new file mode 100644 index 00000000..01850039 --- /dev/null +++ b/src/nodes/shaders/arcshadow.vert @@ -0,0 +1,12 @@ +uniform highp mat4 matrix; + +attribute highp vec4 in_vertex; +attribute mediump vec2 in_coord; + +varying mediump vec2 coord; + +void main() +{ + coord = in_coord; + gl_Position = matrix * in_vertex; +} diff --git a/src/nodes/shaders/boxshadow-vulkan.frag b/src/nodes/shaders/boxshadow-vulkan.frag index a5d5451e..58d79062 100644 --- a/src/nodes/shaders/boxshadow-vulkan.frag +++ b/src/nodes/shaders/boxshadow-vulkan.frag @@ -8,7 +8,7 @@ layout( std140, binding = 0 ) uniform buf mat4 matrix; vec4 color; vec4 radius; - vec2 aspect; + vec2 aspectRatio; float blurExtent; float opacity; } ubuf; @@ -25,25 +25,21 @@ void main() { vec4 col = vec4(0.0); - if ( ubuf.opacity > 0.0 ) - { - const float minRadius = 0.05; + float e2 = 0.5 * ubuf.blurExtent; + float r = 2.0 * effectiveRadius( ubuf.radius, coord ); - float e2 = 0.5 * ubuf.blurExtent; - float r = 2.0 * effectiveRadius( ubuf.radius, coord ); + const float minRadius = 0.05; + float f = minRadius / max( r, minRadius ); - float f = minRadius / max( r, minRadius ); + r += e2 * f; - r += e2 * f; + vec2 d = r + ubuf.blurExtent - ubuf.aspectRatio * ( 1.0 - abs( 2.0 * coord ) ); + float l = min( max(d.x, d.y), 0.0) + length( max(d, 0.0) ); - vec2 d = r + ubuf.blurExtent - ubuf.aspect * ( 1.0 - abs( 2.0 * coord ) ); - float l = min( max(d.x, d.y), 0.0) + length( max(d, 0.0) ); + float shadow = l - r; - float shadow = l - r; - - float v = smoothstep( -e2, e2, shadow ); - col = mix( ubuf.color, vec4(0.0), v ) * ubuf.opacity; - } + float v = smoothstep( -e2, e2, shadow ); + col = mix( ubuf.color, vec4(0.0), v ) * ubuf.opacity; fragColor = col; } diff --git a/src/nodes/shaders/boxshadow-vulkan.vert b/src/nodes/shaders/boxshadow-vulkan.vert index 3a308060..0fe63bd9 100644 --- a/src/nodes/shaders/boxshadow-vulkan.vert +++ b/src/nodes/shaders/boxshadow-vulkan.vert @@ -10,7 +10,7 @@ layout( std140, binding = 0 ) uniform buf mat4 matrix; vec4 color; vec4 radius; - vec2 aspect; + vec2 aspectRatio; float blurExtent; float opacity; } ubuf; diff --git a/src/nodes/shaders/boxshadow.frag b/src/nodes/shaders/boxshadow.frag index b24ff185..61b857f7 100644 --- a/src/nodes/shaders/boxshadow.frag +++ b/src/nodes/shaders/boxshadow.frag @@ -2,7 +2,7 @@ uniform lowp float opacity; uniform lowp float blurExtent; uniform lowp vec4 radius; uniform lowp vec4 color; -uniform lowp vec2 aspect; +uniform lowp vec2 aspectRatio; varying lowp vec2 coord; @@ -18,25 +18,19 @@ void main() { lowp vec4 col = vec4(0.0); - if ( opacity > 0.0 ) - { - const lowp float minRadius = 0.05; + lowp float e2 = 0.5 * blurExtent; + lowp float r = 2.0 * effectiveRadius( radius, coord ); - lowp float e2 = 0.5 * blurExtent; - lowp float r = 2.0 * effectiveRadius( radius, coord ); + const lowp float minRadius = 0.05; + r += e2 * ( minRadius / max( r, minRadius ) ); - lowp float f = minRadius / max( r, minRadius ); + lowp vec2 d = r + blurExtent - aspectRatio * ( 1.0 - abs( 2.0 * coord ) ); + lowp float l = min( max(d.x, d.y), 0.0) + length( max(d, 0.0) ); - r += e2 * f; + lowp float shadow = l - r; - lowp vec2 d = r + blurExtent - aspect * ( 1.0 - abs( 2.0 * coord ) ); - lowp float l = min( max(d.x, d.y), 0.0) + length( max(d, 0.0) ); - - lowp float shadow = l - r; - - lowp float v = smoothstep( -e2, e2, shadow ); - col = mix( color, vec4(0.0), v ) * opacity; - } + lowp float v = smoothstep( -e2, e2, shadow ); + col = mix( color, vec4(0.0), v ) * opacity; gl_FragColor = col; } diff --git a/src/nodes/shaders/boxshadow.frag.qsb b/src/nodes/shaders/boxshadow.frag.qsb deleted file mode 100644 index 9a799078..00000000 Binary files a/src/nodes/shaders/boxshadow.frag.qsb and /dev/null differ diff --git a/src/nodes/shaders/boxshadow.vert.qsb b/src/nodes/shaders/boxshadow.vert.qsb deleted file mode 100644 index 4d371492..00000000 Binary files a/src/nodes/shaders/boxshadow.vert.qsb and /dev/null differ diff --git a/src/nodes/shaders/crisplines.frag.qsb b/src/nodes/shaders/crisplines.frag.qsb deleted file mode 100644 index fb01e7de..00000000 Binary files a/src/nodes/shaders/crisplines.frag.qsb and /dev/null differ diff --git a/src/nodes/shaders/crisplines.vert.qsb b/src/nodes/shaders/crisplines.vert.qsb deleted file mode 100644 index c25564dc..00000000 Binary files a/src/nodes/shaders/crisplines.vert.qsb and /dev/null differ diff --git a/src/nodes/shaders/gradientconic.frag.qsb b/src/nodes/shaders/gradientconic.frag.qsb deleted file mode 100644 index c2a0848e..00000000 Binary files a/src/nodes/shaders/gradientconic.frag.qsb and /dev/null differ diff --git a/src/nodes/shaders/gradientconic.vert.qsb b/src/nodes/shaders/gradientconic.vert.qsb deleted file mode 100644 index e1b0505c..00000000 Binary files a/src/nodes/shaders/gradientconic.vert.qsb and /dev/null differ diff --git a/src/nodes/shaders/gradientlinear.frag.qsb b/src/nodes/shaders/gradientlinear.frag.qsb deleted file mode 100644 index 0d042678..00000000 Binary files a/src/nodes/shaders/gradientlinear.frag.qsb and /dev/null differ diff --git a/src/nodes/shaders/gradientlinear.vert.qsb b/src/nodes/shaders/gradientlinear.vert.qsb deleted file mode 100644 index 55c4d629..00000000 Binary files a/src/nodes/shaders/gradientlinear.vert.qsb and /dev/null differ diff --git a/src/nodes/shaders/gradientradial.frag.qsb b/src/nodes/shaders/gradientradial.frag.qsb deleted file mode 100644 index 5af5a391..00000000 Binary files a/src/nodes/shaders/gradientradial.frag.qsb and /dev/null differ diff --git a/src/nodes/shaders/gradientradial.vert.qsb b/src/nodes/shaders/gradientradial.vert.qsb deleted file mode 100644 index c81c721d..00000000 Binary files a/src/nodes/shaders/gradientradial.vert.qsb and /dev/null differ diff --git a/src/nodes/shaders/vulkan2qsb.sh b/src/nodes/shaders/vulkan2qsb.sh index 22e28e10..27639dd4 100755 --- a/src/nodes/shaders/vulkan2qsb.sh +++ b/src/nodes/shaders/vulkan2qsb.sh @@ -3,8 +3,12 @@ function qsbcompile { qsbfile=`echo $1 | sed 's/-vulkan//'` qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -o ${qsbfile}.qsb $1 + # qsb --qt6 -b -o ${qsbfile}.qsb $1 } +qsbcompile arcshadow-vulkan.vert +qsbcompile arcshadow-vulkan.frag + qsbcompile boxshadow-vulkan.vert qsbcompile boxshadow-vulkan.frag diff --git a/support/CMakeLists.txt b/support/CMakeLists.txt index 4d15724f..ecd53385 100644 --- a/support/CMakeLists.txt +++ b/support/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ @@ -31,7 +31,7 @@ target_compile_definitions(${target} target_include_directories(${target} PUBLIC ${CMAKE_CURRENT_LIST_DIR}) if(ENABLE_ENSURE_SKINS) - target_include_directories(${target} PRIVATE ${CMAKE_SOURCE_DIR}/skins) + target_include_directories(${target} PRIVATE ${QSK_SOURCE_DIR}/skins) target_compile_definitions(${target} PRIVATE ENSURE_SKINS) target_link_libraries(${target} PRIVATE squiekskin material3skin fluent2skin) endif() diff --git a/support/SkinnyGlobal.h b/support/SkinnyGlobal.h index 1750693f..84942af8 100644 --- a/support/SkinnyGlobal.h +++ b/support/SkinnyGlobal.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/support/SkinnyNamespace.cpp b/support/SkinnyNamespace.cpp index 31da9c91..35fea3c7 100644 --- a/support/SkinnyNamespace.cpp +++ b/support/SkinnyNamespace.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/support/SkinnyNamespace.h b/support/SkinnyNamespace.h index 5451a5e0..0aeda789 100644 --- a/support/SkinnyNamespace.h +++ b/support/SkinnyNamespace.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/support/SkinnyShapeFactory.cpp b/support/SkinnyShapeFactory.cpp index 2804928b..75cb6334 100644 --- a/support/SkinnyShapeFactory.cpp +++ b/support/SkinnyShapeFactory.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/support/SkinnyShapeFactory.h b/support/SkinnyShapeFactory.h index 422d2e0e..2ed9f8bd 100644 --- a/support/SkinnyShapeFactory.h +++ b/support/SkinnyShapeFactory.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/support/SkinnyShapeProvider.cpp b/support/SkinnyShapeProvider.cpp index 4db4b89e..122ac010 100644 --- a/support/SkinnyShapeProvider.cpp +++ b/support/SkinnyShapeProvider.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/support/SkinnyShapeProvider.h b/support/SkinnyShapeProvider.h index cf7fbde9..8306afef 100644 --- a/support/SkinnyShapeProvider.h +++ b/support/SkinnyShapeProvider.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/support/SkinnyShortcut.cpp b/support/SkinnyShortcut.cpp index 6226f559..d7bbff01 100644 --- a/support/SkinnyShortcut.cpp +++ b/support/SkinnyShortcut.cpp @@ -1,3 +1,8 @@ +/****************************************************************************** + * QSkinny - Copyright (C) The authors + * SPDX-License-Identifier: BSD-3-Clause + *****************************************************************************/ + #include "SkinnyShortcut.h" #include "SkinnyNamespace.h" diff --git a/support/SkinnyShortcut.h b/support/SkinnyShortcut.h index ac363574..84587d7e 100644 --- a/support/SkinnyShortcut.h +++ b/support/SkinnyShortcut.h @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/ diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 74da26cc..3052d313 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,3 +1,10 @@ if(TARGET Qt::Svg) add_subdirectory(svg2qvg) -endif() \ No newline at end of file + install( + FILES + ${QSK_CMAKE_DIR}/QSkinnyTools.cmake + DESTINATION + ${PACKAGE_LOCATION} + COMPONENT + Devel) +endif() diff --git a/tools/svg2qvg/CMakeLists.txt b/tools/svg2qvg/CMakeLists.txt index c206f820..05507a7b 100644 --- a/tools/svg2qvg/CMakeLists.txt +++ b/tools/svg2qvg/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################ -# QSkinny - Copyright (C) 2016 Uwe Rathmann +# QSkinny - Copyright (C) The authors # SPDX-License-Identifier: BSD-3-Clause ############################################################################ @@ -22,14 +22,18 @@ if(BUILD_SVG2QVG_STANDALONE) # TODO fix multi configuration generators if(CMAKE_GENERATOR MATCHES "Visual Studio.*") add_definitions("/I${qskinny_AUTOGEN_DIR}/include_\$(Configuration)") + elseif(CMAKE_GENERATOR MATCHES "Ninja Multi.*") + target_include_directories(${target} + PRIVATE + ${qskinny_AUTOGEN_DIR}/include_$) else() target_include_directories(${target} PRIVATE ${qskinny_AUTOGEN_DIR}/include) endif() target_include_directories(${target} PRIVATE - ${CMAKE_SOURCE_DIR}/src/common - ${CMAKE_SOURCE_DIR}/src/graphic) + ${QSK_SOURCE_DIR}/src/common + ${QSK_SOURCE_DIR}/src/graphic) target_compile_definitions(${target} PRIVATE QSK_STANDALONE) target_link_libraries(${target} PRIVATE Qt::Gui Qt::GuiPrivate) diff --git a/tools/svg2qvg/main.cpp b/tools/svg2qvg/main.cpp index 4821c4e0..d5ffcf82 100644 --- a/tools/svg2qvg/main.cpp +++ b/tools/svg2qvg/main.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann + * QSkinny - Copyright (C) The authors * SPDX-License-Identifier: BSD-3-Clause *****************************************************************************/