Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto hide feature #452

Closed
Closed
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
256 commits
Select commit Hold shift + click to select a range
e456503
Merge branch 'master' into auto_hide_feature
Sep 7, 2022
1a903e7
add pin icon
Sep 7, 2022
4a77580
swap position of auto hide button and detach group button
Sep 7, 2022
9735f41
Fix toggle view through the actions menu not working correctly
Sep 7, 2022
1d9902b
Make tabs menu hidden when overlayed
Sep 7, 2022
302fcd1
Fix bug where dragging an overlayed widget would cause it to be empty
Sep 7, 2022
068797d
Fixed build issues of original pull request
githubuser0xFFFF Sep 7, 2022
de4a59d
Re added back in CentralWidgetExample after mistakenly removing it
Sep 8, 2022
8bfb98e
Remove auto hide feature being set by default. Add config for the def…
Sep 8, 2022
0087a1b
Add left right styling to the dock widget side tab
Sep 8, 2022
ecccba4
Add overlay splitter object name
Sep 8, 2022
5ddb02c
fix the border styling of the dock widget side tab when not focused
Sep 8, 2022
a279e71
Fix side tab bar area name being saved wrong in the XML
Sep 8, 2022
be4e5a8
Change the styling - Now the dock widget side tab has a gray left/right
Sep 8, 2022
37edf47
Fix the side tab widget not updating style when its restored from XML
Sep 8, 2022
9bfd77a
Remove None and Bottom from the SideTabBarArea enum
Sep 8, 2022
af549d8
Add title label to the overlayed dock area
Sep 8, 2022
c1df05b
Fix bug where undock button would be show incorrectly in floating dock
Sep 8, 2022
fac8126
Whitespace changes only
Sep 8, 2022
3ec395f
update default stylesheet
Sep 8, 2022
60c2200
Add hover styling
Sep 8, 2022
a2e9c1a
Add config flag for enabling the overlay dock area title
Sep 8, 2022
6ae14fa
add comment regarding empty widget in overlay dock container
Sep 8, 2022
1097d65
fix elision for vertical eliding label.
nickdademo Sep 9, 2022
84c6afa
Reworked toggle view
Sep 9, 2022
dc05ec3
Add nullptr check when restoring state with overlayed widgets
Sep 9, 2022
54b9a8d
Merge branch 'auto_hide_feature' of github.com:duerr-ndt/Qt-Advanced-…
Sep 9, 2022
22402e7
Added support for delete on close to overlayed widgets
Sep 9, 2022
621e5e7
fix tooltips for auto hide button and close button
Sep 9, 2022
3ef1ac9
Fix splitter size being saved incorrectly if the overlay widget is ne…
Sep 9, 2022
883d5b5
fix crash when sometimes restoring state
Sep 9, 2022
489f72a
Add side tab widget icons
Sep 12, 2022
214c415
Add Bottom side bar
Sep 13, 2022
4841d9b
Set splitter sizes based on proportion settable in the dock widget
Sep 13, 2022
dfc2714
Fix invalid state on restore
Sep 13, 2022
b950b8a
Fix overlayed containers able to drag into the center
Sep 13, 2022
9a69955
Simplify logic when restoring state
Sep 13, 2022
263c731
Add bottom side icon config
Sep 13, 2022
daa52e1
Add missing update style to dock widget side tab
Sep 13, 2022
42498b2
Fixed some more spacing in DockWidgetSideTab
Sep 13, 2022
8ddabc4
Fix docking behavior when there is a central widget
Sep 13, 2022
1919254
Fix central dock widget being pinnable
Sep 13, 2022
d394930
Change splitter proportion from int to double
Sep 13, 2022
f0f3cae
tweak spacing
Sep 13, 2022
ac311d6
Fix moving content to parent on toggle view
Sep 13, 2022
0e5329f
add comment
Sep 13, 2022
ee97b03
Fix crash when restoring state
Sep 14, 2022
6b85b2b
Revert "Fix crash when restoring state"
Sep 14, 2022
773f186
Fix crash when restoring state but better
Sep 14, 2022
8e5e974
Remove event filter from dock area as well
Sep 14, 2022
f3305b9
Remove old crash fix
Sep 14, 2022
48163d2
add paintEvent override for styling purposes.
nickdademo Sep 14, 2022
5df2467
add orientation prop to SideTabBar.
nickdademo Sep 14, 2022
06bcf2c
Add insert order for overlayed widget to the side tab bar
Sep 14, 2022
4d3328e
Fix side tab widget ordering
Sep 14, 2022
6998c0e
double -> float
Sep 15, 2022
68e5aec
add rais
SyarifFakhri Sep 15, 2022
68a3bcd
Add assert
SyarifFakhri Sep 15, 2022
59108ed
Add right bottom and left bottom
SyarifFakhri Sep 15, 2022
060313c
clear dock widget focus on repin
SyarifFakhri Sep 15, 2022
8732484
Fix side tab widget resizing strangely on first add
SyarifFakhri Sep 15, 2022
f69b1e1
Fix active X widgets not being rendered correctly
SyarifFakhri Sep 19, 2022
ea0eac0
Fix autohide example
SyarifFakhri Sep 19, 2022
6e143de
Fix side tab widgets being the wrong size when being added to a layout
SyarifFakhri Sep 19, 2022
3d4d677
Bump XML version
SyarifFakhri Sep 19, 2022
40dccdb
Remove testing code
SyarifFakhri Sep 19, 2022
2bb1589
Add missing check for bottom sidebar config
SyarifFakhri Sep 19, 2022
c850e36
Update css for qt-5
SyarifFakhri Sep 19, 2022
b567f6c
Add documentation
SyarifFakhri Sep 19, 2022
32f9b46
Fix weird behavior when widget is overlayed
SyarifFakhri Sep 19, 2022
0e6971e
Remove [[fallthrough]]
SyarifFakhri Sep 20, 2022
8ac8d63
Ensure that the closed state is consistent
SyarifFakhri Sep 20, 2022
7f6fa0c
Fix linux styling
SyarifFakhri Sep 22, 2022
880a7f1
add config flag in ads demo
SyarifFakhri Sep 22, 2022
53e8010
Merge branch 'auto_hide_feature' of github.com:duerr-ndt/Qt-Advanced-…
SyarifFakhri Sep 22, 2022
3cd0265
- Fix crash caused by not removing dock area from parent container
SyarifFakhri Oct 3, 2022
a74e034
remove unused vars
SyarifFakhri Oct 3, 2022
412f245
Dissallow non focusable dock widgets from being pinned
SyarifFakhri Oct 6, 2022
8fc3338
Pulled latest changes from duer autohide branch
githubuser0xFFFF Oct 12, 2022
62d3d73
Made Auto Hide Feature independent from Focus Feature and renamed Ove…
githubuser0xFFFF Oct 12, 2022
6c27115
Ignore MouseButtonPress events of SideTabWidget in event filter
githubuser0xFFFF Oct 12, 2022
60526f2
Fixed some typos
githubuser0xFFFF Oct 12, 2022
ae55013
Merge branch 'auto_hide_feature' of github.com:githubuser0xFFFF/Qt-Ad…
SyarifFakhri Oct 13, 2022
8610a64
Rename overlayDockContainer -> AutoHideDockContainer
SyarifFakhri Oct 13, 2022
84ca7b1
fix side tab not hiding when double clicking dock title bar
SyarifFakhri Oct 13, 2022
b51c56e
Fix bug where left and bottom overlay splitters cannot be clicked
SyarifFakhri Oct 13, 2022
589a62f
update user guide
SyarifFakhri Oct 13, 2022
5b3ad7e
fix typo
SyarifFakhri Oct 13, 2022
ad0c210
fix crash when using widgets that delete on close
SyarifFakhri Oct 14, 2022
efb87c8
update size then mask
SyarifFakhri Oct 14, 2022
91190e8
cleaner dock widget side tab click handling
SyarifFakhri Oct 14, 2022
ac8cf86
remove unused css
SyarifFakhri Oct 14, 2022
f9b6223
Add top area
SyarifFakhri Oct 14, 2022
b0544be
Added activeTab property
SyarifFakhri Oct 14, 2022
754a41d
Formatting and cleanup
SyarifFakhri Oct 14, 2022
4399f6e
Update css
SyarifFakhri Oct 14, 2022
9f9d979
Added sideTabBarArea property to CAutoHideDockContainer to improve CS…
githubuser0xFFFF Oct 15, 2022
a8a40f0
Merge branch 'duerr-ndt-auto_hide_feature' into auto_hide_feature
githubuser0xFFFF Oct 17, 2022
e311712
Changed moveContentsToParent() logic when disabling auto dock for a c…
githubuser0xFFFF Oct 17, 2022
bb630ca
Changed toggleAutoHideArea)= logic - only the current dock widget is …
githubuser0xFFFF Oct 17, 2022
1431244
Replaced tab bar areas LeftTop, LeftBottom, RightTop, RightBottom wit…
githubuser0xFFFF Oct 17, 2022
ffe6ecc
Improved logic for finding the auto hide side location
githubuser0xFFFF Oct 17, 2022
96a5443
Added alternative auto hide button svg icon and modified stylesheet t…
githubuser0xFFFF Oct 17, 2022
90b9290
Move autohide related CSS into a separate block to have all settings …
githubuser0xFFFF Oct 17, 2022
60e0201
Added new auto hide config flag CDockManager::AutoHideButtonTogglesArea
githubuser0xFFFF Oct 17, 2022
fde8007
reduce margin a little bit for the horizontal component
SyarifFakhri Oct 18, 2022
1c69685
Update css
SyarifFakhri Oct 18, 2022
118e79e
Remove config flag
SyarifFakhri Oct 18, 2022
d83ec7c
Add config to make auto hide button optionally checkable for styling …
SyarifFakhri Oct 18, 2022
0cbc810
Renamed SideTabIconLabel - added C prefix CSideTabIconLabel
githubuser0xFFFF Oct 18, 2022
3a3c3a9
Fixed namespace comment in ElidingLabel
githubuser0xFFFF Oct 18, 2022
cbc43e5
Added PushButton to test new CDockWidgetSideTab
githubuser0xFFFF Oct 18, 2022
866ccb2
Reimplemented DockWidgetSideTab based on QPushButton
githubuser0xFFFF Oct 18, 2022
63fed89
Removed individual config flags for each sidebar with the global Auto…
githubuser0xFFFF Oct 18, 2022
8974b1a
Merge branch 'auto_hide_feature_original_f' into auto_hide_feature
SyarifFakhri Oct 19, 2022
7319c52
FIxed CMakeLists
SyarifFakhri Oct 19, 2022
7ed3f8b
Remove all dock widget focusable constraint on auto hide button
SyarifFakhri Oct 19, 2022
9eb9ee4
fix icon only config for side tab bars
SyarifFakhri Oct 19, 2022
10a75b0
remove unused and cleanup
SyarifFakhri Oct 19, 2022
bc1f12b
Implemented experimental mouse event handling
githubuser0xFFFF Oct 23, 2022
93d0d4b
Merge branch 'master' into auto_hide_dockcontainer
githubuser0xFFFF Oct 24, 2022
f549a92
Added resize support for new QFrame based AutoHideDockContainer
githubuser0xFFFF Oct 24, 2022
ff0b32a
Added new Visual Studio Light theme
githubuser0xFFFF Oct 24, 2022
8e8ead0
Improved visual_studio_light.css
githubuser0xFFFF Oct 25, 2022
ebdd950
Removed supefluous onAutoHideToggleRequested() function
githubuser0xFFFF Oct 25, 2022
7774aaa
Fixed calculateSideTabBarArea function to work properly with every do…
githubuser0xFFFF Oct 25, 2022
14acd0f
Fixed updateResizeHandleSizeLimitMax() function to work properly with…
githubuser0xFFFF Oct 25, 2022
6eb4625
Improved visual_studio_light.css theme
githubuser0xFFFF Oct 25, 2022
0fbbef7
Fixed initial size of AutoHideDockContainer
githubuser0xFFFF Oct 25, 2022
314ed4b
fix missing case statement
SyarifFakhri Oct 25, 2022
54c7c7e
iconsize -> iconSize in css
SyarifFakhri Oct 25, 2022
fafa52a
fix bug where "right click -> detach group" would of an overlay dock …
SyarifFakhri Oct 25, 2022
a74d8ac
Improved visual_studio_light.css
githubuser0xFFFF Oct 25, 2022
44bfc56
Removed superfluous function setDockSizeProportion()
githubuser0xFFFF Oct 25, 2022
c3aefff
Added missing exports for ResizeHandle and PushButton
githubuser0xFFFF Oct 25, 2022
293bf9b
Updated stylesheet to default
githubuser0xFFFF Oct 25, 2022
43c8d69
Restored initial implementation of ElidingLabel because vertical labe…
githubuser0xFFFF Oct 26, 2022
cd58e6e
Reverted stylesheets to initial code to restart with styling
githubuser0xFFFF Oct 26, 2022
875a358
Ensure the SideTab is hidden if empty
githubuser0xFFFF Oct 26, 2022
b43770d
Added properties to auto hide widgets to improve CSS styling options
githubuser0xFFFF Oct 26, 2022
b14d3ff
Added auto hide styling to focus_highlighting.css
githubuser0xFFFF Oct 26, 2022
b2399bb
Removed superfluous code from AutoHideDockContainer.cpp
githubuser0xFFFF Oct 26, 2022
5199fa4
Implemented save and restore function in AutoHideDockContainer
githubuser0xFFFF Oct 26, 2022
f22d62a
Implemented non opaque resizing for ResizeHandle
githubuser0xFFFF Oct 26, 2022
f5ac29c
Implemented support for Opaque / Non Opaque auto hide container resizing
githubuser0xFFFF Oct 26, 2022
eb008be
Cleanup of focus_highlighting.css
githubuser0xFFFF Oct 26, 2022
ea8e442
Updated default.css to support the new auto hide functionality
githubuser0xFFFF Oct 26, 2022
822ad48
Code cleanup
githubuser0xFFFF Oct 26, 2022
c94155f
Moved SideBarLocation enum out of CDockWidgetSideTab into global ads …
githubuser0xFFFF Oct 27, 2022
11223bf
Prevent deletion of DockWidgetSideTabs if SideTabBar is deleted - the…
githubuser0xFFFF Oct 27, 2022
f20c3bc
Fixed wrong position of AutoHideDockContainer when uncollapsing
githubuser0xFFFF Oct 27, 2022
da9062e
Fixed wrong rendering of DockWidgetSideTab if orientation changed whe…
githubuser0xFFFF Oct 27, 2022
2d67e9e
Some small changes
githubuser0xFFFF Oct 27, 2022
85d7b30
Changed AutoHide save and restore code
githubuser0xFFFF Oct 27, 2022
3f256f7
Some small renamings
githubuser0xFFFF Oct 27, 2022
c80174e
Removed superfluous code and simplified some things
githubuser0xFFFF Oct 27, 2022
85da93c
fix crash when adding auto hide dock container without a previous doc…
SyarifFakhri Oct 28, 2022
c2bd56e
add set size to allow the user to set a size for the pinned widget ma…
SyarifFakhri Oct 28, 2022
2a97833
fix cmakelists and remove setDefaultDockProportion from dock widget
SyarifFakhri Oct 28, 2022
ee2ef8a
Use resize margin - disallow users from resizing to the size of the p…
SyarifFakhri Oct 28, 2022
a012426
cleanup - remove unused code, fix comments, add const
SyarifFakhri Oct 28, 2022
f6b77f5
Implemented showing and hiding of side bar when it does not contain a…
githubuser0xFFFF Oct 28, 2022
6cf05c3
Removed debug output
githubuser0xFFFF Oct 28, 2022
b85a6b5
Removed debug output
githubuser0xFFFF Oct 28, 2022
38ee87f
Merge branch 'duerr-ndt-auto_hide_feature' into auto_hide_feature_ref…
githubuser0xFFFF Oct 28, 2022
b70fc7b
Added some SideBar documentation
githubuser0xFFFF Oct 28, 2022
ae5a75b
Removed DockWidget->sideTabWidget()->setProperty("focused", Focused),…
githubuser0xFFFF Oct 28, 2022
1eaeed6
Changed root index of file system model to prevent lagging UI if netw…
githubuser0xFFFF Oct 28, 2022
6adce73
Some restructuring in default.css and default_linux.css to improve re…
Oct 28, 2022
f4bfa0f
Changed type of sideTabBarArea properties to int to fix non working L…
Oct 28, 2022
1189945
Updated Linux css files to properly support new auto hide feature
Oct 28, 2022
af4a3ef
Removed config flag CDockManager::AutoHideDockAreaHasTitle - this sho…
githubuser0xFFFF Oct 28, 2022
8d67057
Moved creation of SideTabWidget into AutoHideDockContainer.cpp
githubuser0xFFFF Oct 28, 2022
d1d801c
Moved dock area restore code into CDockAreaWidget
githubuser0xFFFF Oct 30, 2022
d56281e
Fix crash that can happen on loading certain configurations
SyarifFakhri Oct 31, 2022
4479030
Properly implemented restore functionality for auto hide container
githubuser0xFFFF Nov 1, 2022
fba9c7c
Create auto hide sidebars only if config flag is set
githubuser0xFFFF Nov 1, 2022
760c036
Use explicit naming for functions to configure auto hide flags and di…
githubuser0xFFFF Nov 1, 2022
2370d79
Removed debug code from DockManager saveState function
githubuser0xFFFF Nov 1, 2022
782af9a
Renamed SideTabBar and DockWidgetSideTab into AutoHideSideBar and Aut…
githubuser0xFFFF Nov 1, 2022
075ef61
Refactoring: renamed CDockWidgetSideTab to CAutoHideTab and CSideTabB…
githubuser0xFFFF Nov 1, 2022
da6bf2b
Fixed typo
githubuser0xFFFF Nov 1, 2022
bfad80c
Some code cleanup
githubuser0xFFFF Nov 1, 2022
44b2dc4
Merge branch 'auto_hide_feature' of github.com:githubuser0xFFFF/Qt-Ad…
SyarifFakhri Nov 1, 2022
94b8042
Made naming of auto hide config flags explicit
githubuser0xFFFF Nov 1, 2022
08714dd
Properly evaluate pinnable flag
githubuser0xFFFF Nov 1, 2022
8e46431
Merge branch 'master' into auto_hide_feature
githubuser0xFFFF Nov 1, 2022
28745fa
Some small improvements and execute auto hide code only if config is …
githubuser0xFFFF Nov 1, 2022
fbd25a8
Improved auto hide config flags
githubuser0xFFFF Nov 1, 2022
0d78303
Fixed typo
githubuser0xFFFF Nov 1, 2022
fda5887
Removed AutoHideInsertOrder enum - new side tabs are always appended.
githubuser0xFFFF Nov 1, 2022
540961b
Renamed toggleAutoHide to setAutoHide and added toggleAutoHide function
githubuser0xFFFF Nov 1, 2022
07355fa
change fix for crash on currentIndex invalid
SyarifFakhri Nov 2, 2022
ea499c7
setSideTabWidget on dockwidget
SyarifFakhri Nov 2, 2022
1f69382
small cleanup
SyarifFakhri Nov 2, 2022
983afc4
Fixed wrong size calculation in CAutoHideDockContainer updateSize() f…
githubuser0xFFFF Nov 2, 2022
7d79ea2
Fixed crash by access to invalid dock parent container in CAutoHideDo…
githubuser0xFFFF Nov 2, 2022
9f153af
Changed MainWindow to enable ActiveX only for non opaque configuratio…
githubuser0xFFFF Nov 2, 2022
7c1d04f
Move calculateSideTabBarArea() function from DockContainerWidget into…
githubuser0xFFFF Nov 2, 2022
9c14c62
Added setAutoHide() and toggleAutoHide() function to CDockWidget
githubuser0xFFFF Nov 2, 2022
b5a1795
Added context menu actions for titleBar and dock widget tab auto hide
githubuser0xFFFF Nov 2, 2022
d2c08ac
Improved context menu of DockAreaWidget
githubuser0xFFFF Nov 2, 2022
159579f
Fixed some auto hide specific bugs
githubuser0xFFFF Nov 2, 2022
716207f
Removed superfluous deleteAutoHideWidgets() function from CDockContai…
githubuser0xFFFF Nov 2, 2022
736c096
make a copy before deleting
SyarifFakhri Nov 3, 2022
246dd04
fix crash
SyarifFakhri Nov 3, 2022
513bab4
Merge branch 'auto_hide_feature' of github.com:githubuser0xFFFF/Qt-Ad…
SyarifFakhri Nov 3, 2022
d255292
Revert "fix crash"
SyarifFakhri Nov 3, 2022
bcf8e8a
Revert "setSideTabWidget on dockwidget"
SyarifFakhri Nov 3, 2022
986077c
revert not removing old dock widgets when restoring state
SyarifFakhri Nov 3, 2022
3b97fdc
Improved AutoHideSidebar to provide better resize behavior if parent …
githubuser0xFFFF Nov 3, 2022
1922395
Improved linux auto hide specific css code
Nov 3, 2022
04ea1c6
Added option to auto hide a DockWidget or a DockArea to a specific si…
githubuser0xFFFF Nov 3, 2022
409d448
Added support for auto hiding a dock area / widget to a specific bord…
githubuser0xFFFF Nov 3, 2022
5e59a6d
Removed debug output
githubuser0xFFFF Nov 3, 2022
27d71ee
Fixed restoreDockWidgetsOpenState() function to delete legacy auto hi…
githubuser0xFFFF Nov 3, 2022
58cd91d
Merge branch 'originf_auto_hide_feature' into auto_hide_feature
SyarifFakhri Nov 4, 2022
c0247fc
Added option ShowAutoHideOnMouseOver that enables showing of auto hid…
githubuser0xFFFF Nov 4, 2022
279a9d7
Fixed delayed hiding of CAutoHideDockContainer on mouse leave when re…
githubuser0xFFFF Nov 4, 2022
6f5e33a
Added CSS styling for AutoHideTab that is iconOnly
githubuser0xFFFF Nov 4, 2022
32eaf93
Removed some whitespace from focus_highlighting.css
githubuser0xFFFF Nov 4, 2022
35f212a
Fixed Qt6 build
githubuser0xFFFF Nov 4, 2022
99854f6
Update linux stylesheet files to support icon only auto hide sidebars
Nov 4, 2022
3f11f74
Some cleanup
githubuser0xFFFF Nov 4, 2022
a878308
Merge branch 'auto_hide_feature' of https://github.com/githubuser0xFF…
githubuser0xFFFF Nov 4, 2022
a79abbd
Fixed hiding of sidebar if Auto Hide Tab is closed
githubuser0xFFFF Nov 4, 2022
1bf6984
Added feature to apply a Visual Studio like light theme via ToolBar
githubuser0xFFFF Nov 4, 2022
9c53734
Added a small image viewer to the demo application
githubuser0xFFFF Nov 4, 2022
bd0b2ad
Improved title bar button tooltips and made naming consistend with co…
githubuser0xFFFF Nov 5, 2022
1b2b903
Auto Hide Tab now shows text as tooltip - for icon only buttons to he…
githubuser0xFFFF Nov 5, 2022
e1368be
Added missing render widget to demo application
githubuser0xFFFF Nov 5, 2022
aad16f7
Merge branch 'auto_hide_feature' of github.com:githubuser0xFFFF/Qt-Ad…
SyarifFakhri Nov 7, 2022
44a5873
Fixed emission of missing top level event when redocking a auto hide …
githubuser0xFFFF Nov 7, 2022
eda6104
Added actions to demo applications to create floating, docked and aut…
githubuser0xFFFF Nov 7, 2022
be86a77
Implemented custom close handling for dynamically created image viewers
githubuser0xFFFF Nov 7, 2022
2569e0a
Dynamically created image viewer now loads random image in demo
githubuser0xFFFF Nov 7, 2022
95b627e
Prevent accidental hiding collapsing of an auto hide widget by a mous…
githubuser0xFFFF Nov 7, 2022
6cdea82
Fixed wrong image filename in demo application
githubuser0xFFFF Nov 7, 2022
0073870
Added documentation for Auto-Hide feature
githubuser0xFFFF Nov 7, 2022
5a9f23a
Fixed emission of top level event in DockContainerWidget
githubuser0xFFFF Nov 7, 2022
33e6098
Merge branch 'originf_auto_hide_feature' into auto_hide_feature
SyarifFakhri Nov 8, 2022
64bd902
Fixed bug in dropIntoSection() caused by the addition of AutoHideSide…
githubuser0xFFFF Nov 8, 2022
89cca4c
Reverted file version change for saved state data because the file is…
githubuser0xFFFF Nov 8, 2022
208c804
User rootSplitter() function instead of searching for child widget
githubuser0xFFFF Nov 8, 2022
f132255
Added app icon for demo app
githubuser0xFFFF Nov 8, 2022
c646d13
Updated ads_logo.svg to fix size for mobile page
githubuser0xFFFF Nov 8, 2022
38dfd51
Merge branch 'master' into auto_hide_feature
githubuser0xFFFF Nov 8, 2022
00c05eb
Merge branch 'auto_hide_feature' of github.com:githubuser0xFFFF/Qt-Ad…
SyarifFakhri Nov 9, 2022
8e7b7f5
Fixed CAutoHideDockContainer::addDockWidget to prevent OldDockArea->r…
githubuser0xFFFF Nov 9, 2022
17bea8c
Merge branch 'auto_hide_feature' of github.com:githubuser0xFFFF/Qt-Ad…
SyarifFakhri Nov 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions examples/autohide/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
cmake_minimum_required(VERSION 3.5)
SyarifFakhri marked this conversation as resolved.
Show resolved Hide resolved
project(ads_example_centralwidget VERSION ${VERSION_SHORT})
SyarifFakhri marked this conversation as resolved.
Show resolved Hide resolved
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_executable(CentralWidgetExample WIN32
main.cpp
mainwindow.cpp
mainwindow.ui
)
target_include_directories(CentralWidgetExample PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../src")
target_link_libraries(CentralWidgetExample PRIVATE qtadvanceddocking)
target_link_libraries(CentralWidgetExample PUBLIC Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::Widgets)
set_target_properties(CentralWidgetExample PROPERTIES
AUTOMOC ON
AUTORCC ON
AUTOUIC ON
CXX_STANDARD 14
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
VERSION ${VERSION_SHORT}
EXPORT_NAME "Qt Advanced Docking System Central Widget Example"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/bin"
)
10 changes: 10 additions & 0 deletions examples/autohide/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <mainwindow.h>
#include <QApplication>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
CMainWindow w;
w.show();
return a.exec();
}
106 changes: 106 additions & 0 deletions examples/autohide/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import os
import sys

from PyQt5 import uic
from PyQt5.QtCore import Qt, QTimer, QDir, QSignalBlocker
from PyQt5.QtGui import QCloseEvent, QIcon
from PyQt5.QtWidgets import (QApplication, QLabel, QCalendarWidget, QFrame, QTreeView,
QTableWidget, QFileSystemModel, QPlainTextEdit, QToolBar,
QWidgetAction, QComboBox, QAction, QSizePolicy, QInputDialog)

from PyQtAds import QtAds

UI_FILE = os.path.join(os.path.dirname(__file__), 'mainwindow.ui')
MainWindowUI, MainWindowBase = uic.loadUiType(UI_FILE)

class MainWindow(MainWindowUI, MainWindowBase):

def __init__(self, parent=None):
super().__init__(parent)

self.setupUi(self)

QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.OpaqueSplitterResize, True)
QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.XmlCompressionEnabled, False)
QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.FocusHighlighting, True)
self.dock_manager = QtAds.CDockManager(self)

# Set central widget
text_edit = QPlainTextEdit()
text_edit.setPlaceholderText("This is the central editor. Enter your text here.")
central_dock_widget = QtAds.CDockWidget("CentralWidget")
central_dock_widget.setWidget(text_edit)
central_dock_area = self.dock_manager.setCentralWidget(central_dock_widget)
central_dock_area.setAllowedAreas(QtAds.DockWidgetArea.OuterDockAreas)

# create other dock widgets
table = QTableWidget()
table.setColumnCount(3)
table.setRowCount(10)
table_dock_widget = QtAds.CDockWidget("Table 1")
table_dock_widget.setWidget(table)
table_dock_widget.setMinimumSizeHintMode(QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
table_dock_widget.resize(250, 150)
table_dock_widget.setMinimumSize(200, 150)
table_area = self.dock_manager.addDockWidget(QtAds.DockWidgetArea.LeftDockWidgetArea, table_dock_widget)
self.menuView.addAction(table_dock_widget.toggleViewAction())

table = QTableWidget()
table.setColumnCount(5)
table.setRowCount(1020)
table_dock_widget = QtAds.CDockWidget("Table 2")
table_dock_widget.setWidget(table)
table_dock_widget.setMinimumSizeHintMode(QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
table_dock_widget.resize(250, 150)
table_dock_widget.setMinimumSize(200, 150)
table_area = self.dock_manager.addDockWidget(QtAds.DockWidgetArea.BottomDockWidgetArea, table_dock_widget, table_area)
self.menuView.addAction(table_dock_widget.toggleViewAction())

properties_table = QTableWidget()
properties_table.setColumnCount(3)
properties_table.setRowCount(10)
properties_dock_widget = QtAds.CDockWidget("Properties")
properties_dock_widget.setWidget(properties_table)
properties_dock_widget.setMinimumSizeHintMode(QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
properties_dock_widget.resize(250, 150)
properties_dock_widget.setMinimumSize(200, 150)
self.dock_manager.addDockWidget(QtAds.DockWidgetArea.RightDockWidgetArea, properties_dock_widget, central_dock_area)
self.menuView.addAction(properties_dock_widget.toggleViewAction())

self.create_perspective_ui()

def create_perspective_ui(self):
save_perspective_action = QAction("Create Perspective", self)
save_perspective_action.triggered.connect(self.save_perspective)
perspective_list_action = QWidgetAction(self)
self.perspective_combobox = QComboBox(self)
self.perspective_combobox.setSizeAdjustPolicy(QComboBox.AdjustToContents)
self.perspective_combobox.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
self.perspective_combobox.activated[str].connect(self.dock_manager.openPerspective)
perspective_list_action.setDefaultWidget(self.perspective_combobox)
self.toolBar.addSeparator()
self.toolBar.addAction(perspective_list_action)
self.toolBar.addAction(save_perspective_action)

def save_perspective(self):
perspective_name, ok = QInputDialog.getText(self, "Save Perspective", "Enter Unique name:")
if not ok or not perspective_name:
return

self.dock_manager.addPerspective(perspective_name)
blocker = QSignalBlocker(self.perspective_combobox)
self.perspective_combobox.clear()
self.perspective_combobox.addItems(self.dock_manager.perspectiveNames())
self.perspective_combobox.setCurrentText(perspective_name)

def closeEvent(self, event: QCloseEvent):
self.dock_manager.deleteLater()
super().closeEvent(event)


if __name__ == '__main__':
app = QApplication(sys.argv)

w = MainWindow()
w.show()
app.exec_()
133 changes: 133 additions & 0 deletions examples/autohide/mainwindow.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
#include "mainwindow.h"

#include "ui_mainwindow.h"

#include <QWidgetAction>
#include <QLabel>
#include <QCalendarWidget>
#include <QTreeView>
#include <QFileSystemModel>
#include <QTableWidget>
#include <QHBoxLayout>
#include <QRadioButton>
#include <QPushButton>
#include <QInputDialog>
#include <QFileDialog>
#include <QSettings>
#include <QMessageBox>
#include <QPlainTextEdit>
#include <QToolBar>

#include "DockAreaWidget.h"
#include "DockAreaTitleBar.h"
#include "DockAreaTabBar.h"
#include "FloatingDockContainer.h"
#include "DockComponentsFactory.h"

using namespace ads;


CMainWindow::CMainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::CMainWindow)
{
ui->setupUi(this);
CDockManager::setConfigFlag(CDockManager::OpaqueSplitterResize, true);
CDockManager::setConfigFlag(CDockManager::XmlCompressionEnabled, false);
CDockManager::setConfigFlag(CDockManager::FocusHighlighting, true);
DockManager = new CDockManager(this);

// Set central widget
QPlainTextEdit* w = new QPlainTextEdit();
w->setPlaceholderText("This is the central editor. Enter your text here.");
CDockWidget* CentralDockWidget = new CDockWidget("CentralWidget");
CentralDockWidget->setWidget(w);
auto* CentralDockArea = DockManager->setCentralWidget(CentralDockWidget);
CentralDockArea->setAllowedAreas(DockWidgetArea::OuterDockAreas);

// create other dock widgets
QTableWidget* table = new QTableWidget();
table->setColumnCount(3);
table->setRowCount(10);
CDockWidget* TableDockWidget = new CDockWidget("Table 1");
TableDockWidget->setWidget(table);
TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget);
TableDockWidget->resize(250, 150);
TableDockWidget->setMinimumSize(200,150);
auto TableArea = DockManager->addDockWidget(DockWidgetArea::LeftDockWidgetArea, TableDockWidget);
ui->menuView->addAction(TableDockWidget->toggleViewAction());

table = new QTableWidget();
table->setColumnCount(5);
table->setRowCount(1020);
TableDockWidget = new CDockWidget("Table 2");
TableDockWidget->setWidget(table);
TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget);
TableDockWidget->resize(250, 150);
TableDockWidget->setMinimumSize(200,150);
DockManager->addDockWidget(DockWidgetArea::BottomDockWidgetArea, TableDockWidget, TableArea);
ui->menuView->addAction(TableDockWidget->toggleViewAction());

QTableWidget* propertiesTable = new QTableWidget();
propertiesTable->setColumnCount(3);
propertiesTable->setRowCount(10);
CDockWidget* PropertiesDockWidget = new CDockWidget("Properties");
PropertiesDockWidget->setWidget(propertiesTable);
PropertiesDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget);
PropertiesDockWidget->resize(250, 150);
PropertiesDockWidget->setMinimumSize(200,150);
DockManager->addDockWidget(DockWidgetArea::RightDockWidgetArea, PropertiesDockWidget, CentralDockArea);
ui->menuView->addAction(PropertiesDockWidget->toggleViewAction());

createPerspectiveUi();
}

CMainWindow::~CMainWindow()
{
delete ui;
}


void CMainWindow::createPerspectiveUi()
{
SavePerspectiveAction = new QAction("Create Perspective", this);
connect(SavePerspectiveAction, SIGNAL(triggered()), SLOT(savePerspective()));
PerspectiveListAction = new QWidgetAction(this);
PerspectiveComboBox = new QComboBox(this);
PerspectiveComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
PerspectiveComboBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
connect(PerspectiveComboBox, SIGNAL(currentTextChanged(const QString&)),
DockManager, SLOT(openPerspective(const QString&)));
PerspectiveListAction->setDefaultWidget(PerspectiveComboBox);
ui->toolBar->addSeparator();
ui->toolBar->addAction(PerspectiveListAction);
ui->toolBar->addAction(SavePerspectiveAction);
}


void CMainWindow::savePerspective()
{
QString PerspectiveName = QInputDialog::getText(this, "Save Perspective", "Enter unique name:");
if (PerspectiveName.isEmpty())
{
return;
}

DockManager->addPerspective(PerspectiveName);
QSignalBlocker Blocker(PerspectiveComboBox);
PerspectiveComboBox->clear();
PerspectiveComboBox->addItems(DockManager->perspectiveNames());
PerspectiveComboBox->setCurrentText(PerspectiveName);
}


//============================================================================
void CMainWindow::closeEvent(QCloseEvent* event)
{
// Delete dock manager here to delete all floating widgets. This ensures
// that all top level windows of the dock manager are properly closed
DockManager->deleteLater();
QMainWindow::closeEvent(event);
}


43 changes: 43 additions & 0 deletions examples/autohide/mainwindow.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QComboBox>
#include <QWidgetAction>

#include "DockManager.h"
#include "DockAreaWidget.h"
#include "DockWidget.h"

QT_BEGIN_NAMESPACE
namespace Ui { class CMainWindow; }
QT_END_NAMESPACE

class CMainWindow : public QMainWindow
{
Q_OBJECT

public:
CMainWindow(QWidget *parent = nullptr);
~CMainWindow();

protected:
virtual void closeEvent(QCloseEvent* event) override;

private:
QAction* SavePerspectiveAction = nullptr;
QWidgetAction* PerspectiveListAction = nullptr;
QComboBox* PerspectiveComboBox = nullptr;

Ui::CMainWindow *ui;

ads::CDockManager* DockManager;
ads::CDockAreaWidget* StatusDockArea;
ads::CDockWidget* TimelineDockWidget;

void createPerspectiveUi();

private slots:
void savePerspective();
};
#endif // MAINWINDOW_H
47 changes: 47 additions & 0 deletions examples/autohide/mainwindow.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CMainWindow</class>
<widget class="QMainWindow" name="CMainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1284</width>
<height>757</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1284</width>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuView">
<property name="title">
<string>View</string>
</property>
</widget>
<addaction name="menuView"/>
</widget>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
</widget>
<resources/>
<connections/>
</ui>
Loading