Compare commits

..

90 Commits
1.6 ... 1.7

Author SHA1 Message Date
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
Sergio Martins
e98633b664 Remove unused variable, which fixes Windows build 2022-09-17 11:35:31 +01:00
Sergio Martins
290c0815e8 Update Changelog regarding issue #314 2022-09-16 18:42:11 +01:00
Sergio Martins
40d57e5000 Honour FloatingWindowFlag::DontUseParentForFloatingWindows 2022-09-16 18:42:11 +01:00
Sergio Martins
f2218f8ff3 Add Frame::requestedFloatingWindowFlags()
Just so we can share this bit of code without duplicating it
2022-09-16 18:42:11 +01:00
Sergio Martins
c070a11312 Remove FloatingWindowFlag::DontUseQtToolWindowsForFloatingWindows
UseQtTool and UseQtWindow have the same effect
2022-09-16 18:42:11 +01:00
Sergio Martins
7ac6a31512 Allow to specify Qt::Tool or Qt::Window per floating window 2022-09-16 18:42:11 +01:00
Sergio Martins
ef1226187d tests: Test DockWidgetBase::setFloatingWindowFlags() 2022-09-16 18:42:11 +01:00
Sergio Martins
757e57559a Add DockWidgetBase::setFloatingWindowFlags(flags)
So you can specify, per floating window, which flags you want
2022-09-16 18:42:11 +01:00
Sergio Martins
0bef7bc0e9 Load FloatingWindowFlags from disk with LayoutSaver
If a user specified different flags for a certain FloatingWindow,
they'll be reloaded when restored with LayoutSaver as well.
2022-09-16 18:42:11 +01:00
Sergio Martins
369437cbae Move FloatingWindow::Flag enum to KDDockWidgets namespace level 2022-09-16 18:42:11 +01:00
Sergio Martins
fd35fc26e6 Allow to specify which flags FloatingWindow should use 2022-09-16 18:42:11 +01:00
Sergio Martins
c2208b169e LayoutSaver: Store the floating window flags too 2022-09-16 18:42:11 +01:00
Sergio Martins
ff200950aa Isolate more Config flags in FloatingWindow 2022-09-16 18:42:11 +01:00
Sergio Martins
9916032981 Further isolate access to top-level Config in FloatingWindow
In preparation for per-floatingwindow flags
2022-09-16 18:42:11 +01:00
Sergio Martins
e6ccd9d01c Move TitleBar::supportsMinimize|MaximizeButton into FloatingWindow
Just a minor refactoring so FloatingWindow can save it during serialization.
So we can support per-floating window settings.
2022-09-16 18:42:11 +01:00
Allen Winter
3a3fedce3f pre-commit - update hooks versions 2022-09-16 12:55:56 -04:00
Allen Winter
5fdc1a14bc README-bindings.md - minor 2022-09-15 09:42:49 -04:00
Allen Winter
bced0a66c6 README-bindings.md - cleanup and improve 2022-09-15 09:22:57 -04:00
Allen Winter
fb63fdfd78 docs/api/Doxyfile.cmake - add README-bindings.md to INPUT 2022-09-15 09:12:01 -04:00
Allen Winter
b61c26669b cmake-format a bit prettier 2022-09-15 09:04:00 -04:00
Allen Winter
02316c2f72 CMakeLists.txt - set version pre 1.7.0 2022-09-15 09:02:36 -04:00
Sergio Martins
f531e8cb95 Bump ChangeLog and README to 1.7 2022-09-15 10:53:06 +01:00
332 changed files with 3217 additions and 12668 deletions

View File

@@ -49,7 +49,7 @@ with section("format"):
# If a positional argument group contains more than this many arguments, then
# force it to a vertical layout.
max_pargs_hwrap = 6
max_pargs_hwrap = 4
# If a cmdline positional group consumes more than this many lines without
# nesting, then invalidate the layout (and nest)
@@ -94,7 +94,8 @@ with section("format"):
keyword_case = 'upper'
# A list of command names which should always be wrapped
always_wrap = []
always_wrap = ["add_executable", "add_library",
"target_link_libraries", "target_include_directories", "install"]
# If true, the argument lists which are known to be sortable will be sorted
# lexicographicall
@@ -102,7 +103,7 @@ with section("format"):
# If true, the parsers may infer whether or not an argument list is sortable
# (without annotation).
autosort = False
autosort = True
# By default, if cmake-format cannot successfully fit everything into the
# desired linewidth it will apply the last, most agressive attempt that it

View File

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

View File

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

View File

@@ -5,22 +5,22 @@ Source: https://www.github.com/KDAB/KDDockWidgets
#misc source code
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
#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
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
#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/*
Copyright: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
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-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
License: BSD-3-Clause
#artwork
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
#3rdparty

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -63,11 +63,6 @@
# Build the layout linter.
# Ignored unless KDDockWidgets_DEVELOPER_MODE=True
# Default=true
#
# -DKDDockWidgets_FUZZER=[true|false]
# Build the fuzzer.
# Ignored unless KDDockWidgets_DEVELOPER_MODE=True
# Default=true
cmake_minimum_required(VERSION 3.12)
@@ -93,13 +88,13 @@ project(
)
set(${PROJECT_NAME}_VERSION_MAJOR 1)
set(${PROJECT_NAME}_VERSION_MINOR 6)
set(${PROJECT_NAME}_VERSION_PATCH 0)
set(${PROJECT_NAME}_VERSION_MINOR 7)
set(${PROJECT_NAME}_VERSION_PATCH 1)
set(${PROJECT_NAME}_VERSION
${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}
)
set(PROJECT_VERSION ${${PROJECT_NAME}_VERSION}) #PROJECT_VERSION is needed by some ECM modules
set(${PROJECT_NAME}_SOVERSION "1.6")
set(${PROJECT_NAME}_SOVERSION "1.7")
include(FeatureSummary)
@@ -133,7 +128,14 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
CACHE STRING "Choose the type of build." FORCE
)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
set_property(
CACHE CMAKE_BUILD_TYPE
PROPERTY STRINGS
"Debug"
"Release"
"MinSizeRel"
"RelWithDebInfo"
)
endif()
if(${PROJECT_NAME}_XLib)
@@ -346,29 +348,7 @@ if(${PROJECT_NAME}_TESTS)
if(${PROJECT_NAME}_DEVELOPER_MODE)
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_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
add_test(NAME tst_docks COMMAND tst_docks)
if(NOT ${PROJECT_NAME}_QTQUICK)
# tst_multisplitter depends on QWidget
@@ -387,4 +367,15 @@ if(${PROJECT_NAME}_IS_ROOT_PROJECT)
include(ECMUninstallTarget)
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)

View File

@@ -9,11 +9,10 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
"KDDockWidgets_FUZZER" : "OFF"
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
},
"warnings" : {
"uninitialized" : true
"warnings": {
"uninitialized": true
}
},
{
@@ -25,12 +24,11 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
"KDDockWidgets_FUZZER" : "OFF",
"ECM_ENABLE_SANITIZERS" : "'address;undefined'"
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"ECM_ENABLE_SANITIZERS": "'address;undefined'"
},
"warnings" : {
"uninitialized" : true
"warnings": {
"uninitialized": true
}
},
{
@@ -41,11 +39,11 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_WERROR": "ON",
"KDDockWidgets_EXAMPLES" : "OFF"
"KDDockWidgets_EXAMPLES": "OFF"
},
"environment": {
"CXX": "clazy",
"CCACHE_DISABLE" : "ON"
"CCACHE_DISABLE": "ON"
}
},
{
@@ -55,13 +53,13 @@
"binaryDir": "${sourceDir}/build-clazy-qtquick",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_EXAMPLES" : "OFF",
"KDDockWidgets_EXAMPLES": "OFF",
"KDDockWidgets_WERROR": "ON",
"KDDockWidgets_QTQUICK": "ON"
},
"environment": {
"CXX": "clazy",
"CCACHE_DISABLE" : "ON"
"CCACHE_DISABLE": "ON"
}
},
{
@@ -80,7 +78,7 @@
"binaryDir": "${sourceDir}/build-release-no-x11extras",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_X11EXTRAS" : "OFF"
"KDDockWidgets_X11EXTRAS": "OFF"
}
},
{
@@ -102,9 +100,8 @@
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_QTQUICK": "ON",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"ECM_ENABLE_SANITIZERS" : "'address;undefined'",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
"KDDockWidgets_FUZZER" : "OFF"
"ECM_ENABLE_SANITIZERS": "'address;undefined'",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
@@ -127,6 +124,17 @@
"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",
"displayName": "static-qtquick",
@@ -146,7 +154,7 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_QT6": "ON",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
},
"environment": {
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
@@ -161,9 +169,8 @@
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_QT6": "ON",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
"KDDockWidgets_FUZZER" : "OFF",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
},
"environment": {
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
@@ -178,10 +185,9 @@
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_QT6": "ON",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
"ECM_ENABLE_SANITIZERS" : "'address;undefined'",
"KDDockWidgets_FUZZER" : "OFF",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"ECM_ENABLE_SANITIZERS": "'address;undefined'",
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
},
"environment": {
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
@@ -195,8 +201,8 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_QTQUICK": "ON",
"KDDockWidgets_QT6": "ON",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
"KDDockWidgets_QT6": "ON",
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
},
"environment": {
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
@@ -210,16 +216,16 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_QTQUICK": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"ECM_ENABLE_SANITIZERS" : "'address;undefined'",
"KDDockWidgets_QT6": "ON",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"ECM_ENABLE_SANITIZERS": "'address;undefined'",
"KDDockWidgets_QT6": "ON",
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
},
"environment": {
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}",
"QML2_IMPORT_PATH" : "$env{QT6_DIR}/imports:$env{QT6_DIR}/qml",
"LD_LIBRARY_PATH" : "$env{QT6_DIR}/lib"
"QML2_IMPORT_PATH": "$env{QT6_DIR}/imports:$env{QT6_DIR}/qml",
"LD_LIBRARY_PATH": "$env{QT6_DIR}/lib"
}
},
{
@@ -230,11 +236,10 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
"KDDockWidgets_FUZZER" : "ON"
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
},
"warnings" : {
"uninitialized" : true
"warnings": {
"uninitialized": true
},
"environment": {
"CC": "clang-cl",
@@ -249,11 +254,10 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"KDDockWidgets_FUZZER" : "OFF",
"KDDockWidgets_QTQUICK": "ON"
},
"warnings" : {
"uninitialized" : true
"warnings": {
"uninitialized": true
},
"environment": {
"CC": "clang-cl",
@@ -268,12 +272,11 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"KDDockWidgets_FUZZER" : "ON",
"KDDockWidgets_QT6": "ON",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
},
"warnings" : {
"uninitialized" : true
"warnings": {
"uninitialized": true
},
"environment": {
"CC": "clang-cl",
@@ -289,20 +292,19 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"KDDockWidgets_FUZZER" : "OFF",
"KDDockWidgets_QTQUICK": "ON",
"KDDockWidgets_QT6": "ON",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
},
"warnings" : {
"uninitialized" : true
"warnings": {
"uninitialized": true
},
"environment": {
"CC": "clang-cl",
"CXX": "clang-cl",
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}",
"QML2_IMPORT_PATH" : "$env{QT6_DIR}/imports:$env{QT6_DIR}/qml",
"LD_LIBRARY_PATH" : "$env{QT6_DIR}/lib"
"QML2_IMPORT_PATH": "$env{QT6_DIR}/imports:$env{QT6_DIR}/qml",
"LD_LIBRARY_PATH": "$env{QT6_DIR}/lib"
}
},
{
@@ -313,18 +315,17 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
"KDDockWidgets_FUZZER" : "OFF",
"CMAKE_C_FLAGS_INIT" : "-ftime-trace",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_C_FLAGS_INIT": "-ftime-trace",
"CMAKE_CXX_FLAGS_INIT": "-ftime-trace"
},
"warnings" : {
"uninitialized" : true
"warnings": {
"uninitialized": true
},
"environment": {
"CC": "clang",
"CXX": "clang++",
"CCACHE_DISABLE" : "ON"
"CCACHE_DISABLE": "ON"
}
},
{
@@ -335,19 +336,18 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
"KDDockWidgets_FUZZER" : "OFF",
"KDDockWidgets_QT6" : "ON",
"CMAKE_C_FLAGS_INIT" : "-ftime-trace",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"KDDockWidgets_QT6": "ON",
"CMAKE_C_FLAGS_INIT": "-ftime-trace",
"CMAKE_CXX_FLAGS_INIT": "-ftime-trace"
},
"warnings" : {
"uninitialized" : true
"warnings": {
"uninitialized": true
},
"environment": {
"CC": "clang",
"CXX": "clang++",
"CCACHE_DISABLE" : "ON"
"CCACHE_DISABLE": "ON"
}
},
{
@@ -448,17 +448,23 @@
},
{
"name": "ci-static",
"inherits":["static"],
"inherits": [
"static"
],
"binaryDir": "${sourceDir}/build-ci-static"
},
{
"name": "ci-static-qtquick",
"inherits":["static-qtquick"],
"inherits": [
"static-qtquick"
],
"binaryDir": "${sourceDir}/build-ci-static-qtquick"
},
{
"name": "ci-python",
"inherits":["python"],
"inherits": [
"python"
],
"binaryDir": "${sourceDir}/build-python"
}
],
@@ -467,16 +473,16 @@
"name": "clazy",
"configurePreset": "clazy",
"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",
"CCACHE_DISABLE" : "ON"
"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"
}
},
{
"name": "clazy-qtquick",
"configurePreset": "clazy-qtquick",
"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",
"CCACHE_DISABLE" : "ON"
"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"
}
}
]

View File

@@ -1,3 +1,22 @@
* 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
FloatingWindows to have different window flags. For example, some having
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)
- Minimum Qt6 version is now 6.2.0
- Minimum CMake version is now 3.12.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
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:
GNU General Public License version 2.0 (see LICENSES/GPL-2.0-only.txt)
or the

View File

@@ -1,19 +1,3 @@
# KDDockWidgets and QtQuick
## Supported Qt versions and toolchains
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.
Please use branch 2.0 for QtQuick support.

View File

@@ -2,48 +2,90 @@
These are the instructions for building the Python bindings for KDDockWidgets.
Currently unsupported:
- debug builds
- builds against Qt debug libraries
- static builds
- python2 bindings
- only some 32-bit platforms are supported. see <https://wiki.qt.io/Qt_for_Python>
Also, there are no plans to support the qmake buildsystem.
## Prerequisites
You will need:
- a compiler with C++14 support (C++17 for Qt6 builds)
- Python3.7 or higher
- Qt5 version 5.12 or higher
- Qt6 version 6.2 or higher
- QtForPython provided by the Qt project.
## Install PySide2 for Qt5
Make sure you have PySide2, shiboken2 and shiboken2-generator installed.
As this time, you cannot get shiboken2-generator because the wheels are not on PyPi.
To use the wheels do this:
```bash
% pip3 install \
% python3 -m pip install \
--index-url=http://download.qt.io/official_releases/QtForPython/ \
--trusted-host download.qt.io \
shiboken2 pyside2 shiboken2_generator
```
For more info visit <https://doc.qt.io/qtforpython/shiboken2/gettingstarted.html>.
For more info visit <https://doc.qt.io/qtforpython/shiboken2/gettingstarted.html>
afterwards run:
```bash
python3 -m pip list | grep PySide
```
afterwards run 'pip3 list | grep PySide2'
Note the version *must* match the same Qt you intend to use when building KDDockWidgets.
Not supported:
## Install PySide6 for Qt6
- debug builds
- static builds
- python2 bindings
- only some 32-bit platforms are supported (see <https://wiki.qt.io/Qt_for_Python>)
Follow the same instructions as [the previous section](#Install PySide2 for Qt5),
except installing `shiboken6 pyside6 shiboken6_generator` with pip.
Tell CMake to build the bindings by passing the `-DKDDockWidgets_PYTHON_BINDINGS=True' option,
followed by the make command.
## Building KDDockWidgets Python Bindings
The bindings will be installed to the passed `-DCMAKE_INSTALL_PREFIX`, which
might require setting the `PYTHONPATH` env variable to point to that path when
running applications. Alternatively, configure the bindings install location
by passing `-DKDDockWidgets_PYTHON_BINDINGS_INSTALL_PREFIX=/usr/lib/python3.8/site-packages`
to CMake (adjust to the python path on your system).
Tell CMake to build the bindings by passing the `-DKDDockWidgets_PYTHON_BINDINGS=True' option.
Then run `cmake --build` as usual.
The bindings will be installed to `CMAKE_INSTALL_PREFIX`, which might require setting
the `PYTHONPATH` env variable to point to that path when running applications.
For example, if you install to the default location on linux you would:
```bash
export PYTHONPATH=/usr/local/KDAB/KDDockWidgets-1.7.0/lib64/python3.10/site-packages
```
Alternatively, configure the bindings install location by passing (for example)
`-DKDDockWidgets_PYTHON_BINDINGS_INSTALL_PREFIX=/usr/lib/python3.8/site-packages` to CMake
and adjust to the PYTHONPATH accordingly, as necessary.
To run the KDDW python example
```bash
export PYTHONPATH=/kddw/install/path # Only if needed
export PYTHONPATH=/usr/local/KDAB/KDDockWidgets-1.7.0/lib64/python3.10/site-packages # adapt as needed
cd python/examples/
rcc -g python -o rc_assets.py ../../examples/dockwidgets/resources_example.qrc
python3 main.py
```
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"
then first mROUBLESHOOTINGake sure you have llvm installed. If you still have problems try

View File

@@ -2,6 +2,8 @@
[![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
> 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
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
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
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
- 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
- Not mixing GUI with state with logic with animations
- 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
- Reordering tabs with mouse
- Partial layout save/restore, affecting only a chosen sub-set
@@ -152,7 +156,7 @@ ongoing effort to make KDDW support multiple "frontends" (QtWidgets, QtQuick and
like flutter).
1.x will be supported for many years to come, at least for bug fixes and small features.
Use `v1.5.0` tag for the latest stable. `v1.6.0` will be released soon, so branch `1.6` is also safe.
Use `v1.6.0` tag for the latest stable.
Use `2.0` if you need non-QtWidgets support, for example `QtQuick/QML`. While `1.6` has support for `QtQuick/QML`
it won't be receiving bug fixes. `2.0` is under active development, you might encounter minor source/ABI
@@ -184,7 +188,7 @@ headers.
## 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).
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>
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -23,18 +23,9 @@ set(PYSIDE2_FOUND FALSE)
if(PYSIDE2_PRIV_FOUND)
set(PYSIDE2_FOUND TRUE)
message(STATUS "Using PySide2 found in the system!")
pkg_get_variable(SHIBOKEN_BINARY
pyside2
generator_location
)
pkg_get_variable(PYSIDE2_BASEDIR
pyside2
typesystemdir
)
pkg_get_variable(PYSIDE_INCLUDE_DIR
pyside2
includedir
)
pkg_get_variable(SHIBOKEN_BINARY pyside2 generator_location)
pkg_get_variable(PYSIDE2_BASEDIR pyside2 typesystemdir)
pkg_get_variable(PYSIDE_INCLUDE_DIR pyside2 includedir)
set(PYSIDE_TYPESYSTEMS ${PYSIDE2_BASEDIR})
set(PYSIDE2_SO_VERSION ${PYSIDE2_PRIV_VERSION})
set(PYSIDE_LIBRARY ${PYSIDE2_PRIV_LINK_LIBRARIES})
@@ -45,7 +36,8 @@ else()
get_filename_component(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARY_FILENAME} NAME)
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
import os, sys
try:
import PySide2.QtCore as QtCore
@@ -58,16 +50,18 @@ else()
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT PYSIDE2_BASEDIR)
message(
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\""
message(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\""
)
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(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
import os
import PySide2.QtCore as QtCore
print(os.path.basename(QtCore.__file__).split('.', 1)[1])
@@ -77,7 +71,8 @@ else()
)
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
import os
import PySide2.QtCore as QtCore
print(';'.join(map(str, QtCore.__version_info__)))
@@ -103,10 +98,17 @@ else()
#PySide
#===============================================================================
find_path(PYSIDE_INCLUDE_DIR
pyside.h
if(PYSIDE_CUSTOM_PREFIX STREQUAL "")
set(PYSIDE_CUSTOM_PREFIX ${PYSIDE2_BASEDIR})
endif()
find_path(
PYSIDE_INCLUDE_DIR pyside.h
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
if(MSVC)
@@ -119,15 +121,17 @@ else()
set(PYSIDE_LIBRARY_BASENAMES "libpyside2.${PYSIDE2_SUFFIX}")
endif()
find_file(PYSIDE_LIBRARY
${PYSIDE_LIBRARY_BASENAMES}
find_file(
PYSIDE_LIBRARY ${PYSIDE_LIBRARY_BASENAMES}
PATHS ${PYSIDE2_BASEDIR} ${PYSIDE_CUSTOM_PREFIX}/lib
NO_DEFAULT_PATH)
NO_DEFAULT_PATH
)
find_path(PYSIDE_TYPESYSTEMS
typesystem_core.xml
find_path(
PYSIDE_TYPESYSTEMS typesystem_core.xml
PATHS ${PYSIDE2_BASEDIR}/typesystems ${PYSIDE_CUSTOM_PREFIX}/share/PySide2/typesystems
NO_DEFAULT_PATH)
NO_DEFAULT_PATH
)
endif()
if(PYSIDE2_FOUND)
@@ -142,17 +146,20 @@ if(PYSIDE2_FOUND)
set_property(TARGET PySide2::pyside2 PROPERTY IMPORTED_IMPLIB ${PYSIDE_LIBRARY})
endif()
set_property(TARGET PySide2::pyside2 PROPERTY IMPORTED_LOCATION ${PYSIDE_LIBRARY})
set_property(TARGET PySide2::pyside2 APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES
${PYSIDE_INCLUDE_DIR}
${PYSIDE_INCLUDE_DIR}/QtCore/
${PYSIDE_INCLUDE_DIR}/QtGui/
${PYSIDE_INCLUDE_DIR}/QtWidgets/
${Python3_INCLUDE_DIRS}
set_property(
TARGET PySide2::pyside2
APPEND
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${PYSIDE_INCLUDE_DIR}
${PYSIDE_INCLUDE_DIR}/QtCore/
${PYSIDE_INCLUDE_DIR}/QtGui/
${PYSIDE_INCLUDE_DIR}/QtWidgets/
${Python3_INCLUDE_DIRS}
)
endif()
find_package_handle_standard_args(PySide2
find_package_handle_standard_args(
PySide2
REQUIRED_VARS PYSIDE2_BASEDIR PYSIDE_INCLUDE_DIR PYSIDE_LIBRARY PYSIDE_TYPESYSTEMS
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>
#
# 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)
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
import os, sys
try:
import PySide6.QtCore as QtCore
@@ -33,17 +34,19 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT PYSIDE6_BASEDIR)
message(
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\""
message(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\""
)
endif()
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(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
import os
import PySide6.QtCore as QtCore
print(os.path.basename(QtCore.__file__).split('.', 1)[1])
@@ -53,7 +56,8 @@ if(PYSIDE6_BASEDIR)
)
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
import os
import PySide6.QtCore as QtCore
print(';'.join(map(str, QtCore.__version_info__)))
@@ -81,10 +85,11 @@ endif()
if(PYSIDE6_FOUND)
#PySide
#===============================================================================
find_path(PYSIDE_INCLUDE_DIR
pyside.h
find_path(
PYSIDE_INCLUDE_DIR pyside.h
PATHS ${PYSIDE6_BASEDIR}/include ${PYSIDE_CUSTOM_PREFIX}/include/PySide6
NO_DEFAULT_PATH)
NO_DEFAULT_PATH
)
# Platform specific library names
if(MSVC)
@@ -97,15 +102,17 @@ if(PYSIDE6_FOUND)
set(PYSIDE_LIBRARY_BASENAMES "libpyside6.${PYSIDE6_SUFFIX}")
endif()
find_file(PYSIDE_LIBRARY
${PYSIDE_LIBRARY_BASENAMES}
find_file(
PYSIDE_LIBRARY ${PYSIDE_LIBRARY_BASENAMES}
PATHS ${PYSIDE6_BASEDIR} ${PYSIDE_CUSTOM_PREFIX}/lib
NO_DEFAULT_PATH)
NO_DEFAULT_PATH
)
find_path(PYSIDE_TYPESYSTEMS
typesystem_core.xml
find_path(
PYSIDE_TYPESYSTEMS typesystem_core.xml
PATHS ${PYSIDE6_BASEDIR}/typesystems ${PYSIDE_CUSTOM_PREFIX}/share/PySide6/typesystems
NO_DEFAULT_PATH)
NO_DEFAULT_PATH
)
endif()
if(PYSIDE6_FOUND)
@@ -120,17 +127,20 @@ if(PYSIDE6_FOUND)
set_property(TARGET PySide6::pyside6 PROPERTY IMPORTED_IMPLIB ${PYSIDE_LIBRARY})
endif()
set_property(TARGET PySide6::pyside6 PROPERTY IMPORTED_LOCATION ${PYSIDE_LIBRARY})
set_property(TARGET PySide6::pyside6 APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES
${PYSIDE_INCLUDE_DIR}
${PYSIDE_INCLUDE_DIR}/QtCore/
${PYSIDE_INCLUDE_DIR}/QtGui/
${PYSIDE_INCLUDE_DIR}/QtWidgets/
${Python3_INCLUDE_DIRS}
set_property(
TARGET PySide6::pyside6
APPEND
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${PYSIDE_INCLUDE_DIR}
${PYSIDE_INCLUDE_DIR}/QtCore/
${PYSIDE_INCLUDE_DIR}/QtGui/
${PYSIDE_INCLUDE_DIR}/QtWidgets/
${Python3_INCLUDE_DIRS}
)
endif()
find_package_handle_standard_args(PySide6
find_package_handle_standard_args(
PySide6
REQUIRED_VARS PYSIDE6_BASEDIR PYSIDE_INCLUDE_DIR PYSIDE_LIBRARY PYSIDE_TYPESYSTEMS
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>
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -24,23 +24,15 @@ set(SHIBOKEN_FOUND FALSE)
if(SHIBOKEN2_PRIV_FOUND)
set(SHIBOKEN_FOUND TRUE)
message(STATUS "Using shiboken found in the system!")
pkg_get_variable(SHIBOKEN_BINARY
shiboken2
generator_location
)
pkg_get_variable(SHIBOKEN_BASEDIR
shiboken2
libdir
)
pkg_get_variable(SHIBOKEN_INCLUDE_DIR
shiboken2
includedir
)
pkg_get_variable(SHIBOKEN_BINARY shiboken2 generator_location)
pkg_get_variable(SHIBOKEN_BASEDIR shiboken2 libdir)
pkg_get_variable(SHIBOKEN_INCLUDE_DIR shiboken2 includedir)
set(SHIBOKEN_VERSION ${SHIBOKEN2_PRIV_VERSION})
set(SHIBOKEN_LIBRARY ${SHIBOKEN2_PRIV_LINK_LIBRARIES})
else()
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
import os
try:
import shiboken2_generator
@@ -52,14 +44,13 @@ else()
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT SHIBOKEN_GENERATOR_BASEDIR)
message(
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\""
message(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\""
)
endif()
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
import os
try:
import shiboken2
@@ -71,14 +62,13 @@ else()
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT SHIBOKEN_BASEDIR)
message(
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\""
message(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\""
)
endif()
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
import os
import shiboken2
print(';'.join(filter(None, map(str, shiboken2.__version_info__))))
@@ -91,15 +81,21 @@ else()
list(GET SHIBOKEN_VERSION 2 SHIBOKEN_MINOR_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 "Shiboken base dir: ${SHIBOKEN_BASEDIR}")
message(STATUS "Shiboken custom path: ${SHIBOKEN_CUSTOM_PREFIX}")
message(STATUS "Shiboken custom path: [${SHIBOKEN_CUSTOM_PREFIX}]")
if(SHIBOKEN_BASEDIR)
find_path(SHIBOKEN_INCLUDE_DIR
shiboken.h
find_path(
SHIBOKEN_INCLUDE_DIR shiboken.h
PATHS ${SHIBOKEN_CUSTOM_PREFIX} ${SHIBOKEN_GENERATOR_BASEDIR}/include
NO_DEFAULT_PATH
NO_CACHE
NO_SYSTEM_ENVIRONMENT_PATH
)
if(MSVC)
set(SHIBOKEN_LIBRARY_BASENAMES "shiboken2.abi3.lib")
@@ -109,15 +105,13 @@ else()
set(SHIBOKEN_LIBRARY_BASENAMES "libshiboken2.${PYSIDE2_SUFFIX}")
elseif(APPLE)
set(SHIBOKEN_LIBRARY_BASENAMES
libshiboken2.abi3.dylib
libshiboken2.abi3.${SHIBOKEN_MACRO_VERSION}.dylib
libshiboken2.abi3.dylib libshiboken2.abi3.${SHIBOKEN_MACRO_VERSION}.dylib
libshiboken2.abi3.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}.dylib
libshiboken2.abi3.${SHIBOKEN_VERSION}.dylib
)
else()
set(SHIBOKEN_LIBRARY_BASENAMES
libshiboken2.abi3.so
libshiboken2.abi3.so.${SHIBOKEN_MACRO_VERSION}
libshiboken2.abi3.so libshiboken2.abi3.so.${SHIBOKEN_MACRO_VERSION}
libshiboken2.abi3.so.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}
libshiboken2.abi3.so.${SHIBOKEN_VERSION}
)
@@ -129,29 +123,35 @@ else()
set(SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_CUSTOM_PREFIX})
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_BASEDIR})
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_GENERATOR_BASEDIR})
find_file(SHIBOKEN_LIBRARY
${SHIBOKEN_LIBRARY_BASENAMES}
find_file(
SHIBOKEN_LIBRARY ${SHIBOKEN_LIBRARY_BASENAMES}
PATHS ${SHIBOKEN_SEARCH_PATHS}
NO_DEFAULT_PATH)
NO_DEFAULT_PATH
)
find_program(SHIBOKEN_BINARY
shiboken2
find_program(
SHIBOKEN_BINARY shiboken2
PATHS ${SHIBOKEN_SEARCH_PATHS}
NO_DEFAULT_PATH
)
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)
endif()
if(SHIBOKEN_FOUND)
endif()
if(MSVC)
# 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
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
for lib in '${Python3_LIBRARIES}'.split(';'):
if '/' in lib:
prefix, py = lib.rsplit('/', 1)
@@ -177,15 +177,18 @@ if(SHIBOKEN_FOUND)
# Create shiboke2 target
add_library(Shiboken2::libshiboken SHARED IMPORTED GLOBAL)
if(MSVC)
set_property(TARGET Shiboken2::libshiboken PROPERTY
IMPORTED_IMPLIB ${SHIBOKEN_LIBRARY})
set_property(TARGET Shiboken2::libshiboken PROPERTY IMPORTED_IMPLIB ${SHIBOKEN_LIBRARY})
endif()
set_property(TARGET Shiboken2::libshiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_LIBRARY})
set_property(TARGET Shiboken2::libshiboken APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${SHIBOKEN_INCLUDE_DIR} ${Python3_INCLUDE_DIRS}
set_property(
TARGET Shiboken2::libshiboken
APPEND
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SHIBOKEN_INCLUDE_DIR} ${Python3_INCLUDE_DIRS}
)
set_property(TARGET Shiboken2::libshiboken APPEND PROPERTY
INTERFACE_LINK_LIBRARIES ${PYTHON_LIMITED_LIBRARIES}
set_property(
TARGET Shiboken2::libshiboken
APPEND
PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIMITED_LIBRARIES}
)
# Generator target
@@ -193,8 +196,8 @@ if(SHIBOKEN_FOUND)
set_property(TARGET Shiboken2::shiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_BINARY})
endif()
find_package_handle_standard_args(Shiboken2
find_package_handle_standard_args(
Shiboken2
REQUIRED_VARS SHIBOKEN_BASEDIR SHIBOKEN_INCLUDE_DIR SHIBOKEN_LIBRARY SHIBOKEN_BINARY
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>
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -17,7 +17,8 @@
set(SHIBOKEN_FOUND FALSE)
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
import os
try:
import shiboken6_generator
@@ -29,14 +30,13 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT SHIBOKEN_GENERATOR_BASEDIR)
message(
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\""
message(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\""
)
endif()
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
import os
try:
import shiboken6
@@ -48,14 +48,13 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT SHIBOKEN_BASEDIR)
message(
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\""
message(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\""
)
endif()
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
import os
import shiboken6
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}")
if(SHIBOKEN_BASEDIR)
find_path(SHIBOKEN_INCLUDE_DIR
shiboken.h
find_path(
SHIBOKEN_INCLUDE_DIR shiboken.h
PATHS ${SHIBOKEN_CUSTOM_PREFIX} ${SHIBOKEN_GENERATOR_BASEDIR}/include
NO_DEFAULT_PATH
)
@@ -86,15 +85,13 @@ if(SHIBOKEN_BASEDIR)
set(SHIBOKEN_LIBRARY_BASENAMES "libshiboken6.${PYSIDE2_SUFFIX}")
elseif(APPLE)
set(SHIBOKEN_LIBRARY_BASENAMES
libshiboken6.abi3.dylib
libshiboken6.abi3.${SHIBOKEN_MACRO_VERSION}.dylib
libshiboken6.abi3.dylib libshiboken6.abi3.${SHIBOKEN_MACRO_VERSION}.dylib
libshiboken6.abi3.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}.dylib
libshiboken6.abi3.${SHIBOKEN_VERSION}.dylib
)
else()
set(SHIBOKEN_LIBRARY_BASENAMES
libshiboken6.abi3.so
libshiboken6.abi3.so.${SHIBOKEN_MACRO_VERSION}
libshiboken6.abi3.so libshiboken6.abi3.so.${SHIBOKEN_MACRO_VERSION}
libshiboken6.abi3.so.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}
libshiboken6.abi3.so.${SHIBOKEN_VERSION}
)
@@ -106,29 +103,35 @@ if(SHIBOKEN_BASEDIR)
set(SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_CUSTOM_PREFIX})
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_BASEDIR})
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_GENERATOR_BASEDIR})
find_file(SHIBOKEN_LIBRARY
${SHIBOKEN_LIBRARY_BASENAMES}
find_file(
SHIBOKEN_LIBRARY ${SHIBOKEN_LIBRARY_BASENAMES}
PATHS ${SHIBOKEN_SEARCH_PATHS}
NO_DEFAULT_PATH)
NO_DEFAULT_PATH
)
find_program(SHIBOKEN_BINARY
shiboken6
find_program(
SHIBOKEN_BINARY shiboken6
PATHS ${SHIBOKEN_SEARCH_PATHS}
NO_DEFAULT_PATH
)
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)
endif()
if(SHIBOKEN_FOUND)
endif()
if(MSVC)
# 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
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "if True:
COMMAND
${Python3_EXECUTABLE} -c "if True:
for lib in '${Python3_LIBRARIES}'.split(';'):
if '/' in lib:
prefix, py = lib.rsplit('/', 1)
@@ -154,15 +157,18 @@ if(SHIBOKEN_FOUND)
# Create shiboken2 target
add_library(Shiboken6::libshiboken SHARED IMPORTED GLOBAL)
if(MSVC)
set_property(TARGET Shiboken6::libshiboken PROPERTY
IMPORTED_IMPLIB ${SHIBOKEN_LIBRARY})
set_property(TARGET Shiboken6::libshiboken PROPERTY IMPORTED_IMPLIB ${SHIBOKEN_LIBRARY})
endif()
set_property(TARGET Shiboken6::libshiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_LIBRARY})
set_property(TARGET Shiboken6::libshiboken APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${SHIBOKEN_INCLUDE_DIR} ${Python3_INCLUDE_DIRS}
set_property(
TARGET Shiboken6::libshiboken
APPEND
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SHIBOKEN_INCLUDE_DIR} ${Python3_INCLUDE_DIRS}
)
set_property(TARGET Shiboken6::libshiboken APPEND PROPERTY
INTERFACE_LINK_LIBRARIES ${PYTHON_LIMITED_LIBRARIES}
set_property(
TARGET Shiboken6::libshiboken
APPEND
PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIMITED_LIBRARIES}
)
# Generator target
@@ -175,4 +181,3 @@ find_package_handle_standard_args(
REQUIRED_VARS SHIBOKEN_BASEDIR SHIBOKEN_INCLUDE_DIR SHIBOKEN_LIBRARY SHIBOKEN_BINARY
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
#

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>
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -7,7 +7,8 @@
if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX)
# 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."
)
endif()
@@ -91,7 +92,8 @@ endmacro()
# dependsArg - This var will be passed to add_custom_command(DEPENDS) so a new generation will be
# trigger if one of these files changes
# moduleOutputDir - Where the library file should be stored
macro(create_python_bindings
macro(
create_python_bindings
libraryName
typesystemPaths
includePaths
@@ -101,12 +103,17 @@ macro(create_python_bindings
globalInclude
typesystemXML
dependsArg
moduleOutputDir)
moduleOutputDir
)
# Transform the path separators into something shiboken understands.
make_path(shiboken_include_dirs ${includePaths})
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})
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)
add_custom_command(
OUTPUT ${outputSource}
COMMAND $<TARGET_PROPERTY:Shiboken2::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS}
${globalInclude}
--include-paths=${shiboken_include_dirs}
--typesystem-paths=${shiboken_typesystem_dirs}
${shiboken_framework_include_dirs_option}
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
${typesystemXML}
COMMAND
$<TARGET_PROPERTY:Shiboken2::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS} ${globalInclude}
--include-paths=${shiboken_include_dirs} --typesystem-paths=${shiboken_typesystem_dirs}
${shiboken_framework_include_dirs_option} --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${typesystemXML}
DEPENDS ${typesystemXML} ${dependsArg}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for ${libraryName} binding..."
@@ -136,10 +140,10 @@ macro(create_python_bindings
add_library(${TARGET_NAME} MODULE ${outputSource})
set_target_properties(
${TARGET_NAME} PROPERTIES
PREFIX ""
OUTPUT_NAME ${MODULE_NAME}
LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir}
${TARGET_NAME}
PROPERTIES PREFIX ""
OUTPUT_NAME ${MODULE_NAME}
LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir}
)
if(APPLE)
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path")
@@ -153,18 +157,14 @@ macro(create_python_bindings
target_include_directories(${TARGET_NAME} PUBLIC ${targetIncludeDirs})
target_link_libraries(
${TARGET_NAME}
${targetLinkLibraries}
PySide2::pyside2
Shiboken2::libshiboken
)
target_link_libraries(${TARGET_NAME} ${targetLinkLibraries} PySide2::pyside2 Shiboken2::libshiboken)
target_compile_definitions(${TARGET_NAME} PRIVATE Py_LIMITED_API=0x03050000)
if(APPLE)
set_property(TARGET ${TARGET_NAME} APPEND PROPERTY LINK_FLAGS "-undefined dynamic_lookup")
set_property(
TARGET ${TARGET_NAME}
APPEND
PROPERTY LINK_FLAGS "-undefined dynamic_lookup"
)
endif()
install(
TARGETS ${TARGET_NAME}
LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}
)
install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX})
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>
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -7,7 +7,8 @@
if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX)
# 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."
)
endif()
@@ -91,7 +92,8 @@ endmacro()
# dependsArg - This var will be passed to add_custom_command(DEPENDS) so a new generation will be
# trigger if one of these files changes
# moduleOutputDir - Where the library file should be stored
macro(create_python_bindings
macro(
create_python_bindings
libraryName
typesystemPaths
includePaths
@@ -101,12 +103,17 @@ macro(create_python_bindings
globalInclude
typesystemXML
dependsArg
moduleOutputDir)
moduleOutputDir
)
# Transform the path separators into something shiboken understands.
make_path(shiboken_include_dirs ${includePaths})
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})
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)
add_custom_command(
OUTPUT ${outputSource}
COMMAND $<TARGET_PROPERTY:Shiboken6::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS}
${globalInclude}
--include-paths=${shiboken_include_dirs}
--typesystem-paths=${shiboken_typesystem_dirs}
${shiboken_framework_include_dirs_option}
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
${typesystemXML}
COMMAND
$<TARGET_PROPERTY:Shiboken6::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS} ${globalInclude}
--include-paths=${shiboken_include_dirs} --typesystem-paths=${shiboken_typesystem_dirs}
${shiboken_framework_include_dirs_option} --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${typesystemXML}
DEPENDS ${typesystemXML} ${dependsArg}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for ${libraryName} binding..."
@@ -136,10 +140,10 @@ macro(create_python_bindings
add_library(${TARGET_NAME} MODULE ${outputSource})
set_target_properties(
${TARGET_NAME} PROPERTIES
PREFIX ""
OUTPUT_NAME ${MODULE_NAME}
LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir}
${TARGET_NAME}
PROPERTIES PREFIX ""
OUTPUT_NAME ${MODULE_NAME}
LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir}
)
if(APPLE)
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path")
@@ -153,18 +157,14 @@ macro(create_python_bindings
target_include_directories(${TARGET_NAME} PUBLIC ${targetIncludeDirs})
target_link_libraries(
${TARGET_NAME}
${targetLinkLibraries}
PySide6::pyside6
Shiboken6::libshiboken
)
target_link_libraries(${TARGET_NAME} ${targetLinkLibraries} PySide6::pyside6 Shiboken6::libshiboken)
target_compile_definitions(${TARGET_NAME} PRIVATE Py_LIMITED_API=0x03050000)
if(APPLE)
set_property(TARGET ${TARGET_NAME} APPEND PROPERTY LINK_FLAGS "-undefined dynamic_lookup")
set_property(
TARGET ${TARGET_NAME}
APPEND
PROPERTY LINK_FLAGS "-undefined dynamic_lookup"
)
endif()
install(
TARGETS ${TARGET_NAME}
LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}
)
install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX})
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>
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -46,7 +46,10 @@ foreach(qval ${VARS_LIST})
list(GET QVAL_LIST 1 path)
endif()
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()
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.
#
# 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
#
# Contact KDAB at <info@kdab.com> for commercial licensing options.
@@ -12,7 +12,7 @@ from conans import ConanFile, CMake, tools
class KDDockWidgetsConan(ConanFile):
name = "kddockwidgets"
version = "1.6.0"
version = "1.7.0"
default_user = "kdab"
default_channel = "stable"
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
* 1.6.0 final

View File

@@ -1,10 +1,10 @@
Format: 1.0
Source: kddockwidgets
Version: 1.6.0-1
Version: 1.7.0-1
Binary: kddockwidgets
Maintainer: Allen Winter <allen.winter@kdab.com>
Architecture: any
Build-Depends: debhelper (>=9), cdbs, cmake, qtbase5-dev, qtbase5-private-dev, libqt5x11extras5-dev, libfontconfig-dev, libfreetype-dev
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
Version: 1.6.0
Version: 1.7.0
Release: 1
Summary: KDAB's Dock Widget Framework for Qt5
Source0: %{name}-%{version}.tar.gz
@@ -98,6 +98,8 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
%{_libdir}/libkddockwidgets.so
%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
1.6.0 final
* Mon Nov 24 2021 Allen Winter <allen.winter@kdab.com> 1.5.0

View File

@@ -1,10 +1,10 @@
Format: 1.0
Source: kddockwidgets
Version: 1.6.0-1
Version: 1.7.0-1
Binary: kddockwidgets
Maintainer: Allen Winter <allen.winter@kdab.com>
Architecture: any
Build-Depends: debhelper (>=9), cdbs, cmake, qt6-base-dev, qt6-base-private-dev, libgl1-mesa-dev, libfontconfig-dev, libfreetype-dev
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
Version: 1.6.0
Version: 1.7.0
Release: 1
Summary: KDAB's Dock Widget Framework for Qt6
Source0: %{name}-%{version}.tar.gz
@@ -92,6 +92,8 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DKDDockWidgets_QT6=True -DCMAKE_BUILD_TYPE=
%{_libdir}/libkddockwidgets-qt6.so
%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
1.6.0 final
* 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.
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -79,5 +79,11 @@ set(QCH_INSTALL_DIR
${INSTALL_DOC_DIR}
CACHE STRING "Install location of Qt Assistant help files."
)
install(FILES ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch DESTINATION ${QCH_INSTALL_DIR})
install(FILES ${DOXYGEN_OUTPUT_DIR}/kddockwidgets.tags DESTINATION ${INSTALL_DOC_DIR})
install(
FILES ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch
DESTINATION ${QCH_INSTALL_DIR}
)
install(
FILES ${DOXYGEN_OUTPUT_DIR}/kddockwidgets.tags
DESTINATION ${INSTALL_DOC_DIR}
)

View File

@@ -845,6 +845,7 @@ WARN_LOGFILE = doxygen.log
# Note: If this tag is empty the current directory is searched.
INPUT = "@CMAKE_SOURCE_DIR@/README.md" \
"@CMAKE_SOURCE_DIR@/README-bindings.md" \
"@CMAKE_SOURCE_DIR@/src"
# This tag can be used to specify the character encoding of the source files

View File

@@ -1,7 +1,7 @@
<hr>
<div style="float: left;">
<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>
"The Qt, C++ and OpenGL Experts"<br>
<a href="https://www.kdab.com/">https://www.kdab.com/</a>

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -25,7 +25,15 @@ endif()
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_example.qrc)
add_executable(
kddockwidgets_example main.cpp MyFrameworkWidgetFactory.cpp MyMainWindow.cpp MyWidget.cpp ${RESOURCES_EXAMPLE_SRC}
kddockwidgets_example
${RESOURCES_EXAMPLE_SRC}
main.cpp
MyFrameworkWidgetFactory.cpp
MyMainWindow.cpp
MyWidget.cpp
)
target_link_libraries(kddockwidgets_example PRIVATE KDAB::kddockwidgets)
target_link_libraries(
kddockwidgets_example
PRIVATE KDAB::kddockwidgets
)

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
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) {
setPersistentCentralWidget(new MyWidget1());
}
// optional, just for demo purposes regarding pressing Ctrl key to hide drop indicators
qApp->installEventFilter(this);
}
MyMainWindow::~MyMainWindow()
@@ -210,3 +213,26 @@ KDDockWidgets::DockWidgetBase *MyMainWindow::newDockWidget()
count++;
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.
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -27,6 +27,7 @@ public:
private:
void createDockWidgets();
bool eventFilter(QObject *obj, QEvent *ev) override;
KDDockWidgets::DockWidgetBase *newDockWidget();
QMenu *m_toggleMenu = nullptr;
const bool m_dockWidget0IsNonClosable;

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -27,6 +27,12 @@ set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/resources_e
# Just to reuse MyWidget.h
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/)
add_executable(kddockwidgets_mdi_with_docking_example main.cpp ../dockwidgets/MyWidget.cpp ${RESOURCES_EXAMPLE_SRC})
add_executable(
kddockwidgets_mdi_with_docking_example
${RESOURCES_EXAMPLE_SRC} ../dockwidgets/MyWidget.cpp main.cpp
)
target_link_libraries(kddockwidgets_mdi_with_docking_example PRIVATE KDAB::kddockwidgets)
target_link_libraries(
kddockwidgets_mdi_with_docking_example
PRIVATE KDAB::kddockwidgets
)

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -27,6 +27,12 @@ set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/resources_e
# Just to reuse MyWidget.h
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/)
add_executable(kddockwidgets_minimal_mdi_example main.cpp ../dockwidgets/MyWidget.cpp ${RESOURCES_EXAMPLE_SRC})
add_executable(
kddockwidgets_minimal_mdi_example
${RESOURCES_EXAMPLE_SRC} ../dockwidgets/MyWidget.cpp main.cpp
)
target_link_libraries(kddockwidgets_minimal_mdi_example PRIVATE KDAB::kddockwidgets)
target_link_libraries(
kddockwidgets_minimal_mdi_example
PRIVATE KDAB::kddockwidgets
)

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -24,6 +24,12 @@ endif()
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/resources_example.qrc)
add_executable(kddockwidgets_minimal_example main.cpp ../dockwidgets/MyWidget.cpp ${RESOURCES_EXAMPLE_SRC})
add_executable(
kddockwidgets_minimal_example
${RESOURCES_EXAMPLE_SRC} ../dockwidgets/MyWidget.cpp main.cpp
)
target_link_libraries(kddockwidgets_minimal_example PRIVATE KDAB::kddockwidgets)
target_link_libraries(
kddockwidgets_minimal_example
PRIVATE KDAB::kddockwidgets
)

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,6 +1,6 @@
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -26,6 +26,12 @@ set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_qtquick_example.
${CMAKE_CURRENT_SOURCE_DIR}/../../dockwidgets/resources_example.qrc
)
add_executable(kddockwidgets_customtitlebar_quick main.cpp ${RESOURCES_EXAMPLE_SRC})
add_executable(
kddockwidgets_customtitlebar_quick
${RESOURCES_EXAMPLE_SRC} main.cpp
)
target_link_libraries(kddockwidgets_customtitlebar_quick PRIVATE KDAB::kddockwidgets)
target_link_libraries(
kddockwidgets_customtitlebar_quick
PRIVATE KDAB::kddockwidgets
)

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -26,6 +26,12 @@ set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_qtquick_example.
${CMAKE_CURRENT_SOURCE_DIR}/../../dockwidgets/resources_example.qrc
)
add_executable(kddockwidgets_example_quick main.cpp ${RESOURCES_EXAMPLE_SRC})
add_executable(
kddockwidgets_example_quick
${RESOURCES_EXAMPLE_SRC} main.cpp
)
target_link_libraries(kddockwidgets_example_quick PRIVATE KDAB::kddockwidgets)
target_link_libraries(
kddockwidgets_example_quick
PRIVATE KDAB::kddockwidgets
)

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -26,6 +26,12 @@ set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_qtquick_mdi_exam
${CMAKE_CURRENT_SOURCE_DIR}/../../dockwidgets/resources_example.qrc
)
add_executable(kddockwidgets_example_mdi_quick main.cpp ${RESOURCES_EXAMPLE_SRC})
add_executable(
kddockwidgets_example_mdi_quick
${RESOURCES_EXAMPLE_SRC} main.cpp
)
target_link_libraries(kddockwidgets_example_mdi_quick PRIVATE KDAB::kddockwidgets)
target_link_libraries(
kddockwidgets_example_mdi_quick
PRIVATE KDAB::kddockwidgets
)

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
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.
#
# 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>
#
# 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)
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()
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)
add_subdirectory(PyKDDockWidgets)

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -43,14 +43,21 @@ set(PyKDDockWidgets_typesystem_paths # PySide path, this variable was exposed by
set(PyKDDockWidgets_target_include_directories ${CMAKE_SOURCE_DIR}/src)
# Libraries that will be necessary to link the target, this will used in the command 'target_link_libraries'
set(PyKDDockWidgets_target_link_libraries KDAB::kddockwidgets Qt${Qt_VERSION_MAJOR}::Core Qt${Qt_VERSION_MAJOR}::Gui
Qt${Qt_VERSION_MAJOR}::Widgets ${Python3_LIBRARIES}
set(PyKDDockWidgets_target_link_libraries
KDAB::kddockwidgets
Qt${Qt_VERSION_MAJOR}::Core
Qt${Qt_VERSION_MAJOR}::Gui
Qt${Qt_VERSION_MAJOR}::Widgets
${Python3_LIBRARIES}
)
# changes on these files should trigger a new generation
set(PyKDDockWidgets_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/kddockwidgets_global.h ${CMAKE_SOURCE_DIR}/src/DockWidgetBase.h
${CMAKE_SOURCE_DIR}/src/DockWidget.h ${CMAKE_SOURCE_DIR}/src/MainWindowBase.h ${CMAKE_SOURCE_DIR}/src/MainWindow.h
${CMAKE_CURRENT_SOURCE_DIR}/kddockwidgets_global.h
${CMAKE_SOURCE_DIR}/src/DockWidgetBase.h
${CMAKE_SOURCE_DIR}/src/DockWidget.h
${CMAKE_SOURCE_DIR}/src/MainWindowBase.h
${CMAKE_SOURCE_DIR}/src/MainWindow.h
${CMAKE_SOURCE_DIR}/src/LayoutSaver.h
)
@@ -71,8 +78,9 @@ create_python_bindings(
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.cmake ${CMAKE_CURRENT_BINARY_DIR}/__init__.py @ONLY)
# install
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/__init__.py $<TARGET_FILE:KDAB::kddockwidgets>
DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/__init__.py $<TARGET_FILE:KDAB::kddockwidgets>
DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}
)
if(NOT WIN32)
install(FILES $<TARGET_LINKER_FILE:KDAB::kddockwidgets> $<TARGET_SONAME_FILE:KDAB::kddockwidgets>

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# 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
def _saveLayout(self):
#saver = KDDockWidgets.LayoutSaver()
#result = saver.saveToFile("mylayout.json")
#print("Saving layout to disk. Result=", result)
# saver = KDDockWidgets.LayoutSaver()
# result = saver.saveToFile("mylayout.json")
# print("Saving layout to disk. Result=", result)
print("Not available")
# pylint: disable=no-self-use
def _restoreLayout(self):
#options = KDDockWidgets.RestoreOption_None
# options = KDDockWidgets.RestoreOption_None
# if self.restoreIsRelative:
# options |= KDDockWidgets.RestoreOption_RelativeToMainWindow
#saver = KDDockWidgets.LayoutSaver(options)
# saver = KDDockWidgets.LayoutSaver(options)
# saver.restoreFromFile("mylayout.json")
print("Not available")

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# 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
def _saveLayout(self):
#saver = KDDockWidgets.LayoutSaver()
#result = saver.saveToFile("mylayout.json")
#print("Saving layout to disk. Result=", result)
# saver = KDDockWidgets.LayoutSaver()
# result = saver.saveToFile("mylayout.json")
# print("Saving layout to disk. Result=", result)
print("Not available")
# pylint: disable=no-self-use
def _restoreLayout(self):
#options = KDDockWidgets.RestoreOption_None
# options = KDDockWidgets.RestoreOption_None
# if self.restoreIsRelative:
# options |= KDDockWidgets.RestoreOption_RelativeToMainWindow
#saver = KDDockWidgets.LayoutSaver(options)
# saver = KDDockWidgets.LayoutSaver(options)
# saver.restoreFromFile("mylayout.json")
print("Not available")

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,6 +1,6 @@
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,6 +1,6 @@
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

View File

@@ -1,7 +1,7 @@
#
# 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>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -14,8 +14,12 @@ if(POLICY CMP0043)
endif()
add_definitions(
-DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_USE_QSTRINGBUILDER -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
-DQT_STRICT_ITERATORS -DQT_NO_KEYWORDS -DQT_NO_FOREACH
-DQT_NO_SIGNALS_SLOTS_KEYWORDS
-DQT_USE_QSTRINGBUILDER
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
-DQT_STRICT_ITERATORS
-DQT_NO_KEYWORDS
-DQT_NO_FOREACH
)
set(DOCKSLIBS_SRCS
@@ -239,8 +243,13 @@ ecm_generate_headers(
set(RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/kddockwidgets_resources.qrc)
add_library(kddockwidgets ${KDDockWidgets_LIBRARY_MODE} ${DOCKSLIBS_SRCS} ${DOCKS_INSTALLABLE_INCLUDES} ${RESOURCES})
add_library(KDAB::kddockwidgets ALIAS kddockwidgets)
add_library(
kddockwidgets
${KDDockWidgets_LIBRARY_MODE} ${DOCKSLIBS_SRCS} ${DOCKS_INSTALLABLE_INCLUDES} ${RESOURCES}
)
add_library(
KDAB::kddockwidgets ALIAS kddockwidgets
)
set_target_properties(kddockwidgets PROPERTIES OUTPUT_NAME "kddockwidgets${KDDockWidgets_LIBRARY_QTID}")
set_compiler_flags(kddockwidgets)
@@ -309,7 +318,7 @@ elseif(
AND NOT ${PROJECT_NAME}_QT6
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)
endif()
@@ -353,23 +362,37 @@ if(MSVC AND NOT ${PROJECT_NAME}_STATIC)
)
endif()
install(FILES ${camelcase_HEADERS} DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets)
install(FILES ${DOCKS_INSTALLABLE_INCLUDES} DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets)
install(FILES ${DOCKS_INSTALLABLE_PRIVATE_INCLUDES} DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets/private)
install(FILES private/multisplitter/Item_p.h
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets/private/multisplitter
install(
FILES ${camelcase_HEADERS}
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets
)
install(FILES private/multisplitter/Widget.h
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets/private/multisplitter
install(
FILES ${DOCKS_INSTALLABLE_INCLUDES}
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets
)
install(FILES private/multisplitter/Separator_p.h
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets/private/multisplitter
install(
FILES ${DOCKS_INSTALLABLE_PRIVATE_INCLUDES}
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets/private
)
install(FILES private/indicators/ClassicIndicators_p.h
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets/private/indicators
install(
FILES private/multisplitter/Item_p.h
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets/private/multisplitter
)
install(FILES private/indicators/SegmentedIndicators_p.h
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets/private/indicators
install(
FILES private/multisplitter/Widget.h
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets/private/multisplitter
)
install(
FILES private/multisplitter/Separator_p.h
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets/private/multisplitter
)
install(
FILES private/indicators/ClassicIndicators_p.h
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets/private/indicators
)
install(
FILES private/indicators/SegmentedIndicators_p.h
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets/private/indicators
)
if(KDDockWidgets_QTQUICK)
@@ -409,8 +432,9 @@ ecm_setup_version(
COMPATIBILITY
AnyNewerVersion
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/kddockwidgets_version.h"
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/kddockwidgets_version.h"
DESTINATION ${DOCKS_INCLUDES_INSTALL_PATH}/kddockwidgets
)
install(
EXPORT kddockwidgetsTargets
@@ -419,9 +443,10 @@ install(
DESTINATION ${INSTALL_LIBRARY_DIR}/cmake/KDDockWidgets${KDDockWidgets_LIBRARY_QTID}
)
configure_file(KDDockWidgetsConfig.cmake.in KDDockWidgets${KDDockWidgets_LIBRARY_QTID}Config.cmake @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KDDockWidgets${KDDockWidgets_LIBRARY_QTID}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KDDockWidgets${KDDockWidgets_LIBRARY_QTID}ConfigVersion.cmake"
DESTINATION ${INSTALL_LIBRARY_DIR}/cmake/KDDockWidgets${KDDockWidgets_LIBRARY_QTID}
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/KDDockWidgets${KDDockWidgets_LIBRARY_QTID}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KDDockWidgets${KDDockWidgets_LIBRARY_QTID}ConfigVersion.cmake"
DESTINATION ${INSTALL_LIBRARY_DIR}/cmake/KDDockWidgets${KDDockWidgets_LIBRARY_QTID}
)
if(${PROJECT_NAME}_DEVELOPER_MODE)

View File

@@ -1,7 +1,7 @@
/*
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -356,4 +356,9 @@ bool Config::dropIndicatorsInhibited() const
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.
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>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
@@ -317,6 +317,9 @@ public:
void setMDIPopupThreshold(int);
int mdiPopupThreshold() const;
/// Prints some debug information
void printDebug();
#ifdef KDDOCKWIDGETS_QTQUICK
///@brief Sets the QQmlEngine to use. Applicable only when using QtQuick.
void setQmlEngine(QQmlEngine *);

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