Compare commits

...

34 Commits

Author SHA1 Message Date
Philipp Swoboda
7a7c03793c Switched back to version 1.6 because of disapearing icons 2023-02-12 18:49:05 +01:00
Allen Winter
598787868b appveyor.yml - use Qt6.2 on Mac as well
since 6.2 is the min supported Qt version
2022-09-14 17:50:42 -04:00
Allen Winter
48319a6309 distro/qt6-kddockwidgets.spec - fix found on OBS 2022-09-14 17:46:51 -04:00
Allen Winter
409ac51a3f distro - use today's date 2022-09-14 11:44:30 -04:00
Allen Winter
d9b2eab833 .krazy - skip some example files 2022-09-14 11:41:26 -04:00
Allen Winter
dc510c06eb prepare for 1.6.0 release
`
2022-09-14 10:25:34 -04:00
Allen Winter
285a51b940 buildsystem - follow DPySide[2,6]ModuleBuild.cmake renaming 2022-09-14 10:24:15 -04:00
Allen Winter
f02e3e27d6 cmake/KDAB/modules/KDInstallLocation.cmake - sync 2022-09-14 09:11:15 -04:00
Allen Winter
be42120e06 remove PySide[2,6]ModuleBuild.cmake
replaced with KDPySide[2,6]ModuleBuild.cmake
2022-09-14 09:10:27 -04:00
Allen Winter
c8e542cabf buildsystem required CMake v3.12.0 or higher 2022-09-14 09:09:21 -04:00
Sergio Martins
a267f6a0a7 Mention in ChangeLog that minimum is 6.2 2022-09-14 13:47:16 +01:00
Sergio Martins
3c2cb67bcd cmake: Allow to build with Qt 6.2, since it's the last LTS 2022-09-14 13:40:31 +01:00
Allen Winter
77127886da .pylintrc - ignore settings for older pylint versions 2022-09-13 12:14:34 -04:00
Allen Winter
70def3e14c misspellings found by codespell v2.2.1 2022-09-13 12:12:16 -04:00
Allen Winter
a91aa74d52 misc whitespace cleaning 2022-09-13 12:07:14 -04:00
Allen Winter
619119fc37 README.md - a bit of trivial whitespace cleaning 2022-09-13 12:06:37 -04:00
Sergio Martins
77c8cec2b8 cmake: Fix ci-dev-qtquick-qt6 not using QtQuick
It was building the QtWidgets frontend by mistake
2022-09-12 18:36:07 +01:00
Sergio Martins
71f5cccb61 tests: Fix tests not being run on macOS Qt6
Latest Qt5 and Qt6 are fine nowadays, so just remove the check.
There was an offscreen qpa bug in macOS which was fixed in 5.15.2.
2022-09-12 17:57:28 +01:00
Sergio Martins
f5eb97bd26 cmake: Remove unity builds from cmake presets
The speedup is small since KDDW is small as well.
The burden of maintaining it isn't worth the speedup.

Fixes static build preset failing.
2022-09-12 17:54:51 +01:00
Sergio Martins
fcedc65c41 README: Explain our versioning 2022-09-08 11:51:42 +01:00
Sergio Martins
236ed813f8 qtquick: Fix build, use WidgetType instead of QWidget 2022-09-07 17:46:46 +01:00
Sergio Martins
1c4a4fb8bc README: Discourage people from using 1.6 for QtQuick
It works but won't be receiving bug fixes.
2022-09-07 17:11:35 +01:00
Allen Winter
be7bbe00b1 appveyor.yml - don't build the master branch 2022-09-06 09:10:20 -04:00
Sergio Martins
f277d5efb7 Fix affinity of central frame
Fixes issue #245

(cherry-picked from commit f9e758d02f)
2022-09-05 22:57:02 +01:00
Sergio Martins
bde5be9d9c Release mouse if Qt doesn't receive mouse release
As explained in commit message for #166, there's a case where Qt
doesn't receive the mouse release from Windows. If that happens
then allow to drop if we're over a drop indicator.

Fixes issue #306
2022-08-16 14:28:49 -07:00
Sergio Martins
7e689f0b39 python: Improve Dockerfile
Added more instructions and missing runtime packages

So I can test issue #304
2022-08-16 20:47:21 +01:00
Sergio Martins
ef78d60751 Python: Add a Dockerfile for a python environment
So I can test issue #304
2022-08-16 00:52:34 +01:00
Sergio Martins
bdbab41674 cmake: Disable unity builds for python preset
It's not supported
2022-08-16 00:03:29 +01:00
Sergio Martins
f84006347b Add SegmentedIndicators::s_centralIndicatorMaxWidth/height
So the user can change the maximum size of the central indicator
2022-07-28 19:42:56 +01:00
Allen Winter
9ce7477cbb docs/api/Doxyfile.cmake - add .pngs 2022-07-22 16:00:08 -04:00
Allen Winter
913c570b2b .reuse/dep5 - minor cleaning 2022-07-19 12:48:22 -04:00
Shantanu Tushar
daebe9e680 Export SideBarButton
This allows code to link to subclasses of SideBarButton.
2022-07-19 11:39:32 +01:00
Shantanu Tushar
cf7f037af4 Allow custom sidebars to access its dock widgets
This is useful in cases where a custom sidebar wants behavior that
affects multiple dock widgets it "contains".
2022-07-19 11:39:32 +01:00
Sergio Martins
72ac856fa7 Allow to use TitleBar with non-KDDW widgets
For example, on EGLFS, the user might want some dialogs with similar
decorations. In the future we can make it draggable as well.
2022-07-16 23:51:39 +01:00
41 changed files with 246 additions and 116 deletions

View File

@@ -70,4 +70,3 @@ SpacesInAngles: false
SpacesInCStyleCastParentheses: true
SpacesInParentheses: false
...

3
.krazy
View File

@@ -16,6 +16,9 @@ EXCLUDE style
SKIP /fwd_headers/
SKIP Doxyfile.cmake
#skip some example files
SKIP /examples/qtquick/CMakeFiles/
#skip CMake files
SKIP /KDDockWidgetsConfig.cmake.in
#skip more files

View File

@@ -140,6 +140,8 @@ disable=print-statement,
exception-escape,
comprehension-escape,
consider-using-f-string,
useless-option-value,
unknown-option-value,
R0801,I1101,E0401
# Enable the message, report, category or checker with the given id(s). You can

View File

@@ -1,6 +1,6 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: KDDockWidgets
Upstream-Contact: <info@kdab.com>
Upstream-Contact: <info@kdab.com>
Source: https://www.github.com/KDAB/KDDockWidgets
#misc source code
@@ -16,7 +16,6 @@ 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>
License: GPL-2.0-only OR GPL-3.0-only
License: BSD-3-Clause
#artwork

View File

@@ -69,7 +69,7 @@
# Ignored unless KDDockWidgets_DEVELOPER_MODE=True
# Default=true
cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.12)
# Allow using a non-KDAB install location.
set(KDAB_INSTALL
@@ -85,20 +85,16 @@ if(DEFINED CMAKE_INSTALL_PREFIX)
endif()
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
project(KDDockWidgets LANGUAGES CXX)
else()
project(
KDDockWidgets
DESCRIPTION "An advanced docking system for Qt"
HOMEPAGE_URL "https://github.com/KDAB/KDDockWidgets"
LANGUAGES CXX
)
endif()
project(
KDDockWidgets
DESCRIPTION "An advanced docking system for Qt"
HOMEPAGE_URL "https://github.com/KDAB/KDDockWidgets"
LANGUAGES CXX
)
set(${PROJECT_NAME}_VERSION_MAJOR 1)
set(${PROJECT_NAME}_VERSION_MINOR 5)
set(${PROJECT_NAME}_VERSION_PATCH 99)
set(${PROJECT_NAME}_VERSION_MINOR 6)
set(${PROJECT_NAME}_VERSION_PATCH 0)
set(${PROJECT_NAME}_VERSION
${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}
)
@@ -122,6 +118,11 @@ option(${PROJECT_NAME}_X11EXTRAS
)
option(${PROJECT_NAME}_XLib "On Linux, link against XLib, for a more robust window z-order detection." OFF)
# changed by Philipp Swoboda, philipp@swoboda.xyz
# set QT6 as default option and switch X11 Extra off
set(${PROJECT_NAME}_X11EXTRA OFF)
set(${PROJECT_NAME}_QT6 ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/ECM/modules")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/KDAB/modules")
@@ -146,7 +147,7 @@ endif()
if(${PROJECT_NAME}_QT6)
set(Qt_VERSION_MAJOR 6)
set(QT_MIN_VERSION "6.3.0")
set(QT_MIN_VERSION "6.2.0")
set(${PROJECT_NAME}_LIBRARY_QTID "-qt6")
else()
set(Qt_VERSION_MAJOR 5)
@@ -286,24 +287,25 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
install(FILES LICENSE.txt README.md DESTINATION ${INSTALL_DOC_DIR})
install(DIRECTORY LICENSES DESTINATION ${INSTALL_DOC_DIR})
# Generate .pri file for qmake users
# (except for older cmake versions and when using the VS generator)
if(CMAKE_VERSION VERSION_GREATER "3.11.99" AND NOT CMAKE_CONFIGURATION_TYPES)
include(ECMGeneratePriFile)
set(PROJECT_VERSION_STRING ${${PROJECT_NAME}_VERSION})
ecm_generate_pri_file(
BASE_NAME
KDDockWidgets
LIB_NAME
kddockwidgets${${PROJECT_NAME}_LIBRARY_QTID}
DEPS
${${PROJECT_NAME}_DEPS}
FILENAME_VAR
pri_filename
INCLUDE_INSTALL_DIR
${CMAKE_INSTALL_INCLUDEDIR}
)
install(FILES ${pri_filename} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
# Generate .pri file for qmake users (except when using the VS generator)
if(NOT CMAKE_CONFIGURATION_TYPES)
if(Qt_VERSION_MAJOR EQUAL 5 OR (Qt_VERSION_MAJOR EQUAL 6 AND Qt6Core_VERSION VERSION_GREATER "6.2"))
include(ECMGeneratePriFile)
set(PROJECT_VERSION_STRING ${${PROJECT_NAME}_VERSION})
ecm_generate_pri_file(
BASE_NAME
KDDockWidgets
LIB_NAME
kddockwidgets${${PROJECT_NAME}_LIBRARY_QTID}
DEPS
${${PROJECT_NAME}_DEPS}
FILENAME_VAR
pri_filename
INCLUDE_INSTALL_DIR
${CMAKE_INSTALL_INCLUDEDIR}
)
install(FILES ${pri_filename} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
endif()
endif()
else()
#Always disable tests, examples, docs when used as a submodule
@@ -349,32 +351,30 @@ if(${PROJECT_NAME}_TESTS)
if(${PROJECT_NAME}_DEVELOPER_MODE)
add_subdirectory(tests)
# Require Qt5.15.1 or higher to run the tests_launcher tests on Mac
if(NOT APPLE OR Qt5Widgets_VERSION VERSION_GREATER 5.15.0)
# 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
endif()
# 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
if(NOT ${PROJECT_NAME}_QTQUICK)
# tst_multisplitter depends on QWidget
add_test(NAME tst_multisplitter COMMAND tst_multisplitter)

View File

@@ -70,8 +70,7 @@
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_UNITY_BUILD" : "ON"
"CMAKE_BUILD_TYPE": "Release"
}
},
{
@@ -81,7 +80,6 @@
"binaryDir": "${sourceDir}/build-release-no-x11extras",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_UNITY_BUILD" : "ON",
"KDDockWidgets_X11EXTRAS" : "OFF"
}
},
@@ -92,8 +90,7 @@
"binaryDir": "${sourceDir}/build-release-qtquick",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_QTQUICK": "ON",
"CMAKE_UNITY_BUILD" : "ON"
"KDDockWidgets_QTQUICK": "ON"
}
},
{
@@ -117,8 +114,7 @@
"binaryDir": "${sourceDir}/build-python",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_PYTHON_BINDINGS": "ON",
"CMAKE_UNITY_BUILD" : "ON"
"KDDockWidgets_PYTHON_BINDINGS": "ON"
}
},
{
@@ -128,8 +124,7 @@
"binaryDir": "${sourceDir}/build-static",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_STATIC": "ON",
"CMAKE_UNITY_BUILD" : "ON"
"KDDockWidgets_STATIC": "ON"
}
},
{
@@ -140,8 +135,7 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_STATIC": "ON",
"KDDockWidgets_QTQUICK": "ON",
"CMAKE_UNITY_BUILD" : "ON"
"KDDockWidgets_QTQUICK": "ON"
}
},
{
@@ -152,7 +146,6 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_QT6": "ON",
"CMAKE_UNITY_BUILD" : "ON",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
},
"environment": {
@@ -203,7 +196,6 @@
"CMAKE_BUILD_TYPE": "Release",
"KDDockWidgets_QTQUICK": "ON",
"KDDockWidgets_QT6": "ON",
"CMAKE_UNITY_BUILD" : "ON",
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
},
"environment": {
@@ -425,7 +417,8 @@
"cacheVariables": {
"KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_QT6": "ON"
"KDDockWidgets_QT6": "ON",
"KDDockWidgets_QTQUICK": "ON"
}
},
{

View File

@@ -1,5 +1,6 @@
* v1.6.0 (unreleased)
- Minimum Qt6 version is now 6.3.0
* v1.6.0 (14 September 2022)
- Minimum Qt6 version is now 6.2.0
- Minimum CMake version is now 3.12.0
- Fixed restoring of normal geometry when closing a maximized window (#259)
- Experimental support for docking into dock widgets which are in a MDI area.
- Fixed potential crash involving infinite loop between QWidget::create() and QWidget::createWinId()

View File

@@ -2,7 +2,7 @@ GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

View File

@@ -2,6 +2,9 @@
[![Build Status](https://travis-ci.com/KDAB/KDDockWidgets.svg?branch=master)](https://travis-ci.com/KDAB/KDDockWidgets)
> ⚠️⚠️: 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.
`KDDockWidgets` is a Qt dock widget library written by KDAB, suitable for replacing
`QDockWidget` and implementing advanced functionalities missing in Qt.
@@ -144,10 +147,19 @@ Please refer to [README-bindings.md](README-bindings.md).
## Versioning
New features go to master while the stable branch only accepts non-intrusive bug fixes.
There's currently two lines of development: `v1` which is very mature and stable and `v2` which is an
ongoing effort to make KDDW support multiple "frontends" (QtWidgets, QtQuick and even non-Qt technologies,
like flutter).
We'll try to remain source and binary compatible across versions. API will get
a deprecation notice before being removed in the next version. Note that this
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 `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
incompatibilities. Despite that, it is pretty stable, and all 200 unit-tests pass.
We'll try to remain source-compatible across versions (except for the v1 -> v2 jump).
API will get a deprecation notice before being removed in the next version. Note that this
compatibility effort is only for the public API. Private API (headers ending
in _p.h) might change so you shouldn't depend on them. Private API is only
exposed so more advanced users can override, for example `paintEvent()`, and

View File

@@ -9,6 +9,8 @@ version: 1.0.{build}-{branch}
branches:
except:
- gh-pages
- wip/v2
- master
# Do not build on tags (GitHub and BitBucket)
skip_tags: false
@@ -51,7 +53,7 @@ install:
before_build:
- cmd: call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
- cmd: set PATH=C:\Qt\6.2\msvc2019_64\bin;C:\Qt\5.15\msvc2019_64\bin;%PATH%
- sh: if [ "`uname -s`" = "Darwin" ]; then export PATH=$HOME/Qt/6.1/macos/bin:$HOME/Qt/5.15/clang_64/bin:$PATH; else export PATH=$HOME/Qt/6.2/gcc_64/bin:$HOME/Qt/5.15/gcc_64/bin:$PATH; fi
- sh: if [ "`uname -s`" = "Darwin" ]; then export PATH=$HOME/Qt/6.2/macos/bin:$HOME/Qt/5.15/clang_64/bin:$PATH; else export PATH=$HOME/Qt/6.2/gcc_64/bin:$HOME/Qt/5.15/gcc_64/bin:$PATH; fi
build_script:
- mkdir build

View File

@@ -30,7 +30,7 @@ if(NOT INSTALL_DATADIR)
set(INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR})
endif()
if(NOT INSTALL_DOC_DIR)
set(INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR}${KDDockWidgets_LIBRARY_QTID})
set(INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR}${${PROJECT_NAME}_LIBRARY_QTID})
endif()
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

View File

@@ -12,7 +12,7 @@ from conans import ConanFile, CMake, tools
class KDDockWidgetsConan(ConanFile):
name = "kddockwidgets"
version = "1.5.0"
version = "1.6.0"
default_user = "kdab"
default_channel = "stable"
license = ("https://raw.githubusercontent.com/KDAB/KDDockWidgets/master/LICENSES/GPL-2.0-only.txt",

View File

@@ -1,3 +1,9 @@
kddockwidgets (1.6.0) release candidate; urgency=high
* 1.6.0 final
-- Allen Winter <allen.winter@kdab.com> Wed, 14 Sep 2022 11:40:00 -0500
kddockwidgets (1.5.0) release candidate; urgency=high
* 1.5.0 final

View File

@@ -1,3 +1,4 @@
#!/usr/bin/make -f
DEB_CMAKE_EXTRA_FLAGS = -DCMAKE_BUILD_TYPE=Release
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk

View File

@@ -1,10 +1,10 @@
Format: 1.0
Source: kddockwidgets
Version: 1.5.0-1
Version: 1.6.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.5.0.tar.gz
00000000000000000000000000000000 00000 qt5-kddockwidgets-1.6.0.tar.gz

View File

@@ -1,5 +1,5 @@
Name: qt5-kddockwidgets
Version: 1.5.0
Version: 1.6.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 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
1.5.0 final
* Fri Jul 16 2021 Allen Winter <allen.winter@kdab.com> 1.4.0

View File

@@ -1,10 +1,10 @@
Format: 1.0
Source: kddockwidgets
Version: 1.5.0-1
Version: 1.6.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.5.0.tar.gz
00000000000000000000000000000000 00000 qt6-kddockwidgets-1.6.0.tar.gz

View File

@@ -1,5 +1,5 @@
Name: qt6-kddockwidgets
Version: 1.5.0
Version: 1.6.0
Release: 1
Summary: KDAB's Dock Widget Framework for Qt6
Source0: %{name}-%{version}.tar.gz
@@ -18,7 +18,7 @@ BuildRequires: libqt6-qtbase-devel libqt6-qtbase-private-headers-devel libqt6-q
%endif
%if %{defined fedora}
BuildRequires: gcc-c++ qt6-qtbase-devel qt6-qtbase-private-devel desktop-file-utils libxkbcommon-devel
BuildRequires: gcc-c++ qt6-qtbase-devel qt6-qtbase-private-devel desktop-file-utils libxkbcommon-devel util-linux
%endif
%if %{defined rhel}
@@ -79,14 +79,21 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DKDDockWidgets_QT6=True -DCMAKE_BUILD_TYPE=
%files devel
%defattr(-,root,root,-)
%if 0%{?fedora} > 35
%{_libdir}/qt6/mkspecs/modules/*
%endif
#%dir %{_prefix}/share/mkspecs
#%dir %{_prefix}/share/mkspecs/features
#%{_prefix}/share/mkspecs/features/kddockwidgets.prf
%dir %{_includedir}/kddockwidgets-qt6
%{_includedir}/kddockwidgets-qt6/kddockwidgets/*
%dir %{_libdir}/cmake/KDDockWidgets-qt6
%{_libdir}/cmake/KDDockWidgets-qt6/*
%{_libdir}/libkddockwidgets-qt6.so
#%{_prefix}/mkspecs/modules/* ECMGeneratePriFile isn't ported to Qt6 yet
%changelog
* 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
1.5.0 final
* Fri Jul 16 2021 Allen Winter <allen.winter@kdab.com> 1.4.0

42
docker/pyside2/Dockerfile Normal file
View File

@@ -0,0 +1,42 @@
#
# This file is part of KDDockWidgets.
#
# SPDX-FileCopyrightText: 2019-2022 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
#
# Contact KDAB at <info@kdab.com> for commercial licensing options.
# The purpose of this Dockerfile is just for quickly getting a running python build for testing.
# Instructions:
# $ docker build -t kddw-pyside2 .
# $ docker run -it -v ~/Qt/5.15.2/gcc_64/:/Qt/ -v /tmp/.X11-unix:/tmp/.X11-unix kddw-pyside2
# git checkout 1.6
# cmake --preset=python -G Ninja . && cd build-python/ && ninja
# Test with:
# cd ../python/examples && rcc -g python -o rc_assets.py ../../examples/dockwidgets/resources_example.qrc
# python3 main.py
FROM ubuntu:22.04
MAINTAINER Sergio Martins (sergio.martins@kdab.com)
ENV TZ=Europe/Berlin
ENV LC_CTYPE=C.UTF-8
ENV DISPLAY=:0
ENV PATH=$PATH:/Qt/bin/
ENV LD_LIBRARY_PATH=/Qt/lib/
ENV PYTHONPATH=/KDDockWidgets/build-python/python/
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt update
RUN apt install build-essential software-properties-common git ninja-build libssl-dev mesa-common-dev libglu1-mesa-dev libglib2.0-dev libfontconfig libxkbcommon-x11-0 libdbus-1-3 cmake pip libxslt1-dev llvm-dev clang libxcb-keysyms1 libxcb-image0 libxcb-icccm4 libxcb-xinerama0 libxcb-shape0 libxcb-render-util0 -y
RUN pip3 install --index-url=http://download.qt.io/official_releases/QtForPython/ --trusted-host download.qt.io shiboken2 pyside2 shiboken2_generator
WORKDIR /
RUN git clone https://github.com/KDAB/KDDockWidgets.git
WORKDIR /KDDockWidgets/

View File

@@ -876,7 +876,8 @@ FILE_PATTERNS = *.cpp \
*.h \
*.dox \
*.md \
*.gif
*.gif \
*.png
# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.

View File

@@ -38,7 +38,7 @@ 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(PySide${PYSIDE_MAJOR_VERSION}ModuleBuild)
include(KDPySide${PYSIDE_MAJOR_VERSION}ModuleBuild)
add_subdirectory(PyKDDockWidgets)
if(${PROJECT_NAME}_TESTS)
add_subdirectory(tests)

View File

@@ -105,7 +105,10 @@ MainWindow::MainWindow(const QString &name, MainWindowOptions options,
} else {
d->m_layout->addWidget(layoutWidget());
}
}
void MainWindow::postInit(QWidget *parent, Qt::WindowFlags flags)
{
setCentralWidget(d->m_centralWidget);
const bool isWindow = !parent || (flags & Qt::Window);

View File

@@ -48,6 +48,8 @@ public:
explicit MainWindow(const QString &uniqueName, MainWindowOptions options = MainWindowOption_None,
QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
void postInit(QWidget *parent, Qt::WindowFlags flags = Qt::WindowFlags());
///@brief Destructor
~MainWindow() override;

View File

@@ -702,7 +702,7 @@ bool MainWindowBase::deserialize(const LayoutSaver::MainWindow &mw)
}
if (d->affinities != mw.affinities) {
qWarning() << Q_FUNC_INFO << "Affinty name changed from" << d->affinities
qWarning() << Q_FUNC_INFO << "Affinity name changed from" << d->affinities
<< "; to" << mw.affinities;
d->affinities = mw.affinities;

View File

@@ -263,6 +263,7 @@ StateDragging::StateDragging(DragController *parent)
if (!mouseButtonIsReallyDown && isLeftButtonPressed()) {
qCDebug(state) << "Canceling drag, Qt thinks mouse button is pressed"
<< "but Windows knows it's not";
handleMouseButtonRelease(QCursor::pos());
Q_EMIT q->dragCanceled();
}
});

View File

@@ -29,6 +29,7 @@ public:
private:
friend class MainWindowBase;
friend class Frame;
friend class ::TestDocks;
Frame *const m_centralFrame = nullptr;
};

View File

@@ -588,6 +588,8 @@ bool Frame::hasTabsVisible() const
QStringList Frame::affinities() const
{
if (isEmpty()) {
if (auto m = mainWindow())
return m->affinities();
return {};
} else {
return dockWidgetAt(0)->affinities();

View File

@@ -68,6 +68,11 @@ void SideBar::onButtonClicked(DockWidgetBase *dw)
toggleOverlay(dw);
}
QVector<DockWidgetBase *> SideBar::dockWidgets() const
{
return m_dockWidgets;
}
void SideBar::onDockWidgetDestroyed(QObject *dw)
{
removeDockWidget(static_cast<DockWidgetBase *>(dw));

View File

@@ -66,6 +66,8 @@ protected:
void onButtonClicked(DockWidgetBase *dw);
QVector<DockWidgetBase *> dockWidgets() const;
private:
void onDockWidgetDestroyed(QObject *dw);
void updateSize();

View File

@@ -32,6 +32,7 @@ TitleBar::TitleBar(Frame *parent)
, Draggable(this)
, m_frame(parent)
, m_floatingWindow(nullptr)
, m_genericWidget(nullptr)
, m_supportsAutoHide(Config::self().flags() & Config::Flag_AutoHideSupport)
{
connect(m_frame, &Frame::numDockWidgetsChanged, this, &TitleBar::updateCloseButton);
@@ -49,6 +50,7 @@ TitleBar::TitleBar(FloatingWindow *parent)
, Draggable(this)
, m_frame(nullptr)
, m_floatingWindow(parent)
, m_genericWidget(nullptr)
, m_supportsAutoHide(Config::self().flags() & Config::Flag_AutoHideSupport)
{
connect(m_floatingWindow, &FloatingWindow::numFramesChanged, this, &TitleBar::updateButtons);
@@ -57,6 +59,17 @@ TitleBar::TitleBar(FloatingWindow *parent)
init();
}
TitleBar::TitleBar(WidgetType *parent)
: QWidgetAdapter(parent)
, Draggable(this, /*enabled=*/false) // We don't allow dragging generic windows at this time
, m_frame(nullptr)
, m_floatingWindow(nullptr)
, m_genericWidget(parent)
, m_supportsAutoHide(false)
{
init();
}
void TitleBar::init()
{
setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed));
@@ -91,7 +104,7 @@ bool TitleBar::onDoubleClicked()
MainWindowBase *TitleBar::mainWindow() const
{
if (m_floatingWindow)
if (m_floatingWindow || m_genericWidget)
return nullptr;
if (m_frame)
@@ -212,6 +225,9 @@ void TitleBar::setIcon(const QIcon &icon)
std::unique_ptr<WindowBeingDragged> TitleBar::makeWindow()
{
if (m_genericWidget)
return {}; // not applicable
if (!isVisible() && window()->isVisible() && !(Config::self().flags() & Config::Flag_ShowButtonsOnTabBarIfTitleBarHidden)) {
// When using Flag_ShowButtonsOnTabBarIfTitleBarHidden we forward the call from the tab bar's
@@ -262,6 +278,9 @@ DockWidgetBase *TitleBar::singleDockWidget() const
bool TitleBar::supportsFloatingButton() const
{
if (m_genericWidget)
return {}; // not applicable
if (Config::self().flags() & Config::Flag_TitleBarHasMaximizeButton) {
// Apps having a maximize/restore button traditionally don't have a floating one,
// QDockWidget style only has floating and no maximize/restore.
@@ -318,7 +337,11 @@ bool TitleBar::isFocused() const
return m_frame->isFocused();
else if (m_floatingWindow)
return m_floatingWindow->isActiveWindow();
#ifdef KDDOCKWIDGETS_QTWIDGETS
// Remove ifdef in 2.0 branch.
else if (m_genericWidget)
return m_genericWidget->isActiveWindow();
#endif
return false;
}
@@ -362,6 +385,9 @@ void TitleBar::onCloseClicked()
} else {
m_floatingWindow->close();
}
} else if (m_genericWidget) {
if (auto window = m_genericWidget->window())
window->close();
}
}
@@ -373,6 +399,9 @@ bool TitleBar::isFloating() const
if (m_frame)
return m_frame->isFloating();
if (m_genericWidget)
return false; // Not applicable
qWarning() << "TitleBar::isFloating: shouldn't happen";
return false;
}
@@ -390,6 +419,9 @@ DockWidgetBase::List TitleBar::dockWidgets() const
if (m_frame)
return m_frame->dockWidgets();
if (m_genericWidget)
return {}; // Not applicable
qWarning() << "TitleBar::dockWidget: shouldn't happen";
return {};
}

View File

@@ -50,6 +50,11 @@ public:
explicit TitleBar(Frame *parent);
explicit TitleBar(FloatingWindow *parent);
/// Allows TitleBar to be used in a non-dockwidget application, for example on a frameless QMessageBox on EGLFS
/// Just so we can reuse the existing styling
explicit TitleBar(WidgetType *parent);
~TitleBar() override;
void setTitle(const QString &title);
@@ -173,6 +178,7 @@ private:
void updateFloatButton();
void updateCloseButton();
void setCloseButtonEnabled(bool);
void setCloseButtonVisible(bool);
void setFloatButtonVisible(bool);
void setFloatButtonToolTip(const QString &);
@@ -184,6 +190,7 @@ private:
Frame *const m_frame;
FloatingWindow *const m_floatingWindow;
WidgetType *const m_genericWidget;
const bool m_supportsAutoHide;
bool m_closeButtonEnabled = true;
bool m_floatButtonVisible = true;

View File

@@ -24,6 +24,8 @@ qreal SegmentedIndicators::s_draggedWindowOpacity = 0.7;
QColor SegmentedIndicators::s_segmentPenColor = Qt::black;
QColor SegmentedIndicators::s_segmentBrushColor = QColor(0xbb, 0xd5, 0xee, /*alpha=*/200);
QColor SegmentedIndicators::s_hoveredSegmentBrushColor = QColor(0x3574c5);
int SegmentedIndicators::s_centralIndicatorMaxWidth = 300;
int SegmentedIndicators::s_centralIndicatorMaxHeight = 160;
SegmentedIndicators::SegmentedIndicators(DropArea *dropArea)
@@ -108,8 +110,8 @@ QHash<DropLocation, QPolygon> SegmentedIndicators::segmentsForRect(QRect r, bool
const QPoint centerPos = bounds.boundingRect().center();
// Build the center
const int indicatorWidth = qMin(300, maxWidth - 100);
const int indicatorHeight = qMin(160, int(indicatorWidth * 0.60));
const int indicatorWidth = qMin(s_centralIndicatorMaxWidth, maxWidth - 100);
const int indicatorHeight = qMin(s_centralIndicatorMaxHeight, int(indicatorWidth * 0.60));
const int tabWidth = int(indicatorWidth * 0.267);
const int tabHeight = int(indicatorHeight * 0.187);
const int centerRectLeft = centerPos.x() - indicatorWidth / 2;

View File

@@ -32,6 +32,8 @@ public:
static int s_segmentGirth;
static int s_segmentPenWidth;
static int s_centralIndicatorMaxWidth;
static int s_centralIndicatorMaxHeight;
static qreal s_draggedWindowOpacity;
static QColor s_segmentPenColor;
static QColor s_segmentBrushColor;

View File

@@ -29,7 +29,7 @@ class DockWidgetQuick;
*
* "DockWidget {}" in QML won't create a KDDockWidget::DockWidget directly, but instead an
* DockWidgetInstantiator. DockWidgetInstantiator will then create the DockWidget instance only
* when the QML parsing ends (and all propreties are set)
* when the QML parsing ends (and all properties are set)
*
* This allows to pass the correct uniqueName to DockWidget's ctor.
*/

View File

@@ -29,7 +29,7 @@ class DockWidget;
class Frame;
class SideBarWidget;
class SideBarButton : public QToolButton
class DOCKS_EXPORT SideBarButton : public QToolButton
{
Q_OBJECT
public:

View File

@@ -106,6 +106,14 @@ TitleBarWidget::TitleBarWidget(FloatingWindow *parent)
init();
}
TitleBarWidget::TitleBarWidget(QWidget *parent)
: TitleBar(parent)
, m_layout(new QHBoxLayout(this))
{
init();
}
void TitleBarWidget::init()
{
qCDebug(creation) << "TitleBarWidget" << this;

View File

@@ -38,6 +38,7 @@ class DOCKS_EXPORT TitleBarWidget : public TitleBar
public:
explicit TitleBarWidget(Frame *parent);
explicit TitleBarWidget(FloatingWindow *parent);
explicit TitleBarWidget(QWidget *parent);
~TitleBarWidget() override;
///@brief getter for the close button

View File

@@ -17,6 +17,7 @@
#include "DockWidgetBase.h"
#include "DockWidgetBase_p.h"
#include "DropAreaWithCentralFrame_p.h"
#include "Frame_p.h"
#include "LayoutSaver_p.h"
#include "MDILayoutWidget_p.h"
#include "MainWindowMDI.h"
@@ -7820,23 +7821,14 @@ void TestDocks::tst_closeTabOfCentralFrame()
QVERIFY(frame->QWidgetAdapter::isVisible());
}
void TestDocks::tst_centralFrame245()
void TestDocks::tst_centralGroupAffinity()
{
/*
Build: -DKDDockWidgets_DEVELOPER_MODE=ON
Run: ./bin/tst_docks tst_centralFrame245 -platform xcb
auto m = createMainWindow(QSize(500, 500), MainWindowOption_HasCentralFrame, "tst_centralFrame245");
auto dock1 = createDockWidget("1", new QPushButton("1"));
auto dock2 = createDockWidget("2", new QPushButton("2"));
const QStringList affinities = { "a" };
m->setAffinities(affinities);
m->addDockWidgetAsTab(dock1);
m->addDockWidgetAsTab(dock2);
QTest::qWait(100000);
*/
Frame *centralGroup = m->dropArea()->m_centralFrame;
QCOMPARE(centralGroup->affinities(), affinities);
}
void TestDocks::tst_persistentCentralWidget()

View File

@@ -152,7 +152,7 @@ private Q_SLOTS:
void tst_availableLengthForOrientation();
void tst_closeShowWhenNoCentralFrame();
void tst_closeTabOfCentralFrame();
void tst_centralFrame245();
void tst_centralGroupAffinity();
void tst_setAsCurrentTab();
void tst_placeholderDisappearsOnReadd();
void tst_placeholdersAreRemovedProperly();