Compare commits

...

69 Commits

Author SHA1 Message Date
ff4d97d5ac Make adaptions for LabMCT under v1.7 2023-06-19 13:10:51 +02:00
Sergio Martins
59a81fbe62 Fix another mistake checking for Config::Flag_AutoHideSupport 2023-05-16 10:01:41 +01:00
Sergio Martins
0fe194769d Update Changelog 2023-05-16 09:40:41 +01:00
Sergio Martins
5861607df1 Fix "pin" button appearing when using Flag_TitleBarNoFloatButton
Fixes issue #359
2023-05-16 09:37:46 +01:00
Allen Winter
e7c9a20752 python/CMakeLists.txt - improve PYTHON_BINDINGS_INSTALL_PREFIX
If `cmake --install. --prefix=/some/path` is specified that
install prefix is taken into account for the bindings too.

Also, on Windows, don't install under a 'pythonX.Y' hierarchy.

fixes: #361
2023-05-15 12:16:52 -04:00
Allen Winter
dba4d649ed README-bindings.md - talk about Python3_EXECUTABLE 2023-05-15 08:56:10 -04:00
Allen Winter
ede69197ed This is v1.7.1 now 2023-05-03 16:07:36 -04:00
Allen Winter
70fd6f0770 Prep for release 1.7.0 2023-05-03 15:38:49 -04:00
Sergio Martins
c91c28748e Fix a detachment found by clazy 2023-05-03 20:38:33 +01:00
Renato Araujo Oliveira Filho
1275327163 More fixes for MacOS build 2023-05-02 21:26:39 +01:00
Renato Araujo Oliveira Filho
c3751142c0 Fix MacOs build
Avoid use empty path for custom dir
2023-05-02 19:37:27 +01:00
Allen Winter
c603593552 cmake/KDAB - sync to upstream 2023-05-02 11:10:53 -04:00
Kevin Funk
ac6ed8e929 cmake: Minor: Use CONFIG mode where applicable 2023-04-06 12:12:29 +02:00
Allen Winter
4f7175c446 .reuse/dep5 - add vscode.code-workspace 2023-03-25 21:28:05 -04:00
Sergio Martins
832736c1e5 Rename code.dev-qtwidgets.code-workspace to vscode.code-workspace 2023-03-25 13:00:14 +00:00
Sergio Martins
c5cbe4064a tests: Remove tests_launcher
It was a way to speed up test execution, but at the expense of
being weird and non-standard. It would block tst_docks from appearing
as qttest with children, as tst_docks wasn't passed to add_test.

Solution will be to instead split tst_docks into smaller executables,
which was done in 2.0 branch already.
2023-03-25 12:54:15 +00:00
Sergio Martins
68b7c0b1a9 tests: Remove old fuzzer
Not worth maintaining, as the layouting code is mature now.
Was useful when we had flaky code for layouting, but that has since
been rewritten.

Reducing maintenance burden.
2023-03-25 12:48:52 +00:00
Sergio Martins
285574205c README-QtQuick: Redirect to 2.0 branch
QtQuick in 1.7 isn't receiving any new features or fixes
2023-03-25 12:34:17 +00:00
Allen Winter
dbf96091f8 .pre-commit-config.yaml - autoupdate 2023-03-25 08:11:25 -04:00
Allen Winter
9c03da23a6 python/examples - autopep8 2023-03-25 08:08:12 -04:00
Allen Winter
ea08429b23 src/DockWidgetBase.h - codespell 2023-03-25 08:05:38 -04:00
Allen Winter
ad1a2df8af README-QtQuick.md - markdownlint fix for long lines 2023-03-25 08:04:31 -04:00
Sergio Martins
af3fd6b296 vscode: Use "current" debug targets
(amends previous commit, forgot to save)
2023-03-25 11:21:42 +00:00
Sergio Martins
ae461f947f vscode: Use "current" debug targets
This allows to remove hardcoded build directories and remove the
Qt6 workspace file.
2023-03-24 20:25:37 +00:00
Sergio Martins
f24a04252b Add a prophylactic against a crash
Crash seen in the wild. Can't reproduce, but could happen if the deletion
was triggered by some external event during a drag.

We're using a QPointer already, so it even makes sense.
2023-03-17 10:58:22 +00:00
Sergio Martins
dd9837c3f1 Fix assert when saving mdi layout
Since the layout is nested, we need to look further for the main window.

I don't know however if restoring layouts even works with MDI.
Needs to be tested and implemented.
2023-03-14 23:10:14 +00:00
Sergio Martins
b6beb3d244 Add test for #352
Commented out, since we can't use an XFAIL, as it crashes
2023-03-14 23:00:54 +00:00
Sergio Martins
1a46823b03 Don't crash when using LayoutSaver with MDI
It's not supported but it shouldn't crash.
For #352, leaving it open still, as the reporter actually experiences
an assert, not a segfault. To be investigated further
2023-03-14 22:54:46 +00:00
Sergio Martins
4d50376ccf Fix reading floating window flags from >=1.6 layouts
1.7 introduced per-floating-window "flags" in the saved layouts. When
that value is not present in the saved layout, we need to fallback from
reading from Config global settings
2023-03-10 17:16:10 +00:00
Sergio Martins
59f7280d59 Add test for loading flags from layouts from 1.6
1.7 now has flags per floating window. When loading a layout from
1.6 we need however to fallback to the global Config::flags()
2023-03-10 17:10:37 +00:00
Sergio Martins
683dd68754 Update Changelog
Lot's of stuff was missing
2023-03-08 22:33:21 +00:00
Sergio Martins
1b33da8b44 Windows: Don't resize diagonally when at least 1 dimension is fixed
If width is fixed and height is not, then when using the corner resize
only width can be changed (and same for fixed height).

Fixes #345
2023-03-06 19:56:21 +00:00
Sergio Martins
f6d9ac5606 debug: Allow to print flags
For issue #345
2023-03-03 16:17:29 +00:00
Sergio Martins
f08d39ecc8 Fix clazy warning about returning false in event filter
Use the base class instead
2023-02-28 12:34:10 +00:00
Sergio Martins
ee5e004ed2 Fix some icons not appearing in title bar
Looks like QIcon was being added into the cache after it was already
moved from.
2023-02-27 22:50:25 +00:00
Sergio Martins
c744291d33 README: Explain that QtQuick does not work on EGLFS
For issue #342
2023-02-15 13:05:31 +00:00
Allen Winter
a6e0de9db9 .pre-commit-config.yaml - disable pylint on precommit.ci 2023-02-10 10:38:42 -05:00
Milian Wolff
0ad83ea1b4 Allow restoring layouts without touching floating dock widgets
The current behavior is great for when we want to apply an older
stored state to a different screen configuration. There,
scaling/shrinking the floating docks makes sense.

But we now also want to have more fine grained window
configurations and save/restore them more frequently. In those
situations, the screen config is the same, but the mainwindow may
or may not be full screen when the state was saved. In this case
we don't want to touch the size of the floating docks - most notably
we don't want to resize a "nearly fullscreen" floating window from
a state with a small main window when loading it into a state with
a fullscreen mainwindow - in such situations the floating window would
get resized beyond the available screen space!

Preventing the latter is probably required as a safety measure
independently of this patch, for situations where the relative
resizing is desired. This is outside the scope of this patch.
2023-02-10 15:13:09 +00:00
Sergio Martins
fdcdaae1f1 Fix build with C++11
initialized lambda captures is a C++14 extension
2023-02-10 14:53:42 +00:00
Sergio Martins
af455bb37e examples: Show how to hide dock indicators when ctrl is pressed
Fixes issue #334 and issue #337.
Won't add this directly into the library, as each project
has different requirements regarding this.

It's easy to do in application code though.
2023-02-07 23:51:20 +00:00
Sergio Martins
57aded2a67 Fix setDropIndicatorsInhibited(false) not showing drop indicators
It required the user to move the mouse, which was OK but we can do
better.

Now, KDDW will automaticallt re-show the drop indicators if we're in
the middle of a drag operation.

Required for issue #334 and issue #337
2023-02-07 21:58:37 +00:00
Aleš Petrovački
31b0ad8d7d Update Readme with new image on top of it 2023-02-06 18:26:02 +01:00
Aleš Petrovački
3ae7f4ac21 Add logo to KDDockWidgets git repo 2023-02-06 18:22:41 +01:00
Sergio Martins
5b3fb35679 cmake: Add a preset for static Qt6 builds 2023-02-03 19:04:52 +00:00
Sergio Martins
c39486ce84 vscode: Remove ms C++ extension settings
I'm on clangd instead.
I could leave them there, but no idea if they are correct.
Once we have a developer using the MS extension then he's free
to maintain the options.
2023-02-01 17:16:34 +00:00
Sergio Martins
e7bc93a69f Fix relayouting when dock widget is deleted directly
Usually, it's closed. "delete" isn't very well tested.
When it's deleted the container item becomes empty, so needs
to be resized to QSize(0,0) as well.

There's already a codepath for that but was too restrictive.
It now handles that case too.

Fixes #336
2023-01-27 18:09:34 +00:00
Sergio Martins
f2c3fe6910 tests: Add an XFAIL for issue #336 2023-01-27 16:23:36 +00:00
Sergio Martins
2326874be7 Cache TitleBar icons
Minor performance improvement. Detected by Milian when profiling.
2023-01-27 14:36:05 +00:00
Mauro Persano
1fc57b02b3 Save side bar overlay geometry when frame is resized
Previously we were updating the side bar overlay geometry only when the
side bar was closed. So if we open the side bar overlay, resize it, and
save/restore the layout state, we won't get the last side bar size.

Save it every time the frame is resized.
2023-01-27 12:19:26 +00:00
Mauro Persano
c55ce478df Serialize dock overlayed geometries
Otherwise the size of auto-hidden dock widgets won't get restored.
2023-01-27 12:19:26 +00:00
Sergio Martins
b0dfbc4486 Fix Werror build regarding unused variable 2023-01-26 22:57:39 +00:00
Allen Winter
6f6679d6be update copyright year to 2023 2023-01-06 12:24:12 -05:00
Sergio Martins
a6598d4607 Fixed build with -Wextra-semi 2023-01-06 17:14:58 +00:00
Sergio Martins
32b0e024d8 Fixed case of corrupt layout when using setDockWidgetFactoryFunc()
If the factory returned null for some dock widget, then the layout
would have holes. They need to be turned into placeholders, which
will be invisible.

Move the test into the QtWidgets guard. There's no point in making
it agnostic, since the bug is in the layouting.
2023-01-06 15:24:02 +00:00
Sergio Martins
392504e902 test: Add test for a bogus layout
The layout is creating holes when we skip restoring 1 dock widget
2023-01-05 22:34:30 +00:00
Sergio Martins
5b484a7dda tests: Added a test for issue #326
Currently an XFAIL
2022-11-18 11:50:20 +00:00
Mauro Persano
4be77d96df Fix layout scaling factor when main window is native
When a main window is serialized, we get the geometry to be serialized
with MainWindowBase::windowGeometry. When the layout is restored, we
get the geometry of the current window with window()->geometry() and use
it to compute the scaling factor.

The values returned by MainWindowBase::windowGeometry and
window()->geometry() will differ if the main window is a native widget,
but not a toplevel window. In this case, windowGeometry returns the
geometry of the main window widget, not of its containing window.

Use MainWindowBase::windowGeometry when computing the scaling factor, so
that these geometries are consistent and the scaling factor is correct.
2022-11-14 11:03:46 +00:00
Sergio Martins
8947c56442 Improve auto-hide icon transparency
They had non-transparent corners
2022-11-10 11:35:30 +00:00
Sergio Martins
35bf7bc9c8 Fix moving floating windows to negative positions
QScreen::geometry() is already in "virtual coordinate space", no
need to map again. Bug wasn't noticeable since most setups
have virtual top left at 0,0, so it was a no-op in most cases.

Fixes bug #321
2022-10-28 12:08:38 +01:00
Allen Winter
0d943620ac README.md - add blurb about demo 2022-10-27 16:10:07 -04:00
Allen Winter
8f6c659021 CMakeLists.txt - change name of demo 2022-10-27 16:09:56 -04:00
Allen Winter
a82f2afa64 create-demo-win-zip - create a 7z with the example execs
Add a "createZipDemo" buildsystem target to run this.
The 7z includes the Qt runtime.
2022-10-27 11:45:55 -04:00
Allen Winter
f1ae102383 pre-commit - autoupdate, and markdownlint config 2022-10-25 07:53:28 -04:00
Eism
34a7bfd0e5 Fixed using normal geometry of platform window if fractional scaling is enabled 2022-10-06 10:47:15 +01:00
pre-commit-ci[bot]
1f27716020 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-clang-format: v14.0.0 → v14.0.6](https://github.com/pre-commit/mirrors-clang-format/compare/v14.0.0...v14.0.6)
- [github.com/PyCQA/pylint: v2.15.2 → v2.15.3](https://github.com/PyCQA/pylint/compare/v2.15.2...v2.15.3)
2022-09-28 20:12:44 +01:00
Sergio Martins
4706392464 Amend last commit by using the shorter name, UseQtWindow
Still, one redundant flag was removed, but now, the one with
the long name.

For #314
2022-09-25 19:16:57 +01:00
Sergio Martins
3a9b583552 Remove uneeded FloatingWindowFlag::UseQtWindow
There's already DontUseQtToolWindowsForFloatingWindows
2022-09-25 19:05:59 +01:00
Sergio Martins
9a74839910 FloatingWindow::isUtilityWindow() now honours custom flags
If the user has passed custom per-window flags then we shouldn't
use the global ones.

Fixes minimize problem in #314
2022-09-25 18:47:31 +01:00
Sergio Martins
322ac107e3 refactoring: Move KDDockWidgets::usesUtilityWindows into FloatingWindow.cpp
No behaviour change for now, just moving.
Its usage is tricky, so it should only be used in one place, so we
can honour FloatingWindow::m_flags overrides too.

For issue #314
2022-09-25 17:27:45 +01:00
330 changed files with 2801 additions and 12589 deletions

View File

@@ -1,4 +1,5 @@
all all
rule 'MD007', :indent => 2, :start_indented => false
rule 'MD013', :line_length => 100, :tables => false rule 'MD013', :line_length => 100, :tables => false
rule 'MD029', :style => :ordered rule 'MD029', :style => :ordered
exclude_rule 'MD033' exclude_rule 'MD033'

View File

@@ -1,9 +1,13 @@
# See https://pre-commit.com for more information # See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks # See https://pre-commit.com/hooks.html for more hooks
ci:
skip: [pylint]
autoupdate_schedule: monthly
exclude: ^(cmake/ECM|cmake/KDAB/) exclude: ^(cmake/ECM|cmake/KDAB/)
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0 rev: v4.4.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: end-of-file-fixer - id: end-of-file-fixer
@@ -13,22 +17,22 @@ repos:
args: [--allow-multiple-documents] args: [--allow-multiple-documents]
- id: check-json - id: check-json
- repo: https://github.com/pre-commit/mirrors-clang-format - repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.0 rev: v14.0.6
hooks: hooks:
- id: clang-format - id: clang-format
exclude: (.json) exclude: (.json)
- repo: https://github.com/PyCQA/pylint - repo: https://github.com/PyCQA/pylint
rev: v2.15.2 rev: v2.17.1
hooks: hooks:
- id: pylint - id: pylint
exclude: ^(.cmake-format.py|conan/conanfile.py) exclude: ^(.cmake-format.py|conan/conanfile.py)
additional_dependencies: ["PySide2", "PySide6"] additional_dependencies: ["PySide2", "PySide6"]
- repo: https://github.com/pre-commit/mirrors-autopep8 - repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.7.0 rev: v2.0.2
hooks: hooks:
- id: autopep8 - id: autopep8
- repo: https://github.com/codespell-project/codespell - repo: https://github.com/codespell-project/codespell
rev: v2.2.1 rev: v2.2.4
hooks: hooks:
- id: codespell - id: codespell
- repo: https://github.com/cheshirekow/cmake-format-precommit - repo: https://github.com/cheshirekow/cmake-format-precommit
@@ -39,13 +43,13 @@ repos:
- id: cmake-format - id: cmake-format
exclude: (.py.cmake|Doxyfile.cmake) exclude: (.py.cmake|Doxyfile.cmake)
- repo: https://github.com/markdownlint/markdownlint - repo: https://github.com/markdownlint/markdownlint
rev: v0.11.0 rev: v0.12.0
hooks: hooks:
- id: markdownlint - id: markdownlint
entry: mdl entry: mdl
language: ruby language: ruby
files: \.(md|mdown|markdown)$ files: \.(md|mdown|markdown)$
- repo: https://github.com/fsfe/reuse-tool - repo: https://github.com/fsfe/reuse-tool
rev: v1.0.0 rev: v1.1.2
hooks: hooks:
- id: reuse - id: reuse

View File

@@ -5,22 +5,22 @@ Source: https://www.github.com/KDAB/KDDockWidgets
#misc source code #misc source code
Files: *.qrc *.json *.xml src/fwd_headers/* Files: *.qrc *.json *.xml src/fwd_headers/*
Copyright: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
License: GPL-2.0-only OR GPL-3.0-only License: GPL-2.0-only OR GPL-3.0-only
#misc documentation #misc documentation
Files: CONTRIBUTORS.txt Changelog README.md README-QtQuick.md README-WASM.md README-Wayland.md README-bindings.md README-troubleshooting conan/README.txt python/examples/README.txt python/examples-qt6/README.txt docs/KDDockWidgets-CopyrightAssignmentForm.pdf *.html Files: CONTRIBUTORS.txt Changelog README.md README-QtQuick.md README-WASM.md README-Wayland.md README-bindings.md README-troubleshooting conan/README.txt python/examples/README.txt python/examples-qt6/README.txt docs/KDDockWidgets-CopyrightAssignmentForm.pdf *.html
Copyright: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
License: GPL-2.0-only OR GPL-3.0-only License: GPL-2.0-only OR GPL-3.0-only
#misc config files #misc config files
Files: .pre-commit-config.yaml .codespellrc .krazy .cmake-format .clang-format .clazy .gitignore .mdlrc .mdlrc.rb .pep8 .pylintrc appveyor.yml code.dev-*.code-workspace docs/api/Doxyfile.cmake distro/* Files: .pre-commit-config.yaml .codespellrc .krazy .cmake-format .clang-format .clazy .gitignore .mdlrc .mdlrc.rb .pep8 .pylintrc appveyor.yml code.dev-*.code-workspace vscode.code-workspace docs/api/Doxyfile.cmake distro/*
Copyright: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
License: BSD-3-Clause License: BSD-3-Clause
#artwork #artwork
Files: screencap.gif images/* src/img/* docs/api/*.png examples/dockwidgets/assets/*.png src/img/classic_indicators/*.png Files: screencap.gif images/* src/img/* docs/api/*.png examples/dockwidgets/assets/*.png src/img/classic_indicators/*.png
Copyright: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
License: GPL-2.0-only OR GPL-3.0-only License: GPL-2.0-only OR GPL-3.0-only
#3rdparty #3rdparty

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sergio Martins <sergio.martins@kdab.com> # Author: Sergio Martins <sergio.martins@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -63,11 +63,6 @@
# Build the layout linter. # Build the layout linter.
# Ignored unless KDDockWidgets_DEVELOPER_MODE=True # Ignored unless KDDockWidgets_DEVELOPER_MODE=True
# Default=true # Default=true
#
# -DKDDockWidgets_FUZZER=[true|false]
# Build the fuzzer.
# Ignored unless KDDockWidgets_DEVELOPER_MODE=True
# Default=true
cmake_minimum_required(VERSION 3.12) cmake_minimum_required(VERSION 3.12)
@@ -93,8 +88,8 @@ project(
) )
set(${PROJECT_NAME}_VERSION_MAJOR 1) set(${PROJECT_NAME}_VERSION_MAJOR 1)
set(${PROJECT_NAME}_VERSION_MINOR 6) set(${PROJECT_NAME}_VERSION_MINOR 7)
set(${PROJECT_NAME}_VERSION_PATCH 95) set(${PROJECT_NAME}_VERSION_PATCH 1)
set(${PROJECT_NAME}_VERSION set(${PROJECT_NAME}_VERSION
${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH} ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}
) )
@@ -103,18 +98,18 @@ set(${PROJECT_NAME}_SOVERSION "1.7")
include(FeatureSummary) include(FeatureSummary)
option(${PROJECT_NAME}_QT6 "Build against Qt 6" OFF) option(${PROJECT_NAME}_QT6 "Build against Qt 6" ON)
option(${PROJECT_NAME}_DEVELOPER_MODE "Developer Mode" OFF) option(${PROJECT_NAME}_DEVELOPER_MODE "Developer Mode" OFF)
option(${PROJECT_NAME}_PYTHON_BINDINGS "Build python bindings" OFF) option(${PROJECT_NAME}_PYTHON_BINDINGS "Build python bindings" OFF)
option(${PROJECT_NAME}_QTQUICK "Build for QtQuick instead of QtWidgets" OFF) option(${PROJECT_NAME}_QTQUICK "Build for QtQuick instead of QtWidgets" OFF)
option(${PROJECT_NAME}_STATIC "Build statically" OFF) option(${PROJECT_NAME}_STATIC "Build statically" OFF)
option(${PROJECT_NAME}_TESTS "Build the tests" OFF) option(${PROJECT_NAME}_TESTS "Build the tests" OFF)
option(${PROJECT_NAME}_EXAMPLES "Build the examples" ON) option(${PROJECT_NAME}_EXAMPLES "Build the examples" OFF)
option(${PROJECT_NAME}_DOCS "Build the API documentation" OFF) option(${PROJECT_NAME}_DOCS "Build the API documentation" OFF)
option(${PROJECT_NAME}_WERROR "Use -Werror (will be true for developer-mode unconditionally)" OFF) option(${PROJECT_NAME}_WERROR "Use -Werror (will be true for developer-mode unconditionally)" OFF)
option(${PROJECT_NAME}_X11EXTRAS option(${PROJECT_NAME}_X11EXTRAS
"Link with QtX11Extras to detect if the compositor supports transparency. Not applicable to non-Linux or Qt6." "Link with QtX11Extras to detect if the compositor supports transparency. Not applicable to non-Linux or Qt6."
ON OFF
) )
option(${PROJECT_NAME}_XLib "On Linux, link against XLib, for a more robust window z-order detection." OFF) option(${PROJECT_NAME}_XLib "On Linux, link against XLib, for a more robust window z-order detection." OFF)
@@ -353,29 +348,7 @@ if(${PROJECT_NAME}_TESTS)
if(${PROJECT_NAME}_DEVELOPER_MODE) if(${PROJECT_NAME}_DEVELOPER_MODE)
add_subdirectory(tests) add_subdirectory(tests)
# tst_docks.exe is pretty big (160 tests), so split it in more runs so we can use threads. add_test(NAME tst_docks COMMAND tst_docks)
add_test(NAME tst_docks0 COMMAND tests_launcher 0 5)
add_test(NAME tst_docks1 COMMAND tests_launcher 1 5)
add_test(NAME tst_docks2 COMMAND tests_launcher 2 5)
add_test(NAME tst_docks3 COMMAND tests_launcher 3 5)
add_test(NAME tst_docks4 COMMAND tests_launcher 4 5)
add_test(NAME tst_docks5 COMMAND tests_launcher 5 5)
add_test(NAME tst_docks6 COMMAND tests_launcher 6 5)
add_test(NAME tst_docks7 COMMAND tests_launcher 7 5)
add_test(NAME tst_docks8 COMMAND tests_launcher 8 5)
add_test(NAME tst_docks9 COMMAND tests_launcher 9 5)
add_test(NAME tst_docks10 COMMAND tests_launcher 10 5)
add_test(NAME tst_docks11 COMMAND tests_launcher 10 5)
add_test(NAME tst_docks12 COMMAND tests_launcher 11 5)
add_test(NAME tst_docks13 COMMAND tests_launcher 12 5)
add_test(NAME tst_docks14 COMMAND tests_launcher 13 5)
add_test(NAME tst_docks15 COMMAND tests_launcher 14 5)
add_test(NAME tst_docks16 COMMAND tests_launcher 15 5)
add_test(NAME tst_docks17 COMMAND tests_launcher 16 5)
add_test(NAME tst_docks18 COMMAND tests_launcher 17 5)
add_test(NAME tst_docks19 COMMAND tests_launcher 18 5)
add_test(NAME tst_docks20 COMMAND tests_launcher 19 5)
add_test(NAME tst_docks21 COMMAND tests_launcher 20 5) # one more for rounding leftovers
if(NOT ${PROJECT_NAME}_QTQUICK) if(NOT ${PROJECT_NAME}_QTQUICK)
# tst_multisplitter depends on QWidget # tst_multisplitter depends on QWidget
@@ -394,4 +367,15 @@ if(${PROJECT_NAME}_IS_ROOT_PROJECT)
include(ECMUninstallTarget) include(ECMUninstallTarget)
endif() endif()
# Deployment
if(WIN32)
add_custom_target(
createZipDemo
COMMAND cmd /c ${CMAKE_CURRENT_SOURCE_DIR}\\deploy\\create-demo-win-zip.bat
${CMAKE_PROJECT_NAME}-Demo-${${PROJECT_NAME}_VERSION}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Target to generate the Zip demo installer for Windows"
)
endif()
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

View File

@@ -9,11 +9,10 @@
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON", "KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
"KDDockWidgets_FUZZER" : "OFF"
}, },
"warnings" : { "warnings": {
"uninitialized" : true "uninitialized": true
} }
}, },
{ {
@@ -25,12 +24,11 @@
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON", "KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"KDDockWidgets_FUZZER" : "OFF", "ECM_ENABLE_SANITIZERS": "'address;undefined'"
"ECM_ENABLE_SANITIZERS" : "'address;undefined'"
}, },
"warnings" : { "warnings": {
"uninitialized" : true "uninitialized": true
} }
}, },
{ {
@@ -41,11 +39,11 @@
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_WERROR": "ON", "KDDockWidgets_WERROR": "ON",
"KDDockWidgets_EXAMPLES" : "OFF" "KDDockWidgets_EXAMPLES": "OFF"
}, },
"environment": { "environment": {
"CXX": "clazy", "CXX": "clazy",
"CCACHE_DISABLE" : "ON" "CCACHE_DISABLE": "ON"
} }
}, },
{ {
@@ -55,13 +53,13 @@
"binaryDir": "${sourceDir}/build-clazy-qtquick", "binaryDir": "${sourceDir}/build-clazy-qtquick",
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_EXAMPLES" : "OFF", "KDDockWidgets_EXAMPLES": "OFF",
"KDDockWidgets_WERROR": "ON", "KDDockWidgets_WERROR": "ON",
"KDDockWidgets_QTQUICK": "ON" "KDDockWidgets_QTQUICK": "ON"
}, },
"environment": { "environment": {
"CXX": "clazy", "CXX": "clazy",
"CCACHE_DISABLE" : "ON" "CCACHE_DISABLE": "ON"
} }
}, },
{ {
@@ -80,7 +78,7 @@
"binaryDir": "${sourceDir}/build-release-no-x11extras", "binaryDir": "${sourceDir}/build-release-no-x11extras",
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Release", "CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_X11EXTRAS" : "OFF" "KDDockWidgets_X11EXTRAS": "OFF"
} }
}, },
{ {
@@ -102,9 +100,8 @@
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_QTQUICK": "ON", "KDDockWidgets_QTQUICK": "ON",
"KDDockWidgets_DEVELOPER_MODE": "ON", "KDDockWidgets_DEVELOPER_MODE": "ON",
"ECM_ENABLE_SANITIZERS" : "'address;undefined'", "ECM_ENABLE_SANITIZERS": "'address;undefined'",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
"KDDockWidgets_FUZZER" : "OFF"
} }
}, },
{ {
@@ -127,6 +124,17 @@
"KDDockWidgets_STATIC": "ON" "KDDockWidgets_STATIC": "ON"
} }
}, },
{
"name": "static6",
"displayName": "static6",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-static6",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_STATIC": "ON",
"KDDockWidgets_QT6": "ON"
}
},
{ {
"name": "static-qtquick", "name": "static-qtquick",
"displayName": "static-qtquick", "displayName": "static-qtquick",
@@ -146,7 +154,7 @@
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Release", "CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_QT6": "ON", "KDDockWidgets_QT6": "ON",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}" "CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
}, },
"environment": { "environment": {
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}" "PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
@@ -161,9 +169,8 @@
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_QT6": "ON", "KDDockWidgets_QT6": "ON",
"KDDockWidgets_DEVELOPER_MODE": "ON", "KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"KDDockWidgets_FUZZER" : "OFF", "CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
}, },
"environment": { "environment": {
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}" "PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
@@ -178,10 +185,9 @@
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_QT6": "ON", "KDDockWidgets_QT6": "ON",
"KDDockWidgets_DEVELOPER_MODE": "ON", "KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"ECM_ENABLE_SANITIZERS" : "'address;undefined'", "ECM_ENABLE_SANITIZERS": "'address;undefined'",
"KDDockWidgets_FUZZER" : "OFF", "CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
}, },
"environment": { "environment": {
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}" "PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
@@ -196,7 +202,7 @@
"CMAKE_BUILD_TYPE": "Release", "CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_QTQUICK": "ON", "KDDockWidgets_QTQUICK": "ON",
"KDDockWidgets_QT6": "ON", "KDDockWidgets_QT6": "ON",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}" "CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
}, },
"environment": { "environment": {
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}" "PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
@@ -210,16 +216,16 @@
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_QTQUICK": "ON", "KDDockWidgets_QTQUICK": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"KDDockWidgets_DEVELOPER_MODE": "ON", "KDDockWidgets_DEVELOPER_MODE": "ON",
"ECM_ENABLE_SANITIZERS" : "'address;undefined'", "ECM_ENABLE_SANITIZERS": "'address;undefined'",
"KDDockWidgets_QT6": "ON", "KDDockWidgets_QT6": "ON",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}" "CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
}, },
"environment": { "environment": {
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}", "PATH": "$env{QT6_DIR}/bin:$penv{PATH}",
"QML2_IMPORT_PATH" : "$env{QT6_DIR}/imports:$env{QT6_DIR}/qml", "QML2_IMPORT_PATH": "$env{QT6_DIR}/imports:$env{QT6_DIR}/qml",
"LD_LIBRARY_PATH" : "$env{QT6_DIR}/lib" "LD_LIBRARY_PATH": "$env{QT6_DIR}/lib"
} }
}, },
{ {
@@ -230,11 +236,10 @@
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON", "KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
"KDDockWidgets_FUZZER" : "ON"
}, },
"warnings" : { "warnings": {
"uninitialized" : true "uninitialized": true
}, },
"environment": { "environment": {
"CC": "clang-cl", "CC": "clang-cl",
@@ -249,11 +254,10 @@
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON", "KDDockWidgets_DEVELOPER_MODE": "ON",
"KDDockWidgets_FUZZER" : "OFF",
"KDDockWidgets_QTQUICK": "ON" "KDDockWidgets_QTQUICK": "ON"
}, },
"warnings" : { "warnings": {
"uninitialized" : true "uninitialized": true
}, },
"environment": { "environment": {
"CC": "clang-cl", "CC": "clang-cl",
@@ -268,12 +272,11 @@
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON", "KDDockWidgets_DEVELOPER_MODE": "ON",
"KDDockWidgets_FUZZER" : "ON",
"KDDockWidgets_QT6": "ON", "KDDockWidgets_QT6": "ON",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}" "CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
}, },
"warnings" : { "warnings": {
"uninitialized" : true "uninitialized": true
}, },
"environment": { "environment": {
"CC": "clang-cl", "CC": "clang-cl",
@@ -289,20 +292,19 @@
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON", "KDDockWidgets_DEVELOPER_MODE": "ON",
"KDDockWidgets_FUZZER" : "OFF",
"KDDockWidgets_QTQUICK": "ON", "KDDockWidgets_QTQUICK": "ON",
"KDDockWidgets_QT6": "ON", "KDDockWidgets_QT6": "ON",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}" "CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
}, },
"warnings" : { "warnings": {
"uninitialized" : true "uninitialized": true
}, },
"environment": { "environment": {
"CC": "clang-cl", "CC": "clang-cl",
"CXX": "clang-cl", "CXX": "clang-cl",
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}", "PATH": "$env{QT6_DIR}/bin:$penv{PATH}",
"QML2_IMPORT_PATH" : "$env{QT6_DIR}/imports:$env{QT6_DIR}/qml", "QML2_IMPORT_PATH": "$env{QT6_DIR}/imports:$env{QT6_DIR}/qml",
"LD_LIBRARY_PATH" : "$env{QT6_DIR}/lib" "LD_LIBRARY_PATH": "$env{QT6_DIR}/lib"
} }
}, },
{ {
@@ -313,18 +315,17 @@
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON", "KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"KDDockWidgets_FUZZER" : "OFF", "CMAKE_C_FLAGS_INIT": "-ftime-trace",
"CMAKE_C_FLAGS_INIT" : "-ftime-trace",
"CMAKE_CXX_FLAGS_INIT": "-ftime-trace" "CMAKE_CXX_FLAGS_INIT": "-ftime-trace"
}, },
"warnings" : { "warnings": {
"uninitialized" : true "uninitialized": true
}, },
"environment": { "environment": {
"CC": "clang", "CC": "clang",
"CXX": "clang++", "CXX": "clang++",
"CCACHE_DISABLE" : "ON" "CCACHE_DISABLE": "ON"
} }
}, },
{ {
@@ -335,19 +336,18 @@
"cacheVariables": { "cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug", "CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON", "KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"KDDockWidgets_FUZZER" : "OFF", "KDDockWidgets_QT6": "ON",
"KDDockWidgets_QT6" : "ON", "CMAKE_C_FLAGS_INIT": "-ftime-trace",
"CMAKE_C_FLAGS_INIT" : "-ftime-trace",
"CMAKE_CXX_FLAGS_INIT": "-ftime-trace" "CMAKE_CXX_FLAGS_INIT": "-ftime-trace"
}, },
"warnings" : { "warnings": {
"uninitialized" : true "uninitialized": true
}, },
"environment": { "environment": {
"CC": "clang", "CC": "clang",
"CXX": "clang++", "CXX": "clang++",
"CCACHE_DISABLE" : "ON" "CCACHE_DISABLE": "ON"
} }
}, },
{ {
@@ -448,17 +448,23 @@
}, },
{ {
"name": "ci-static", "name": "ci-static",
"inherits":["static"], "inherits": [
"static"
],
"binaryDir": "${sourceDir}/build-ci-static" "binaryDir": "${sourceDir}/build-ci-static"
}, },
{ {
"name": "ci-static-qtquick", "name": "ci-static-qtquick",
"inherits":["static-qtquick"], "inherits": [
"static-qtquick"
],
"binaryDir": "${sourceDir}/build-ci-static-qtquick" "binaryDir": "${sourceDir}/build-ci-static-qtquick"
}, },
{ {
"name": "ci-python", "name": "ci-python",
"inherits":["python"], "inherits": [
"python"
],
"binaryDir": "${sourceDir}/build-python" "binaryDir": "${sourceDir}/build-python"
} }
], ],
@@ -467,16 +473,16 @@
"name": "clazy", "name": "clazy",
"configurePreset": "clazy", "configurePreset": "clazy",
"environment": { "environment": {
"CLAZY_CHECKS" : "level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-typeinfo", "CLAZY_CHECKS": "level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-typeinfo",
"CCACHE_DISABLE" : "ON" "CCACHE_DISABLE": "ON"
} }
}, },
{ {
"name": "clazy-qtquick", "name": "clazy-qtquick",
"configurePreset": "clazy-qtquick", "configurePreset": "clazy-qtquick",
"environment": { "environment": {
"CLAZY_CHECKS" : "level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-typeinfo", "CLAZY_CHECKS": "level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-typeinfo",
"CCACHE_DISABLE" : "ON" "CCACHE_DISABLE": "ON"
} }
} }
] ]

View File

@@ -1,7 +1,21 @@
* v1.7.0 (unreleased) * v1.7.1 (unreleased)
- Fixed pin button appearing by mistake when using Flag_TitleBarNoFloatButton (#359)
* v1.7.0 (03 May 2023)
- Introduce DockWidget::setFloatingWindowFlags(flags). Allows for different - Introduce DockWidget::setFloatingWindowFlags(flags). Allows for different
FloatingWindows to have different window flags. For example, some having FloatingWindows to have different window flags. For example, some having
Qt::Tool while others having Qt::Window (#314). Qt::Tool while others having Qt::Window (#314).
- Fixed fixed-sized windows being able to be resized on Windows (#345)
- Allow restoring layouts without touching floating dock widgets
- Fix setDropIndicatorsInhibited(false) not showing drop indicators (#334, #337)
- Fix relayouting when dock widget is deleted directly (#336)
- Minor performance improvement: Cache TitleBar icons
- Save side bar overlay geometry when frame is resized
- Fixed case of corrupt layout when using setDockWidgetFactoryFunc()
- Fix layout scaling factor when main window is native
- Fix moving floating windows to negative positions (#321)
- Fixed using normal geometry of platform window if fractional scaling is enabled
- Allow to specify Qt::Tool or Qt::Window per floating window
* v1.6.0 (14 September 2022) * v1.6.0 (14 September 2022)
- Minimum Qt6 version is now 6.2.0 - Minimum Qt6 version is now 6.2.0

View File

@@ -1,4 +1,4 @@
The KDDockWidgets software is Copyright (C) 2018-2022 Klaralvdalens Datakonsult AB. The KDDockWidgets software is Copyright (C) 2018-2023 Klaralvdalens Datakonsult AB.
You may use, distribute and copy the KDDockWidgets software under the terms of You may use, distribute and copy the KDDockWidgets software under the terms of
the GNU General Public License version 2 or under the terms of GNU General the GNU General Public License version 2 or under the terms of GNU General

View File

@@ -1,4 +1,4 @@
KDDockWidgets is (C) 2018-2022, Klarälvdalens Datakonsult AB, and is licensed KDDockWidgets is (C) 2018-2023, Klarälvdalens Datakonsult AB, and is licensed
according to the terms of the: according to the terms of the:
GNU General Public License version 2.0 (see LICENSES/GPL-2.0-only.txt) GNU General Public License version 2.0 (see LICENSES/GPL-2.0-only.txt)
or the or the

View File

@@ -1,19 +1,3 @@
# KDDockWidgets and QtQuick # KDDockWidgets and QtQuick
## Supported Qt versions and toolchains Please use branch 2.0 for QtQuick support.
KDDockWidgets for QtQuick requires a C++17 capable compiler and Qt >= 6.2.1.
Qt 5.15.2 will probably also work, but it's not built and tested by KDAB CI, we
advise users to move to Qt6 as soon as possible.
## Troubleshooting
- QtGraphicalEffects is not supported, as it's buggy when moving between different QWindows.
See for example QTBUG-94943, KDDockWidgets issue #213. Also search the Qt bug tracker
for "QQuickItem: Cannot use same item on different windows at the same time"
- Very rarely, in some Nvidia/X11 setups, floating/docking has noticeable lag (like 1 second)
This could be solved by going to Nvidia's settings and making sure all monitors have
the same refresh rate and disabling "Allow Flipping". It's not known why this solves it. Might also
be a bug in Qt.

View File

@@ -29,7 +29,7 @@ As this time, you cannot get shiboken2-generator because the wheels are not on P
To use the wheels do this: To use the wheels do this:
```bash ```bash
% pip3 install \ % python3 -m pip install \
--index-url=http://download.qt.io/official_releases/QtForPython/ \ --index-url=http://download.qt.io/official_releases/QtForPython/ \
--trusted-host download.qt.io \ --trusted-host download.qt.io \
shiboken2 pyside2 shiboken2_generator shiboken2 pyside2 shiboken2_generator
@@ -40,7 +40,7 @@ For more info visit <https://doc.qt.io/qtforpython/shiboken2/gettingstarted.html
afterwards run: afterwards run:
```bash ```bash
pip3 list | grep PySide python3 -m pip list | grep PySide
``` ```
Note the version *must* match the same Qt you intend to use when building KDDockWidgets. Note the version *must* match the same Qt you intend to use when building KDDockWidgets.
@@ -48,7 +48,7 @@ Note the version *must* match the same Qt you intend to use when building KDDock
## Install PySide6 for Qt6 ## Install PySide6 for Qt6
Follow the same instructions as [the previous section](#Install PySide2 for Qt5), Follow the same instructions as [the previous section](#Install PySide2 for Qt5),
except installing `shiboken6 pyside6 shiboken6_generator` with pip3. except installing `shiboken6 pyside6 shiboken6_generator` with pip.
## Building KDDockWidgets Python Bindings ## Building KDDockWidgets Python Bindings
@@ -79,6 +79,14 @@ To run the KDDW python example
### Build Issues ### Build Issues
- You can override the default Python3 version found by CMake (usually the
newest version available) by passing the Python3_EXECUTABLE value to CMake,
i.e.
```bash
cmake -DPython3_EXECUTABLE=/usr/bin/python3.10 ....
```
- If you see errors like "Unable to locate Clang's built-in include directory" - If you see errors like "Unable to locate Clang's built-in include directory"
then first mROUBLESHOOTINGake sure you have llvm installed. If you still have problems try then first mROUBLESHOOTINGake sure you have llvm installed. If you still have problems try
setting the environment variable `LLVM_INSTALL_DIR` to point to your llvm installation. setting the environment variable `LLVM_INSTALL_DIR` to point to your llvm installation.

View File

@@ -2,6 +2,8 @@
[![Build Status](https://travis-ci.com/KDAB/KDDockWidgets.svg?branch=master)](https://travis-ci.com/KDAB/KDDockWidgets) [![Build Status](https://travis-ci.com/KDAB/KDDockWidgets.svg?branch=master)](https://travis-ci.com/KDAB/KDDockWidgets)
![KDDockWidgetsLogo](https://github.com/KDAB/KDDockWidgets/blob/1.7/images/kddockwidgets.png?raw=true)
> ⚠️⚠️: If you're using QtQuick/QML it's recommended to use 2.0 branch. 1.x will continue > ⚠️⚠️: If you're using QtQuick/QML it's recommended to use 2.0 branch. 1.x will continue
> to receive bug fixes for a long time but only for QtWidgets frontend. > to receive bug fixes for a long time but only for QtWidgets frontend.
@@ -12,6 +14,18 @@ Although `KDDockWidgets` is ready to be used out of the box, it can also be seen
as a framework to allow building very tailored custom docking systems. It tries as a framework to allow building very tailored custom docking systems. It tries
to expose every internal widget and every knob for the app developer to tune. to expose every internal widget and every knob for the app developer to tune.
You will find more information in these places:
- [our official home page](https://www.kdab.com/development-resources/qt-tools/kddockwidgets)
- [online detailed browsable API reference](https://docs.kdab.com/kddockwidgets)
- [our example programs](examples/)
We also have an [in browser demo](https://demos.kdab.com/wasm/kddockwidgets/dockwidgets.html).
Note however that this demo isn't fully featured, as it's running on Qt for WebAssembly.
Additionally, KDAB can provide pre-built Windows binaries for the example programs.
Contact <info@kdab.com> if interested.
## Motivation ## Motivation
Throughout the years KDAB contributed and funded bug fixes and features to `QDockWidget`. Throughout the years KDAB contributed and funded bug fixes and features to `QDockWidget`.
@@ -22,15 +36,6 @@ and an equal number of days just to fix dozens of regressions.
to move forward with new features. Furthermore, our customers were getting more to move forward with new features. Furthermore, our customers were getting more
creative with their requests, so it was clear we needed a better docking framework. creative with their requests, so it was clear we needed a better docking framework.
You will find more information in these places:
- [our official home page](https://www.kdab.com/development-resources/qt-tools/kddockwidgets)
- [online detailed browsable API reference](https://docs.kdab.com/kddockwidgets)
- [our example programs](examples/)
We also have an [in browser demo](https://demos.kdab.com/wasm/kddockwidgets/dockwidgets.html). Note
however that this demo isn't fully featured, as it's running on Qt for WebAssembly.
## Features ## Features
- Provide advanced docking that QDockWidget doesn't support - Provide advanced docking that QDockWidget doesn't support
@@ -57,7 +62,6 @@ however that this demo isn't fully featured, as it's running on Qt for WebAssemb
- Clean codebase - Clean codebase
- Not mixing GUI with state with logic with animations - Not mixing GUI with state with logic with animations
- Great test coverage, even the GUI and DnD operations are tested. 200 tests currently. - Great test coverage, even the GUI and DnD operations are tested. 200 tests currently.
- Fuzzer for doing random testing and finding bugs
- Lazy separator resize - Lazy separator resize
- Reordering tabs with mouse - Reordering tabs with mouse
- Partial layout save/restore, affecting only a chosen sub-set - Partial layout save/restore, affecting only a chosen sub-set
@@ -184,7 +188,7 @@ headers.
## Licensing ## Licensing
KDDockWidgets is (C) 2019-2022, Klarälvdalens Datakonsult AB, and is licensed according to KDDockWidgets is (C) 2019-2023, Klarälvdalens Datakonsult AB, and is licensed according to
the terms of the [GPL 2.0](LICENSES/GPL-2.0-only.txt) or [GPL 3.0](LICENSES/GPL-3.0-only.txt). the terms of the [GPL 2.0](LICENSES/GPL-2.0-only.txt) or [GPL 3.0](LICENSES/GPL-3.0-only.txt).
Contact KDAB at <info@kdab.com> to inquire about commercial licensing. Contact KDAB at <info@kdab.com> to inquire about commercial licensing.

View File

@@ -1,5 +1,5 @@
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
@@ -23,18 +23,9 @@ set(PYSIDE2_FOUND FALSE)
if(PYSIDE2_PRIV_FOUND) if(PYSIDE2_PRIV_FOUND)
set(PYSIDE2_FOUND TRUE) set(PYSIDE2_FOUND TRUE)
message(STATUS "Using PySide2 found in the system!") message(STATUS "Using PySide2 found in the system!")
pkg_get_variable(SHIBOKEN_BINARY pkg_get_variable(SHIBOKEN_BINARY pyside2 generator_location)
pyside2 pkg_get_variable(PYSIDE2_BASEDIR pyside2 typesystemdir)
generator_location pkg_get_variable(PYSIDE_INCLUDE_DIR pyside2 includedir)
)
pkg_get_variable(PYSIDE2_BASEDIR
pyside2
typesystemdir
)
pkg_get_variable(PYSIDE_INCLUDE_DIR
pyside2
includedir
)
set(PYSIDE_TYPESYSTEMS ${PYSIDE2_BASEDIR}) set(PYSIDE_TYPESYSTEMS ${PYSIDE2_BASEDIR})
set(PYSIDE2_SO_VERSION ${PYSIDE2_PRIV_VERSION}) set(PYSIDE2_SO_VERSION ${PYSIDE2_PRIV_VERSION})
set(PYSIDE_LIBRARY ${PYSIDE2_PRIV_LINK_LIBRARIES}) set(PYSIDE_LIBRARY ${PYSIDE2_PRIV_LINK_LIBRARIES})
@@ -45,7 +36,8 @@ else()
get_filename_component(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARY_FILENAME} NAME) get_filename_component(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARY_FILENAME} NAME)
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
import os, sys import os, sys
try: try:
import PySide2.QtCore as QtCore import PySide2.QtCore as QtCore
@@ -58,16 +50,18 @@ else()
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
if(NOT PYSIDE2_BASEDIR) if(NOT PYSIDE2_BASEDIR)
message( message(FATAL_ERROR "The PySide2 module could not be imported. Make sure you have it installed "
FATAL_ERROR
"The PySide2 module could not be imported. Make sure you have it installed "
"by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\"" "by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\""
) )
endif() endif()
set(PYSIDE_BASEDIR ${PYSIDE2_BASEDIR} CACHE PATH "Top level install of PySide2" FORCE) set(PYSIDE_BASEDIR
${PYSIDE2_BASEDIR}
CACHE PATH "Top level install of PySide2" FORCE
)
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
import os import os
import PySide2.QtCore as QtCore import PySide2.QtCore as QtCore
print(os.path.basename(QtCore.__file__).split('.', 1)[1]) print(os.path.basename(QtCore.__file__).split('.', 1)[1])
@@ -77,7 +71,8 @@ else()
) )
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
import os import os
import PySide2.QtCore as QtCore import PySide2.QtCore as QtCore
print(';'.join(map(str, QtCore.__version_info__))) print(';'.join(map(str, QtCore.__version_info__)))
@@ -103,10 +98,17 @@ else()
#PySide #PySide
#=============================================================================== #===============================================================================
find_path(PYSIDE_INCLUDE_DIR if(PYSIDE_CUSTOM_PREFIX STREQUAL "")
pyside.h set(PYSIDE_CUSTOM_PREFIX ${PYSIDE2_BASEDIR})
endif()
find_path(
PYSIDE_INCLUDE_DIR pyside.h
PATHS ${PYSIDE2_BASEDIR}/include ${PYSIDE_CUSTOM_PREFIX}/include/PySide2 PATHS ${PYSIDE2_BASEDIR}/include ${PYSIDE_CUSTOM_PREFIX}/include/PySide2
NO_DEFAULT_PATH) NO_DEFAULT_PATH
NO_CACHE
NO_SYSTEM_ENVIRONMENT_PATH
)
# Platform specific library names # Platform specific library names
if(MSVC) if(MSVC)
@@ -119,15 +121,17 @@ else()
set(PYSIDE_LIBRARY_BASENAMES "libpyside2.${PYSIDE2_SUFFIX}") set(PYSIDE_LIBRARY_BASENAMES "libpyside2.${PYSIDE2_SUFFIX}")
endif() endif()
find_file(PYSIDE_LIBRARY find_file(
${PYSIDE_LIBRARY_BASENAMES} PYSIDE_LIBRARY ${PYSIDE_LIBRARY_BASENAMES}
PATHS ${PYSIDE2_BASEDIR} ${PYSIDE_CUSTOM_PREFIX}/lib PATHS ${PYSIDE2_BASEDIR} ${PYSIDE_CUSTOM_PREFIX}/lib
NO_DEFAULT_PATH) NO_DEFAULT_PATH
)
find_path(PYSIDE_TYPESYSTEMS find_path(
typesystem_core.xml PYSIDE_TYPESYSTEMS typesystem_core.xml
PATHS ${PYSIDE2_BASEDIR}/typesystems ${PYSIDE_CUSTOM_PREFIX}/share/PySide2/typesystems PATHS ${PYSIDE2_BASEDIR}/typesystems ${PYSIDE_CUSTOM_PREFIX}/share/PySide2/typesystems
NO_DEFAULT_PATH) NO_DEFAULT_PATH
)
endif() endif()
if(PYSIDE2_FOUND) if(PYSIDE2_FOUND)
@@ -142,8 +146,10 @@ if(PYSIDE2_FOUND)
set_property(TARGET PySide2::pyside2 PROPERTY IMPORTED_IMPLIB ${PYSIDE_LIBRARY}) set_property(TARGET PySide2::pyside2 PROPERTY IMPORTED_IMPLIB ${PYSIDE_LIBRARY})
endif() endif()
set_property(TARGET PySide2::pyside2 PROPERTY IMPORTED_LOCATION ${PYSIDE_LIBRARY}) set_property(TARGET PySide2::pyside2 PROPERTY IMPORTED_LOCATION ${PYSIDE_LIBRARY})
set_property(TARGET PySide2::pyside2 APPEND PROPERTY set_property(
INTERFACE_INCLUDE_DIRECTORIES TARGET PySide2::pyside2
APPEND
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${PYSIDE_INCLUDE_DIR} ${PYSIDE_INCLUDE_DIR}
${PYSIDE_INCLUDE_DIR}/QtCore/ ${PYSIDE_INCLUDE_DIR}/QtCore/
${PYSIDE_INCLUDE_DIR}/QtGui/ ${PYSIDE_INCLUDE_DIR}/QtGui/
@@ -152,7 +158,8 @@ if(PYSIDE2_FOUND)
) )
endif() endif()
find_package_handle_standard_args(PySide2 find_package_handle_standard_args(
PySide2
REQUIRED_VARS PYSIDE2_BASEDIR PYSIDE_INCLUDE_DIR PYSIDE_LIBRARY PYSIDE_TYPESYSTEMS REQUIRED_VARS PYSIDE2_BASEDIR PYSIDE_INCLUDE_DIR PYSIDE_LIBRARY PYSIDE_TYPESYSTEMS
VERSION_VAR PYSIDE2_SO_VERSION VERSION_VAR PYSIDE2_SO_VERSION
) )

View File

@@ -1,5 +1,5 @@
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
@@ -20,7 +20,8 @@ list(GET Python3_LIBRARIES 0 PYTHON_LIBRARY_FILENAME)
get_filename_component(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARY_FILENAME} NAME) get_filename_component(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARY_FILENAME} NAME)
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
import os, sys import os, sys
try: try:
import PySide6.QtCore as QtCore import PySide6.QtCore as QtCore
@@ -33,17 +34,19 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
if(NOT PYSIDE6_BASEDIR) if(NOT PYSIDE6_BASEDIR)
message( message(FATAL_ERROR "The PySide6 module could not be imported. Make sure you have it installed "
FATAL_ERROR
"The PySide6 module could not be imported. Make sure you have it installed "
"by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\"" "by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\""
) )
endif() endif()
if(PYSIDE6_BASEDIR) if(PYSIDE6_BASEDIR)
set(PYSIDE_BASEDIR ${PYSIDE6_BASEDIR} CACHE PATH "Top level install of PySide6" FORCE) set(PYSIDE_BASEDIR
${PYSIDE6_BASEDIR}
CACHE PATH "Top level install of PySide6" FORCE
)
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
import os import os
import PySide6.QtCore as QtCore import PySide6.QtCore as QtCore
print(os.path.basename(QtCore.__file__).split('.', 1)[1]) print(os.path.basename(QtCore.__file__).split('.', 1)[1])
@@ -53,7 +56,8 @@ if(PYSIDE6_BASEDIR)
) )
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
import os import os
import PySide6.QtCore as QtCore import PySide6.QtCore as QtCore
print(';'.join(map(str, QtCore.__version_info__))) print(';'.join(map(str, QtCore.__version_info__)))
@@ -81,10 +85,11 @@ endif()
if(PYSIDE6_FOUND) if(PYSIDE6_FOUND)
#PySide #PySide
#=============================================================================== #===============================================================================
find_path(PYSIDE_INCLUDE_DIR find_path(
pyside.h PYSIDE_INCLUDE_DIR pyside.h
PATHS ${PYSIDE6_BASEDIR}/include ${PYSIDE_CUSTOM_PREFIX}/include/PySide6 PATHS ${PYSIDE6_BASEDIR}/include ${PYSIDE_CUSTOM_PREFIX}/include/PySide6
NO_DEFAULT_PATH) NO_DEFAULT_PATH
)
# Platform specific library names # Platform specific library names
if(MSVC) if(MSVC)
@@ -97,15 +102,17 @@ if(PYSIDE6_FOUND)
set(PYSIDE_LIBRARY_BASENAMES "libpyside6.${PYSIDE6_SUFFIX}") set(PYSIDE_LIBRARY_BASENAMES "libpyside6.${PYSIDE6_SUFFIX}")
endif() endif()
find_file(PYSIDE_LIBRARY find_file(
${PYSIDE_LIBRARY_BASENAMES} PYSIDE_LIBRARY ${PYSIDE_LIBRARY_BASENAMES}
PATHS ${PYSIDE6_BASEDIR} ${PYSIDE_CUSTOM_PREFIX}/lib PATHS ${PYSIDE6_BASEDIR} ${PYSIDE_CUSTOM_PREFIX}/lib
NO_DEFAULT_PATH) NO_DEFAULT_PATH
)
find_path(PYSIDE_TYPESYSTEMS find_path(
typesystem_core.xml PYSIDE_TYPESYSTEMS typesystem_core.xml
PATHS ${PYSIDE6_BASEDIR}/typesystems ${PYSIDE_CUSTOM_PREFIX}/share/PySide6/typesystems PATHS ${PYSIDE6_BASEDIR}/typesystems ${PYSIDE_CUSTOM_PREFIX}/share/PySide6/typesystems
NO_DEFAULT_PATH) NO_DEFAULT_PATH
)
endif() endif()
if(PYSIDE6_FOUND) if(PYSIDE6_FOUND)
@@ -120,8 +127,10 @@ if(PYSIDE6_FOUND)
set_property(TARGET PySide6::pyside6 PROPERTY IMPORTED_IMPLIB ${PYSIDE_LIBRARY}) set_property(TARGET PySide6::pyside6 PROPERTY IMPORTED_IMPLIB ${PYSIDE_LIBRARY})
endif() endif()
set_property(TARGET PySide6::pyside6 PROPERTY IMPORTED_LOCATION ${PYSIDE_LIBRARY}) set_property(TARGET PySide6::pyside6 PROPERTY IMPORTED_LOCATION ${PYSIDE_LIBRARY})
set_property(TARGET PySide6::pyside6 APPEND PROPERTY set_property(
INTERFACE_INCLUDE_DIRECTORIES TARGET PySide6::pyside6
APPEND
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${PYSIDE_INCLUDE_DIR} ${PYSIDE_INCLUDE_DIR}
${PYSIDE_INCLUDE_DIR}/QtCore/ ${PYSIDE_INCLUDE_DIR}/QtCore/
${PYSIDE_INCLUDE_DIR}/QtGui/ ${PYSIDE_INCLUDE_DIR}/QtGui/
@@ -130,7 +139,8 @@ if(PYSIDE6_FOUND)
) )
endif() endif()
find_package_handle_standard_args(PySide6 find_package_handle_standard_args(
PySide6
REQUIRED_VARS PYSIDE6_BASEDIR PYSIDE_INCLUDE_DIR PYSIDE_LIBRARY PYSIDE_TYPESYSTEMS REQUIRED_VARS PYSIDE6_BASEDIR PYSIDE_INCLUDE_DIR PYSIDE_LIBRARY PYSIDE_TYPESYSTEMS
VERSION_VAR PYSIDE6_SO_VERSION VERSION_VAR PYSIDE6_SO_VERSION
) )

View File

@@ -1,5 +1,5 @@
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
@@ -24,23 +24,15 @@ set(SHIBOKEN_FOUND FALSE)
if(SHIBOKEN2_PRIV_FOUND) if(SHIBOKEN2_PRIV_FOUND)
set(SHIBOKEN_FOUND TRUE) set(SHIBOKEN_FOUND TRUE)
message(STATUS "Using shiboken found in the system!") message(STATUS "Using shiboken found in the system!")
pkg_get_variable(SHIBOKEN_BINARY pkg_get_variable(SHIBOKEN_BINARY shiboken2 generator_location)
shiboken2 pkg_get_variable(SHIBOKEN_BASEDIR shiboken2 libdir)
generator_location pkg_get_variable(SHIBOKEN_INCLUDE_DIR shiboken2 includedir)
)
pkg_get_variable(SHIBOKEN_BASEDIR
shiboken2
libdir
)
pkg_get_variable(SHIBOKEN_INCLUDE_DIR
shiboken2
includedir
)
set(SHIBOKEN_VERSION ${SHIBOKEN2_PRIV_VERSION}) set(SHIBOKEN_VERSION ${SHIBOKEN2_PRIV_VERSION})
set(SHIBOKEN_LIBRARY ${SHIBOKEN2_PRIV_LINK_LIBRARIES}) set(SHIBOKEN_LIBRARY ${SHIBOKEN2_PRIV_LINK_LIBRARIES})
else() else()
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
import os import os
try: try:
import shiboken2_generator import shiboken2_generator
@@ -52,14 +44,13 @@ else()
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
if(NOT SHIBOKEN_GENERATOR_BASEDIR) if(NOT SHIBOKEN_GENERATOR_BASEDIR)
message( message(FATAL_ERROR "The shiboken2_generator module could not be imported. Make sure you have it installed "
FATAL_ERROR
"The shiboken2_generator module could not be imported. Make sure you have it installed "
"by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\"" "by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\""
) )
endif() endif()
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
import os import os
try: try:
import shiboken2 import shiboken2
@@ -71,14 +62,13 @@ else()
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
if(NOT SHIBOKEN_BASEDIR) if(NOT SHIBOKEN_BASEDIR)
message( message(FATAL_ERROR "The shiboken2 module could not be imported. Make sure you have it installed "
FATAL_ERROR
"The shiboken2 module could not be imported. Make sure you have it installed "
"by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\"" "by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\""
) )
endif() endif()
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
import os import os
import shiboken2 import shiboken2
print(';'.join(filter(None, map(str, shiboken2.__version_info__)))) print(';'.join(filter(None, map(str, shiboken2.__version_info__))))
@@ -91,15 +81,21 @@ else()
list(GET SHIBOKEN_VERSION 2 SHIBOKEN_MINOR_VERSION) list(GET SHIBOKEN_VERSION 2 SHIBOKEN_MINOR_VERSION)
string(REPLACE ";" "." SHIBOKEN_VERSION "${SHIBOKEN_VERSION}") string(REPLACE ";" "." SHIBOKEN_VERSION "${SHIBOKEN_VERSION}")
if(SHIBOKEN_CUSTOM_PREFIX STREQUAL "")
set(SHIBOKEN_CUSTOM_PREFIX ${SHIBOKEN_GENERATOR_BASEDIR})
endif()
message(STATUS "ShibokenGenerator base dir: ${SHIBOKEN_GENERATOR_BASEDIR}") message(STATUS "ShibokenGenerator base dir: ${SHIBOKEN_GENERATOR_BASEDIR}")
message(STATUS "Shiboken base dir: ${SHIBOKEN_BASEDIR}") message(STATUS "Shiboken base dir: ${SHIBOKEN_BASEDIR}")
message(STATUS "Shiboken custom path: ${SHIBOKEN_CUSTOM_PREFIX}") message(STATUS "Shiboken custom path: [${SHIBOKEN_CUSTOM_PREFIX}]")
if(SHIBOKEN_BASEDIR) if(SHIBOKEN_BASEDIR)
find_path(SHIBOKEN_INCLUDE_DIR find_path(
shiboken.h SHIBOKEN_INCLUDE_DIR shiboken.h
PATHS ${SHIBOKEN_CUSTOM_PREFIX} ${SHIBOKEN_GENERATOR_BASEDIR}/include PATHS ${SHIBOKEN_CUSTOM_PREFIX} ${SHIBOKEN_GENERATOR_BASEDIR}/include
NO_DEFAULT_PATH NO_DEFAULT_PATH
NO_CACHE
NO_SYSTEM_ENVIRONMENT_PATH
) )
if(MSVC) if(MSVC)
set(SHIBOKEN_LIBRARY_BASENAMES "shiboken2.abi3.lib") set(SHIBOKEN_LIBRARY_BASENAMES "shiboken2.abi3.lib")
@@ -109,15 +105,13 @@ else()
set(SHIBOKEN_LIBRARY_BASENAMES "libshiboken2.${PYSIDE2_SUFFIX}") set(SHIBOKEN_LIBRARY_BASENAMES "libshiboken2.${PYSIDE2_SUFFIX}")
elseif(APPLE) elseif(APPLE)
set(SHIBOKEN_LIBRARY_BASENAMES set(SHIBOKEN_LIBRARY_BASENAMES
libshiboken2.abi3.dylib libshiboken2.abi3.dylib libshiboken2.abi3.${SHIBOKEN_MACRO_VERSION}.dylib
libshiboken2.abi3.${SHIBOKEN_MACRO_VERSION}.dylib
libshiboken2.abi3.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}.dylib libshiboken2.abi3.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}.dylib
libshiboken2.abi3.${SHIBOKEN_VERSION}.dylib libshiboken2.abi3.${SHIBOKEN_VERSION}.dylib
) )
else() else()
set(SHIBOKEN_LIBRARY_BASENAMES set(SHIBOKEN_LIBRARY_BASENAMES
libshiboken2.abi3.so libshiboken2.abi3.so libshiboken2.abi3.so.${SHIBOKEN_MACRO_VERSION}
libshiboken2.abi3.so.${SHIBOKEN_MACRO_VERSION}
libshiboken2.abi3.so.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION} libshiboken2.abi3.so.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}
libshiboken2.abi3.so.${SHIBOKEN_VERSION} libshiboken2.abi3.so.${SHIBOKEN_VERSION}
) )
@@ -129,29 +123,35 @@ else()
set(SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_CUSTOM_PREFIX}) set(SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_CUSTOM_PREFIX})
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_BASEDIR}) list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_BASEDIR})
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_GENERATOR_BASEDIR}) list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_GENERATOR_BASEDIR})
find_file(SHIBOKEN_LIBRARY find_file(
${SHIBOKEN_LIBRARY_BASENAMES} SHIBOKEN_LIBRARY ${SHIBOKEN_LIBRARY_BASENAMES}
PATHS ${SHIBOKEN_SEARCH_PATHS} PATHS ${SHIBOKEN_SEARCH_PATHS}
NO_DEFAULT_PATH) NO_DEFAULT_PATH
)
find_program(SHIBOKEN_BINARY find_program(
shiboken2 SHIBOKEN_BINARY shiboken2
PATHS ${SHIBOKEN_SEARCH_PATHS} PATHS ${SHIBOKEN_SEARCH_PATHS}
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
endif() endif()
if(SHIBOKEN_INCLUDE_DIR AND SHIBOKEN_LIBRARY AND SHIBOKEN_BINARY) if(SHIBOKEN_INCLUDE_DIR
AND SHIBOKEN_LIBRARY
AND SHIBOKEN_BINARY
)
set(SHIBOKEN_FOUND TRUE) set(SHIBOKEN_FOUND TRUE)
endif() endif()
if(SHIBOKEN_FOUND) if(SHIBOKEN_FOUND)
endif() endif()
if(MSVC) if(MSVC)
# On Windows we must link to python3.dll that is a small library that links against python3x.dll # On Windows we must link to python3.dll that is a small library that links against python3x.dll
# that allow us to choose any python3x.dll at runtime # that allow us to choose any python3x.dll at runtime
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
for lib in '${Python3_LIBRARIES}'.split(';'): for lib in '${Python3_LIBRARIES}'.split(';'):
if '/' in lib: if '/' in lib:
prefix, py = lib.rsplit('/', 1) prefix, py = lib.rsplit('/', 1)
@@ -177,15 +177,18 @@ if(SHIBOKEN_FOUND)
# Create shiboke2 target # Create shiboke2 target
add_library(Shiboken2::libshiboken SHARED IMPORTED GLOBAL) add_library(Shiboken2::libshiboken SHARED IMPORTED GLOBAL)
if(MSVC) if(MSVC)
set_property(TARGET Shiboken2::libshiboken PROPERTY set_property(TARGET Shiboken2::libshiboken PROPERTY IMPORTED_IMPLIB ${SHIBOKEN_LIBRARY})
IMPORTED_IMPLIB ${SHIBOKEN_LIBRARY})
endif() endif()
set_property(TARGET Shiboken2::libshiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_LIBRARY}) set_property(TARGET Shiboken2::libshiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_LIBRARY})
set_property(TARGET Shiboken2::libshiboken APPEND PROPERTY set_property(
INTERFACE_INCLUDE_DIRECTORIES ${SHIBOKEN_INCLUDE_DIR} ${Python3_INCLUDE_DIRS} TARGET Shiboken2::libshiboken
APPEND
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SHIBOKEN_INCLUDE_DIR} ${Python3_INCLUDE_DIRS}
) )
set_property(TARGET Shiboken2::libshiboken APPEND PROPERTY set_property(
INTERFACE_LINK_LIBRARIES ${PYTHON_LIMITED_LIBRARIES} TARGET Shiboken2::libshiboken
APPEND
PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIMITED_LIBRARIES}
) )
# Generator target # Generator target
@@ -193,8 +196,8 @@ if(SHIBOKEN_FOUND)
set_property(TARGET Shiboken2::shiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_BINARY}) set_property(TARGET Shiboken2::shiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_BINARY})
endif() endif()
find_package_handle_standard_args(Shiboken2 find_package_handle_standard_args(
Shiboken2
REQUIRED_VARS SHIBOKEN_BASEDIR SHIBOKEN_INCLUDE_DIR SHIBOKEN_LIBRARY SHIBOKEN_BINARY REQUIRED_VARS SHIBOKEN_BASEDIR SHIBOKEN_INCLUDE_DIR SHIBOKEN_LIBRARY SHIBOKEN_BINARY
VERSION_VAR SHIBOKEN_VERSION VERSION_VAR SHIBOKEN_VERSION
) )

View File

@@ -1,5 +1,5 @@
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
@@ -17,7 +17,8 @@
set(SHIBOKEN_FOUND FALSE) set(SHIBOKEN_FOUND FALSE)
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
import os import os
try: try:
import shiboken6_generator import shiboken6_generator
@@ -29,14 +30,13 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
if(NOT SHIBOKEN_GENERATOR_BASEDIR) if(NOT SHIBOKEN_GENERATOR_BASEDIR)
message( message(FATAL_ERROR "The shiboken6_generator module could not be imported. Make sure you have it installed "
FATAL_ERROR
"The shiboken6_generator module could not be imported. Make sure you have it installed "
"by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\"" "by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\""
) )
endif() endif()
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
import os import os
try: try:
import shiboken6 import shiboken6
@@ -48,14 +48,13 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
if(NOT SHIBOKEN_BASEDIR) if(NOT SHIBOKEN_BASEDIR)
message( message(FATAL_ERROR "The shiboken6 module could not be imported. Make sure you have it installed "
FATAL_ERROR
"The shiboken6 module could not be imported. Make sure you have it installed "
"by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\"" "by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\""
) )
endif() endif()
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
import os import os
import shiboken6 import shiboken6
print(';'.join(filter(None, map(str, shiboken6.__version_info__)))) print(';'.join(filter(None, map(str, shiboken6.__version_info__))))
@@ -73,8 +72,8 @@ message(STATUS "Shiboken base dir: ${SHIBOKEN_BASEDIR}")
message(STATUS "Shiboken custom path: ${SHIBOKEN_CUSTOM_PREFIX}") message(STATUS "Shiboken custom path: ${SHIBOKEN_CUSTOM_PREFIX}")
if(SHIBOKEN_BASEDIR) if(SHIBOKEN_BASEDIR)
find_path(SHIBOKEN_INCLUDE_DIR find_path(
shiboken.h SHIBOKEN_INCLUDE_DIR shiboken.h
PATHS ${SHIBOKEN_CUSTOM_PREFIX} ${SHIBOKEN_GENERATOR_BASEDIR}/include PATHS ${SHIBOKEN_CUSTOM_PREFIX} ${SHIBOKEN_GENERATOR_BASEDIR}/include
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
@@ -86,15 +85,13 @@ if(SHIBOKEN_BASEDIR)
set(SHIBOKEN_LIBRARY_BASENAMES "libshiboken6.${PYSIDE2_SUFFIX}") set(SHIBOKEN_LIBRARY_BASENAMES "libshiboken6.${PYSIDE2_SUFFIX}")
elseif(APPLE) elseif(APPLE)
set(SHIBOKEN_LIBRARY_BASENAMES set(SHIBOKEN_LIBRARY_BASENAMES
libshiboken6.abi3.dylib libshiboken6.abi3.dylib libshiboken6.abi3.${SHIBOKEN_MACRO_VERSION}.dylib
libshiboken6.abi3.${SHIBOKEN_MACRO_VERSION}.dylib
libshiboken6.abi3.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}.dylib libshiboken6.abi3.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}.dylib
libshiboken6.abi3.${SHIBOKEN_VERSION}.dylib libshiboken6.abi3.${SHIBOKEN_VERSION}.dylib
) )
else() else()
set(SHIBOKEN_LIBRARY_BASENAMES set(SHIBOKEN_LIBRARY_BASENAMES
libshiboken6.abi3.so libshiboken6.abi3.so libshiboken6.abi3.so.${SHIBOKEN_MACRO_VERSION}
libshiboken6.abi3.so.${SHIBOKEN_MACRO_VERSION}
libshiboken6.abi3.so.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION} libshiboken6.abi3.so.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}
libshiboken6.abi3.so.${SHIBOKEN_VERSION} libshiboken6.abi3.so.${SHIBOKEN_VERSION}
) )
@@ -106,29 +103,35 @@ if(SHIBOKEN_BASEDIR)
set(SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_CUSTOM_PREFIX}) set(SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_CUSTOM_PREFIX})
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_BASEDIR}) list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_BASEDIR})
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_GENERATOR_BASEDIR}) list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_GENERATOR_BASEDIR})
find_file(SHIBOKEN_LIBRARY find_file(
${SHIBOKEN_LIBRARY_BASENAMES} SHIBOKEN_LIBRARY ${SHIBOKEN_LIBRARY_BASENAMES}
PATHS ${SHIBOKEN_SEARCH_PATHS} PATHS ${SHIBOKEN_SEARCH_PATHS}
NO_DEFAULT_PATH) NO_DEFAULT_PATH
)
find_program(SHIBOKEN_BINARY find_program(
shiboken6 SHIBOKEN_BINARY shiboken6
PATHS ${SHIBOKEN_SEARCH_PATHS} PATHS ${SHIBOKEN_SEARCH_PATHS}
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
endif() endif()
if(SHIBOKEN_INCLUDE_DIR AND SHIBOKEN_LIBRARY AND SHIBOKEN_BINARY) if(SHIBOKEN_INCLUDE_DIR
AND SHIBOKEN_LIBRARY
AND SHIBOKEN_BINARY
)
set(SHIBOKEN_FOUND TRUE) set(SHIBOKEN_FOUND TRUE)
endif() endif()
if(SHIBOKEN_FOUND) if(SHIBOKEN_FOUND)
endif() endif()
if(MSVC) if(MSVC)
# On Windows we must link to python3.dll that is a small library that links against python3x.dll # On Windows we must link to python3.dll that is a small library that links against python3x.dll
# that allow us to choose any python3x.dll at runtime # that allow us to choose any python3x.dll at runtime
execute_process( execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True: COMMAND
${Python3_EXECUTABLE} -c "if True:
for lib in '${Python3_LIBRARIES}'.split(';'): for lib in '${Python3_LIBRARIES}'.split(';'):
if '/' in lib: if '/' in lib:
prefix, py = lib.rsplit('/', 1) prefix, py = lib.rsplit('/', 1)
@@ -154,15 +157,18 @@ if(SHIBOKEN_FOUND)
# Create shiboken2 target # Create shiboken2 target
add_library(Shiboken6::libshiboken SHARED IMPORTED GLOBAL) add_library(Shiboken6::libshiboken SHARED IMPORTED GLOBAL)
if(MSVC) if(MSVC)
set_property(TARGET Shiboken6::libshiboken PROPERTY set_property(TARGET Shiboken6::libshiboken PROPERTY IMPORTED_IMPLIB ${SHIBOKEN_LIBRARY})
IMPORTED_IMPLIB ${SHIBOKEN_LIBRARY})
endif() endif()
set_property(TARGET Shiboken6::libshiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_LIBRARY}) set_property(TARGET Shiboken6::libshiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_LIBRARY})
set_property(TARGET Shiboken6::libshiboken APPEND PROPERTY set_property(
INTERFACE_INCLUDE_DIRECTORIES ${SHIBOKEN_INCLUDE_DIR} ${Python3_INCLUDE_DIRS} TARGET Shiboken6::libshiboken
APPEND
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SHIBOKEN_INCLUDE_DIR} ${Python3_INCLUDE_DIRS}
) )
set_property(TARGET Shiboken6::libshiboken APPEND PROPERTY set_property(
INTERFACE_LINK_LIBRARIES ${PYTHON_LIMITED_LIBRARIES} TARGET Shiboken6::libshiboken
APPEND
PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIMITED_LIBRARIES}
) )
# Generator target # Generator target
@@ -175,4 +181,3 @@ find_package_handle_standard_args(
REQUIRED_VARS SHIBOKEN_BASEDIR SHIBOKEN_INCLUDE_DIR SHIBOKEN_LIBRARY SHIBOKEN_BINARY REQUIRED_VARS SHIBOKEN_BASEDIR SHIBOKEN_INCLUDE_DIR SHIBOKEN_LIBRARY SHIBOKEN_BINARY
VERSION_VAR SHIBOKEN_VERSION VERSION_VAR SHIBOKEN_VERSION
) )

View File

@@ -1,5 +1,5 @@
# #
# SPDX-FileCopyrightText: 2012-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2012-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #

View File

@@ -1,5 +1,5 @@
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
@@ -7,7 +7,8 @@
if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX) if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX)
# cmake-lint: disable=C0103 # cmake-lint: disable=C0103
set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX
${CMAKE_INSTALL_PREFIX}
CACHE FILEPATH "Custom path to install python bindings." CACHE FILEPATH "Custom path to install python bindings."
) )
endif() endif()
@@ -91,7 +92,8 @@ endmacro()
# dependsArg - This var will be passed to add_custom_command(DEPENDS) so a new generation will be # dependsArg - This var will be passed to add_custom_command(DEPENDS) so a new generation will be
# trigger if one of these files changes # trigger if one of these files changes
# moduleOutputDir - Where the library file should be stored # moduleOutputDir - Where the library file should be stored
macro(create_python_bindings macro(
create_python_bindings
libraryName libraryName
typesystemPaths typesystemPaths
includePaths includePaths
@@ -101,12 +103,17 @@ macro(create_python_bindings
globalInclude globalInclude
typesystemXML typesystemXML
dependsArg dependsArg
moduleOutputDir) moduleOutputDir
)
# Transform the path separators into something shiboken understands. # Transform the path separators into something shiboken understands.
make_path(shiboken_include_dirs ${includePaths}) make_path(shiboken_include_dirs ${includePaths})
make_path(shiboken_typesystem_dirs ${typesystemPaths}) make_path(shiboken_typesystem_dirs ${typesystemPaths})
get_property(raw_python_dir_include_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES) get_property(
raw_python_dir_include_dirs
DIRECTORY
PROPERTY INCLUDE_DIRECTORIES
)
make_path(python_dir_include_dirs ${raw_python_dir_include_dirs}) make_path(python_dir_include_dirs ${raw_python_dir_include_dirs})
set(shiboken_include_dirs "${shiboken_include_dirs}${PATH_SEP}${python_dir_include_dirs}") set(shiboken_include_dirs "${shiboken_include_dirs}${PATH_SEP}${python_dir_include_dirs}")
@@ -119,13 +126,10 @@ macro(create_python_bindings
set_property(SOURCE ${outputSource} PROPERTY SKIP_AUTOGEN ON) set_property(SOURCE ${outputSource} PROPERTY SKIP_AUTOGEN ON)
add_custom_command( add_custom_command(
OUTPUT ${outputSource} OUTPUT ${outputSource}
COMMAND $<TARGET_PROPERTY:Shiboken2::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS} COMMAND
${globalInclude} $<TARGET_PROPERTY:Shiboken2::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS} ${globalInclude}
--include-paths=${shiboken_include_dirs} --include-paths=${shiboken_include_dirs} --typesystem-paths=${shiboken_typesystem_dirs}
--typesystem-paths=${shiboken_typesystem_dirs} ${shiboken_framework_include_dirs_option} --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${typesystemXML}
${shiboken_framework_include_dirs_option}
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
${typesystemXML}
DEPENDS ${typesystemXML} ${dependsArg} DEPENDS ${typesystemXML} ${dependsArg}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for ${libraryName} binding..." COMMENT "Running generator for ${libraryName} binding..."
@@ -136,8 +140,8 @@ macro(create_python_bindings
add_library(${TARGET_NAME} MODULE ${outputSource}) add_library(${TARGET_NAME} MODULE ${outputSource})
set_target_properties( set_target_properties(
${TARGET_NAME} PROPERTIES ${TARGET_NAME}
PREFIX "" PROPERTIES PREFIX ""
OUTPUT_NAME ${MODULE_NAME} OUTPUT_NAME ${MODULE_NAME}
LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir} LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir}
) )
@@ -153,18 +157,14 @@ macro(create_python_bindings
target_include_directories(${TARGET_NAME} PUBLIC ${targetIncludeDirs}) target_include_directories(${TARGET_NAME} PUBLIC ${targetIncludeDirs})
target_link_libraries( target_link_libraries(${TARGET_NAME} ${targetLinkLibraries} PySide2::pyside2 Shiboken2::libshiboken)
${TARGET_NAME}
${targetLinkLibraries}
PySide2::pyside2
Shiboken2::libshiboken
)
target_compile_definitions(${TARGET_NAME} PRIVATE Py_LIMITED_API=0x03050000) target_compile_definitions(${TARGET_NAME} PRIVATE Py_LIMITED_API=0x03050000)
if(APPLE) if(APPLE)
set_property(TARGET ${TARGET_NAME} APPEND PROPERTY LINK_FLAGS "-undefined dynamic_lookup") set_property(
endif() TARGET ${TARGET_NAME}
install( APPEND
TARGETS ${TARGET_NAME} PROPERTY LINK_FLAGS "-undefined dynamic_lookup"
LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}
) )
endif()
install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX})
endmacro() endmacro()

View File

@@ -1,5 +1,5 @@
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
@@ -7,7 +7,8 @@
if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX) if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX)
# cmake-lint: disable=C0103 # cmake-lint: disable=C0103
set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX
${CMAKE_INSTALL_PREFIX}
CACHE FILEPATH "Custom path to install python bindings." CACHE FILEPATH "Custom path to install python bindings."
) )
endif() endif()
@@ -91,7 +92,8 @@ endmacro()
# dependsArg - This var will be passed to add_custom_command(DEPENDS) so a new generation will be # dependsArg - This var will be passed to add_custom_command(DEPENDS) so a new generation will be
# trigger if one of these files changes # trigger if one of these files changes
# moduleOutputDir - Where the library file should be stored # moduleOutputDir - Where the library file should be stored
macro(create_python_bindings macro(
create_python_bindings
libraryName libraryName
typesystemPaths typesystemPaths
includePaths includePaths
@@ -101,12 +103,17 @@ macro(create_python_bindings
globalInclude globalInclude
typesystemXML typesystemXML
dependsArg dependsArg
moduleOutputDir) moduleOutputDir
)
# Transform the path separators into something shiboken understands. # Transform the path separators into something shiboken understands.
make_path(shiboken_include_dirs ${includePaths}) make_path(shiboken_include_dirs ${includePaths})
make_path(shiboken_typesystem_dirs ${typesystemPaths}) make_path(shiboken_typesystem_dirs ${typesystemPaths})
get_property(raw_python_dir_include_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES) get_property(
raw_python_dir_include_dirs
DIRECTORY
PROPERTY INCLUDE_DIRECTORIES
)
make_path(python_dir_include_dirs ${raw_python_dir_include_dirs}) make_path(python_dir_include_dirs ${raw_python_dir_include_dirs})
set(shiboken_include_dirs "${shiboken_include_dirs}${PATH_SEP}${python_dir_include_dirs}") set(shiboken_include_dirs "${shiboken_include_dirs}${PATH_SEP}${python_dir_include_dirs}")
@@ -119,13 +126,10 @@ macro(create_python_bindings
set_property(SOURCE ${outputSource} PROPERTY SKIP_AUTOGEN ON) set_property(SOURCE ${outputSource} PROPERTY SKIP_AUTOGEN ON)
add_custom_command( add_custom_command(
OUTPUT ${outputSource} OUTPUT ${outputSource}
COMMAND $<TARGET_PROPERTY:Shiboken6::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS} COMMAND
${globalInclude} $<TARGET_PROPERTY:Shiboken6::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS} ${globalInclude}
--include-paths=${shiboken_include_dirs} --include-paths=${shiboken_include_dirs} --typesystem-paths=${shiboken_typesystem_dirs}
--typesystem-paths=${shiboken_typesystem_dirs} ${shiboken_framework_include_dirs_option} --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${typesystemXML}
${shiboken_framework_include_dirs_option}
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
${typesystemXML}
DEPENDS ${typesystemXML} ${dependsArg} DEPENDS ${typesystemXML} ${dependsArg}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for ${libraryName} binding..." COMMENT "Running generator for ${libraryName} binding..."
@@ -136,8 +140,8 @@ macro(create_python_bindings
add_library(${TARGET_NAME} MODULE ${outputSource}) add_library(${TARGET_NAME} MODULE ${outputSource})
set_target_properties( set_target_properties(
${TARGET_NAME} PROPERTIES ${TARGET_NAME}
PREFIX "" PROPERTIES PREFIX ""
OUTPUT_NAME ${MODULE_NAME} OUTPUT_NAME ${MODULE_NAME}
LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir} LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir}
) )
@@ -153,18 +157,14 @@ macro(create_python_bindings
target_include_directories(${TARGET_NAME} PUBLIC ${targetIncludeDirs}) target_include_directories(${TARGET_NAME} PUBLIC ${targetIncludeDirs})
target_link_libraries( target_link_libraries(${TARGET_NAME} ${targetLinkLibraries} PySide6::pyside6 Shiboken6::libshiboken)
${TARGET_NAME}
${targetLinkLibraries}
PySide6::pyside6
Shiboken6::libshiboken
)
target_compile_definitions(${TARGET_NAME} PRIVATE Py_LIMITED_API=0x03050000) target_compile_definitions(${TARGET_NAME} PRIVATE Py_LIMITED_API=0x03050000)
if(APPLE) if(APPLE)
set_property(TARGET ${TARGET_NAME} APPEND PROPERTY LINK_FLAGS "-undefined dynamic_lookup") set_property(
endif() TARGET ${TARGET_NAME}
install( APPEND
TARGETS ${TARGET_NAME} PROPERTY LINK_FLAGS "-undefined dynamic_lookup"
LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}
) )
endif()
install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX})
endmacro() endmacro()

View File

@@ -1,5 +1,5 @@
# #
# SPDX-FileCopyrightText: 2016-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2016-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Allen Winter <allen.winter@kdab.com> # Author: Allen Winter <allen.winter@kdab.com>
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
@@ -46,7 +46,10 @@ foreach(qval ${VARS_LIST})
list(GET QVAL_LIST 1 path) list(GET QVAL_LIST 1 path)
endif() endif()
if(NOT ${var}) #if set already on the command line for example if(NOT ${var}) #if set already on the command line for example
set(${var} ${path} CACHE PATH "Qt install path for ${var}") set(${var}
${path}
CACHE PATH "Qt install path for ${var}"
)
endif() endif()
endif() endif()
endforeach() endforeach()

View File

@@ -1,148 +0,0 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"C_Cpp.default.compileCommands": "${workspaceFolder}/build-dev-qtquick/compile_commands.json",
"C_Cpp.default.cStandard": "c17",
"files.trimTrailingWhitespace": true,
"editor.formatOnType": true,
"C_Cpp.autocompleteAddParentheses": true,
"cmake.copyCompileCommands": "${workspaceFolder}/compile_commands.json"
},
"launch": {
"version": "0.2.0",
"configurations": [
{
"name": "gdb-kddockwidgets_customtitlebar_quick",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_customtitlebar_quick",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "gdb-kddockwidgets_example_mdi_quick",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_mdi_quick",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "gdb-kddockwidgets_example_quick",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_quick",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "gdb-tst_docks",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev-qtquick/bin/tst_docks",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "lldb-kddockwidgets_customtitlebar_quick",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_customtitlebar_quick",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "lldb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "lldb-kddockwidgets_example_mdi_quick",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_mdi_quick",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "lldb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "lldb-kddockwidgets_example_quick",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_quick",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "lldb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "lldb-tst_docks",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev-qtquick/bin/tst_docks",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "lldb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "msvc-kddockwidgets_customtitlebar_quick",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_customtitlebar_quick",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "msvc-kddockwidgets_example_mdi_quick",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_mdi_quick",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "msvc-kddockwidgets_example_quick",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_quick",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "msvc-tst_docks",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev-qtquick/bin/tst_docks",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false
}
]
}
}

View File

@@ -1,100 +0,0 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"C_Cpp.default.compileCommands": "${workspaceFolder}/build-dev/compile_commands.json",
"C_Cpp.default.cStandard": "c17",
"files.trimTrailingWhitespace": true,
"editor.formatOnType": true,
"C_Cpp.autocompleteAddParentheses": true,
"cmake.copyCompileCommands": "${workspaceFolder}/compile_commands.json"
},
"launch": {
"version": "0.2.0",
"configurations": [
{
"name": "kddockwidgets_example",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_example",
"args": [],
"cwd": "${workspaceFolder}"
},
{
"name": "kddockwidgets_minimal_example",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_example",
"args": [],
"cwd": "${workspaceFolder}"
},
{
"name": "kddockwidgets_minimal_mdi_example",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_mdi_example",
"args": [],
"cwd": "${workspaceFolder}"
},
{
"name": "kddockwidgets_mdi_with_docking_example",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_mdi_with_docking_example",
"args": [],
"cwd": "${workspaceFolder}"
},
{
"name": "tst_docks",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/build-dev/bin/tst_docks",
"args": [],
"cwd": "${workspaceFolder}"
},
{
"name": "msvc-kddockwidgets_example",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_example",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "msvc-kddockwidgets_minimal_example",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_example",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "msvc-kddockwidgets_minimal_mdi_example",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_mdi_example",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "msvc-tst_docks",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev/bin/tst_docks",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false
}
]
}
}

View File

@@ -1,148 +0,0 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"C_Cpp.default.compileCommands": "${workspaceFolder}/build-dev6/compile_commands.json",
"C_Cpp.default.cStandard": "c17",
"files.trimTrailingWhitespace": true,
"editor.formatOnType": true,
"C_Cpp.autocompleteAddParentheses": true,
"cmake.copyCompileCommands": "${workspaceFolder}/compile_commands.json"
},
"launch": {
"version": "0.2.0",
"configurations": [
{
"name": "gdb-kddockwidgets_example",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_example",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "gdb-kddockwidgets_minimal_example",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_example",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "gdb-kddockwidgets_minimal_mdi_example",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_mdi_example",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "gdb-tst_docks",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev6/bin/tst_docks",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "lldb-kddockwidgets_example",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_example",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "lldb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "lldb-kddockwidgets_minimal_example",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_example",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "lldb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "lldb-kddockwidgets_minimal_mdi_example",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_mdi_example",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "lldb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "lldb-tst_docks",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev6/bin/tst_docks",
"args": [],
"cwd": "${workspaceFolder}",
"MIMode": "lldb",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "msvc-kddockwidgets_example",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_example",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "msvc-kddockwidgets_minimal_example",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_example",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "msvc-kddockwidgets_minimal_mdi_example",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_mdi_example",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false
},
{
"name": "msvc-tst_docks",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dev6/bin/tst_docks",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false
}
]
}
}

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
# #
# Contact KDAB at <info@kdab.com> for commercial licensing options. # Contact KDAB at <info@kdab.com> for commercial licensing options.
@@ -12,7 +12,7 @@ from conans import ConanFile, CMake, tools
class KDDockWidgetsConan(ConanFile): class KDDockWidgetsConan(ConanFile):
name = "kddockwidgets" name = "kddockwidgets"
version = "1.6.95" version = "1.7.0"
default_user = "kdab" default_user = "kdab"
default_channel = "stable" default_channel = "stable"
license = ("https://raw.githubusercontent.com/KDAB/KDDockWidgets/master/LICENSES/GPL-2.0-only.txt", license = ("https://raw.githubusercontent.com/KDAB/KDDockWidgets/master/LICENSES/GPL-2.0-only.txt",

View File

@@ -0,0 +1,47 @@
@echo off
rem
rem This file is part of KDDockWidgets.
rem
rem SPDX-FileCopyrightText: 2022-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
rem
rem SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
rem
rem Contact KDAB at <info@kdab.com> for commercial licensing options.
rem
rem assumes the builddir is the workdir
rem assumes Qt is in PATH
rem %1 is the name of the deployment
if [%1] == [] (
echo "Usage: %~nx0 <deploymentName>"
goto theEnd
)
rem Prepare the deployDir
set "deploy=%1"
if exist %deploy% (
rmdir /Q /S %deploy%
)
mkdir %deploy%
rem Deploy programs
for %%s in (bin\*.dll bin\*_example.exe) do (
copy %%s %deploy% >nul
)
rem Deploy Qt
windeployqt --compiler-runtime %deploy%
rem Zip it
set zipFile=%cd%\%deploy%.7z
if exist %zipFile% (
del /F /Q %zipFile%
)
7z a %zipFile% %deploy%
rem Must echo this line exactly for the CI
echo Created zip file "%zipFile%" successfully
:theEnd
exit /b %ERRORLEVEL%

View File

@@ -1,3 +1,9 @@
kddockwidgets (1.7.0) release candidate; urgency=high
* 1.7.0 final
-- Allen Winter <allen.winter@kdab.com> Wed, 03 May 2023 15:00:00 -0500
kddockwidgets (1.6.0) release candidate; urgency=high kddockwidgets (1.6.0) release candidate; urgency=high
* 1.6.0 final * 1.6.0 final

View File

@@ -1,10 +1,10 @@
Format: 1.0 Format: 1.0
Source: kddockwidgets Source: kddockwidgets
Version: 1.6.0-1 Version: 1.7.0-1
Binary: kddockwidgets Binary: kddockwidgets
Maintainer: Allen Winter <allen.winter@kdab.com> Maintainer: Allen Winter <allen.winter@kdab.com>
Architecture: any Architecture: any
Build-Depends: debhelper (>=9), cdbs, cmake, qtbase5-dev, qtbase5-private-dev, libqt5x11extras5-dev, libfontconfig-dev, libfreetype-dev Build-Depends: debhelper (>=9), cdbs, cmake, qtbase5-dev, qtbase5-private-dev, libqt5x11extras5-dev, libfontconfig-dev, libfreetype-dev
Files: Files:
00000000000000000000000000000000 00000 qt5-kddockwidgets-1.6.0.tar.gz 00000000000000000000000000000000 00000 qt5-kddockwidgets-1.7.0.tar.gz

View File

@@ -1,5 +1,5 @@
Name: qt5-kddockwidgets Name: qt5-kddockwidgets
Version: 1.6.0 Version: 1.7.0
Release: 1 Release: 1
Summary: KDAB's Dock Widget Framework for Qt5 Summary: KDAB's Dock Widget Framework for Qt5
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
@@ -98,6 +98,8 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
%{_libdir}/libkddockwidgets.so %{_libdir}/libkddockwidgets.so
%changelog %changelog
* Wed May 03 2023 Allen Winter <allen.winter@kdab.com> 1.7.0
1.7.0 final
* Wed Sep 14 2022 Allen Winter <allen.winter@kdab.com> 1.6.0 * Wed Sep 14 2022 Allen Winter <allen.winter@kdab.com> 1.6.0
1.6.0 final 1.6.0 final
* Mon Nov 24 2021 Allen Winter <allen.winter@kdab.com> 1.5.0 * Mon Nov 24 2021 Allen Winter <allen.winter@kdab.com> 1.5.0

View File

@@ -1,10 +1,10 @@
Format: 1.0 Format: 1.0
Source: kddockwidgets Source: kddockwidgets
Version: 1.6.0-1 Version: 1.7.0-1
Binary: kddockwidgets Binary: kddockwidgets
Maintainer: Allen Winter <allen.winter@kdab.com> Maintainer: Allen Winter <allen.winter@kdab.com>
Architecture: any Architecture: any
Build-Depends: debhelper (>=9), cdbs, cmake, qt6-base-dev, qt6-base-private-dev, libgl1-mesa-dev, libfontconfig-dev, libfreetype-dev Build-Depends: debhelper (>=9), cdbs, cmake, qt6-base-dev, qt6-base-private-dev, libgl1-mesa-dev, libfontconfig-dev, libfreetype-dev
Files: Files:
00000000000000000000000000000000 00000 qt6-kddockwidgets-1.6.0.tar.gz 00000000000000000000000000000000 00000 qt6-kddockwidgets-1.7.0.tar.gz

View File

@@ -1,5 +1,5 @@
Name: qt6-kddockwidgets Name: qt6-kddockwidgets
Version: 1.6.0 Version: 1.7.0
Release: 1 Release: 1
Summary: KDAB's Dock Widget Framework for Qt6 Summary: KDAB's Dock Widget Framework for Qt6
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
@@ -92,6 +92,8 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DKDDockWidgets_QT6=True -DCMAKE_BUILD_TYPE=
%{_libdir}/libkddockwidgets-qt6.so %{_libdir}/libkddockwidgets-qt6.so
%changelog %changelog
* Wed May 03 2023 Allen Winter <allen.winter@kdab.com> 1.7.0
1.7.0 final
* Wed Sep 14 2022 Allen Winter <allen.winter@kdab.com> 1.6.0 * Wed Sep 14 2022 Allen Winter <allen.winter@kdab.com> 1.6.0
1.6.0 final 1.6.0 final
* Mon Nov 24 2021 Allen Winter <allen.winter@kdab.com> 1.5.0 * Mon Nov 24 2021 Allen Winter <allen.winter@kdab.com> 1.5.0

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sérgio Martins <sergio.martins@kdab.com> # Author: Sérgio Martins <sergio.martins@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Allen Winter <allen.winter@kdab.com> # Author: Allen Winter <allen.winter@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Allen Winter <allen.winter@kdab.com> # Author: Allen Winter <allen.winter@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
<hr> <hr>
<div style="float: left;"> <div style="float: left;">
<img src="kdab-logo-16x16.png"> <img src="kdab-logo-16x16.png">
<font style="font-weight: bold;">&copy; 2019-2022 Klar&auml;lvdalens Datakonsult AB (KDAB)</font> <font style="font-weight: bold;">&copy; 2019-2023 Klar&auml;lvdalens Datakonsult AB (KDAB)</font>
<br> <br>
"The Qt, C++ and OpenGL Experts"<br> "The Qt, C++ and OpenGL Experts"<br>
<a href="https://www.kdab.com/">https://www.kdab.com/</a> <a href="https://www.kdab.com/">https://www.kdab.com/</a>

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sergio Martins <sergio.martins@kdab.com> # Author: Sergio Martins <sergio.martins@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -121,6 +121,9 @@ MyMainWindow::MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowO
if (options & KDDockWidgets::MainWindowOption_HasCentralWidget) { if (options & KDDockWidgets::MainWindowOption_HasCentralWidget) {
setPersistentCentralWidget(new MyWidget1()); setPersistentCentralWidget(new MyWidget1());
} }
// optional, just for demo purposes regarding pressing Ctrl key to hide drop indicators
qApp->installEventFilter(this);
} }
MyMainWindow::~MyMainWindow() MyMainWindow::~MyMainWindow()
@@ -210,3 +213,26 @@ KDDockWidgets::DockWidgetBase *MyMainWindow::newDockWidget()
count++; count++;
return dock; return dock;
} }
bool MyMainWindow::eventFilter(QObject *obj, QEvent *ev)
{
// This event filter is just for examplify how to use the KDDW API to hide
// the drag indicators when ctrl is pressed
switch (ev->type()) {
case QEvent::KeyPress:
case QEvent::KeyRelease: {
auto kev = static_cast<QKeyEvent *>(ev);
if (kev->key() == Qt::Key_Control && qobject_cast<QWindow *>(obj)) {
const bool hideIndicators = ev->type() == QEvent::KeyPress;
KDDockWidgets::Config::self().setDropIndicatorsInhibited(hideIndicators);
}
}
break;
default:
break;
}
return KDDockWidgets::MainWindow::eventFilter(obj, ev);
}

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -27,6 +27,7 @@ public:
private: private:
void createDockWidgets(); void createDockWidgets();
bool eventFilter(QObject *obj, QEvent *ev) override;
KDDockWidgets::DockWidgetBase *newDockWidget(); KDDockWidgets::DockWidgetBase *newDockWidget();
QMenu *m_toggleMenu = nullptr; QMenu *m_toggleMenu = nullptr;
const bool m_dockWidget0IsNonClosable; const bool m_dockWidget0IsNonClosable;

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sergio Martins <sergio.martins@kdab.com> # Author: Sergio Martins <sergio.martins@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sergio Martins <sergio.martins@kdab.com> # Author: Sergio Martins <sergio.martins@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sergio Martins <sergio.martins@kdab.com> # Author: Sergio Martins <sergio.martins@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,6 +1,6 @@
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sergio Martins <sergio.martins@kdab.com> # Author: Sergio Martins <sergio.martins@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sergio Martins <sergio.martins@kdab.com> # Author: Sergio Martins <sergio.martins@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sergio Martins <sergio.martins@kdab.com> # Author: Sergio Martins <sergio.martins@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sergio Martins <sergio.martins@kdab.com> # Author: Sergio Martins <sergio.martins@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sergio Martins <sergio.martins@kdab.com> Author: Sergio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

BIN
images/kddockwidgets.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -32,11 +32,21 @@ find_package(Shiboken${PYSIDE_MAJOR_VERSION} REQUIRED)
find_package(PySide${PYSIDE_MAJOR_VERSION} ${QtWidgets_VERSION} EXACT REQUIRED) find_package(PySide${PYSIDE_MAJOR_VERSION} ${QtWidgets_VERSION} EXACT REQUIRED)
if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX) if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX)
set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # cmake-lint: disable=C0103
set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX
${INSTALL_LIBRARY_DIR}
CACHE FILEPATH "Custom path to install python bindings."
)
if(NOT WIN32)
set(Python3_VERSION_MAJORMINOR "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
set(BINDINGS_DIR "python${Python3_VERSION_MAJORMINOR}/site-packages/${PYTHON_BINDING_NAMESPACE}")
else()
set(BINDINGS_DIR "site-packages/${PYTHON_BINDING_NAMESPACE}")
endif()
set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX
"${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}/${BINDINGS_DIR}"
)
endif() endif()
set(Python3_VERSION_MAJORMINOR "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
set(BINDINGS_DIR "${INSTALL_LIBRARY_DIR}/python${Python3_VERSION_MAJORMINOR}/site-packages/${PYTHON_BINDING_NAMESPACE}")
set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX "${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}/${BINDINGS_DIR}")
include(KDPySide${PYSIDE_MAJOR_VERSION}ModuleBuild) include(KDPySide${PYSIDE_MAJOR_VERSION}ModuleBuild)
add_subdirectory(PyKDDockWidgets) add_subdirectory(PyKDDockWidgets)

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -88,17 +88,17 @@ class MyMainWindow(KDDockWidgets.MainWindow):
# pylint: disable=no-self-use # pylint: disable=no-self-use
def _saveLayout(self): def _saveLayout(self):
#saver = KDDockWidgets.LayoutSaver() # saver = KDDockWidgets.LayoutSaver()
#result = saver.saveToFile("mylayout.json") # result = saver.saveToFile("mylayout.json")
#print("Saving layout to disk. Result=", result) # print("Saving layout to disk. Result=", result)
print("Not available") print("Not available")
# pylint: disable=no-self-use # pylint: disable=no-self-use
def _restoreLayout(self): def _restoreLayout(self):
#options = KDDockWidgets.RestoreOption_None # options = KDDockWidgets.RestoreOption_None
# if self.restoreIsRelative: # if self.restoreIsRelative:
# options |= KDDockWidgets.RestoreOption_RelativeToMainWindow # options |= KDDockWidgets.RestoreOption_RelativeToMainWindow
#saver = KDDockWidgets.LayoutSaver(options) # saver = KDDockWidgets.LayoutSaver(options)
# saver.restoreFromFile("mylayout.json") # saver.restoreFromFile("mylayout.json")
print("Not available") print("Not available")

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -88,17 +88,17 @@ class MyMainWindow(KDDockWidgets.MainWindow):
# pylint: disable=no-self-use # pylint: disable=no-self-use
def _saveLayout(self): def _saveLayout(self):
#saver = KDDockWidgets.LayoutSaver() # saver = KDDockWidgets.LayoutSaver()
#result = saver.saveToFile("mylayout.json") # result = saver.saveToFile("mylayout.json")
#print("Saving layout to disk. Result=", result) # print("Saving layout to disk. Result=", result)
print("Not available") print("Not available")
# pylint: disable=no-self-use # pylint: disable=no-self-use
def _restoreLayout(self): def _restoreLayout(self):
#options = KDDockWidgets.RestoreOption_None # options = KDDockWidgets.RestoreOption_None
# if self.restoreIsRelative: # if self.restoreIsRelative:
# options |= KDDockWidgets.RestoreOption_RelativeToMainWindow # options |= KDDockWidgets.RestoreOption_RelativeToMainWindow
#saver = KDDockWidgets.LayoutSaver(options) # saver = KDDockWidgets.LayoutSaver(options)
# saver.restoreFromFile("mylayout.json") # saver.restoreFromFile("mylayout.json")
print("Not available") print("Not available")

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> # Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,6 +1,6 @@
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2021-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2021-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo <renato.araujo@kdab.com> # Author: Renato Araujo <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,6 +1,6 @@
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2021-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2021-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Renato Araujo <renato.araujo@kdab.com> # Author: Renato Araujo <renato.araujo@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
# #
# This file is part of KDDockWidgets. # This file is part of KDDockWidgets.
# #
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> # SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sergio Martins <sergio.martins@kdab.com> # Author: Sergio Martins <sergio.martins@kdab.com>
# #
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -318,7 +318,7 @@ elseif(
AND NOT ${PROJECT_NAME}_QT6 AND NOT ${PROJECT_NAME}_QT6
AND ${PROJECT_NAME}_X11EXTRAS AND ${PROJECT_NAME}_X11EXTRAS
) )
find_package(Qt${Qt_VERSION_MAJOR}X11Extras) find_package(Qt${Qt_VERSION_MAJOR}X11Extras CONFIG)
target_link_libraries(kddockwidgets PUBLIC Qt${Qt_VERSION_MAJOR}::X11Extras) target_link_libraries(kddockwidgets PUBLIC Qt${Qt_VERSION_MAJOR}::X11Extras)
endif() endif()

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -356,4 +356,9 @@ bool Config::dropIndicatorsInhibited() const
return d->m_dropIndicatorsInhibited; return d->m_dropIndicatorsInhibited;
} }
void Config::printDebug()
{
qDebug() << "Flags: " << d->m_flags << d->m_internalFlags;
}
} }

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -317,6 +317,9 @@ public:
void setMDIPopupThreshold(int); void setMDIPopupThreshold(int);
int mdiPopupThreshold() const; int mdiPopupThreshold() const;
/// Prints some debug information
void printDebug();
#ifdef KDDOCKWIDGETS_QTQUICK #ifdef KDDOCKWIDGETS_QTQUICK
///@brief Sets the QQmlEngine to use. Applicable only when using QtQuick. ///@brief Sets the QQmlEngine to use. Applicable only when using QtQuick.
void setQmlEngine(QQmlEngine *); void setQmlEngine(QQmlEngine *);

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/* /*
This file is part of KDDockWidgets. This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com> Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

Some files were not shown because too many files have changed in this diff Show More