Commit Graph

846 Commits

Author SHA1 Message Date
Uwe Kindler
6c27115de8 Ignore MouseButtonPress events of SideTabWidget in event filter 2022-10-12 11:32:55 +02:00
Uwe Kindler
62d3d73651 Made Auto Hide Feature independent from Focus Feature and renamed OverlayDockContainer to AutoHideDockContainer 2022-10-12 11:17:54 +02:00
Uwe Kindler
8fc333806a Pulled latest changes from duer autohide branch 2022-10-12 10:58:47 +02:00
syarif fakhri
7f6fa0c96c Fix linux styling 2022-09-22 09:53:14 +08:00
Syarif Fakhri
8ac8d63b96 Ensure that the closed state is consistent 2022-09-20 14:47:28 +08:00
Syarif Fakhri
0e6971e2ae Remove [[fallthrough]] 2022-09-20 09:41:02 +08:00
Syarif Fakhri
32f9b4664b Fix weird behavior when widget is overlayed 2022-09-19 18:11:47 +08:00
Syarif Fakhri
c850e36025 Update css for qt-5 2022-09-19 16:33:45 +08:00
Syarif Fakhri
2bb1589ca2 Add missing check for bottom sidebar config 2022-09-19 16:02:32 +08:00
Syarif Fakhri
40dccdb5ae Remove testing code 2022-09-19 14:30:18 +08:00
Syarif Fakhri
3d4d677494 Bump XML version 2022-09-19 14:30:07 +08:00
Syarif Fakhri
6e143de09d Fix side tab widgets being the wrong size when being added to a layout 2022-09-19 14:19:31 +08:00
Syarif Fakhri
f69b1e1ef8 Fix active X widgets not being rendered correctly 2022-09-19 10:49:07 +08:00
Syarif Fakhri
87324846cd Fix side tab widget resizing strangely on first add 2022-09-15 16:02:55 +08:00
Syarif Fakhri
060313c11f clear dock widget focus on repin 2022-09-15 13:04:49 +08:00
Syarif Fakhri
59108ed245 Add right bottom and left bottom 2022-09-15 12:51:59 +08:00
Syarif Fakhri
68a3bcde08 Add assert 2022-09-15 12:15:33 +08:00
Syarif Fakhri
68e5aec912 add rais 2022-09-15 11:51:56 +08:00
Syarif Fakhri
6998c0e585 double -> float 2022-09-15 09:43:15 +08:00
Syarif Fakhri
4d3328e468 Fix side tab widget ordering
Now is fixed based on the side tab widget
2022-09-14 17:39:57 +08:00
Syarif Fakhri
06bcf2cd48 Add insert order for overlayed widget to the side tab bar
- Set the default insert order to append
2022-09-14 15:52:34 +08:00
Nick D'Ademo
5df2467592 add orientation prop to SideTabBar. 2022-09-14 14:25:11 +08:00
Nick D'Ademo
48163d2679 add paintEvent override for styling purposes. 2022-09-14 14:17:28 +08:00
Syarif Fakhri
f3305b95d2 Remove old crash fix 2022-09-14 13:10:06 +08:00
Syarif Fakhri
8e5e974669 Remove event filter from dock area as well 2022-09-14 12:39:18 +08:00
Syarif Fakhri
773f186a7f Fix crash when restoring state but better
- Rather than having to check for nullptr, just make sure the slot isn't
called
2022-09-14 12:34:13 +08:00
Syarif Fakhri
6b85b2b505 Revert "Fix crash when restoring state"
This reverts commit ee97b03e53.
2022-09-14 12:32:32 +08:00
Syarif Fakhri
ee97b03e53 Fix crash when restoring state
- when restoring state, the old dock widgets would remove themselves
from their old dock areas and add themselves to the new dock areas. The
old dock areas that are empty would then delete themselves.
- That is a problem when the old overlay dock container would still try to
access the old dock areas, not knowing their deleted, causing a crash.
2022-09-14 12:16:36 +08:00
Syarif Fakhri
0e5329fd3e add comment 2022-09-13 17:27:13 +08:00
Syarif Fakhri
ac311d6d45 Fix moving content to parent on toggle view 2022-09-13 17:26:46 +08:00
Syarif Fakhri
f0f3caeb32 tweak spacing 2022-09-13 16:51:15 +08:00
Syarif Fakhri
d394930d74 Change splitter proportion from int to double
- Allows for fine grain control (can now set 0.75 or 0.6)
- Makes more sense
2022-09-13 16:29:39 +08:00
Syarif Fakhri
19192541f9 Fix central dock widget being pinnable
- Add config for dock widget being pinnable
2022-09-13 16:19:11 +08:00
Syarif Fakhri
8ddabc4cc8 Fix docking behavior when there is a central widget 2022-09-13 16:02:14 +08:00
Syarif Fakhri
42498b2021 Fixed some more spacing in DockWidgetSideTab 2022-09-13 14:57:24 +08:00
Syarif Fakhri
daa52e109e Add missing update style to dock widget side tab 2022-09-13 14:21:01 +08:00
Syarif Fakhri
263c73188a Add bottom side icon config 2022-09-13 14:16:12 +08:00
Syarif Fakhri
9a69955124 Simplify logic when restoring state 2022-09-13 13:10:29 +08:00
Syarif Fakhri
b950b8a209 Fix overlayed containers able to drag into the center
of the central widget
2022-09-13 12:45:26 +08:00
Syarif Fakhri
dfc2714d3b Fix invalid state on restore
- Overlayed dock areas should not be added to the d->DockArea list
- As they are not treated like normal dock areas
2022-09-13 12:44:48 +08:00
Syarif Fakhri
4841d9b896 Set splitter sizes based on proportion settable in the dock widget 2022-09-13 11:20:46 +08:00
Syarif Fakhri
214c415fa2 Add Bottom side bar 2022-09-13 10:42:58 +08:00
Syarif Fakhri
489f72aa0c Add side tab widget icons
- Add config to prioritize icon only if it has one
2022-09-12 15:55:45 +08:00
Syarif Fakhri
883d5b5198 fix crash when sometimes restoring state 2022-09-09 15:38:31 +08:00
Syarif Fakhri
3ef1ac97c2 Fix splitter size being saved incorrectly if the overlay widget is never opened 2022-09-09 15:24:33 +08:00
Syarif Fakhri
621e5e7789 fix tooltips for auto hide button and close button 2022-09-09 14:43:59 +08:00
Syarif Fakhri
22402e79f5 Added support for delete on close to overlayed widgets 2022-09-09 13:57:43 +08:00
Syarif Fakhri
54b9a8dc50 Merge branch 'auto_hide_feature' of github.com:duerr-ndt/Qt-Advanced-Docking-System into auto_hide_feature 2022-09-09 13:37:14 +08:00
Syarif Fakhri
dc05ec3acf Add nullptr check when restoring state with overlayed widgets 2022-09-09 13:33:42 +08:00
Syarif Fakhri
84c6afa428 Reworked toggle view
Previous:
- It would just hide the overlay dock widget and leave the side tabs
still visible
- Close button, toggle view action would simply collapse the dock widget
intsead of completely hiding it

Current:
- Now toggle view and collapse functionality are separated.
- Toggle view will now hide the side tab bars completely
- Close button and toggle view action will completely hide it
- Collapse view will simply hide the overlay dock container without
hiding the side tabs
- Handled logic for floating widgets and toggling view
2022-09-09 12:18:41 +08:00
Nick D'Ademo
1097d65959 fix elision for vertical eliding label. 2022-09-09 09:34:45 +08:00
Syarif Fakhri
6ae14fada3 add comment regarding empty widget in overlay dock container 2022-09-08 17:42:24 +08:00
Syarif Fakhri
a2e9c1aa9c Add config flag for enabling the overlay dock area title
Changed the config name from DefaultDockContainerConfig->DefaultAutoHideConfig
2022-09-08 16:58:40 +08:00
Syarif Fakhri
60c22000a8 Add hover styling 2022-09-08 16:49:32 +08:00
Syarif Fakhri
3ec395fe79 update default stylesheet 2022-09-08 16:41:00 +08:00
Syarif Fakhri
fac81265bf Whitespace changes only 2022-09-08 16:30:07 +08:00
Syarif Fakhri
c1df05b55d Fix bug where undock button would be show incorrectly in floating dock
widgets when toggling overlay

Also centralized and simplified the logic for the title bar button
visibility
2022-09-08 16:08:20 +08:00
Syarif Fakhri
af549d8ca9 Add title label to the overlayed dock area 2022-09-08 14:43:18 +08:00
Syarif Fakhri
9bfd77a206 Remove None and Bottom from the SideTabBarArea enum 2022-09-08 14:13:45 +08:00
Syarif Fakhri
37edf47c4b Fix the side tab widget not updating style when its restored from XML 2022-09-08 14:04:18 +08:00
Syarif Fakhri
be4e5a88a6 Change the styling - Now the dock widget side tab has a gray left/right
edge border when not selected
2022-09-08 14:01:52 +08:00
Syarif Fakhri
a279e71535 Fix side tab bar area name being saved wrong in the XML 2022-09-08 13:10:46 +08:00
Syarif Fakhri
5ddb02cc8e fix the border styling of the dock widget side tab when not focused 2022-09-08 11:45:30 +08:00
Syarif Fakhri
ecccba4536 Add overlay splitter object name 2022-09-08 11:31:54 +08:00
Syarif Fakhri
0087a1b360 Add left right styling to the dock widget side tab 2022-09-08 11:30:56 +08:00
Syarif Fakhri
8bfb98ea20 Remove auto hide feature being set by default. Add config for the default auto hide feature. 2022-09-08 11:23:45 +08:00
Uwe Kindler
068797dbb0 Fixed build issues of original pull request 2022-09-07 10:56:17 +02:00
Syarif Fakhri
302fcd1435 Fix bug where dragging an overlayed widget would cause it to be empty
Fix bug where pin and unpin doesn't work
2022-09-07 15:50:53 +08:00
Syarif Fakhri
1d9902b690 Make tabs menu hidden when overlayed 2022-09-07 13:31:44 +08:00
Syarif Fakhri
9735f41b1a Fix toggle view through the actions menu not working correctly 2022-09-07 12:13:46 +08:00
Syarif Fakhri
4a77580b07 swap position of auto hide button and detach group button 2022-09-07 11:54:32 +08:00
Syarif Fakhri
1a903e74f2 add pin icon 2022-09-07 11:54:03 +08:00
Syarif Fakhri
e4565034fb Merge branch 'master' into auto_hide_feature 2022-09-07 10:12:57 +08:00
Syarif Fakhri
052d3cecb9 Fix check state of the auto hide button
when dragging the container into a floating window
2022-09-06 17:59:56 +08:00
Syarif Fakhri
fde133c25e Fix a bug where overlay widgets from another container widget
would not be correctly transferred into the container widget that it's
dragged into.
2022-09-06 17:42:26 +08:00
Syarif Fakhri
6e35a9e7a7 - Add an example folder for auto hide functionality
Note: this does not include the py file, To be added in a different
commit
- Added a better API to programatically add the overlay areas in the
CDockManager
2022-09-06 15:35:18 +08:00
Syarif Fakhri
bfab7e495a Move logic for enabling auto hide into the public toggle method 2022-09-06 13:49:11 +08:00
Syarif Fakhri
3e9dc7f4d6 Add initial functionality for Auto hide
- Add left and right side tab widgets
- Add overlay dock and overlay dock widget behavior
2022-09-06 13:30:26 +08:00
Uwe Kindler
3cd6d766f8 Added some documentation for Linux modal dialog fix 2022-09-05 09:06:29 +02:00
Uwe
c11a496278 Change to ensure that modal widgets are always on top of floating widgets 2022-09-05 09:01:40 +02:00
Uwe
d27783e2f1 Added check for model widget for Linux
Prevent painting of drop overlays when model widget is active
2022-09-02 14:54:48 +02:00
Uwe Kindler
efd88565a9 Small change to fix issue #445 2022-08-29 11:11:08 +02:00
Doug Smith
f3bb1b17d0
Add link to xcb on Linux (#446) 2022-08-29 08:20:47 +02:00
Sebastian Büttner
518cee9d0a
Remove version check for qt 5.x to fix conan qt6 compatibility (#447)
Qt6 compatibility is broken in some cases when building with conan. This is due to the find_package version check against 5.5 rejecting the Qt6 version (e.g. 6.3.1).
This patch removed the version check.
2022-08-29 08:20:30 +02:00
Sebastian Büttner
6302ab03d8
Set required C++ standard depending on Qt version (#444)
Qt6 requires C++17 for building. ADS however only requires C++14 so far. Now when building using Conon for example the packages are built independently and ADS is built using the C++-14 flag which in turn causes the included Qt6 headers to fail the compile process. This patch bumps the required C++ standard to C++17 for builds targeting Qt6 only.
2022-08-14 22:17:42 +02:00
Uwe Kindler
a0f0640c9f Fixed CustomCloseHandling for floating widgets 2022-07-29 13:25:14 +02:00
bjb-work
df74686287
call CDockWidget::closeDockWidgetInternal when close attempt and CustomCloseHandling (#438)
Co-authored-by: bjb-work <N/A>
2022-07-15 14:47:20 +02:00
Uwe Kindler
bedd25021c Fixed issue #429 - Raise floating widget on toggleView() request 2022-06-17 08:31:24 +02:00
Uwe Kindler
0e566cb8a3 Fixed #420 - Floating docks title doesn't update
added tests for DockWidget->setWindowTitle() in demo application
2022-05-10 13:41:19 +02:00
Mira Weller
23f80334f6
Fix issue #415 (#416) 2022-05-03 08:47:31 +02:00
Igor Sirotin
a284e3bd65
CMake bugfixes [target alias, license install] (#412)
* Added alias to cmake library target

* Fixed CMake license install

Co-authored-by: Igor Sirotin <i.sirotin@1440.space>
2022-04-18 23:07:48 +02:00
Uwe Kindler
78a4166e42 Updated CFloatingDockContainer::closeEvent() function to delete all dock widgets with DockWidgetDeleteOnClose flag set 2022-03-25 13:31:40 +01:00
tytan652
3d3b694040
Avoid calling XCB functions under non-XCB Linux platform (#405) 2022-03-24 19:43:39 +01:00
ruffianhy
ad06241c9d
fix(issue-350): on RedHat/CentOS, sometimes there will be one more move event after user release their mouse which will cause the floating overlay can not be hide. Here we use the WindowActivate and WindowDeactivate event to check whether user release their mouse. (#401) 2022-03-13 21:22:07 +01:00
Uwe Kindler
7ab4c9af2e Handle StyleChange event in DockWidgetTab to update icon 2022-02-25 21:41:46 +01:00
kzl
d5fefaa35f
while dockManager.removeDockWidget , the dockManager() returns null (#399) 2022-02-18 19:33:55 +01:00
Ben Hetherington
3c4af9c6af
Add method to add dock widget to dock container (#398)
This adds a `addDockWidgetToContainer()` method to `CDockManager`, which allows a dock widget to be registered with the dock manager, and added to a specific container, even if that container doesn't currently have any `DockAreaWidget`s.

This is pretty much just a clone of `addDockWidget()`, but with the ability to specify a container widget instead of a dock area.
2022-02-06 08:21:43 +01:00
SleepProgger
6fb45c055c
Removed ContentMargin in DockContainer (#387) 2021-12-20 07:46:26 +01:00
Uwe Kindler
b15bc26a63 Some small coding style fixes 2021-12-12 17:28:11 +01:00
Uwe Kindler
1d90e8e823 Merge branch 'fix_issue_380' of https://github.com/jporcher/Qt-Advanced-Docking-System into jporcher-fix_issue_380 2021-12-12 17:19:27 +01:00
Jean Porcherot
6b3027401d Fix issue #380 and add example 2021-12-09 10:11:05 +01:00
Uwe Kindler
2afe62ec77 Fixed issue #378 - Don't show empty floating containers on startup 2021-12-06 09:42:12 +01:00
Ben Hetherington
0df1a41a1d
Fix potential crash when restoring container state (#381)
This fixes a crash which could occur when restoring the state of a floating container to a non-floating container.

This was because `ads::CDockContainerWidget::RestoreState()` will unconditionally assume this is floating if the XML has the `Floating` boolean set, and will dereference `floatingWidget()`. If this isn't floating, `floatingWidget()` will return `nullptr`, leading to a crash when it's subsequently used.

Fixes #379.
2021-12-03 17:01:16 +01:00
anoy
21badd592e
add QFlag operators (#376) 2021-11-26 19:09:09 +01:00
Uwe Kindler
a110d53a53 Fixed crash in DockFocusController
DockWidget pointers are now wrapped into QPointer to detect deleted
DockWidgets
2021-11-18 22:10:11 +01:00
Uwe Kindler
0270993782 Fixed error caused by broken merge request 2021-11-17 07:51:14 +01:00
Uwe Kindler
2c0d899b2a Fixed pixmap warning in ElidingLabel 2021-11-17 07:50:46 +01:00
Ben Hetherington
1abe101ef7
Prevent middle-click from closing unclosable tabs (#372)
This fixes a bug whereby you could close a dock widget by middle-clicking its tab, even if its `CDockWidget::DockWidgetClosable` flag is set to `false`.
2021-11-16 06:24:39 +01:00
Rodrigo Oliva
31e26c2c1c
Fix crash when adding closed dock widgets to the manager. (#366)
Co-authored-by: Rodrigo Oliva <Rodrigo.Oliva@king.com>
2021-10-20 16:54:47 +02:00
Uwe Kindler
de05ddd203 Renamed RecreateContentsWidgetOnCloseAndOpen into DeleteContentOnClose 2021-10-14 13:57:06 +02:00
Uwe Kindler
03a8eaa44f Merge branch 'ff/editor/dev/widget_factory' of https://github.com/rolivav/Qt-Advanced-Docking-System into rolivav-ff/editor/dev/widget_factory 2021-10-14 13:18:54 +02:00
Uwe Kindler
48e79f12a7 Fixed Linux bug in DockFocusController.cpp 2021-10-11 22:05:37 +02:00
Uwe Kindler
89aa3d5251 Fixed null pointer bug in DockFocusController.cpp 2021-10-11 21:20:21 +02:00
Rodrigo Oliva
87b0596ebc
Add feature to close tabs with the middle mouse button. (#360)
Co-authored-by: Rodrigo Oliva <Rodrigo.Oliva@king.com>
2021-10-11 20:33:56 +02:00
Rodrigo Oliva
a08857804a Add new flag that will delete the contained widget and recreate it from a factory when closing and opening the dock widget. 2021-10-10 21:37:16 +02:00
nmiglio
dbca6d79cf
Update DockWidget.h (#364) 2021-10-08 19:40:57 +02:00
Francis Hart
a24221c002
Fix MSVC compiler warning C4275 (#361)
The CFloatingDockContainer is exported, but inherits from a base
class that is not exported. This triggers a compiler warning under
MSVC toolchain. This patch fixes the issue by exporting the
IFloatingWidget class.
2021-10-08 19:40:30 +02:00
Lucas
0b82ff30fe
Fix issue #351: https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/351 (#357) 2021-10-01 15:30:33 +02:00
Rodrigo Oliva
0c44accb44
Remove deprecation warning while building with Qt 5.15. (#344)
Co-authored-by: Rodrigo Oliva <Rodrigo.Oliva@king.com>
2021-08-23 19:47:15 +02:00
Uwe Kindler
401e8cf492 Improved initial size of floating dock widget 2021-07-30 13:50:17 +02:00
Uwe Kindler
1e3af06bb0 Fixed notifyFloatingWidgetDrop() function 2021-07-28 13:44:34 +02:00
Uwe Kindler
5af7492b67 Changed DockFocusController to properly handle window activation 2021-07-27 12:22:31 +02:00
Uwe Kindler
8d1465a81f Added initial support for setting focus highlighting without uisng setFocus 2021-07-25 18:12:27 +02:00
Charles Cross
fc91502162
Removes dependency on QtX11Extras for Qt6.2-beta (#331)
* Removes dependency on QtX11Extras and implements placeholder solution with QtGUI private API

* Fixes CMakeLists.txt to work with Qt5 and Qt6

* Removes all other uses of X11extras

* Renames and moves x11 methods into ads::internal

* Fixes typo

* Adds gui-private to src.pro
2021-07-17 14:49:20 +02:00
Uwe Kindler
511132ee4f Fixxed issue #294 - Tab refresh problem with a QGLWidget 2021-06-17 20:32:45 +02:00
Rodrigo Oliva
ad30211dae
Update icon label tooltip when the tab tooltip changes (#322)
Co-authored-by: Rodrigo Oliva <Rodrigo.Oliva@king.com>
2021-05-26 06:59:36 +02:00
Rui Oliveira
aff0bd6e25
Add Qt6 support on CMake (#319) 2021-04-28 22:52:45 +02:00
jporcher
2f041a0eed
Fix memory leaks (#314) 2021-04-20 14:25:30 +02:00
Uwe Kindler
ffa0105d3e Fixed emission perspectiveListChanged signal after loading of perspective list and added perspectiveListLoaded signal 2021-04-13 07:05:17 +02:00
Walter Bormans
13853573ea
Additional Qt keyword conversion. (#299)
This comit is an addtion to pull request #295. Not all Qt keywords were included.

Co-authored-by: Walter Bormans <walter.bormans@paradoxcat.com>
2021-01-22 06:18:34 +01:00
Walter Bormans
e66ef604a7
Removes reliance on special Qt keywords. (#295)
This allows Qt Advanced Docking system to be compiled with the QT_NO_KEYWORDS definition.
This can help avoid conflicts with other dependancies for a project.

Co-authored-by: Walter Bormans <walter.bormans@paradoxcat.com>
2021-01-15 09:08:27 +01:00
Uwe Kindler
a614e3cc3d Fixed CDockAreaWidget::nextOpenDockWidget() function to properly return a DockWidget with tab if this is possible
Added new emptydockarea example
2021-01-11 11:07:03 +01:00
Uwe Kindler
ebde50b492 Fixed FloatingDockContainer Linux build for Qt6 2021-01-10 10:22:54 +01:00
Uwe Kindler
2a6bd306cb Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System 2021-01-09 19:03:14 +01:00
Uwe Kindler
8a27a5596b Added new CDockWidget flag CDockWidget::NoTab to hide the tab from the dock area title bar 2021-01-09 19:02:25 +01:00
Uwe Kindler
0312682e07 Fixed wrong pixmap is null test in ElidingLabel 2021-01-02 20:50:26 +01:00
Uwe Kindler
8d14068df7 Fixed QMouseEvent::globalPos() warning 2021-01-02 20:29:59 +01:00
Uwe Kindler
018ce2001e Fixed all Qt6 build issues 2021-01-02 18:06:45 +01:00
Uwe Kindler
c8fe4c46dd Fixed DockAreaWidget minimumSizeHint 2020-12-23 16:16:13 +01:00
Uwe Kindler
899e06be1c Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System 2020-11-23 12:57:23 +01:00
spking11
66687dc8b6
Add utf-8 support for msvc within cmake. (#280)
Co-authored-by: spking11 <spking11@foxmail.com>
2020-11-23 12:55:19 +01:00
Uwe Kindler
b8fe620276 Merge branch 'master' into adddockwidget_fix 2020-11-23 08:04:11 +01:00
spking11
1a50ea9892
Add utf-8 support for msvc to resolve building error in some windows systems. (#277) 2020-11-21 17:29:36 +01:00
Uwe Kindler
0a096869fe Fixed adding of dock widgets to floating widget 2020-11-21 15:08:30 +01:00
Uwe Kindler
44dc76bd19 Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System 2020-10-31 13:56:30 +01:00
Uwe Kindler
aedbaec497 Addes support for setting DockWidgetTab icon size via stylesheet 2020-10-31 13:56:16 +01:00
Uwe
04aa622111 Fixed static qmake build 2020-10-30 21:49:28 +01:00
Uwe
3564229482 Fixed CMake static build 2020-10-30 21:13:19 +01:00
githubuser0xFFFF
637db7f4f9
Update CMakeLists.txt 2020-10-27 18:50:54 +01:00
Uwe Kindler
f6d3d6d34a Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System 2020-10-27 15:07:37 +01:00
Uwe Kindler
92369bdb26 Fixed static CMake build for Linux 2020-10-27 15:04:54 +01:00
Nick D'Ademo
8f95447108
Fix. (#264) 2020-10-23 21:00:33 +02:00
Christian Seiler
0e3c3bab45
DockManager: add the ability to programmatically update splitter sizes (#266)
Add the ability to programmatically update splitter sizes. The user must
specify the dock area that is contained in a splitter and a list of
sizes. The list of sizes will be passed to the splitter that immediately
contains the specified dock area. If the dock area is not part of a
splitter the method will have no effect.

Co-authored-by: Christian Seiler <c.seiler@luxflux.de>
2020-10-23 20:59:50 +02:00
Christian Seiler
3a5c965306
Ensure that the stylesheet doesn't affect all QSplitter instances (#265)
The stylesheet should only change the style of ads::CDockSplitter
instances, but not all QSplitter instances. Otherwise all splitters
within any dock widget will also be affected and look different from
the default Qt style.

Co-authored-by: Christian Seiler <c.seiler@luxflux.de>
2020-10-21 22:07:41 +02:00
Christian Seiler
0c88457037
Fix CMake build on macOS (don't try to link against Qt's X11Extras) (#267)
macOS is identified as UNIX by CMake, but Qt doesn't actually use X11
there (and X11 support is not available by default anyway). Change the
condition that includes X11Extras to if (UNIX AND NOT APPLE) instead of
just if (UNIX) to mitigate that. This makes the build on macOS work
with CMake.

Co-authored-by: Christian Seiler <c.seiler@luxflux.de>
2020-10-21 22:05:36 +02:00
Uwe Kindler
46fa22dc6a Documented custom close handling 2020-10-13 21:24:04 +02:00
Nicolas ELIE
b320bb17d1 Merge remote-tracking branch 'upstream/master' into forceclose 2020-10-02 11:04:18 +02:00
Uwe Kindler
5fad43377b Fixed a bug in restoreStateFromXml function
The function accessed the objectName from the CentralWidget even if there is no cental widget
2020-09-25 14:40:28 +02:00
Uwe Kindler
c370875128 Properly implemented save and restore with central widget 2020-09-21 10:51:02 +02:00
Uwe Kindler
1c261515db Improved debug output in DockContainerWidget 2020-09-21 09:39:42 +02:00
Uwe Kindler
37cbae84ca Fixed debug output in FloatingDockContainer.cpp 2020-09-21 09:39:03 +02:00
Uwe Kindler
f645fe725a Added dockWidgetAdded signal to CDockManager 2020-09-18 08:25:47 +02:00
Uwe Kindler
fdedd7d92a Added focusedDockWidget() function to DockManager 2020-09-07 08:17:07 +02:00
Uwe Kindler
70738f7549 Fixed Linux CMake build 2020-09-02 11:48:12 +02:00
Uwe Kindler
65058d3a48 Fixed issue #251 - Window momentarily flashes as floating widget 2020-09-02 09:04:59 +02:00
Uwe Kindler
175b48569f Removed Linux stuff from Mac build 2020-08-31 23:46:42 +02:00
Uwe Kindler
55f23799bc Fixed CMake Windows build 2020-08-31 23:29:33 +02:00
Nicolas Elie
646211cc4c
Merge branch 'master' into forceclose 2020-08-31 16:38:16 +02:00
Uwe Kindler
831d90ebf5 Added X11Etras package to CMakeLists.txt 2020-08-31 16:20:36 +02:00
Uwe Kindler
73f42d55ca Updated linux stylesheets to fix titlebar issue on KDE 2020-08-31 11:57:30 +02:00
Uwe Kindler
059a055483 Renamed FloatingContainerForceCustomTitleBar to
FloatingWidgetForceQWidgetTitleBar
2020-08-31 09:48:32 +02:00
Uwe Kindler
dcf1ee393e Added support for CSS styling of custom widget titlebar close button 2020-08-31 09:38:18 +02:00
Uwe Kindler
04aecb3693 Some code cleanup, adjustments to match ADS coding style 2020-08-31 08:32:56 +02:00
helywin
533d174abc Finished implementing maximize for linux.
Added FloatingContainerForc*TitleBar to switch between native and custom titlebar.

Co-authored-by: SleepProgger <SleepProgger@users.noreply.github.com>
2020-08-29 05:03:21 +02:00
Uwe Kindler
5443e5f998 Merge branch 'centralwidget' 2020-08-24 13:44:19 +02:00
Uwe Kindler
543d226ba3 Fixed memory leak 2020-08-24 13:32:50 +02:00
Uwe Kindler
03b1848b43 Reverted changed 2020-08-24 13:25:20 +02:00
Uwe Kindler
05ab8d2067 Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System 2020-08-24 13:23:40 +02:00
Uwe Kindler
c28a27c81c Reverted changes that cause application crash 2020-08-24 13:22:34 +02:00
Uwe Kindler
1b42048135 Fixed pure virtual function call 2020-08-24 11:33:40 +02:00
Uwe Kindler
bfe6b9bd26 Merge branch 'FixesPack_Parenting_Memory_leaks_etc' of https://github.com/ymiroshnyk/Qt-Advanced-Docking-System into ymiroshnyk-FixesPack_Parenting_Memory_leaks_etc 2020-08-24 11:22:50 +02:00
Uwe Kindler
835a532e75 Corrected constness of some functions, changed signatur of setCentralWidget function 2020-08-24 10:22:12 +02:00
Uwe Kindler
d383ade03c Merge branch 'Central-Widget' of https://github.com/hulswit/Qt-Advanced-Docking-System into hulswit-Central-Widget 2020-08-24 09:50:12 +02:00
Uwe Kindler
6d9c4cee02 Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System 2020-08-24 09:47:34 +02:00
Yurii Miroshnyk
a565239c4a Fixes pack. Parenting, memory leaks, floating widgets deleting.
* DockWidget always has DockAreaWidget as parent. It's not necessary to make it nullptr. This fixes many bugs related to restoring inactive tabbed DockWidgets.

* Fixed memory leaks related to QBoxLayout::takeAt().

* Fixed algorithm of deleting remaining floating widgets after restore.
2020-08-21 19:24:55 +03:00
hulswit
14c29f695c Central widget update
Updated the setting of central widget with option to set where the possible old central widget will be placed. Fixed option of "unsetting" central widget by setting it to nullptr.
2020-08-21 13:30:59 +02:00
shelomentsev
703a9b3e12
Update the state of close button on titlebar and tabbar when CDockWidget::DockWidgetClosable changed. (#240) 2020-08-21 08:09:13 +02:00
shelomentsev
0eca1b0433
Memory leak (#242)
* Delete widgets without parents in CDockAreaLayout.

* Fixed the place where dock widgets witout parents are destroyed.
2020-08-21 08:08:33 +02:00
hulswit
691c9683ce Merge branch 'master' into Central-Widget 2020-08-20 16:37:05 +02:00
hulswit
1a11e5ddcd Central Widget concept added
Adde option to set a dock widget as central widget. It influences resizing behavior of the splitters. The central widget will be stretched with the main window and remaing dock widgets and threir respective areas will be resized only vertically if docked left or right  and horizontaly if docked top or bottom
2020-08-20 16:36:02 +02:00
shelomentsev
a4d281dbb6
Floating window fixes. (#239)
* Don't show a CFloatingDockContainer if all its CDockWidget were hidden before its first shown.

* Destroy empty CFloatingDockContainer when removing CDockWidget via removeDockWidget function.
2020-08-20 12:58:15 +02:00
shelomentsev
8361f90dce
Delete widgets without parents in CDockAreaLayout. (#241) 2020-08-20 12:56:37 +02:00
Uwe Kindler
04b4ff8b4b Fixed typo in DockWidget documentation 2020-08-19 15:16:13 +02:00
Uwe Kindler
121248c3c5 Improved documentation 2020-08-19 13:49:20 +02:00
Uwe Kindler
c6cf9487ba Added maximize button svg icon 2020-08-18 20:36:02 +02:00
Uwe Kindler
c78cc17730 Properly persist dock area HideSingleWidgetTitleBar flag (and all other dock area flags) 2020-08-18 10:48:35 +02:00
Uwe Kindler
f72a8568c5 Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System 2020-08-17 23:51:14 +02:00
Uwe Kindler
11aec65967 Properly persist the AllowedAreas state of CDockAreaWidget 2020-08-17 23:50:37 +02:00
Nicolas ELIE
40636d1e05 Add flag to DockWidget to force dw to be closed with the area that contains it 2020-08-04 11:50:32 +02:00
Nicolas Elie
75841415a3
Update Python bindings (#231)
* Update Python bindings to reflect changes in 8443414

* [Python] Fix no such signal error for signals with a reference to an object in ads namespace

* [Python] Update examples
2020-07-30 13:44:05 +02:00
Some Guy
8443414ae3 Added setHideSingleWidgetTitleBar to DockWidgetArea 2020-07-21 08:20:17 +02:00
Uwe Kindler
81c99745d4 Fixed a bug when dragging a FloatingDragPreview from another floating widget over an empty MainWindow 2020-07-13 09:08:39 +02:00
Uwe Kindler
d6831caea4 Some refatoring in DockFocusController to improve code 2020-07-13 08:43:51 +02:00
Uwe Kindler
aa25e1fd56 Improved emission of focusedDockWidgetChanged signal to ensure, that the application can restore the focus of the focused application dock widget content 2020-07-13 08:41:30 +02:00
Uwe Kindler
0459aff34f Cleanup of debug messages in DockFocusController 2020-07-10 22:08:28 +02:00
Uwe Kindler
aeb0a27401 Improved code documentation 2020-07-08 08:10:27 +02:00
Uwe Kindler
50e3ef3dd8 Fixed stealing of focus by tab close button 2020-07-08 08:08:50 +02:00
Uwe Kindler
9974256d71 Fixed double emission of focusedDockWidgetChanged() signal 2020-07-07 14:38:03 +02:00
Uwe Kindler
8cf4134125 Some changes to ensure emission of focusedDockWidgetChanged signal 2020-07-06 08:22:48 +02:00
Uwe Kindler
ef5b22c616 Merge branch 'master' into focus_changed_fix 2020-07-06 07:35:08 +02:00
Uwe Kindler
acfc96f57c Properly update DockAreaTabBar geometry if tab text changed 2020-07-05 22:29:13 +02:00
Uwe Kindler
2de3e7e3be Deferred focusedDockWidgetChanged signal until dock widget becomes visible 2020-07-03 23:24:20 +02:00
Uwe Kindler
679fa81f6d Added new CDockWidget feature flag focusable 2020-07-03 14:55:33 +02:00
Uwe Kindler
281127c2c3 Merge remote-tracking branch 'remotes/origin/issue212' 2020-07-01 07:48:36 +02:00
Uwe Kindler
8e621f1f20 Properly reparent TabWidget to DockWidget if TabWidget is removed from TabBar 2020-06-30 16:34:59 +02:00
Uwe Kindler
0948f73bf8 Properly reset DockManager pointer when removing DockWidget from DockManager 2020-06-30 11:45:23 +02:00
Uwe Kindler
4bc1a18db2 Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System 2020-06-30 10:00:03 +02:00
Uwe Kindler
80eb628ea3 Fixed naming of the dock area titlebar actions to be consistent 2020-06-30 09:59:42 +02:00
Uwe Kindler
d811915a0c Reset DockArea pointer of DockWidget when removing DockWidget from DockArea 2020-06-29 22:11:37 +02:00
Hannes Schulze
0225563b46
Fix Undefined Behavior in LastAddedAreaCache (#211) 2020-06-28 21:07:17 +02:00
Uwe Kindler
ace6d69695 Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System 2020-06-26 11:19:58 +02:00
Uwe Kindler
2ad92ce958 Removed superfluous code to fix issue #209 2020-06-26 11:18:46 +02:00
Nick D'Ademo
50c4a8ed48
Update CMakeLists.txt (#204)
Pass header files to add_library() so they appear in the 'qtadvanceddocking' Visual Studio project.
Add path to header files in PUBLIC include build interface so the 'qtadvanceddocking' target can be built in-source in a CMake project.
2020-06-19 20:01:48 +02:00
Uwe Kindler
3de877fe56 Updated linux stylesheet
Default linux style uses now the provided SVG buttons for the floating widget title bar close button
2020-06-18 09:21:46 +02:00
Uwe Kindler
e2cebd9dcf Updated stylesheet to provide uniform look of icons for all platforms
added detach-button icon
2020-06-18 08:29:41 +02:00
Uwe Kindler
58744408f0 Switched dock area close button icon to ads specific svg icon 2020-06-14 16:25:18 +02:00
Uwe Kindler
e36655a7ab Fixed wrong current index when removing a widget from CDockAreaLayout 2020-06-14 16:12:56 +02:00
Uwe Kindler
ffed6a9c5f Merged pull request #201 but made it configurable via config flag 2020-06-14 10:39:07 +02:00
Davide Faconti
38d8e6aa25 fix 2020-06-13 17:22:25 +02:00
Davide Faconti
c109ef836a use equal splitter size for widget added programmatically 2020-06-13 16:59:13 +02:00
Uwe Kindler
caa1a9f330 Stylesheet update
Updated stylesheet to use svg icon for close button instead of system icon
2020-06-11 08:36:01 +02:00
Uwe Kindler
e71884b23d Replaced configFlags().testFlag() with testConfigFlag() to improve code readibility 2020-06-11 08:06:37 +02:00
Uwe Kindler
d04c386948 Splitted stylesheets into default and focus_highlighting to properly support both use cases 2020-06-11 07:43:06 +02:00
Uwe Kindler
e63d1b1683 Fixed a bug that caused invisible TabWidget for dock widgets that are not part of a restored state 2020-06-10 16:07:42 +02:00
Uwe Kindler
0c13402516 Added documentation for FocusHighlighting flag 2020-06-10 07:16:35 +02:00
Uwe Kindler
c939df73fa Merge branch 'focused_dockwidget' 2020-06-09 21:57:23 +02:00
Uwe Kindler
fdf169ce9a Fixed docking of floating widgets for MacOS 2020-06-09 20:29:19 +02:00
Uwe Kindler
ff3fcdcacd Removed debug output 2020-06-09 14:40:13 +02:00
Uwe Kindler
a9268e6bf7 Fixed build issues and improved styling
Improved styling of close buttons and focused close buttons
2020-06-07 17:28:23 +02:00
Uwe Kindler
0227bd1786 Added icon for proper styling of focused close icon 2020-06-07 17:19:07 +02:00
Uwe Kindler
227037e42a Added new close button SVG icon 2020-06-07 15:20:24 +02:00
Uwe Kindler
cd495a14ec Fixed MSVC compiler warning 2020-06-07 15:20:08 +02:00
Uwe Kindler
312a8cf500 Enabled ClickFocus for CDockWidget to support focussing in case the content does not support it
Renamed FocusStyling to FocusHighlighting
2020-06-06 14:59:03 +02:00
Uwe Kindler
2fc8bbe9c9 Added mising DockFocusController files 2020-06-05 21:03:47 +02:00
Uwe Kindler
f5c4b26aab Moved focus related functionality into CDockFocusController class to keep the dock manager code clean 2020-06-05 20:42:43 +02:00
Uwe Kindler
c4d2d72e92 Added activateWindow() call in CFloatingDockCiontainer::showEvent
This is required to properly style the floating widget that contains the currently focused widget
2020-06-05 13:40:36 +02:00
Uwe Kindler
f90f0b0427 Properly implemented focusedDockWidgetChanged() signal 2020-06-05 12:14:26 +02:00
Uwe Kindler
d360b4ced2 Merge branch 'master' into focused_dockwidget 2020-06-05 07:40:39 +02:00
Uwe Kindler
2e8137ad85 Fixed setting of CDockingStateReader file version - use internal file version instead of user file version 2020-06-05 07:39:51 +02:00
Uwe Kindler
a65b1bdcaf Removed new dropped signals 2020-06-05 07:27:44 +02:00
Uwe Kindler
4041aa72cc Implemented proper support for setting floating widget focused widget 2020-06-05 06:55:43 +02:00
Uwe Kindler
bcb7118710 Fixed typos 2020-06-04 20:48:59 +02:00
Uwe Kindler
45390506dd Continued implementation 2020-06-04 20:40:23 +02:00
Uwe Kindler
f58a3d4401 Change to support loading of older files without UserVersion atribute 2020-06-03 19:53:17 +02:00
Uwe Kindler
a3e979a8ad Disabled setFocus in CDockWidget::setActiveTab 2020-06-03 19:49:57 +02:00
Uwe Kindler
adb72737e8 Merge branch 'version_fix' into focused_dockwidget 2020-06-03 17:53:05 +02:00
Uwe Kindler
e626a7e302 Merge branch 'master' into focused_dockwidget 2020-06-03 17:52:46 +02:00
Uwe Kindler
8b6df4aaa5 Fixed saveState() and restoreState() version handling to work like the function from QMainWindow 2020-06-03 07:25:09 +02:00
Uwe Kindler
ccf8ea9d1e Try to fix appveyour build problem 2020-05-27 15:26:36 +02:00
Uwe Kindler
dfb8543aee Properly handle Escape key in native Window event handling function if event WM_EXITSIZEMOVE occurs 2020-05-27 13:28:29 +02:00
Uwe Kindler
ea9b39a9dd Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System 2020-05-26 06:41:58 +02:00
Uwe Kindler
1848ffa35a Properly reset widget pointer to nullptr in takeWidget() 2020-05-26 06:41:40 +02:00
Luca
c53be0e97d
Modernised CMake build files and CI configs (#185)
* Modernised CMake build files and CI configs

Fixed include formats

* Fixed build errors and warnings

* Fixes to allow CMake find_package
2020-05-24 09:14:33 +02:00
Uwe Kindler
ae999f132e Improved focus styling 2020-05-23 14:45:49 +02:00
Uwe Kindler
9aa958e8b0 Made all focus related code optional - only if FocusStyling flag is enabled 2020-05-23 11:17:31 +02:00
Uwe Kindler
5652c8440e Added new CDockManger config flag FocusStyling 2020-05-23 11:10:03 +02:00
Uwe Kindler
ce11fa9d10 Merge branch 'master' into focused_dockwidget 2020-05-22 21:28:02 +02:00
Uwe Kindler
6a393955cd Removed debug output 2020-05-22 21:18:59 +02:00
Uwe Kindler
6b5f364864 Fixed issue #179 - appearance of drop indicators then Windows option "Show window contents while dragging" is
FloatingDragPreview.cpp: moved code from moveEvent into moveFloating function to remove indirection and to simplify code
Moved code from moveEvent() function into moveFloating() to remove indirection and to simplify code
Implemented Windows drag handling with native WM_ nonclient area messages
2020-05-22 19:43:50 +02:00
Uwe Kindler
3b2f940efa Fixed windows build 2020-05-21 10:32:31 +02:00
Uwe Kindler
9dcbe91f02 Merge branch 'focused_dockwidget' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System into focused_dockwidget 2020-05-21 08:29:55 +02:00
Uwe Kindler
4da810ba7c Added window()->activateWindow() dropFloatingWidget() function 2020-05-20 14:20:27 +02:00
Uwe Kindler
819f1effc5 Added support for focus styling of CFloatingWidgetTitleBra 2020-05-19 22:53:52 +02:00
Uwe Kindler
ba94ef3493 Merge branch 'master' into focused_dockwidget 2020-05-19 20:51:19 +02:00
Uwe Kindler
36bcbded54 Fixed showing of dock area when inserting a dock widget into a hidden dock area
fixed setting of DockAreaTabBar index to prevent showing of tab 0 when inserting a dock widget into an area with no current index tab
2020-05-19 20:26:57 +02:00
Uwe Kindler
0127fd89a3 Merge branch 'master' into focused_dockwidget 2020-05-17 12:26:22 +02:00
Uwe Kindler
eee9ebb41d Fixed an issue that caused wrong inserten order of dock widget when dropping a floating widget to the left or top container drop area 2020-05-17 12:21:52 +02:00
Uwe Kindler
79cb889d83 Improved focus style handling 2020-05-17 08:51:58 +02:00
Patrick Stewart
cdb8926673
Add missing override (#176) 2020-05-15 19:48:19 +02:00
Uwe Kindler
516465aefb Fixed issue #173 - tab changes position when redocking it to the same position 2020-05-15 12:25:22 +02:00
Uwe Kindler
e760d3e967 Improved focus handling when dropping a dock widget 2020-05-14 09:06:04 +02:00
Uwe Kindler
c5333a2414 Merge branch 'master' into focused_dockwidget 2020-05-14 07:34:31 +02:00
Uwe Kindler
7c03b1b936 Fixed gcc compiler warning caused by supefluous extra semi-colon by all QT_FORWARD_DECLARE_CLASS statements 2020-05-14 07:27:48 +02:00
Uwe Kindler
427b5a0be0 Added nullptr check to fix potential issue #171 - nullptr access closing a CFloatingDockContainer 2020-05-14 07:20:30 +02:00
Patrick Stewart
04ca4ae674
Support for Qt built with the -qtnamespace configure option (#170) 2020-05-13 23:26:05 +02:00
Uwe Kindler
3a0c2a3113 Some refactorings in onFocusChanged() to improve code readibility 2020-05-13 22:51:44 +02:00
Uwe Kindler
789f78354a Merge branch 'master' into focused_dockwidget 2020-05-13 21:27:21 +02:00
Uwe Kindler
d418d92ef4 Added missing DockAreaTitleBar_p.h to src.pro 2020-05-13 16:57:36 +02:00
Jan Krassnigg
115e67edc4 Moved private classes into dedicated header 2020-05-13 16:40:43 +02:00
Uwe Kindler
4c75168152 Improved focus setting when closing a dock area widget 2020-05-13 13:18:05 +02:00
Uwe Kindler
64a2024513 Removed debug output 2020-05-13 11:20:32 +02:00
Uwe Kindler
056e1ef947 Improved highlighting focused dock widget 2020-05-13 11:17:43 +02:00
Jan Krassnigg
a9965bf6dc Moved CTitleBarButton and CSpacerWidget declaration into DockAreaTitleBar.h
This gets rid of the need to MOC DockAreaTitleBar.h and DockAreaTitleBar.cpp and it means that DockAreaTitleBar.cpp does not need to #include "DockAreaTitleBar.moc" anymore, which is a file that is generated by the build system and therefore may be named differently when using a custom build system.
2020-05-13 08:04:50 +02:00
Uwe Kindler
f54869fbf7 Improved setting of CDockWidgetTab focus 2020-05-11 16:29:58 +02:00
Uwe Kindler
835a20f03f Merge branch 'master' into focused_dockwidget 2020-05-11 15:50:47 +02:00
Uwe Kindler
aa7976dac6 Fixed issue #164 - Single DockArea cannot be split 2020-05-11 09:03:28 +02:00
Uwe Kindler
067338ef23 Enable styling of focused dockwidget 2020-05-10 19:30:34 +02:00
Uwe Kindler
cb18bc0d91 Fixed visibility issue when adding dock widget after all other dock widgets have ben closed in the GUI - fix for GitHub issue #148 2020-05-07 16:13:59 +02:00
Uwe Kindler
62ce9dca5d Fixed small bug in FloatingDragPreview that caused flashing of hidden overlay when dragging the last visible dock widget in non opaque docking mode 2020-05-07 14:20:31 +02:00
Uwe Kindler
0c9a1ee3f2 Fixed a bug in FloatingDragPreview that prevents dock widget from floating when dragging over another dock widget 2020-05-04 15:14:35 +02:00