Sergio Martins
02affc24c7
Add a repro for a bug
2022-10-20 17:42:05 +01:00
Sergio Martins
cb5a42ef2e
tests: Fix memory leak
...
The root3 wasn't being put inside anything
2022-10-17 14:37:33 +01:00
Sergio Martins
437bc31aca
Fix memory leak in a test
2022-10-17 13:48:38 +01:00
Sergio Martins
7597bb70a6
Fix memory leak
...
For consistency, all views create a controller, even if they
don't need it. But these dummy controllers weren't being deleted.
2022-10-17 12:24:11 +01:00
Sergio Martins
b6bbaf9e53
vscode: Add launcher for qtquick_customtitlebar
2022-10-10 21:51:02 +01:00
Sergio Martins
70b566b1b8
Also emit FloatingWindow::numDockWidgetsChanged() when restoring layout
2022-10-10 21:50:23 +01:00
Sergio Martins
8adba89a83
qtquick: Fix crash when mouse receiver gets deleted
...
Happened when double clicking a tab
2022-10-07 05:43:11 +01:00
Sergio Martins
04c069bf1b
qtquick: Emit tabBarQmlItemChanged()
...
Not very important, as it's not read by QML.
Maybe removing the Q_PROPERTY and adding an invokable setter
would be better
Fixes bug #318
2022-10-05 11:44:48 +01:00
Sergio Martins
edb06f2543
qtquick|example: Rename tabBar to tabBarRow for readability
...
There's other things named tabbar already
2022-10-04 10:01:11 +01:00
Sergio Martins
de21f60910
Fix typo when emitting hoveredTabIndexChanged
...
Also added an example on how to style hovered tabs differently.
Fixes #317
2022-10-04 09:58:01 +01:00
Sergio Martins
f110afd1d0
header hygiene for Screen.h
...
KDDockWidgets_p.h is not installed, and not needed here anyway
2022-10-04 09:32:27 +01:00
Sergio Martins
84052f6db0
qtquick: Fix numDockWidgetsChanged() not being emitted sometimes
...
For FloatingWindow there's 2 levels of nesting. The outter
titlebar takes care of the nested groups, and then each group
as a title bar as well.
FloatingWindow now detects with inner tabbars get dock widgets
added/removed.
2022-10-03 17:49:07 +01:00
Sergio Martins
2b8b069396
minor readability improvement
2022-10-03 17:31:36 +01:00
Sergio Martins
1bed9c8a62
tests: Manually test that LayoutSaver triggers numDockWidgetsChanged
2022-10-03 17:23:29 +01:00
Sergio Martins
7eddab06d2
vscode: Add a launcher for tst_qtquick
2022-10-03 17:13:53 +01:00
Sergio Martins
66a572f177
tests: Add a test for TitleBar::tst_titlebarNumDockWidgetsChanged()
2022-10-03 17:13:06 +01:00
Sergio Martins
1ee12f5b90
qtquick: Add a
2022-10-03 17:09:41 +01:00
Sergio Martins
b1ff6bf11b
qtquick: Add TabBar_qtquick::hoveredTabIndexChanged() signal
...
So users can style them differently in QML.
For issue #317
2022-10-03 15:15:36 +01:00
Sergio Martins
d8eac5c04b
qtquick: MouseEventRedirector now receives less generic types
...
QQuickItem and View instead of QObject
2022-10-03 15:01:44 +01:00
Sergio Martins
8c0b76074c
flutter: TitleBars now show the real title
2022-10-03 13:42:30 +01:00
Sergio Martins
498a0627fd
flutter: Regenerate bindings
2022-10-03 13:41:33 +01:00
Sergio Martins
04df3d5bab
flutter: add bindings for View.h
...
It's abstract but shiboken's API extractor doesn't know
since all the virtual methods are returning unknown types (shared pointers),
so give it some help.
2022-09-30 18:28:37 +01:00
pre-commit-ci[bot]
2a53aa8fa2
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/pre-commit/mirrors-clang-format: v14.0.0 → v14.0.6](https://github.com/pre-commit/mirrors-clang-format/compare/v14.0.0...v14.0.6 )
- [github.com/PyCQA/pylint: v2.15.2 → v2.15.3](https://github.com/PyCQA/pylint/compare/v2.15.2...v2.15.3 )
2022-09-28 20:14:09 +01:00
Sergio Martins
0c92b1dd6c
qtquick: Added TitleBar_qtquick::numDockWidgetsChanged() signal
...
In case the custom titlebar wants to do something with it.
2022-09-28 20:01:14 +01:00
Sergio Martins
e265a33b4c
Merge branch '1.7' into 2.0
...
-s ours merge
2022-09-19 13:51:48 +01:00
Sergio Martins
75526982f3
Honour FloatingWindowFlag::DontUseParentForFloatingWindows
...
(cherry-picked from commit 40d57e5000 )
2022-09-19 08:46:33 +01:00
Sergio Martins
9c4b53faa6
Allow to specify Qt::Tool or Qt::Window per floating window
...
(cherry-picked from commit 7ac6a31512 )
2022-09-19 08:44:42 +01:00
Sergio Martins
18d0875bde
Add DockWidget::setFloatingWindowFlags(flags)
...
So you can specify, per floating window, which flags you want
(cherry-picked from commit 757e57559a )
2022-09-19 08:40:08 +01:00
Sergio Martins
d9afb45c05
Load FloatingWindowFlags from disk with LayoutSaver
...
If a user specified different flags for a certain FloatingWindow,
they'll be reloaded when restored with LayoutSaver as well.
(cherry-picked from commit 0bef7bc0e9 )
2022-09-19 08:29:39 +01:00
Sergio Martins
c52ecb65b6
Move FloatingWindow::Flag enum to KDDockWidgets namespace level
2022-09-19 04:05:01 +01:00
Sergio Martins
3f34d12805
Allow to specify which flags FloatingWindow should use
...
(cherry-picked from commit fd35fc26e6 )
2022-09-19 04:01:16 +01:00
Sergio Martins
e01a332386
LayoutSaver: Store the floating window flags too
...
(cherry-picked from commit c2208b169e )
2022-09-19 03:56:27 +01:00
Sergio Martins
0e66f8a368
Isolate more Config flags in FloatingWindow
...
(cherry-picked from commit ff200950aa )
2022-09-19 03:50:38 +01:00
Sergio Martins
6241eeca66
Further isolate access to top-level Config in FloatingWindow
...
In preparation for per-floatingwindow flags
(cherry-picked from commit 9916032981 )
2022-09-19 03:43:40 +01:00
Sergio Martins
d54d417c09
Move TitleBar::supportsMinimize|MaximizeButton into FloatingWindow
...
Just a minor refactoring so FloatingWindow can save it during serialization.
So we can support per-floating window settings.
(cherry-picked from commit e6ccd9d01c )
2022-09-19 03:34:48 +01:00
Sergio Martins
e8814b102a
buildsystem required CMake v3.12.0 or higher
...
(cherry-picked from commit c8e542cabf )
2022-09-19 01:47:58 +01:00
Sergio Martins
aca80b186e
cmake: Allow to build with Qt 6.2, since it's the last LTS
...
(cherry picked from commit 3c2cb67bcd )
2022-09-19 01:44:49 +01:00
Sergio Martins
34d614ab37
Update ChangeLog
2022-09-19 01:42:15 +01:00
Sergio Martins
c91e5099e0
cmake: Remove unity builds from cmake presets
...
The speed is small since KDDW is small as well.
The burdon on maintaining it isn't worth the speedup.
Fixes static preset failing.
(cherry-picked from commit f5eb97bd26 )
2022-09-19 01:36:14 +01:00
Sergio Martins
4ccb7df73c
README: Mention that stable branch is 1.6 now
2022-09-19 01:34:22 +01:00
Sergio Martins
e98633b664
Remove unused variable, which fixes Windows build
2022-09-17 11:35:31 +01:00
Sergio Martins
290c0815e8
Update Changelog regarding issue #314
2022-09-16 18:42:11 +01:00
Sergio Martins
40d57e5000
Honour FloatingWindowFlag::DontUseParentForFloatingWindows
2022-09-16 18:42:11 +01:00
Sergio Martins
f2218f8ff3
Add Frame::requestedFloatingWindowFlags()
...
Just so we can share this bit of code without duplicating it
2022-09-16 18:42:11 +01:00
Sergio Martins
c070a11312
Remove FloatingWindowFlag::DontUseQtToolWindowsForFloatingWindows
...
UseQtTool and UseQtWindow have the same effect
2022-09-16 18:42:11 +01:00
Sergio Martins
7ac6a31512
Allow to specify Qt::Tool or Qt::Window per floating window
2022-09-16 18:42:11 +01:00
Sergio Martins
ef1226187d
tests: Test DockWidgetBase::setFloatingWindowFlags()
2022-09-16 18:42:11 +01:00
Sergio Martins
757e57559a
Add DockWidgetBase::setFloatingWindowFlags(flags)
...
So you can specify, per floating window, which flags you want
2022-09-16 18:42:11 +01:00
Sergio Martins
0bef7bc0e9
Load FloatingWindowFlags from disk with LayoutSaver
...
If a user specified different flags for a certain FloatingWindow,
they'll be reloaded when restored with LayoutSaver as well.
2022-09-16 18:42:11 +01:00
Sergio Martins
369437cbae
Move FloatingWindow::Flag enum to KDDockWidgets namespace level
2022-09-16 18:42:11 +01:00
Sergio Martins
fd35fc26e6
Allow to specify which flags FloatingWindow should use
2022-09-16 18:42:11 +01:00
Sergio Martins
c2208b169e
LayoutSaver: Store the floating window flags too
2022-09-16 18:42:11 +01:00
Sergio Martins
ff200950aa
Isolate more Config flags in FloatingWindow
2022-09-16 18:42:11 +01:00
Sergio Martins
9916032981
Further isolate access to top-level Config in FloatingWindow
...
In preparation for per-floatingwindow flags
2022-09-16 18:42:11 +01:00
Sergio Martins
e6ccd9d01c
Move TitleBar::supportsMinimize|MaximizeButton into FloatingWindow
...
Just a minor refactoring so FloatingWindow can save it during serialization.
So we can support per-floating window settings.
2022-09-16 18:42:11 +01:00
Allen Winter
3a3fedce3f
pre-commit - update hooks versions
2022-09-16 12:55:56 -04:00
Allen Winter
5fdc1a14bc
README-bindings.md - minor
2022-09-15 09:42:49 -04:00
Allen Winter
bced0a66c6
README-bindings.md - cleanup and improve
2022-09-15 09:22:57 -04:00
Allen Winter
fb63fdfd78
docs/api/Doxyfile.cmake - add README-bindings.md to INPUT
2022-09-15 09:12:01 -04:00
Allen Winter
b61c26669b
cmake-format a bit prettier
2022-09-15 09:04:00 -04:00
Allen Winter
02316c2f72
CMakeLists.txt - set version pre 1.7.0
2022-09-15 09:02:36 -04:00
Sergio Martins
f531e8cb95
Bump ChangeLog and README to 1.7
2022-09-15 10:53:06 +01:00
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
fd122b08da
flutter: A floating window is now shown
2022-09-11 16:37:39 +01:00
Sergio Martins
617c3d0029
flutter: regenerate bindings
2022-09-11 16:37:18 +01:00
Sergio Martins
f4db14a745
flutter: Platform now tells the overlay about new floating windows
2022-09-11 12:49:57 +01:00
Sergio Martins
4a86415c65
flutter: ViewFactory now creates FloatingWindow view
2022-09-11 12:13:06 +01:00
Sergio Martins
29ac5a2d16
Make DockRegistry actually notify floating window was created
...
Was missing in last commit. Flutter can now now new windows
were created and create fake overlayed windows for them.
2022-09-11 12:12:14 +01:00
Sergio Martins
9995f70c78
flutter: Get notified when floating windows are created
2022-09-10 22:36:52 +01:00
Sergio Martins
38f605d562
flutter: update bindings
2022-09-10 22:31:27 +01:00
Sergio Martins
c6f0ec9d98
flutter: Be notified when a floating window is created
2022-09-10 22:24:44 +01:00
Sergio Martins
4cb4ab9db0
flutter: Add bindings for DockRegistry
2022-09-10 21:05:34 +01:00
Sergio Martins
d5214b8605
flutter: Add WindowWidget.dart
...
A widget that represents a kddw window.
Specially since flutter doesn't support multi-window. We'll
have to draw them over an overlay.
2022-09-10 18:57:11 +01:00
Sergio Martins
9dbca2618d
flutter: Add initial WindowOverlayWidget.dart
...
Doesn't do much yet.
2022-09-10 18:21:39 +01:00
Sergio Martins
383246aa7f
flutter: Regenerated bindings
2022-09-10 16:33:42 +01:00
Sergio Martins
f1efa95802
Make DockWidgetModel::m_tabBar private
2022-09-10 16:13:34 +01:00
Sergio Martins
f18a288def
qtquick: Remove unneeded functions from Stack_qtquick
2022-09-10 15:46:56 +01:00
Sergio Martins
cf6b3c06e0
More m_tabWidget -> m_stack renaming
2022-09-10 15:33:49 +01:00
Sergio Martins
94fcdc990c
qtquick: Stack_qtquick doesn't need to be exposed to QML
2022-09-10 15:32:13 +01:00
Sergio Martins
96990be5bb
qtquick: Move DockWidgetModel to TabBar_qtquick
...
It's where it's used
2022-09-10 15:26:46 +01:00
Sergio Martins
0157d7d914
Remove 2 more unneeded TODOs
2022-09-10 13:27:12 +01:00
Sergio Martins
fbfec2f196
Remove unneeded TODO
...
This is in qtcommon now, so it's fine
2022-09-10 13:25:18 +01:00
Sergio Martins
60dcec9286
Remove some unneeded mentions of QEvent::Show
2022-09-10 12:58:35 +01:00
Sergio Martins
4e3f4e3073
More replacing of show() with open()
...
This time on DockWidgetViewInterface
2022-09-10 12:40:54 +01:00
Sergio Martins
cf44110033
Rename DockWidget::show() to DockWidget::open()
...
Since non-current tabs are open but not visible.
2022-09-10 12:26:30 +01:00
Sergio Martins
3cb6c2b8d0
Add DockWidget::open()
...
Show/hide/visibility is being deprecated
2022-09-10 12:10:25 +01:00
Sergio Martins
b5a9c03c21
Don't handle QEvent::Hide anymore
...
Update the buttons in DockWidget::setIsOpen() instead.
This makes the controllers self-contained and not depending
on the "view technology". Other frameworks might not even
have the concept of show/hidden events
2022-09-10 11:37:32 +01:00
Sergio Martins
3a280ae377
Minor indirection removal (DockWidget::Private::onDockWidgetShown())
2022-09-10 11:30:18 +01:00
Sergio Martins
29be2ae819
Remove DockWidget::hidden() and shown() signals
...
Visibility isn't useful as a concept, since non current tabs
are also hidden. Instead, use DockWidget::isOpen()
2022-09-10 11:23:39 +01:00
Sergio Martins
764385de9f
refactor: DockWidget::isOpen() now keeps its state in the controller
...
No longer tied to QtWidget visibility. This will make it easier to
make new frontends.
2022-09-09 19:51:25 +01:00
Sergio Martins
ea7cb3cbbb
README: Explain our versioning
2022-09-08 11:52:29 +01:00
Sergio Martins
fcedc65c41
README: Explain our versioning
2022-09-08 11:51:42 +01:00
Sergio Martins
4fc43cbadd
Merge branch 'master' into 2.0
2022-09-08 11:13:09 +01:00
Sergio Martins
932a80e73b
Export SideBarButton
...
This allows code to link to subclasses of SideBarButton.
(cherry-picked from commit daebe9e680 )
2022-09-08 00:15:34 +01:00
Sergio Martins
ac0b00add3
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".
(cherry-picked from commit cf7f037af4 )
2022-09-08 00:11:16 +01:00
Allen Winter
82729c85ea
.reuse/dep5 - minor cleaning
...
(cherry picked from commit 913c570b2b )
2022-09-07 23:55:57 +01:00
Allen Winter
fd98824184
docs/api/Doxyfile.cmake - add .pngs
2022-09-07 23:52:06 +01:00
Sergio Martins
3ce1a6c77e
Add SegmentedIndicators::s_centralIndicatorMaxWidth/height
...
So the user can change the maximum size of the central indicator
(cherry-picked from commit f84006347b )
2022-09-07 23:41:59 +01:00
Sergio Martins
bc8d17119a
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
(cherry-picked from commit bde5be9d9c )
2022-09-07 23:29:12 +01:00
Sergio Martins
411750e865
python: Improve Dockerfile
...
Added more instructions and missing runtime packages
So I can test issue #304
(cherry picked from commit 7e689f0b39 )
2022-09-07 23:26:14 +01:00
Sergio Martins
3ac8c5f384
Python: Add a Dockerfile for a python environment
...
So I can test issue #304
(cherry picked from commit ef78d60751 )
2022-09-07 23:24:23 +01:00
Sergio Martins
6b720715bf
cmake: Disable unity builds for python preset
...
It's not supported
(cherry-picked from commit bdbab41674 )
2022-09-07 23:07:46 +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
Sergio Martins
d515969724
Fix QTabBar::setCurrentIndex() not getting called sometimes
...
TabBar::setCurrentIndex() was bailing out and not informing the view
because the current dock widget was the same. That happened because
m_currentDockWidget was being set in two places.
Fixes issue #312
2022-09-07 12:47:04 +01:00
Sergio Martins
ad8457490b
Add an xfailing test for issue #312
2022-09-07 12:07:03 +01:00
Sergio Martins
c0ef4ae0d2
tests: Add a test for DockWidget:setAsCurrentTab()
...
CC issue #312
2022-09-07 11:52:19 +01:00
Sergio Martins
ede6dff09b
qtquick: Use a simple Item instead of a StackLayout
...
StackLayout doesn't allow to reorder children. Instead, just stack
them in an arbitrary order and use visibility to hide the non-current ones.
2022-09-06 22:58:49 +01:00
Sergio Martins
c1420a7e80
tests: Check that current tab matches current widget
2022-09-06 21:51:00 +01:00
Sergio Martins
ef1ce9bb1d
Remove stray qDebug
2022-09-06 15:50:38 +01:00
Allen Winter
be7bbe00b1
appveyor.yml - don't build the master branch
2022-09-06 09:10:20 -04:00
Allen Winter
52cd8f753d
appveyor.yml - don't build the master branch
2022-09-06 09:09:01 -04:00
Sergio Martins
496be36585
Merge branch '1.6'
2022-09-05 23:13:43 +01: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
f9e758d02f
Fix affinity of central frame
...
Fixes issue #245
2022-09-05 22:10:03 +01:00
Sergio Martins
958d1500e5
Remove unneeded View.h include and tidy forward declarations
...
Fixes #311
2022-09-05 21:34:11 +01:00
Sergio Martins
282c3106a4
Fix build with installed KDDW, do not expose Screen.h
...
Screen.h depends on KDDockWidgets_p.h which is not installed.
2022-08-23 07:57:20 +01:00
Sergio Martins
a74dace6e4
tests: Add more tests to TestDocks::tst_addAsPlaceholder()
...
While I'm debugging an issue.
2022-08-22 19:40:19 +01:00
Sergio Martins
1998800883
Remove unneeded "spontaneous" argument from onShown/hidden
2022-08-21 22:55:45 +01:00
Sergio Martins
c8b16c9712
Remove unneeded Group::onDockWidgetShown
2022-08-21 22:09:06 +01:00
Sergio Martins
ffc8038cc4
qtquick: Fix tests when tabs are removed
...
As explained in the comment
2022-08-21 17:29:16 +01:00
Sergio Martins
21d7d220c5
Remove legacy Group::onDockWidgetHidden code which is now unneeded
...
Tests pass without it, so let's simplify.
2022-08-21 17:11:06 +01:00
Sergio Martins
b52bb85190
qtquick: Fix test due to renaming tabs not being implemented
...
A warning will make the tests fail. Downgrade to qDebug as
this is expected.
2022-08-21 16:59:59 +01:00
Sergio Martins
c8386e6ce1
vscode: Fully scope ${workspaceFolder}
...
So it works if someone adds additional folders.
For example, working on the flutter examples within the same IDE.
2022-08-21 13:19:28 +01:00
Sergio Martins
9d9bce1860
vscode: Add launchers for more tests
2022-08-21 13:11:21 +01:00
Sergio Martins
12e8549f8f
vscode: Remove msvc launchers, lldb launchers work on Windows too
...
It's easier to use the same launcher on all 3 operating systems.
2022-08-21 13:04:47 +01:00
Sergio Martins
f0c008fae3
tests: Add a unit-test for Adding dock widget hidden
2022-08-21 12:57:53 +01:00
Sergio Martins
61e93a1970
tests: Add a unit-test for DockWidget::isOpen()
2022-08-21 00:54:24 +01:00
Sergio Martins
763ad1ae6b
Wrapper views now also get a dummy controller
...
Now we can finally make all setVisible/isVisible calls go
through the controller
2022-08-20 19:24:21 +01:00
Sergio Martins
bf43df1233
Call setVisible() through the controller instead of view
...
This is state that's moving to the controller
2022-08-20 18:48:01 +01:00
Sergio Martins
8e0ba911d0
Call isVisible() through the controller instead of view
...
This will be state that's moving to the controller.
2022-08-20 18:28:58 +01:00
Sergio Martins
a1f427e8e2
Remove unused DockRegistry::dockWidgetForGuest()
2022-08-20 18:09:52 +01:00
Sergio Martins
301af34dec
flutter: Generate bindings for the MainWindow controller
2022-08-20 15:54:13 +01:00
Sergio Martins
598fedaf86
flutter: Add virtual onRebuildRequested() to tab bar view
...
So C++ can call this whenever a tab was removed or inserted
2022-08-20 12:05:59 +01:00
Sergio Martins
809ca9e586
cmake: Add preset to build flutter frontend standalone
...
It can't be build in conjuction with the QtWidgets one, since
that would mean using QAction from Qt and requiring a QApplication.
Instead just build the flutter frontend.
2022-08-19 23:35:50 +01:00
Sergio Martins
8c881b6db7
flutter: Group now shows the current dockwidget
2022-08-19 22:17:01 +01:00
Sergio Martins
b0f98dfd2d
flutter: Only DropArea creates the stack now
...
It was a bad default. Other widgets can fill parent.
2022-08-19 20:53:54 +01:00
Sergio Martins
8e5e4d9d0e
flutter: Refactor DropArea_flutter.dart
...
Just specialized it, so we can customize it.
2022-08-19 20:46:48 +01:00
Sergio Martins
ee14264655
flutter: Regenerate bindings
...
Since KDDW API has changed
2022-08-18 00:10:16 +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
6757370ca0
Add more documentation
2022-08-15 21:36:31 +01:00
Sergio Martins
91f0a250e7
Workround Qt bug when reordering tabs
2022-08-15 21:25:11 +01:00
Sergio Martins
63ae96a919
Re-add support for reordering tabs
...
And this time, implement the state in the controllers.
2022-08-15 21:22:53 +01:00
Sergio Martins
65b0b7e140
Remove TabViewInterface::numDockWidgets()
...
The controller knows how many. Frontends no longer need to
implement this
2022-08-15 21:02:44 +01:00
Sergio Martins
a11414ed8d
insertDockWidget() now returns void instead of bool
...
It doesn't fail.
Furthermore, the views shouldn't dictate anything. The controller
is in charge. Views don't get to say a tab failed to be added.
2022-08-15 20:56:21 +01:00
Sergio Martins
74bd786be8
qtquick: Remove code already handled by the backend
...
DockWidget controller knows when it's reparented
2022-08-15 20:48:55 +01:00
Sergio Martins
ca26e856db
tests: Fix tst_tabbar for QtQuick
2022-08-15 20:46:36 +01:00
Sergio Martins
be2c297fa9
Fix list of tabs not being updated when dock widget closed
...
When closing, we need to remove from the TabBar controller.
QtWidgets tests no pass again.
2022-08-15 19:55:01 +01:00
Sergio Martins
838e953320
Fix TabBar::moveTabTo() not swapping indexes
...
The list of dock widgets is now stored in the controller.
2022-08-15 19:38:12 +01:00
Sergio Martins
e61d55df53
Revert "wip"
...
This reverts commit 4af2f1d46b .
Shouldn't have been commited, it's a local change.
2022-08-15 15:18:14 +01:00
Sergio Martins
376202c3f8
Remove more logic from tabbar view into controller
2022-08-15 14:33:33 +01:00
Sergio Martins
2a37813409
Remove more TabBarViewInterface related to indexes
...
That's in the controller now, shared by all frontends
2022-08-15 14:14:15 +01:00
Sergio Martins
bbef108e32
Override QTabBar::tabInserted insted of QTabWidget::tabInserted
...
Since we're moving logic to tab bar instead of tab widget.
Otherwise calling count() on the tab bar while QTabWidget::tabInserted
is running can give the wrong value. So settle with a single class.
2022-08-15 13:47:03 +01:00
Sergio Martins
a0329a01fb
Remove from old tab bar before adding to new
...
By having the state consistent in the controllers it makes it easier
to implement the view counter part code. Relying on the view to
remove from old tab bar implicitly due to reparenting is obscure
2022-08-15 00:09:06 +01:00
Sergio Martins
4af2f1d46b
wip
2022-08-14 23:12:21 +01:00
Sergio Martins
24040ccfbf
Remove some unneeded code, already covered in TabBar.cpp
2022-08-14 23:11:51 +01:00
Sergio Martins
5a455f86a1
TabBar now knows the list of dockwidgets
...
It's no longer on the view.
2022-08-14 22:43:33 +01:00
Sergio Martins
9a8ca5135e
Fix build
2022-08-14 19:38:51 +01:00
Sergio Martins
a9485ee0b2
Port an old syle connect to Qt5 style
2022-08-14 18:54:54 +01:00
Sergio Martins
6a9988e7b0
Remove more unneeded tab widget code
2022-08-14 18:47:59 +01:00
Sergio Martins
7f072366ed
Remove now unneeded TabBar::currentTabChanged(int)
...
It's all in terms of current dock widget now, not indexes.
2022-08-14 18:31:50 +01:00
Sergio Martins
0b5e9bc6c1
Remove unneeded emissions of currentDockWidgetChanged
...
It's now wrapped with a setter, so it's emitted at the right
times always
2022-08-14 17:45:33 +01:00
Sergio Martins
8834f7d75b
TabBar controller now stores the current dock widget
...
It's no longer stored in the view.
This makes it easier for new frontends.
2022-08-14 17:34:01 +01:00
Sergio Martins
4627571f3f
qtquick: Fix current tab being current even after removed
...
Added lots of tests for TabBar.
2022-08-14 15:44:38 +01:00
Sergio Martins
d071fc440a
Don't run tst_qtquick if KDDW_TEST_FRONTENT=1 is set
...
Only QtWidgets test should run in that case.
2022-08-14 14:24:51 +01:00
Sergio Martins
bcbb75da72
Add more documentation to GroupViewInterface.h
2022-08-13 23:19:09 +01:00
Sergio Martins
ca0f767f21
Add more documentation and make interfaces simpler
2022-08-13 23:08:10 +01:00
Sergio Martins
30955b5f5b
Remove more pure-virtuals from GroupViewInterface
...
In this case, made them non-pure, as the default impl is enough
for most frontends. Only qtquick does something different
2022-08-13 22:32:49 +01:00
Sergio Martins
7a4c969b86
Removed a lot of unneeded GroupViewInterface methods
...
These are already implemented in TabViewInterface
2022-08-13 22:17:56 +01:00
Sergio Martins
3ffe116a02
Move more methods away from StackViewInterface
...
Let's just have TabBarViewInterface, which is similar
2022-08-13 20:35:09 +01:00
Sergio Martins
fb59e30c59
Move more code away from Stack and into TabBar
2022-08-13 16:04:32 +01:00
Sergio Martins
8955ec8bcb
Remove unused StackViewInterface::currentIndex()
2022-08-13 14:54:59 +01:00
Sergio Martins
1868ad7bd4
Move more code out of Stack and into TabBar
...
The signals are more about the tabs.
2022-08-13 14:50:19 +01:00
Sergio Martins
1abebef40b
Move move code from StackViewInterface.h to TabBarViewInterface.h
...
Phasing out the former, so frontend writers don't have to implement
two duplicate interfaces
2022-08-13 14:11:33 +01:00
Sergio Martins
de3ef59506
flutter: Regenerate bindings
...
Rename some DropArea arguments too, so they don't appear as "arg_X"
in Dart
2022-08-12 23:01:40 +01:00
Sergio Martins
b56e6a8279
flutter: Add convenience to access the controller
...
Dart can't access the DockWidgetViewInterface since Dartagnan
doesn't support multiple inheritance
2022-08-12 22:49:32 +01:00
Sergio Martins
da21d35f4b
flutter: Group will display the dock widget as well
2022-08-12 22:31:33 +01:00
Sergio Martins
73cdaa8698
flutter: Show a title bar and a tab bar
...
Just placeholders for now, no actual tabs
2022-08-12 21:41:38 +01:00
Sergio Martins
a97e3ae831
flutter: Derive state/widget for all our view types
...
Mostly boilerplate code, no functionality
2022-08-12 17:58:54 +01:00
Sergio Martins
6bc2979989
flutter: Subclass the widget and state for Group
...
So we can start adding the title bar and tab bar
2022-08-12 17:31:38 +01:00
Sergio Martins
3c48b3aab3
flutter: Reuse more code, move code into View_mixin
2022-08-12 17:12:12 +01:00
Sergio Martins
7371171115
flutter: Fix crash due to rootView() being null
...
We can now show a pink dock widget
2022-08-12 16:48:18 +01:00
Sergio Martins
da38c09dec
Improve debug output
2022-08-12 16:37:30 +01:00
Sergio Martins
b55656deec
flutter: Added DockWidget view
...
Not implemented yet, but maybe we can show it on screen hosting
a guest user widget
2022-08-12 15:54:44 +01:00
Sergio Martins
76b03f4700
flutter: Add bindings for DockWidget_flutter view wrapper
2022-08-11 19:15:58 +01:00
Sergio Martins
cc719325cc
flutter: Generate bindings for Controllers::DockWidget too
...
Worksaround Dartagnan only knowing "= {}" as a way to default initialize
QFlags
2022-08-11 16:14:34 +01:00
Sergio Martins
a52428cf35
flutter: Regenerate bindings
...
DropIndicatorOverlay bindings now build.
2022-08-11 15:45:07 +01:00
Sergio Martins
47ada6dd56
flutter: Add more bindings
...
Some commented out due to bugs in dartagnan. To be fixed.
2022-08-11 15:04:34 +01:00
Sergio Martins
2862f2b76f
flutter: Fix moving separators vertically
...
Needs to use the layout's local coordinate space and not global
space. Horizontally was working since the layout occupies the whole
window. Vertically there's flutter's app bar, so the movements were
off by a few pixels
2022-08-10 22:11:11 +01:00
Sergio Martins
48b067023f
Minor rename
2022-08-10 21:50:55 +01:00
Sergio Martins
51b47a26af
flutter: Don't resize separator without primary button pressed
2022-08-10 21:41:36 +01:00
Sergio Martins
cc8dbd3d0c
Fix typo on View::onResized()
...
Width and height were swapped. Caught by the tests.
2022-08-10 21:19:07 +01:00
Sergio Martins
c523d514ee
Only check for mouse button being pressed on separator move for Qt
...
That's a workaround for a bug. Other platforms might not have the
same bug and might not have a way to query mouse buttons the same
way Qt does.
2022-08-10 20:30:09 +01:00
Sergio Martins
e9e88d81e8
Fix install step
...
Separator_quick was old and got renamed to Separator_qtquick
long time ago
2022-08-10 20:26:49 +01:00
Sergio Martins
cffea940ea
cmake: Also define KDDW_FRONTEND_QT if we have QtWidgets or QtQuick
2022-08-10 19:45:04 +01:00
Sergio Martins
647cb4c7f6
Remove Utils::isLeftMouseButtonPressed()
...
It's an unneeded indirection
2022-08-10 19:39:44 +01:00
Sergio Martins
0b2cc6e078
Make separator not depent on QGuiApplication
2022-08-10 19:36:11 +01:00
Sergio Martins
d9f1a04e8d
flutter: Layout can now be resized
2022-08-10 19:33:11 +01:00
Sergio Martins
048d156998
flutter: Tell flutter a view was destroyed
...
So flutter can stop rendering and gc its widget
2022-08-10 19:31:06 +01:00
Sergio Martins
65f23f9c30
flutter: Implement View::parentView()
2022-08-10 19:30:43 +01:00
Sergio Martins
667b9bb28c
flutter: Add ViewWrapper
...
so we can implement View::parentView(), which returns a shared ptr
2022-08-10 19:29:41 +01:00
Sergio Martins
fb6175c4b3
Move the old ViewWrapper to qtcommon
...
Since it's Qt specific
2022-08-10 19:28:56 +01:00
Sergio Martins
192533647d
flutter: Deal in StatefulWidget instead of PositionedWidget
...
So we can wrap PositionedWidget in something else
2022-08-09 19:07:18 +01:00
Sergio Martins
2afe86e63b
flutter: Support showing a basic layout
...
Next step is adding a MouseRegion for the separators
2022-08-09 18:45:11 +01:00
Sergio Martins
b52070dc0e
flutter: Support flutter telling kddw the side of the layout
...
DropArea's size isn't driven by kddw, that gets resized whenever
the user resizes the window. Flutter now tells KDDW the new size
2022-08-09 01:37:37 +01:00
Sergio Martins
3cbd437ee6
flutter: Regenerate bindings
2022-08-09 01:26:58 +01:00
Sergio Martins
532dc04ec6
Make View::onResized(QSize) receive 2 integers instead
...
Avoids an allocation when called by dart.
2022-08-09 01:25:56 +01:00
Sergio Martins
8050ca6259
flutter: Remove unneeded callbacks
2022-08-08 23:33:19 +01:00
Sergio Martins
f493c44729
flutter: Use keys instead of callbacks to update state
2022-08-08 22:49:56 +01:00
Sergio Martins
11301e2f0f
flutter: PositionedWidget now takes reference for the mixin
...
Which is the common denominator
2022-08-07 21:36:40 +01:00
Sergio Martins
151bc356fc
flutter: Stack, TabBar and TitleBar now also implement View_mixin
2022-08-07 16:08:14 +01:00
Sergio Martins
f4f7e4508b
flutter: Group views now implement View_mixin
2022-08-07 16:02:43 +01:00
Sergio Martins
9cf99ff45c
flutter: Use a mixin for the View's data
...
Group_flutter.dart doesn't inherit from View_flutter.dart, it inherits
directly from C++, so wasn't getting the data.
Since Dart doesn't support multiple inheritance we'll use a mixin
2022-08-07 15:56:13 +01:00
Sergio Martins
882f25c7f7
flutter: regenerate bindings
2022-08-07 14:51:00 +01:00
Sergio Martins
69c7d3fd57
Remove View::maximumSize() as we already have View::maxSizeHint()
...
Having both was due to QWidgets having both. For QtQuick and other
frontends we only want the latter.
2022-08-07 14:49:32 +01:00
Sergio Martins
62d8426ec4
flutter: Name the view method arguments in the header
...
While usually unneeded, it makes the bindings generator use
proper names instead of generic "arg1" type names.
2022-08-05 16:54:10 +01:00
Sergio Martins
d8189e3e03
.clang-format: wrap at column 100
2022-08-05 16:49:00 +01:00
Sergio Martins
9a4daf8926
flutter: Don't say we have 1 tab, there's 0 still
...
as the implementation isn't done yet, should fix a crash
2022-08-03 23:42:08 +01:00
Sergio Martins
4c1e45eea9
flutter: Make the ViewFactory return the actual view instances
2022-08-03 23:41:50 +01:00
Sergio Martins
98a7a0e017
flutter: Add a way to dump a dart backtrace
...
gdb can now call Platform::instance()->dumpManagedBacktrace()
2022-08-03 23:39:22 +01:00
Sergio Martins
c461721456
flutter: Generate bindings for Platform.h too
2022-08-03 23:32:09 +01:00
Sergio Martins
f634a1e3f7
flutter: Add bindings for the views
2022-08-03 12:32:38 +01:00
Sergio Martins
7a8222a063
flutter: Add dummy views
...
to be implemented as needed
2022-08-03 12:17:00 +01:00
Sergio Martins
35042c2bef
Add dummy views to the dummy frontend
...
Easier to copy-paste to new frontends now.
2022-08-03 11:43:16 +01:00
Sergio Martins
c9c3fdc1a2
Add assert that there's a stack view interface
...
Helps catch bugs in flutter frontend
2022-08-03 10:03:39 +01:00
Sergio Martins
69c2c0770f
tests: Add another test to tst_dropArea
2022-08-03 09:48:30 +01:00
Sergio Martins
3f32bc3dce
tests: Move tst_droparea.cpp into tests/controllers/
2022-08-03 09:24:03 +01:00
Sergio Martins
8a76c63983
flutter: Add bindings for Stack, TitleBar and TabBar
2022-08-03 00:14:36 +01:00
Sergio Martins
7cc4bae1b7
flutter: Regenerate bindings with newest dartagnan bug fixes
2022-08-02 22:56:51 +01:00
Sergio Martins
bf922a2ecb
flutter: Add bindings for Group
2022-08-01 00:22:19 +01:00
Sergio Martins
27b8480da6
Make InitialOption's ctor public
...
Just mark it as internal.
Someone might think it's useful even if bugs reported won't be prioritized.
2022-08-01 00:17:10 +01:00
Sergio Martins
f97a660584
Remove deprecated function
2022-07-31 23:27:07 +01:00
Sergio Martins
6d30643672
Rename "acceptingFrame" to "acceptingGroup"
...
Frame class has been renamed to group some time ago already
2022-07-31 23:04:50 +01:00
Sergio Martins
e4b2d37f96
Rename "addWidget" to "addTab"
2022-07-31 23:03:16 +01:00
Sergio Martins
45ad75fcd4
flutter: Add multisplitter to the include path
2022-07-31 13:31:03 +01:00
Sergio Martins
8e5225224d
flutter: Regenerate bindings
...
This time without readability tags so we can reduce diff size
2022-07-31 13:30:27 +01:00
Sergio Martins
8a65d2cc0b
flutter: Added bindings for Item
2022-07-31 13:07:59 +01:00
Sergio Martins
cfb5c5e2fe
flutter: Add InitialOption_wrapper
2022-07-31 13:02:27 +01:00
Sergio Martins
2c58580d06
flutter: Remove unneeded main.dart
...
We now depend on flutter, not just dart. So need an embedder
to actually run things.
2022-07-31 12:42:50 +01:00
Sergio Martins
4901b977a0
flutter: PositionedWidget can now fill parent
2022-07-31 12:34:59 +01:00
Sergio Martins
120557b8a6
flutter: A view can now be positioned and sized
2022-07-31 12:12:23 +01:00
Sergio Martins
3c51d201d5
reuse: Ignore .yaml config files
2022-07-31 11:49:57 +01:00
Sergio Martins
b1fcae9bc2
flutter: generate more bindings
2022-07-31 11:46:48 +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
Sergio Martins
ecd05ffbc5
flutter: Creating a DropArea almost works
2022-07-27 11:44:04 +01:00
Sergio Martins
7b20eedf6d
Add tst_dropArea
...
Removed the requirement to have a parent, it's not really needed,
conceptually.
2022-07-27 10:34:13 +01:00
Sergio Martins
93b3f77969
flutter: instantiate DropArea_flutter
2022-07-27 10:32:10 +01:00
Sergio Martins
f7c3dea53f
flutter: Add bindings for Layout
2022-07-26 17:28:01 +01:00
Sergio Martins
02e591fc52
flutter: Add View_flutter.dart
2022-07-26 15:19:57 +01:00
Sergio Martins
3ee9866d84
flutter: Add bindings for CreateViewOptions_wrapper
2022-07-26 15:10:30 +01:00
Sergio Martins
84ec64fade
unnest CreateViewOptions so we can create dart bindings for it
...
Our binding generator doesn't support nested classes yet
2022-07-26 15:03:21 +01:00
Sergio Martins
f8f75cdabc
flutter: Add bindings for View
2022-07-26 14:20:27 +01:00
Sergio Martins
feda194b01
flutter: Also create bindings for ViewFactory
2022-07-26 13:37:21 +01:00
Sergio Martins
249ee2ce67
flutter: Add bindings for ViewFactory_flutter.h
2022-07-26 13:30:35 +01:00
Sergio Martins
d97ccb9792
flutter: Add bindings for Config.h
2022-07-26 13:21:14 +01:00
Sergio Martins
90ba005bc6
flutter: Remove unneeded Platform.dart
2022-07-26 13:15:01 +01:00
Sergio Martins
1a762df812
flutter: Add Platform_dart and regenerate bindings
2022-07-26 13:09:26 +01:00
Sergio Martins
0dd41fc7e9
flutter: Rename Platform.dart to Platform_flutter.dart
...
Makes it consistent with the naming of all other frontends
2022-07-25 17:57:33 +01:00
Sergio Martins
ff7a30dcc3
flutter: Remove duplicate method from QByteArray.dart
...
Dart doens't support 2 methods with the same name
2022-07-25 17:56:40 +01:00
Sergio Martins
c40f38097a
wip
2022-07-25 17:53:26 +01:00
Sergio Martins
7439040147
Don't compare raw Screen pointers directly
...
Instead compare the underlying QScreen.
2022-07-25 06:13:42 -07:00
Sergio Martins
2fa27e8f62
Add Screen::equals(), as comparing Screen raw pointers is meaningless
2022-07-25 13:49:45 +01:00
Sergio Martins
b5ad2f6870
dummy|flutter: Add missing Platform::primaryScreen() override
2022-07-25 13:30:12 +01:00
Waqar Ahmed
ac082ca846
Add Platform::primaryScreen
2022-07-25 17:24:27 +05:00
Sergio Martins
fb88f37b37
cmake: Build the flutter frontend only when using Qt5
...
As the bindings were generated against Qt5, not Qt6.
Won't matter much in the future, since it won't depend on Qt. But for
now there's still some dependencies.
2022-07-25 11:49:06 +01:00
Sergio Martins
0e29658664
Fix flutter and dummy frontend builds
...
Was missing implementation for the new screen methods
2022-07-25 11:46:49 +01:00
Waqar Ahmed
4d5a43ea1f
Remove QScreen usage from non-frontend classes
2022-07-25 11:39:36 +05:00
Waqar Ahmed
396973b987
Add Screen::name
2022-07-25 11:37:52 +05:00
Waqar Ahmed
82d6648119
Avoid emitting thousands of timeout signals without any reason
2022-07-24 15:03:50 +05:00
Sergio Martins
b3dd4516ca
flutter: Renamed KDDockWidgets package to KDDockWidgetsBindings
...
The former is needed for the KDDW flutter frontend, which will use
the latter to access the C++ API.
Using two packages instead of one, since one is generated by
dartagnan.
2022-07-23 20:31:50 +01:00
Sergio Martins
7956ec3b73
flutter: Fix Platform::name_calledFromC()
...
The return type needs to be ffi.Pointer<Utf8>, not String.
This has been fixed in dartagnan
2022-07-23 18:44:20 +01:00
Sergio Martins
9b7eaebd40
flutter: Fix kddockwidgets library name
...
So dart can load the correct one
2022-07-23 17:21:00 +01:00
Sergio Martins
307161a8f1
flutter: Tell dartagnan to not generate CMakeLists.txt
...
We have our own already.
2022-07-23 17:13:26 +01:00
Sergio Martins
ee5bd0094b
flutter: Add bindings to View, ViewFactory and Platform
2022-07-23 17:03:45 +01:00
Sergio Martins
71f4246ac1
cmake: Add flutter to the dev6 preset
2022-07-23 12:38:01 +01:00
Sergio Martins
d4b515b7a3
Fix Qt6 build
2022-07-23 12:33:09 +01:00
Sergio Martins
162b6b914c
flutter: export bindings too
2022-07-23 10:07:41 +01:00
Sergio Martins
a824bba23f
codespell: Accept "sharable" as it comes from Qt
2022-07-23 10:06:14 +01:00
Sergio Martins
42ceb96cc2
flutter: Dart bindings are now built within kddockwidgets.dll too
...
No need to have a separate library with them.
This is just an initial commit to get the cmake right. We'll be adding
more bindings as we go.
Also, at some point, the Qt bindings will be removed and we'll have just
C++ KDDW bindings without any Qt.
2022-07-23 10:01:51 +01:00
Sergio Martins
1e926005c7
Add missing break, fixes fallthrough
2022-07-23 09:46:28 +01:00
Sergio Martins
1252ba40b3
Update .gitignore
2022-07-23 09:46:16 +01:00
Sergio Martins
5419b27a12
Fix linking due to Screen.cpp missing
2022-07-23 09:45:32 +01:00
Sergio Martins
28324e7a6a
flutter: Use QT_NO_CAST_FROM_ASCII for bindings
...
Otherwise kddw won't compile as the QString ascii ctor is private
2022-07-23 09:38:56 +01:00
Sergio Martins
13b94d151b
flutter: Add copyright headers to generated bindings
...
It's done automatically now when refreshing the bindings.
2022-07-23 09:38:56 +01:00
Allen Winter
4e18d198a0
Merge branch '1.6'
2022-07-22 16:00:32 -04:00
Allen Winter
9ce7477cbb
docs/api/Doxyfile.cmake - add .pngs
2022-07-22 16:00:08 -04:00
Waqar Ahmed
6e602970fb
Add a platform agnostic Screen class
2022-07-22 22:20:18 +05:00
Sergio Martins
4b36717630
flutter: Add binding generation support through dartagnan
...
For now, only generating a few classes. We'll build up slowly.
2022-07-22 16:20:21 +01:00
Sergio Martins
53e6f6dc0e
flutter: Initial boiler-plate commit
...
Does not have any implementation.
But we can start generating dart bindings for it.
2022-07-22 14:52:50 +01:00
Sergio Martins
0afb9ae113
Actually remove View::parentChanged() signal
...
Should have gone in the last commit
2022-07-22 10:22:13 +01:00
Sergio Martins
b907c67ee3
Remove View::parentChanged
...
It was driving too much logic.
The controllers deal with this now. Makes it easier to make
non-Qt frontends
2022-07-22 10:10:17 +01:00
Sergio Martins
fb701e8307
Move DockWidget::parentViewChanged() signal to base class
...
So it matches the setter, which was already in the base class
2022-07-22 09:54:18 +01:00
Sergio Martins
1097908882
Override DockWidget::setParentView() instead of relying on QEvent
...
So it works with non-Qt frontends too.
2022-07-22 09:36:20 +01:00
Sergio Martins
5c26aaa9cd
Port some raw QObject::setParent() calls
2022-07-21 22:59:27 +01:00
Sergio Martins
d0f1f2ce77
tests: Test DockWidget::isOpen() too
2022-07-21 17:54:39 +01:00
Sergio Martins
a9d2be775b
tests: Test that dock widgets are floating after being closed
...
Not that it means much, since they're hidden. But be consistent.
2022-07-21 17:27:37 +01:00
Sergio Martins
b7665abf68
vscode: Add a launch for tst_docks
2022-07-21 14:42:40 +01:00
Sergio Martins
d4d325a401
qtquick: Don't compare controller parents, compare view parents
...
Controllers will be ported away from QObject eventually
2022-07-20 18:44:34 +01:00
Sergio Martins
06534bb5d8
tests: Add assert
2022-07-20 14:56:26 +01:00
Sergio Martins
a5589dbe29
tests: Add assert
...
Makes it easier to debug, as it crashes sooner
2022-07-20 14:53:14 +01:00
Sergio Martins
4706d2527c
Remove the *_impl indirection methods from Group
...
They are no longer virtual, so the indirection doesn't make
sense anymore
2022-07-20 14:26:49 +01:00
Sergio Martins
b5a76a4373
Fix UBSAN warning about Group_qtquick already being deleted
...
Its dtor was in the stack when the signal was emitted
2022-07-20 14:03:27 +01:00
Sergio Martins
36931e7c45
Allow DragController views to have access to its controller
...
For consistency
2022-07-20 13:12:52 +01:00
Sergio Martins
013e390428
Don't create unneeded controllers
...
ViewWrappers don't actually have a controller
2022-07-20 12:39:34 +01:00
Sergio Martins
91821901e3
Override Group::setParentView() instead of listening to QEvent::ParentChanged
...
The latter is a Qt'ism
2022-07-20 10:35:27 +01:00
Sergio Martins
6e3524f9b2
Fix another two cases of View::setParent() being called directly
2022-07-20 10:16:57 +01:00
Sergio Martins
26acf4dab4
Add Controller::setParentView()
...
Controllers need to know when the view changes parent. Until know
they listen to event filter's QEvent::ParentChange, which isn't portable
to non-Qt platforms. Instead, always go through the controller.
Then each controller can override setParentView(), which is virtual,
to intercept parent changes without any Qt specific events.
In a followup will inherit from setParentView() in a few controllers
2022-07-19 18:54:45 +01:00
Sergio Martins
d99b842ae1
Always instantiate a controller even if nullptr is passed
...
During the multisplitter tests we create dummy views without
an associated controller. Let's create the controller anyway, as
more logic is moving into them, even if just for tests.
2022-07-19 18:53:38 +01: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
84f0c45cbd
qtquick: Add tabs to the customtabbar example
...
So the user doesn't need to add tabs manually to see them
2022-07-18 10:46:54 +01:00
Sergio Martins
ee59ad5e4b
qtquick: Port customtabbar example to TabBarBase.qml
...
It's now fully functional and styled.
2022-07-18 10:39:53 +01:00
Sergio Martins
82ad2242dd
qtquick: Don't assume in the C++ that the tab bar has a list view
...
Getting the tab index by QPoint is now done in QML, so it can
be overridden by the user.
2022-07-18 10:21:05 +01:00
Sergio Martins
dd1363de6c
qtquick: Minor refactoring of getTabAtIndex()
...
Moved the listview code into a separate function, so it
can be reused soon.
2022-07-18 09:20:32 +01:00
Sergio Martins
92d4922077
qtquick: tabAt(index) now supports non-QtQuickControls TabBar
...
The C++ had hardcoded looking for the list view. User can now
override and write their own function to get to their custom
tabbar.
2022-07-17 23:53:40 +01:00
Sergio Martins
b8acc8614c
qtquick: Split TabBar.qml into two
...
In general, the kddw logic that shouldn't be touched should go to
TabBarBase.qml while TabBar.qml has customizable bits.
For example, somone might not want to use the tab bar from
QtQuickControls but still inherit some logic from TabBarBase.qml
2022-07-17 22:24:51 +01:00
Sergio Martins
48bac96c71
qtquick: Add example of custom tabBar
...
Will do some styling in a follow up
2022-07-17 20:11:18 +01:00
Sergio Martins
9b4ac4738a
qtquick: Use a Loader to load the TabBar
...
It now loads the qml file specified in the ViewFactory.
Which by default is the TabBar.qml we ship, but could be something
else.
2022-07-17 20:11:09 +01:00
Sergio Martins
8a2eac8bcb
qtquick: Fix "current tab index changed" not being emitted
...
suppose tab number 5 is current and you remove tab 0. The current
dock widget didn't change but its index is now 4.
2022-07-17 20:11:09 +01:00
Sergio Martins
de40629094
Remove duplicate signal "currentDockWidgetChanged"
...
Because they were not equivalent, one was emitted in situations
where the other wasn't. Use a single signal to avoid that.
2022-07-17 19:30:28 +01:00
Sergio Martins
3cfc4c484f
tests: test that Group::currentIndex is correct
2022-07-17 18:52:18 +01:00
Sergio Martins
a900f73f7b
qtquick: Factor out TabBar usage into TabBar.qml
...
So the user can customize it soon.
2022-07-17 14:27:19 +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
Allen Winter
18253c467c
Merge branch 'master' into 2.0
2022-07-14 15:30:38 -04:00
Allen Winter
71c221981e
Merge branch '1.6'
2022-07-14 15:30:24 -04:00
Allen Winter
579cd3a201
python/examples[-qt6] - minor pylint fixes
2022-07-14 15:29:51 -04:00
Allen Winter
fae03328f6
codespelling fixes
2022-07-13 09:12:36 -04:00
Allen Winter
a113a428e7
README.md, docs_devel - markdown linting
2022-07-13 09:08:50 -04:00
Allen Winter
d4e020eb4a
reuse compliance
2022-07-13 08:50:25 -04:00
Allen Winter
53c65c6129
Merge branch 'master' into 2.0
2022-07-13 08:42:44 -04:00
Allen Winter
b60e3ef4c9
Merge branch '1.6'
2022-07-13 08:41:26 -04:00
Allen Winter
3764feaf89
Minimum Qt6 supported version 6.3.0
2022-07-13 08:40:59 -04:00
Allen Winter
f1959e5e16
Revert "CMakeLists.txt - set QT_MAJOR_VERSION for ECM"
...
This reverts commit 084947612b .
2022-07-13 08:37:38 -04:00
Allen Winter
084947612b
CMakeLists.txt - set QT_MAJOR_VERSION for ECM
2022-07-13 06:19:28 -04:00
Sergio Martins
7f71efd5f8
Fix build on older gcc
...
Error was:
undefined reference to `KDDockWidgets::Views::View_qtwidgets<QTabBar>::childViewsFor(QWidget const*)'
(Repeated for QLineEdit and others)
2022-07-13 07:19:37 +01:00
Sergio Martins
fc04dc77c4
Install EventFilterInterface.h too
...
DockWidgetRegistry.h depends on it. Copy it to private/ instead, don't want people
do use it directly
Fixes issue #302
2022-07-13 07:10:45 +01:00
Sergio Martins
c960673de4
Fix build of standalone applications
...
add_definitions only had an effect when build kddw itself, not
when applications were using it. Use target_compile_definitions
instead.
2022-07-13 06:59:18 +01:00
Sergio Martins
7d08925ea2
Add missing license to View_qt.cpp
2022-07-12 23:02:23 +01:00
Sergio Martins
688139cd38
Merge branch 'master' into 2.0
2022-07-12 22:48:09 +01:00
Allen Winter
ab40c02b56
Merge branch '1.6'
2022-07-12 16:03:53 -04:00
Allen Winter
710f71e7f0
CMakeLists.txt - fix LIB_NAME for ECMGeneratePriFile for Qt6
2022-07-12 16:03:17 -04:00
Allen Winter
02847c74bd
Merge branch '1.6'
2022-07-12 12:54:25 -04:00
Allen Winter
4e6b49f876
CMakeLists.txt - ECMGeneratePriFiles supports Qt6 now
2022-07-12 12:53:50 -04:00
Allen Winter
d12def7baa
Merge branch '1.6'
2022-07-12 12:11:04 -04:00
Allen Winter
d28dc745bc
buildsystem - InstallLocation.cmake -> KDInstallLocation.cmake
2022-07-12 12:09:55 -04:00
Allen Winter
ad8e14ceff
.reuse/dep5 - full project reuse licensing
2022-07-12 12:09:39 -04:00
Allen Winter
f9debe5f09
.pre-commit-config.yaml - add reuse lint checking
2022-07-12 12:08:45 -04:00
Allen Winter
ed52e6a955
Merge branch '1.6'
2022-07-12 11:13:35 -04:00
Allen Winter
b52b1335a6
Markdownlint the project
2022-07-12 11:12:33 -04:00
Sergio Martins
eaa474e76f
Merge branch '1.6'
2022-07-12 15:31:36 +01:00
Sergio Martins
fedce40883
Workaround for EGLFS not supporting per window mouse cursor shape
...
When hovering over the floating window edges our mouse cursor
changes to resize shape, but when leaving and entering the main window
the mouse cursor wasn't unset.
Workaround by using a global event filter and detecting the leave.
Not using QEvent::Leave as we still allow for some margin outside
the floating window to count as a resize cursor
2022-07-12 15:29:43 +01:00
Sergio Martins
5894fd54f5
WidgetResizeHandler: Remove no-op code
...
We already bail out if o != mTarget a few lines above
2022-07-12 14:09:16 +01:00
Sergio Martins
d788cde263
minor: Improve readability
...
Mouse cursor setting is directly related to it being global or local
event filter.
2022-07-12 12:50:31 +01:00
Sergio Martins
1051e859f4
minor: Separate "toplevelness" with filter being local/global
...
It's too separate concepts
2022-07-12 12:22:39 +01:00
Sergio Martins
2fa9c06f9a
minor: Pass a dedicated enum instead of bool to WidgetResizeHandler ctor
...
bool is opaque and needs a comment, the enum is expressive just by itself.
2022-07-12 11:49:58 +01:00
Sergio Martins
d8e0be874b
Merge branch 'master' into 2.0
...
Merged with "-s ours", as master only contained clang-format changes
already present in 2.0.
2022-07-12 11:35:01 +01:00
Sergio Martins
296de10571
Merge branch '1.6'
2022-07-12 11:31:14 +01:00
Sergio Martins
4691f9bfa5
Ran clang-format over the codebase
2022-07-12 11:28:05 +01:00
Sergio Martins
9ae0ab294c
Windows: Fix build
2022-07-11 15:06:29 -07:00
Sergio Martins
760fc8d0fb
Fix build of dummy frontend with Qt5
2022-07-11 13:52:11 -07:00
Sergio Martins
62020a3ff9
qtquick|example: Allow users to test floating windows with native titlebar
2022-07-11 21:43:16 +01:00
Sergio Martins
e7c51aabd3
Merge branch 'master' into 2.0
2022-07-11 21:15:34 +01:00
Sergio Martins
e83996b402
Merge branch '1.6'
2022-07-11 21:15:18 +01:00
Sergio Martins
c7dd7d954f
pre-commit: Don't clang-format json files
...
Not until I find out how to make vscode use clang-format for
json. It seems to be using its own formatter.
2022-07-11 21:14:15 +01:00
Sergio Martins
64a4ad5029
Fix build when dummy platform is disabled
2022-07-11 19:31:26 +01:00
Sergio Martins
7e051d5e71
Merge branch 'master' into 2.0
2022-07-11 19:24:58 +01:00
Sergio Martins
0d82880ea7
Merge branch '1.6'
2022-07-11 19:24:43 +01:00
Sergio Martins
0f66fe853d
pre-commit: Allow for multi-document yaml files
...
Which is valid yaml.
In case we want to make settings for json formatting in .clang-format.
2022-07-11 19:23:58 +01:00
Sergio Martins
fe18f994ac
Allow dummy to be built against Qt5 too
2022-07-11 19:18:42 +01:00
Allen Winter
025c49c583
buildsystem - sync with cmake ECM and KDAB upstream
2022-07-11 12:27:24 -04:00
Sergio Martins
a5e7b94da1
dummy: Don't look for QtWidgets, QtGui is enough
...
We still depend on QtGui for QMouseEvent, that needs to be
abstracted out
2022-07-11 17:22:39 +01:00
Sergio Martins
77e19fa5bd
Revert "cmake: Remove KDDockWidgets_QT6 from dummy preset"
...
This reverts commit 2666ed3f5e .
It's still needed, didn't notice as it would need a clean build
to repro the failure.
2022-07-11 17:19:45 +01:00
Sergio Martins
8ad64e5e6f
Fix dummy frontend build without QtWidgets
...
Next step is removing QtGui depenency
2022-07-11 17:14:05 +01:00
Sergio Martins
8b3a17d629
cmake: Treat dummy frontend like any other
...
Gets enabled by cmake presets now
2022-07-11 15:55:52 +01:00
Sergio Martins
2666ed3f5e
cmake: Remove KDDockWidgets_QT6 from dummy preset
...
It doesn't need Qt conceptually.
2022-07-11 15:12:11 +01:00
Sergio Martins
68e9f4bcea
dummy: Ifdef the test functions with developer mode
...
Fixes release build
2022-07-11 15:08:06 +01:00
Sergio Martins
ecb2c4ff47
Remove QtWidgets from ViewFactory_dummy
2022-07-11 14:54:50 +01:00
Sergio Martins
37688e1874
cmake: Allow to build only dummy frontend
...
The goal will be to make sure that the backend builds without Qt.
For now, dummy still links to Qt, but we're working on it.
2022-07-11 14:23:03 +01:00
Sergio Martins
adcde3a65c
tests: Add tst_dummyplatform
...
Its only purpose is to instantiate some classes so we're sure
they implement all needed pure virtuals
The dummy platform is just used for copy-pasting into a new
platform, so let's cover as much boiler-plate as possible
2022-07-11 13:45:48 +01:00
Allen Winter
1f7c1e4188
Merge branch 'master' into 2.0
2022-07-11 08:38:22 -04:00
Allen Winter
35c9ccdd6a
Merge branch '1.6'
2022-07-11 08:36:52 -04:00
Allen Winter
518724132b
fix a few missed pylint issues
2022-07-11 08:36:12 -04:00
Sergio Martins
b784780428
Add Dummy enumerator to FrontendTypes
...
so we can test that it reimplements all pure virtual methods.
We get a compiler-error now if any is missing.
Added the missing pure virtual methods too.
2022-07-11 11:54:38 +01:00
Sergio Martins
6ebb680c92
Re-ran clang-format 14 over the source
...
Fixes some differences with clang 13
2022-07-11 11:40:38 +01:00
Sergio Martins
ceab323916
Move qobjectAsView() and qobjectAsWindow from Platform.h to Platform_qt.h
...
As it's Qt specific
2022-07-10 23:04:37 +01:00
Sergio Martins
92b49f78a9
View CTOR no longer receives "thisQObject" via argument
...
It's unused, views don't need to be QObject based anymore
2022-07-10 22:44:54 +01:00
Sergio Martins
8e7e68eddc
Rename View_qt::asObject() to View_qt::asQObject()
...
Which can be done now since View::asQObject() is gone
2022-07-10 22:31:47 +01:00
Sergio Martins
1c21555767
Finally remove View::asQObject()
...
It's not required anymore.
2022-07-10 22:29:31 +01:00
Sergio Martins
2f6d618048
Remove View::asQObject() occurrances from Platform_qt
2022-07-10 22:12:54 +01:00
Sergio Martins
f9b806ede5
Fix memory leak
2022-07-10 22:08:08 +01:00
Sergio Martins
8894572174
Remove one usage of asQObject from WidgetResizeHandler
...
It's being deleted manually, so no need to pass parent.
View::asQObject() will be removed soon
2022-07-10 21:55:13 +01:00
Sergio Martins
2c924a3a82
Remove some QPointer usages and include cleanup
2022-07-10 18:42:28 +01:00
Sergio Martins
640ef58553
Allow to pass View* to qDebug
2022-07-10 18:36:35 +01:00
Sergio Martins
897e0debca
Replace draggableForQObject with draggableForView
2022-07-10 17:58:27 +01:00
Sergio Martins
233736a20b
Replace QPointer with a ViewGuard
2022-07-09 17:07:23 +01:00
Allen Winter
e3c08593b9
src/qtcommon/Platform_qt.h - QT_NAMESPACE
2022-07-09 12:05:54 -04:00
Allen Winter
f6315ba4c0
src/EventFilterInterface.h - QT_NAMESPACE
2022-07-09 11:51:31 -04:00
Allen Winter
1bb3e5de37
CMakeLists.txt - fix a typo that causing --warn-uninitialize
2022-07-09 11:42:47 -04:00
Allen Winter
54a29b5cae
Merge branch 'master' into 2.0
2022-07-09 11:09:35 -04:00
Sergio Martins
800d97c352
Fix 2 clazy warnings
2022-07-09 14:38:01 +01:00
Allen Winter
2f9f2c9ba6
Merge branch '1.6'
2022-07-09 09:17:19 -04:00
Allen Winter
ba7afe20b0
fix misspelling
2022-07-09 09:16:59 -04:00
Allen Winter
146338c9f4
Merge branch '1.6'
2022-07-09 09:14:53 -04:00
Allen Winter
0b5b06dc5a
.gitignore - ignore python/examples-qt6/rc_assets.py
2022-07-09 09:12:17 -04:00
Allen Winter
460b898bea
cmake-lint, cmake-format CMake files
2022-07-09 09:11:45 -04:00
Allen Winter
b3e398c530
Merge branch '1.6'
2022-07-08 17:35:24 -04:00
Allen Winter
6e5cfd70d1
pylint and autopep8 all python files
2022-07-08 17:34:42 -04:00
Allen Winter
4afc6b62b2
.pre-commit-config.yaml - add pylint,autopep8,cmake-lint,cmake-format
2022-07-08 17:33:12 -04:00
Sergio Martins
0785408a5c
Add fwd header for DropAreaWithCentralFrame_p.h
2022-07-08 14:09:57 +01:00
Sergio Martins
2c5df301d8
Bump clang-format to 14.0
2022-07-08 06:56:59 +01:00
Sergio Martins
a0aef05b2d
Merge branch '1.6'
2022-07-08 06:56:37 +01:00
Sergio Martins
3364d8ba76
Add .pre-commit-config.yaml
...
This one is simpler than the one in 2.0 branch, does not include
cmake formatting.
2022-07-08 06:55:59 +01:00
Sergio Martins
b5d1b6d02f
vscode: Copy the compile_commands.json from build to source dir
...
No longer needed to symlink it to make clangd work
2022-07-08 06:53:59 +01:00
Sergio Martins
d958e1cc70
vscode: Copy the compile_commands.json from build to source dir
...
No longer needed to symlink it to make clangd work
2022-07-08 06:47:41 +01:00
Sergio Martins
9a8539fa42
qtquick: Add support for "Always show tabs" option
...
Shows the tab even if the group only has 1 dock widget
2022-07-07 18:05:33 +01:00
Sergio Martins
5386d44fdb
qtquick: Move the "tabbar autohide" property to TabBar
...
It's a better location than in Stack
2022-07-07 14:36:48 +01:00
Sergio Martins
019692fd2f
Store the "tab auto hide" state in the controller, not the view
...
Added a signal for the QtQuick view too
2022-07-07 13:52:03 +01:00
Sergio Martins
448313b1e3
Rename Group::m_tabWidget to Group::m_stack
...
Matches its class name now
2022-07-07 11:41:44 +01:00
Sergio Martins
b1605cc58b
Rename Group::tabWidget() to Group::stack()
...
Matches its class name now
2022-07-07 11:37:47 +01:00
Sergio Martins
8383b227aa
qtquick|examples: Add an option to hide title bar
2022-07-07 11:30:34 +01:00
Sergio Martins
cd41697ee6
Added Config::startDragDistance()
...
Allows the user to change the drag threshold without having
to inherit from Platform
2022-07-07 11:11:02 +01:00
Sergio Martins
4e99b44823
Fix some English typos in comments
2022-07-07 11:04:08 +01:00
Sergio Martins
54802ed856
Remove the last Qt event filter from the backend
...
Ported to our own event filter
2022-07-06 23:08:21 +01:00
Allen Winter
ddf6847d4e
.krazy - fix comment
2022-07-06 09:10:04 -04:00
Sergio Martins
572b62aa9a
Port DragController/Wayland code from Qt event filter
...
Uses our own event filter abstraction now
2022-07-05 23:22:28 +01:00
Sergio Martins
b74ca53ac8
Fix potential crash
...
It's a 2.0 bug on wayland though, but at least bail early.
2022-07-05 23:04:19 +01:00
Sergio Martins
6f177bc2df
Assert that dock widget passed to MainWindow::addDockWidget is valid
2022-07-05 13:48:47 +01:00
Sergio Martins
74e9cc94e6
Also send DnD events through the event filter interface
2022-07-04 23:37:22 +01:00
Sergio Martins
8edf8737ce
Port FallbackMouseGrabber to our own event filter abstraction
...
No longer uses Qt's event filter directly
2022-07-04 22:33:40 +01:00
Sergio Martins
b6460c11f7
Add EventFilterInterface::onMouseEvent()
...
Some event consumers don't want to overload N methods and just
overload one instead
2022-07-04 22:06:30 +01:00
Allen Winter
d75e691795
appveyor.yml - for Qt6 builds use Qt6.3
2022-07-04 09:20:53 -04:00
Sergio Martins
b68e348ff3
Add a .pre-commit-config.yaml file
2022-07-04 11:22:53 +01:00
Sergio Martins
54ad9ec2f2
cmake: format with cmake-format
2022-07-04 11:20:19 +01:00
Sergio Martins
9283a55364
Fix Platform only sending mouse press event
...
Was ignoring other mouse event types
2022-07-03 22:26:15 +01:00
Sergio Martins
35c1517709
Handle double click event in EventFilterInterface too
2022-07-03 22:21:57 +01:00
Sergio Martins
7b9bde123b
Use ViewGuard instead of QPointer
2022-07-03 22:12:32 +01:00
Sergio Martins
7b780bc7e9
Add Windows to DisplayType enumerator too
2022-07-03 21:49:18 +01:00
Sergio Martins
84da42c262
Add Platform_qt::isLeftMouseButtonPressed()
2022-07-03 21:44:42 +01:00
Sergio Martins
1bcd425849
Add Platform::displayType()
2022-07-03 21:36:32 +01:00
Sergio Martins
aafa9526f6
Add Platform::organizationName()
...
So we don't use QCoreApplication::organizationName() directly
2022-07-03 20:56:48 +01:00
Sergio Martins
16565fcd46
Add Platform::setMouseCursor()
...
So we don't depend directly on qGuiApp
2022-07-03 20:04:53 +01:00
Sergio Martins
f288d953fc
Add Platform::applicationName()
...
so controllers don't access qGuiApp directly
2022-07-03 19:55:26 +01:00
Sergio Martins
f1fb3f1eac
Remove unneeded event filter from DockWidget.cpp
...
It has been ported already
2022-07-03 19:47:26 +01:00
Sergio Martins
70da9cc638
appveyor: Trying to fix the QtQuick tests
...
Error was: Failed to create OpenGL context for format QSurfaceFormat.
Reproduced in my docker and setting this env var fixed it.
2022-07-03 19:44:03 +01:00
Sergio Martins
c63290e6d3
Port WidgetResizeHandler away from Qt event filter
2022-07-02 21:27:11 +01:00
Sergio Martins
57c311f850
Fix some typos in comment
2022-07-02 21:26:02 +01:00
Sergio Martins
0963967939
Add mouse move and release events to EventFilterInterface
2022-07-02 20:15:13 +01:00
Sergio Martins
7d21516f6d
Add a m_thisWeakPtr member to Views
...
Allows to promote back to shared pointer
2022-07-02 20:12:33 +01:00
Sergio Martins
ba71ad7407
View_qt: Deliver events to any subscribed event filters
...
Next we'll por some Qt event filters to View's event filter abstraction
2022-07-02 13:43:38 +01:00
Sergio Martins
8af8c603c1
Allow to install event filters on view too
...
So we can port away from Qt event filters.
In a followup will deliver events, one commit per type or so.
Not all events will be filtered, only the ones used by us
2022-07-02 13:31:16 +01:00
Sergio Martins
d461c41d8b
Fix release build
2022-07-02 12:54:55 +01:00
Sergio Martins
edb2538220
Port DockRegistry away from Qt event filters
...
Uses our filter abstraction now
2022-07-02 12:50:52 +01:00
Sergio Martins
5639b5632a
tests: Construct QCoreApplication earlier
...
The global event filter wasn't being set as it didn't have
a qGuiApp at that point
2022-07-02 12:48:16 +01:00
Sergio Martins
c72fdf3586
Add EventFilterInterface and port DockRegistry to it
...
Some classes wont have any Qt in it, so they need another way
to install global event filters. Added API to Platform.h for this
purpose. Implemented as regular event filter in Platform_qt.
2022-07-01 15:28:15 +01:00
Sergio Martins
a690477b73
Move isProcessingAppQuitEvent from DockRegistry to Platform
...
As different platforms will do this differently
2022-07-01 11:31:40 +01:00
Waqar Ahmed
3638622c48
Fix unity build
2022-06-30 13:53:40 +05:00
Waqar Ahmed
7fc7fba697
Fix static build
2022-06-30 13:16:20 +05:00
Sergio Martins
e7a4b3ecdd
Windows: Require VS 2019 as a minimum
...
There's build failures in KDBindings with earlier versions, among
other build problems.
2022-06-29 15:16:04 +01:00
Sergio Martins
5977ffcc1c
appveyor: Run ctest with -V
...
So I can see why tests are failing
2022-06-29 14:56:55 +01:00
Sergio Martins
16f6a0f35c
Trying to fix Mingw build
...
FloatingWindow.cpp:42: error: "NOMINMAX" redefined [-Werror]
2022-06-29 14:50:21 +01:00
Sergio Martins
3845f8cfae
Trying to fix msvc 2017 build
2022-06-29 14:48:58 +01:00
Sergio Martins
9546e55cb0
Trying to fix msvc 2017 build
2022-06-29 14:46:41 +01:00
Sergio Martins
5407e23d31
qtquick: Fix leaks at test exit
2022-06-29 14:21:01 +01:00
Sergio Martins
99240a2f4e
vscode: Add launch for tst_floatingwindow
2022-06-29 14:18:03 +01:00
Sergio Martins
d7f677c8fc
Remove unused ClassicIndicatorsOverlay_qtwidgets file
2022-06-29 13:59:36 +01:00
Sergio Martins
1d0a304d2b
Fix a bunch of warnings in tst_multisplitter
...
The handler wasn't installed so they weren't fatal.
2022-06-29 13:33:40 +01:00
Sergio Martins
bf6e8886b1
Don't build TestHelper* in non-dev mode
...
They're just for the tests.
2022-06-29 12:37:40 +01:00
Sergio Martins
cadd94c233
Fix drop indicator overlay leak
2022-06-29 12:31:16 +01:00
Sergio Martins
a99c3e1b70
Fix potential crash found by the tests
...
Item::checkSanity() can be called via deleteLater when we don't
have a platform anymore
2022-06-29 12:31:16 +01:00
Sergio Martins
214e7d2013
qtquick: Fix pure-virtual method call
2022-06-29 10:11:30 +01:00
Sergio Martins
219ad5be01
Merge branch '2.0' of github.com:KDAB/KDDockWidgets into 2.0
2022-06-29 10:00:59 +01:00
Sergio Martins
199ad09185
Fix shadowing warning
2022-06-29 10:53:46 +01:00
Sergio Martins
e60d535242
vscode: Add a msvc launch for the qtquick example
2022-06-29 10:00:26 +01:00
Sergio Martins
f3532e6ea0
Re-add windowForHandle to fix the windows build
2022-06-29 09:36:19 +01:00
Sergio Martins
cba3f77906
Revert "Remove Window::setProperty/property"
...
This reverts commit ff9a7fba69 .
It's still being used by windows code paths
2022-06-29 09:35:12 +01:00
Sergio Martins
91e2df3ead
Fix QtTest being included without a dev-mode guard
2022-06-29 10:19:57 +01:00
Sergio Martins
fd4431246c
Remove the "groupViewInMDIResize" property from DockRegistry
...
Moved it into the QmlHelpers, as it's QtQuick specific.
Allows to remove a asQObject() call.
2022-06-28 21:40:12 +01:00
Sergio Martins
2f12cd8f3d
Replace a QPointer with a ViewGuard
...
Removes another usage of asQObject
2022-06-28 20:47:57 +01:00
Sergio Martins
3ef91d8b7f
Minor rename: m_draggableWidget -> m_draggableView
2022-06-28 20:36:55 +01:00
Sergio Martins
558eef792f
Don't connect to QObject::destroyed directly
...
Connect to View::beingDestroyed instead.
Decouples more from QObject and allows to remove some asQbject()
calls
2022-06-28 20:33:02 +01:00
Sergio Martins
269e062609
Don't connect to QObject::objectNameChanged
...
Connect to the view's signal instead.
Decouples a bit more from QObject
2022-06-28 20:22:58 +01:00
Sergio Martins
2eb72114d7
Share View::setObjectName() implementation between qtwidgets/qtquick
2022-06-28 20:12:07 +01:00
Sergio Martins
a0d5c25c29
Remove 2 unneeded usages of QObject stuff
2022-06-28 19:23:43 +01:00
Sergio Martins
934ba440b3
Rename itemForWidget to itemForView
...
itemForObject is removed as it's not used
2022-06-28 18:56:13 +01:00
Sergio Martins
aff9806ab1
Port away from using event filter in DockWidget.cpp
...
Platform now abstract the emittion of window activation/deactivation
2022-06-28 18:36:10 +01:00
Sergio Martins
0cd515679f
Don't handle ParentChange event directly, use the signal instead
...
This removes some duplicated code and decouples from QObject a bit
more
2022-06-28 17:24:03 +01:00
Sergio Martins
5a657785d7
Remove event filter from Item
...
In preparation for non-QObject views
2022-06-28 13:43:43 +01:00
Sergio Martins
39274d3e6b
Fix crash
2022-06-28 13:35:31 +01:00
Sergio Martins
d92691bc5c
Add a View::parentChanged() signal
...
Will help removing event filters from non-Qt code
2022-06-28 13:19:23 +01:00
Sergio Martins
83a2620015
Remove View_qtwidgets::asQWidget
2022-06-27 23:54:18 +01:00
Sergio Martins
3dd455bfb7
Port some code away from View::asQObject()
...
Use View_qt::asObject() instead
2022-06-27 23:37:27 +01:00
Sergio Martins
5389bcc825
Add View_qt as a base class for View_qtwidgets and View_qtquick
...
So it can contain the "asObject()" method, which we're removing
from View.h
2022-06-27 22:53:42 +01:00
Sergio Martins
49ccecbadd
Remove some unneeded asQObject calls
2022-06-27 22:41:37 +01:00
Sergio Martins
64619d85e9
tst_qtwidgets: Remove some usages of asQObject()
2022-06-27 22:00:49 +01:00
Sergio Martins
1e5cbed254
View: Group virtual methods together
2022-06-27 21:55:44 +01:00
Sergio Martins
0e6f38381b
Rename hostWidget to hostView
2022-06-27 21:41:48 +01:00
Sergio Martins
cad7cb1c8f
Remove View::parent() and Item::host()
...
Those deal in QObject, which is being phased out
2022-06-27 21:40:05 +01:00
Sergio Martins
696ce887a8
docs: Add documentaiton about how to create a new frontend
...
Will be updating it as we go.
2022-06-26 22:33:46 +01:00
Sergio Martins
0a496aca76
tests: Add more tests for Window
2022-06-26 22:27:06 +01:00
Sergio Martins
68403c866b
Fix Windows build
2022-06-26 21:14:13 +01:00
Sergio Martins
5669e07252
docs++
2022-06-26 20:58:29 +01:00
Sergio Martins
07524ad00c
Replace Qt::WindowState with KDDockWidget::WindowState
2022-06-26 20:45:28 +01:00
Sergio Martins
2f261b6b70
Add KDDockWidgets_p.h to hold private enums
2022-06-26 20:14:41 +01:00
Sergio Martins
ff9a7fba69
Remove Window::setProperty/property
...
Mostly unused and much easier to use a member variable.
2022-06-26 20:08:21 +01:00
Sergio Martins
d43c68bef4
Add a test for Window::handle
2022-06-26 20:01:56 +01:00
Sergio Martins
5dbf3590f8
Minor API cleanups
2022-06-26 20:00:07 +01:00
Sergio Martins
6ff0a5d759
Window documentation and make some functions not virtual
2022-06-26 19:42:06 +01:00
Sergio Martins
2ee9debb66
dummy: Add needed virtual implementations to Window_dummy.cpp
2022-06-26 19:14:16 +01:00
Sergio Martins
9aab0af1dc
qtquick: Fix View::setVisible(false) always showing the window
...
Adds some tests for Window too.
2022-06-26 01:23:26 +01:00
Sergio Martins
820161ba29
tests: Added Platform::createDefaultViewFactory test
2022-06-26 00:37:10 +01:00
Sergio Martins
0024ed54c8
tests: Add tst_platform
2022-06-25 23:34:30 +01:00
Sergio Martins
f08efcdab7
Add missing pure virtual implementation to dummy frontend
2022-06-25 23:07:36 +01:00
Sergio Martins
3b8e3b6c6b
Add a dummy frontend
...
Goal will be that people can copy it to start a new frontend
2022-06-25 20:34:49 +01:00
Sergio Martins
c1f6d64ac3
Remove a TODO and add some docs
2022-06-25 19:00:12 +01:00
Sergio Martins
a74d2aae7a
tests: Add initial test for Window
2022-06-25 18:52:36 +01:00
Sergio Martins
113cdbafe9
Trying to stabilize a test
2022-06-25 18:05:20 +01:00
Sergio Martins
c9fede2aab
Remove the FloatingWindow window state overrides
...
Nothing is inheriting from controller now. Those methods are already
virtual in view, so just remove them from the controller
2022-06-25 17:41:03 +01:00
Sergio Martins
f640d8852b
Fix maximize button not being updated
...
Moved logic into controller
2022-06-25 16:29:41 +01:00
Sergio Martins
8f10d86cad
Fix minimize button not being updated
2022-06-25 16:14:36 +01:00
Sergio Martins
02ef55f9f1
Fix auto-hide button not being updated
...
Moved logic from view into controller.
2022-06-25 13:50:17 +01:00
Sergio Martins
6cd6408bef
cmake: Install v1.x compatible headers for QtWidgets
...
It's nicer to include DockWidget.h than views/DockWidget_qtwidget.h.
QtQuick won't need pretty headers as the recommended way is to use from QML
directly, not C++
2022-06-25 13:13:00 +01:00
Sergio Martins
7ec71d65be
Merge branch 'master' into 2.0
2022-06-25 12:54:32 +01:00
Sergio Martins
8ad2ece8b9
Merge branch '1.6'
2022-06-25 12:54:20 +01:00
Sergio Martins
7cc63926d4
Merge branch '1.6' into 2.0
2022-06-25 12:53:44 +01:00
Sergio Martins
6184b06d12
qtquick: Silence benign warning
2022-06-25 12:30:44 +01:00
Sergio Martins
559a195669
Rename layoutWidget to layout
...
As already done with the class names
2022-06-25 11:47:55 +01:00
Sergio Martins
95d711ece7
qtquick: Allow to use the MDI feature from QML
...
No need to use low level C++ API anymore
2022-06-25 11:45:01 +01:00
Sergio Martins
74a1520382
examples: Use less controllers
2022-06-25 11:13:21 +01:00
Sergio Martins
31ba0ec52d
mdi: Don't expose the controllers directly in the API
2022-06-24 22:42:31 +01:00
Sergio Martins
10f70c8dd6
Move the QString based API from MainWindow_qtquick to MainWindowViewInterface
...
Makes sense for other frontends too
2022-06-24 22:26:02 +01:00
Sergio Martins
452a89bfa2
Remove some controllers from the QML interface
2022-06-24 21:21:45 +01:00
Sérgio Martins
5b7630b318
Fix namespaced build
2022-06-24 20:36:01 +01:00
Sergio Martins
82b3aba854
Remove ViewWrapper*h from public API
2022-06-24 17:20:09 +01:00
Sergio Martins
0a9506cd21
Probably fix Qt namespaced build
2022-06-24 17:00:01 +01:00
Sergio Martins
10c918b93c
Use View instead of ViewWrapper in the api
...
The latter will be an implementation detail soon
2022-06-24 00:10:50 +01:00
Sergio Martins
2ac996218f
Minor typo fix
2022-06-23 22:13:10 +01:00
Sergio Martins
429bcfc4e0
Rename Frame.qml to Group.qml
2022-06-23 16:03:46 +01:00
Sergio Martins
ae5cf1d723
More renaming of "frame" to "group"
2022-06-23 16:01:43 +01:00
Waqar Ahmed
4ba58ac1be
Add DockWidget::aboutToDelete
...
Relying on QObject::destroyed might not be a good idea, fixes the
following ASAN issue:
```
SideBar.cpp:80:22: runtime error: downcast of address 0x6040005c8b90
which does not point to an object of type 'DockWidget'
0x6040005c8b90: note: object is of type 'QObject'
00 00 00 00 88 64 e7 43 3f 7f 00 00 a0 ff 0e 00 80 60 00 00
70 81 0c 00 c0 60 00 00 01 be be be
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'QObject'
```
2022-06-22 19:16:56 +05:00
Sergio Martins
cc918c5195
More "frame" to "group" renaming
2022-06-22 13:42:22 +01:00
Sergio Martins
bc767cefac
Rename asFrameController to asGroupController
2022-06-21 17:32:38 +01:00
Sergio Martins
0aec6dfdb1
Rename more frame variables to group
2022-06-21 17:31:28 +01:00
Sergio Martins
9469273c7a
Rename "frame" variables to "group"
2022-06-21 17:12:11 +01:00
Sergio Martins
fe7a8d450c
Rename Frame class to Group
2022-06-21 16:34:20 +01:00
Sergio Martins
e9eee0e69e
wayland: Fix StateDragging::handleMouseMove() being called
...
For wayland we override StateDragging and deal in QDrag instead
but some spurious mouse event got in and were handled in the base
class.
Fixes a crash when receiving mouse move during a drag
2022-06-21 11:17:31 +01:00
Sergio Martins
d2339d1b12
wayland: Fix QEvent::DragEnter being accepted by user code
...
Otherwise we stop receiving drag moves.
If we're dragging a window we're absolutely sure that user code
won't be interested.
As reproduced by using graphic views.
2022-06-21 11:10:11 +01:00
Sergio Martins
b45644af74
Rename FrameViewInterface class to GroupViewInterface
2022-06-21 09:01:44 +01:00
Sergio Martins
73d627554a
Remove Frame.h/cpp to Group.h/cpp
...
It's a better name.
Files only for now. Contents will come in a followup.
2022-06-21 08:51:52 +01:00
Sergio Martins
e980dc9bb1
Add some trace debugging to DragController
2022-06-20 14:27:28 +01:00
Sergio Martins
b9773cd262
qtquick: Move some Q_INVOKABLES to the views
...
As only the views are exposed
2022-06-19 23:27:21 +01:00
Allen Winter
47ad860921
Merge branch '1.6'
2022-06-19 16:02:49 -04:00
Allen Winter
a2f0e2e689
codespell fix
2022-06-19 16:02:29 -04:00
Allen Winter
1c6c7e767f
Merge branch '1.6'
2022-06-19 15:39:46 -04:00
Allen Winter
1b1d963d3e
.krazy - exclude spelling checking -- use codespell instead
2022-06-19 15:39:24 -04:00
Sergio Martins
da70b1baed
qtquick: Don't overload Q_INVOKABLES
...
Apparently QML doesn't support it very well.
Fixes #291
2022-06-19 20:26:19 +01:00
Sergio Martins
2dff66fb97
README: Move the supported toolchain section into the build section
...
So it's easier for users to find that they need a C++17 compiler.
Won't add exact compiler versions as I have no idea which gcc and which
clang version introduced such support.
Fixes #296
2022-06-19 17:59:09 +01:00
Sergio Martins
a44886279b
README: Move building section to before the example
...
Since you need to build kddw before building the examples.
As a drive-by, added a mention to X11Extras.
Won't mention any package names as that's distro dependent and the amount
of distros is open ended. Would rather remove our current mentions of package names
to make it consistent.
Fixes #297
2022-06-19 17:15:17 +01:00
Sergio Martins
9072555814
ChangeLog: Explain what 2.0 is about
2022-06-19 15:22:54 +01:00
Sergio Martins
b599554ba7
Update ChangeLog with the one from master
2022-06-19 15:14:17 +01:00
Sergio Martins
2b62b1965a
Merge branch 'master' into 2.0
...
empty merge with "-s ours" just to reconcile. All changes from
master have been cherry-picked manually since the code has changed
too much todo a normal merge
2022-06-19 14:43:22 +01:00
Sergio Martins
ea55c74768
Added MainWindow::internalLayout()
...
Allows the application to add more widgets next to the drop area.
(cherry-picked from commit 74dcbd994a )
2022-06-19 14:40:59 +01:00
Sergio Martins
729624ab04
EGLFS: Don't raise the main window when docking
...
EGLFS doesn't honour that the floating windows should be
on top and will make the floating windows go behind.
It's also unneeded to raise it on eglfs, since it's fullscreen.
(cherry-picked from commit d06c6e8f11 )
2022-06-19 14:37:52 +01:00
Sergio Martins
4fa43c7ba1
Make numSideBySide_recursive() ignore invisible items
...
We have invisible items that just remember the position of
other items.
(cherry-picked from commit 9f96eff663 )
2022-06-19 14:37:06 +01:00
Sergio Martins
1f95f67a15
Add DropLocation_Horizontal and DropLocation_Vertical
...
So we can quickly use a bitwise and to see if an arbitrary
drop location is vertical or horizontal.
(cherry-picked from commit 3260c65a6c )
2022-06-19 14:27:32 +01:00
Sergio Martins
73fd21939f
Allow segmented indicators to disable individual segments
...
The application developer might now want to show some segments.
Now he can use Config::setDropIndicatorAllowedFunc(), which previously
only worked for classic indicators
(cherry-picked from commit 2c8ceb67ef )
2022-06-19 14:23:35 +01:00
Sergio Martins
104a065aeb
Pass the DropArea to setDropIndicatorAllowedFunc() too
...
So the lambda can have more advanced usage and inspect the
target layout before allowing or disallowing the drop.
For our use case, we want to limit max 3 dock widgets side by side,
for example.
(cherry-picked from commit 982904e2ba )
2022-06-19 14:22:12 +01:00
Sergio Martins
7b4e04703d
Added MultiSplitter::numSideBySide_recursive()
...
(cherry-picked from commit f5622732ce )
2022-06-19 13:52:30 +01:00
Sergio Martins
a705ccfe5e
Fix typo in code snippet
2022-06-19 13:48:44 +01:00
Sergio Martins
84a8fd61b4
MainWindow: Allow to avoid the immediate QWidget::create()
...
In case you're going to put the main window into a layout you
don't want to have it create a QWindow.
(cherry-picked from commit 4727c9c7fc )
2022-06-19 13:25:53 +01:00
Sergio Martins
724a67f2ef
distro/ - update for ubuntu22.04 and fedora36
...
(cherry-picked from commit bf255c104f )
2022-06-19 13:21:44 +01:00
Sergio Martins
d1e29e6773
Add the possibility of setting the margin used for overlay docks
...
(cherry-picked from commit 9b8759c472 )
2022-06-19 13:19:50 +01:00
Sergio Martins
f2ddbd2cc3
Added KDDockWidgets::InitialVisibilityOption::PreserveCurrentTab
...
So you can insert into a tab group without changing the current
tab, if you want.
(cherry-picked from commit 58b8633e3d )
2022-06-19 13:14:54 +01:00
Sergio Martins
8a0fa46deb
Don't show middle dock indicator if frame isn't dockable
...
This was implemented but the logic was wrong.
Fixes central persistent showing the central indicator.
(cherry-picked from 6166e5805c )
2022-06-19 13:06:09 +01:00
Sergio Martins
28cc64be4a
Remove unused/duplicated file
2022-06-19 13:04:05 +01:00
Sergio Martins
4856da3bec
.pylintrc - initial pylint config file
...
(cherry-picked from commit b1379f0bef )
2022-06-19 13:00:49 +01:00
Sergio Martins
08518e02e0
various - fix some misspellings
...
(cherry-picked from commit f3da0f0547 )
2022-06-19 13:00:06 +01:00
Sergio Martins
1e7f0d7c5f
various - update copyright year
...
(cherry-picked from commit b2fc0c3eb1 )
2022-06-19 12:57:51 +01:00
Sergio Martins
793661ea09
Workaround QTBUG-102430, don't move still maximized window
...
When dragging a maximized window we show normal, but we can
only start moving it when the window managers acknowledges the new
state. The state in QWidget isn't reliable.
(cherry-picked from commit 6e7268e42a )
2022-06-19 12:54:12 +01:00
Sergio Martins
4c177d7823
Save the last known window state from the window manager POV
...
Required for QTBUG-102430
(cherry-picked from commit 7e6c5b2d9f )
2022-06-19 12:52:35 +01:00
Sergio Martins
e763cb138a
Add a comment regarding QTBUG-102430
2022-06-19 12:47:11 +01:00
Sergio Martins
6da693c5da
Workaround FloatingWindow::windowStateChanged regarding QTBUG-102430
...
QWidget::windowStateChanged isn't useful as it's emitted once sync
and another async, with the same value. Only the async one is useful
as it will represent the real window manager state. Then we can do
further moves.
The QWindow one happens to be good (async), so use that one instead.
(cherry-picked from commit d4fe17a0bf )
2022-06-19 12:42:48 +01:00
Sergio Martins
d1de3a29b4
CMakeLists.txt - Python bindings are not supported in Unity builds
...
fixes #284
(cherry-picked from commit c6ce421432 )
2022-06-19 12:30:57 +01:00
Sergio Martins
940991c75e
Use FloatingWindow::isMaximizedOverride() instead of isMaximized()
...
This is for issue #286 .
Allows users to workaround buggy window managers.
(cherry-picked from commit 47f773ab7c )
2022-06-19 12:22:32 +01:00
Sergio Martins
c0d1bd3f92
tests|qtquick|Windows: Stabilize a test
...
The warning is benign and unrelated to anything kddw is doing
(cherry-picked from commit 1f638d2c7a )
2022-06-19 12:16:46 +01:00
Sergio Martins
92192b7949
Fix position of right overlay dockwidgets when there's a toolbar on the left
...
(cherry-picked from commit 7b73393095 )
2022-06-19 12:15:23 +01:00
Sergio Martins
9fda86a511
Linux: Fix dragging of maximized floating windows
...
They should restore their normal size when the drag starts
(cherry-picked from commit 1305dee081 )
2022-06-19 12:13:50 +01:00
Sergio Martins
4114f00183
Added dockWidgetInserted|Removed signals to TabBarWidget
...
Since QTabBar doesn't have them.
Useful for custom tab bars
(cherry-picked from commit 743dbc0718 )
2022-06-19 12:04:25 +01:00
Sergio Martins
848327d8b3
TitleBarWidget: Mark members as protected
...
So custom titlebars have more power
(cherry-picked from commit fd4588de0f )
2022-06-19 11:59:21 +01:00
Sergio Martins
44d38f9f84
Added TitleBar::tabBar()
...
Useful for people writing custom titlebar's with style that depends
on the current tab
(cherry-picked from commit 6ba10cfe12 )
2022-06-19 11:57:26 +01:00
Sergio Martins
fe7f71d986
MDI: Fix another case of showing resize handles wrong
...
(cherry-picked from commit 25b04d7ed8 )
2022-06-19 11:48:08 +01:00
Sergio Martins
05b7980cfe
MDI: Fix case where resize cursor would be shown for frame bellow
...
Was already fixed a few days ago, but this is the case for nested
mdi.
(cherry-picked from commit e345e89c35 )
2022-06-19 11:46:18 +01:00
Sergio Martins
e2e34fb11b
examples: Remove more duplicate MyWidget.cpp/h files
...
share with main example instead
(cherry-picked from commit bb4cf802f5 )
2022-06-19 11:35:54 +01:00
Sergio Martins
1935d3bace
example: Allow to test propagation of close event in the mdi example
...
(cherry-picked from commit 701069617c )
2022-06-19 11:32:37 +01:00
Sergio Martins
8767159cc9
example: Remove duplicate minimal-mdi/MyWidget.cpp
...
It was using the cpp from the main example but the header from
minimal-mdi. Instead, share both the impl and the header
(cherry-picked from commit a8c50f1876 )
2022-06-19 11:28:41 +01:00
Sergio Martins
198bd60565
example: Added --blocks-close-event
...
Makes dock widget #0 reject the close event, meaning it won't close.
(cherry-picked from commit 21765efbac )
2022-06-19 11:18:02 +01:00
Sergio Martins
f8b1745c68
Forward QCloseEvent to the MDI widgets too
...
Fixes case where docked MDI widgets were not able to block a close
(cherry-picked from commit 61cca1e5ec )
2022-06-19 00:56:42 +01:00
Sergio Martins
30f43d7579
Fix MainWindow not propagating close events to docked widgets
...
Nested FloatingWindows already supported it, so make it consistent.
Personal take: In a non-docking world, users can override their
main window close event and prevent a close, to save a document
or such. However, in a docking world, the main window developer
won't know which widgets are docked, so forwarding needs to happen,
as some might have documents to save.
(cherry-picked from commit 7db9938b85 )
2022-06-19 00:46:49 +01:00
Sergio Martins
950914e15c
Further move onCloseEvent to base class
...
So that it can be reused by MDI layouts too
(cherry-picked from commit 01cc915734 )
2022-06-19 00:34:31 +01:00
Sergio Martins
bd4aed18c9
Refactor: Move close event logic from FloatingWindow to DropArea
...
So main window can use it too
(cherry-picked from commit 3454b67a45 )
2022-06-19 00:32:46 +01:00
Sergio Martins
d47130f0c8
appveyor: cherry-picked changed from master
...
f98ce37c12
339edf1143
2022-06-19 00:25:07 +01:00
Sergio Martins
f530668711
Don't dereference potentially nullptr
2022-06-19 00:23:54 +01:00
Sergio Martins
67bb7c16cf
CMakeLists.txt - find COMPONENTS to search for Qt modules
...
(cherry-picked from commit 8b8ef7f2b0 )
2022-06-19 00:22:01 +01:00
Sergio Martins
c30a266c01
Don't try to restore to previous position if there isn't any
...
(cherry-picked from commit 524dff9105 )
2022-06-19 00:14:33 +01:00
Sergio Martins
66b91c1de3
Make redocking floating windows with tabs possible
...
TitleBar::isFloating() was returning false, while it should
have returned true.
Fixed by making isFloating() simpler and dumb. isFloating() should
only say if it belongs to a floating window or not. It shouldn't
contain any logic about whether button should be visible or not.
There's already logic elsewhere that will hide the float button
in case there's nesting.
Fixes issue #96 and #44
(cherry-picked from commit 0099a19a82 )
2022-06-19 00:09:21 +01:00
Sergio Martins
4c670a552e
MDI: Fix resize cursor appearing for frames that had others on top
...
(cherry-picked from commit e6b8636e88 )
2022-06-19 00:05:19 +01:00
Sergio Martins
d5e46dff31
MDI: Fixed closing dock widget in MDI would close main window
...
We only close the window when the window is a FloatingWindow and
it's the last frame
(cherry picked from commit 86419fd979 )
2022-06-18 23:37:02 +01:00
Sergio Martins
3695595826
Merge branch '1.6'
2022-06-18 23:08:40 +01:00
Sergio Martins
303532483b
vscode: filter-out some todo-tree folders, mostly 3rdparty
2022-06-18 22:24:21 +01:00
Sergio Martins
ff92af1e62
Removed some TODOs
...
The comment is still there in case it's interesting for someone,
but it's not something that will be worked on
2022-06-18 22:24:21 +01:00
Sergio Martins
cd1ce835d7
Add cmake presets for ci
2022-06-18 21:49:12 +01:00
Sergio Martins
49b2a10cc6
Fix QtQuick build on Windows
2022-06-18 19:13:45 +01:00
Sergio Martins
a3f7126dfe
cmake: Prefix ci build dirs with "build-"
2022-06-18 19:49:08 +01:00
Sergio Martins
2faecc68c0
Don't build the "Fuzzer"
...
It hasn't been needed in a long time.
I'll enable it once it's needed. Build needs fixing though
2022-06-18 19:48:19 +01:00
Sergio Martins
fe75297a29
cmake: Add CI presets
...
The idea is to test the different code paths, that means:
- Qt5 vs Qt6
- dev-mode vs release
but also to test that the qtquick frontend isn't including anything
from qtwidgets and vice-versa.
2022-06-18 19:40:59 +01:00
Sergio Martins
60c6ffaabb
Rename MDIArea class to MDIArea_qtwidgets
...
To match the filename now
2022-06-18 18:15:19 +01:00
Sergio Martins
408fe315ed
Rename MDIArea.h to views/MDIArea_qtwidgets.h
...
As done for all other views. This one was missing
2022-06-18 17:51:19 +01:00
Sergio Martins
5ec68ef608
README: Add a note to use 1.6 branch instead
2022-06-18 13:46:17 +01:00
Sergio Martins
c7f33f589e
README: Add warning that 2.0 is in active development
2022-06-18 13:44:49 +01:00
Sergio Martins
942d086905
Fix linking on Qt/macOS
2022-06-18 13:36:07 +01:00
Sergio Martins
8dbd87ae0d
cmake: Only add qtquick/ to include path if it's being built
...
And vice-versa for qtwidgets
2022-06-18 13:32:36 +01:00
Sergio Martins
f04e813af3
Fix Platform.h not being installed
2022-06-18 13:17:58 +01:00
Sergio Martins
a0accacb5d
Rename views/MainWindowMDI.h -> ../views/MainWindowMDIViewInterface.h
...
This one was missing
2022-06-18 13:14:18 +01:00
Sergio Martins
1b0bae7780
Don't include Window.h in DockRegistry.h
...
As the latter is installed while the former is not.
Window.h depends on KDBindings so would rather not require it publically.
2022-06-18 13:06:29 +01:00
Sergio Martins
f7bb0c1dbd
Fix examples trying to be installed to /
...
Only worked when being built from within kddw.
2022-06-18 12:42:24 +01:00
Sergio Martins
4c4dcf4423
Move KDBindings usage from Platform.h to Platform_p.h.
...
So user doesn't need to install it
2022-06-18 12:28:54 +01:00
Sergio Martins
7017ce8396
Move KDBindings usage from View.h to View_p.h
...
KDBindings is implementation detail. User won't have to install
it, at this point.
2022-06-18 12:15:42 +01:00
Sergio Martins
9f1a9df621
cmake: Install view interface headers too
2022-06-18 11:48:29 +01:00
Sergio Martins
d7b57d460f
cmake: Don't install Window*h and Item_p.h
...
They are unneeded, and expose kdbindings
2022-06-18 11:46:46 +01:00
Sergio Martins
6be5339fd3
Add d-ptr to DockRegistry, hides usage of kdbindings
2022-06-18 11:21:53 +01:00
Sergio Martins
82d933ad34
Remove unused include
2022-06-18 11:16:41 +01:00
Sergio Martins
cae9627e06
Add a d-ptr to FloatingWindow_qtwidgets
...
So we don't expose kdbindings in the API
2022-06-18 11:14:15 +01:00
Sergio Martins
5a6ceade6c
cmake: Fix QtQuick not being found when using installed kddw
2022-06-18 10:39:50 +01:00
Sergio Martins
e2870dbe4f
cmake: Fix warning about KDDockWidgets_LIBRARY_QTID not being defined
2022-06-18 10:35:19 +01:00
Sergio Martins
d5471aceb6
cmake: Install headers
2022-06-18 10:25:52 +01:00
Sergio Martins
e63a34a4a5
Rename DockRegistry_p.h -> DockRegistry.h
...
People use it.
2022-06-18 09:28:03 +01:00
Sergio Martins
8be6183543
Include cleanup
...
Removed unneeded controllers/ includes from headers
2022-06-18 09:15:30 +01:00
Sergio Martins
1ee5d21d4a
examples: Remove controller usage, use views instead
...
Controllers is low level API
2022-06-18 08:36:09 +01:00
Sergio Martins
26ba2199cb
Moved 2 more DockWidget enums to KDDockWidget.h
...
So users don't have to include controllers/DockWidget.h
2022-06-18 08:16:16 +01:00
Sergio Martins
08d2b6f764
Fix documentation of MyTitleBar_CSS.h
...
It was still refering to the old widgets
2022-06-18 07:54:05 +01:00
Sergio Martins
7ae49ee330
qtquick: Move last DockWidget Q_PROPERTY from controller to view
2022-06-18 00:34:26 +01:00
Sergio Martins
a609f2233b
Move DockWidgetOption enum to KDDockWidget.h
...
controllers/DockWidget.h is not something users will include directly
2022-06-18 00:27:58 +01:00
Sergio Martins
d3de373995
Move "widget" Q_PROPERTY to the qtquick view
2022-06-17 21:54:30 +01:00
Sergio Martins
a5f364da03
qtquick: Fix qml accessing the frame controller
...
It should access the view instead, as the controller will cease to
be QObject
2022-06-17 20:12:44 +01:00
Sergio Martins
499c9412bb
Don't make all DropArea views all DropArea::onResized()
...
Do it in the controller once, instead of repeating it
2022-06-17 20:06:51 +01:00
Sergio Martins
c48a100f73
Remove unused titleBar() method
2022-06-17 19:58:22 +01:00
Sergio Martins
7e7c9d7300
Rename the remaining view interfaces to *ViewInterface
2022-06-17 18:56:34 +01:00
Sergio Martins
0600c42775
Move common code info FrameViewInterface
...
So it's not duplicated between QtWidgets and QtQuick
2022-06-17 18:19:01 +01:00
Sergio Martins
4a47366ba0
Suffix our view interfaces with "*ViewInterface.h"
...
So we know they are a view interface. They'd have the same name
as the controller otherwise
2022-06-17 11:19:27 +01:00
Sergio Martins
a330042339
qtquick: Use enum instead of hardcoded number
2022-06-15 22:01:27 +01:00
Sergio Martins
5e2cc2cc12
Remove old fwd header
2022-06-15 21:56:18 +01:00
Sergio Martins
2a6bd9e415
Add overloads taking view interface instead of controller
...
People won't be using the controllers directly
2022-06-15 21:51:56 +01:00
Sergio Martins
1e3acd2a92
Remove done TODO
2022-06-15 21:18:56 +01:00
Sergio Martins
ab50f0f19b
qtquick: Add the invokables to DockWidget_qtquick.h
...
Actually in the interface class and we mark them invokable with
Q_MOC_RUN trick
2022-06-15 21:13:27 +01:00
Sergio Martins
1283cc87dc
qtwidgets: Added DockWidget_qtwidgets::widget()
2022-06-15 20:30:01 +01:00
Sergio Martins
c373354c0c
qtquick: Move some properties to DockWidget view
...
The controller won't be a QObject soon
2022-06-15 20:25:02 +01:00
Sergio Martins
d2aba705fb
qtquick: Rename guestView to guestItem in the public API
2022-06-15 20:13:42 +01:00
Sergio Martins
78815664cc
Move some dock widget view code into the shared DockWidgetViewInterface
2022-06-15 20:10:20 +01:00
Sergio Martins
e754bb25c6
Pass the controller to DockWidgetViewInterface
...
So it can start to have an API
2022-06-15 19:56:34 +01:00
Sergio Martins
4a3d15432e
Add a DockWidgetViewInterface
...
to share code between both QtQuick and QtWidget DockWidget views
2022-06-15 19:52:34 +01:00
Sergio Martins
921d94d731
Added MainWindow_qtwidgets::setPersistentCentralWidget()
...
Which is nicer for the end user as it deals in QWidget
2022-06-15 19:37:12 +01:00
Sergio Martins
01b2bbc11c
Rename "persistent widget" to "persistent view"
2022-06-15 19:27:04 +01:00
Sergio Martins
a45f53f9d9
examples: Don't mention mainWindow much in the examples
...
Added DockRegistry::mainDockingAreas() as synonym for mainwindows().
2022-06-15 18:45:37 +01:00
Sergio Martins
3e44e0c9a9
qtquick: Add API to the MainWindow view
...
QtQuick can't access our controllers (as they won't be QObject),
so they need to access via the view.
2022-06-15 18:37:27 +01:00
Sergio Martins
63f0bc9e02
Move some invokables from MainWindow controller to the qtquick view
...
As Q_INVOKABLE is just for QtQuick.
There's still some remaining to move, but they are exposing Controllers,
so will need a different API.
2022-06-15 18:13:50 +01:00
Sergio Martins
1c9b44394e
Add a comment
2022-06-15 18:01:49 +01:00
Sergio Martins
84315daa1a
Move MainWindow Q_PROPERTIES to the qtquick view
...
qtquick and views in general won't have access to controllers much
2022-06-15 17:59:17 +01:00
Sergio Martins
337afd2919
Minor header cleanup
2022-06-15 17:16:02 +01:00
Sergio Martins
126ed773cd
Make MainWindow::init() private
2022-06-15 16:55:46 +01:00
Sergio Martins
38432ccacd
Make MainWindow::windowGeometry() private
2022-06-15 16:09:04 +01:00
Sergio Martins
0825a6bdc2
Move sidebars into MainWindow controller
...
No reason to have them duplicated between qtwidgets and qtquick
2022-06-15 15:57:50 +01:00
Sergio Martins
cd35f1ff62
MainWindow header cleanup
2022-06-15 15:29:42 +01:00
Sergio Martins
0c95550af6
Move some common view code into MainWindowViewInterface
...
So that it's not duplicated between QtWidgets and QtQuick
2022-06-15 12:29:14 +01:00
Sergio Martins
e1fe8054d0
Remove public MainWindow::onResized
2022-06-15 11:23:51 +01:00
Sergio Martins
29c675661f
cleanup regarding DockWidget::show()
2022-06-15 05:32:54 +01:00
Sergio Martins
de917f103a
Remove unneeded QtWidget ifdefs and TODO
2022-06-15 05:25:09 +01:00
Sergio Martins
95ff95e995
Remove TODO and shorten namespace
2022-06-15 05:22:41 +01:00
Sergio Martins
9fdf0c2ae1
examples: Remove unneeded header and TODO
2022-06-15 05:18:11 +01:00
Sergio Martins
3b2a395668
Fix build with Wweak-vtables
...
Have to move kdbindings to its own target so we can use -isystem
with it, as it doesn't support Wweak-vtables
2022-06-15 05:01:10 +01:00
Sergio Martins
fec58dd217
Add missing exports
2022-06-15 04:34:49 +01:00
Sergio Martins
148a25a452
Fix some Wweak-tables warnings
2022-06-15 04:33:35 +01:00
Sergio Martins
e6dd002ca8
qtquick: Rename MainWindowLayout to DockingArea
...
Since it's not an actual Window, it's just a QQuickItem. QtQuick has
proper Window items that mean an actual Window.
2022-06-15 00:27:41 +01:00
Sergio Martins
95acf7a4cb
qtquick: Don't register Item, it's unneeded
2022-06-15 00:18:40 +01:00
Sergio Martins
73a5809f62
qtquick: Remove unneeded qml types registering
2022-06-15 00:17:10 +01:00
Sergio Martins
627b6a1593
qtquick: Bump qml imports to 2.0
2022-06-15 00:15:44 +01:00
Sergio Martins
755bc6ac14
cmake: Don't add src/ to include path
...
Fully qualify includes instead
2022-06-14 16:57:22 +01:00
Sergio Martins
dafa14536f
examples: include cleanup
2022-06-13 23:39:31 +01:00
Sergio Martins
a4d337e891
Fully qualify header paths when including controllers
...
so this still works when private headers are installed
2022-06-13 23:24:43 +01:00
Sergio Martins
44476789c2
Add fwd headers for the controllers
2022-06-13 23:01:57 +01:00
Sergio Martins
458ae05564
Move qtquick qrc into qtquick folder/
...
as it's unrelated to the other frontends
2022-06-13 22:51:22 +01:00
Sergio Martins
169d2fe8e2
qtquick: Fix custom titlebar example
...
qrc path was wrong
2022-06-13 22:45:34 +01:00
Sergio Martins
4615936f9e
Fix minor typo
2022-06-13 22:42:28 +01:00
Sergio Martins
ebaf0d170f
examples: Rename minimal_mdi to mdi
...
There's not much functionality to show, so no point in saying it's
minimal
2022-06-13 22:39:31 +01:00
Sergio Martins
040fe14907
examples: Uncomment code that sets separator thickness
...
It works now
2022-06-13 22:32:55 +01:00
Sergio Martins
59013303ac
examples: Port MyViewFactory to new design
...
It was commented out still
2022-06-13 22:31:13 +01:00
Sergio Martins
4dab634abf
docs++
2022-06-13 20:44:59 +01:00
Sergio Martins
32b6c3acbe
Simplify ViewFactory by making it receive View parents instead of Controllers
...
Users don't need to worry about such details, like casting to QWidget.
2022-06-13 20:35:57 +01:00
Sergio Martins
91398d5fab
Minor: Make method protected instead of private
2022-06-13 20:16:11 +01:00
Sergio Martins
b596aaf1f4
Add the qtwidget and qtquick fwd headers to include path
2022-06-13 19:48:37 +01:00
Sergio Martins
ec56120290
Don't include controller headers in view headers
...
view headers will be installed, so shouldn't leak impl details
much. Controllers are more low level things that the user won't use
much
2022-06-13 19:44:47 +01:00
Sergio Martins
8ba160b0f6
Add forward headers for the views
2022-06-13 19:16:51 +01:00
Sergio Martins
6a6854ed84
example: Rename MyFrameworkWidgetFactory to MyViewFactory
2022-06-13 19:00:58 +01:00
Sergio Martins
8b49eabe95
Bump KDBindings
2022-06-13 18:45:05 +01:00
Waqar Ahmed
a17f6468cd
use 0 as default serializationVersion
2022-06-13 14:50:43 +05:00
Waqar Ahmed
c62b1a5a9b
Dont use nlohmann::operator[], use value() instead
2022-06-13 14:47:30 +05:00
Sergio Martins
2e4c01f604
Move some m2 TODOs to m3, as they're not related to QtQuick stabilization
2022-06-13 02:46:31 +01:00
Sergio Martins
3ab3076263
Fix some low hanging TODOs
2022-06-13 02:37:03 +01:00
Sergio Martins
efc42e8d3f
Move updating size constraints from FloatingWindow view to controller
2022-06-13 02:28:56 +01:00
Sergio Martins
e49ecc880e
Replace View::onLayoutRequest() with a signal
...
Which moves more logic into the controllers.
2022-06-13 02:12:12 +01:00
Sergio Martins
cfd4e61a3b
Remove View::setLayoutItem()
...
Because it's specific to Frame
2022-06-13 01:49:06 +01:00
Sergio Martins
b56cf151fe
TitleBar_qtwidgets: Header cleanup
2022-06-12 16:34:35 +01:00
Sergio Martins
87414585ea
SideBar_qtwidgets: Cleanups
...
Include cleanups and making things protected/private.
2022-06-12 16:27:04 +01:00
Sergio Martins
3b814866e2
Remove unneeded isVertical() from Sidebar view
2022-06-12 16:21:11 +01:00
Sergio Martins
55620a5d10
TODO cleanup
...
Removed stale TODOs and promoted some to TODOm2 , as they should
be tackled next
2022-06-12 16:07:29 +01:00
Sergio Martins
5a99c8390a
qtquick: Allow the user to pass a different QQmlEngine to DockWidget
...
Like was the case in v1.x
2022-06-12 15:51:00 +01:00
Sergio Martins
1f7ac6897c
qtquick: Rename setWidget to setGuestView
2022-06-12 15:33:56 +01:00
Sergio Martins
24f1f6be33
qtquick: Remove unnneeded connect from frame view
...
It's already done in the controller
2022-06-12 15:29:21 +01:00
Sergio Martins
6c589f0500
Postpone some m2 TODOs to m3
...
m2 will focus on QtQuick being usable
2022-06-12 15:25:35 +01:00
Sergio Martins
767bbcb251
Make layout linter work against any frontend
2022-06-12 15:16:30 +01:00
Sergio Martins
c12da6b6d5
cmake: Don't link against QTTest in release builds
2022-06-12 14:51:57 +01:00
Sergio Martins
ab2b481a80
cmake: QtQuick frontend no longer needs to link against QtWidgets
2022-06-12 14:43:17 +01:00
Sergio Martins
fb844bc989
Don't use QAction directly
...
In prepartion for qtquick frontend not needing QtWidgets
2022-06-11 18:48:37 +01:00
Sergio Martins
098a368c79
qtquick: Use QGuiApplication for tests, not QApplication
2022-06-11 18:29:12 +01:00
Sergio Martins
1acbf48786
Don't depend directly on QSizePolicy, as that's QtWidgets
...
Introduce our own enum. Soon our qtquick frontend won't link
against QtWidgets
2022-06-11 18:22:38 +01:00
Sergio Martins
e120f6f318
tests: Fix windows tests regarding frame pos vs client pos confusion
...
It's also more readable now.
Might break on linux though, will need to investigate further if that's
the case. In many cases it's just a timing issue, as some platforms are
"more async" than others to add frame
2022-06-11 16:17:10 +01:00
Sergio Martins
a7b6dd5f24
Port the rest of win32 specific code
2022-06-11 15:50:03 +01:00
Sergio Martins
5cd46d572e
Remove a Q_OS_WIN_TODO, nothing to port there
2022-06-11 15:24:32 +01:00
Sergio Martins
0031f1bcfd
Release build now builds
2022-06-11 15:24:19 +01:00
Sergio Martins
42998971cc
Make DockWidget's d ptr public
...
This gives more power to users, at their own risk ofc.
2022-06-11 15:22:34 +01:00
Sergio Martins
35f8e3c3f6
cmake: Disable unity build from release builds
...
It makes it hard to catch missing includes
2022-06-11 15:14:00 +01:00
Sergio Martins
98a8e67f9b
Build fixes for release builds
2022-06-11 15:08:25 +01:00
Sergio Martins
6c53777f1b
Fix build on Windows
2022-06-11 14:31:20 +01:00
Sergio Martins
02a8da4fb8
tests: Remove whitelisted warning
...
It doesn't happen anymore
2022-06-11 14:10:00 +01:00
Sergio Martins
29fd6f4a40
qtquick: Fix binding loops
...
This also restores behaviour with v1.x regarding setParent
2022-06-11 14:03:41 +01:00
Sergio Martins
0f6be75620
vscode: Add a qtquick launcher to the workspace too
2022-06-11 13:25:52 +01:00
Sergio Martins
78025d1e34
Fix name of examples in README and such, since they got renamed
2022-06-11 13:20:26 +01:00
Sergio Martins
b75a10b9eb
examples: Normalize names of examples
2022-06-11 13:06:41 +01:00
Sergio Martins
6aed1508af
tests: Don't run tst_qtwidgets if only qtquick tests were specified
2022-06-11 12:38:57 +01:00
Sergio Martins
e9c050b659
tests: Delete all QWidgets when test stops
...
So we don't go with garbage to the QtQuick tests
2022-06-11 12:38:11 +01:00
Sergio Martins
3c9598a560
tests: Fix Qt6/qtquick tests by supressing benign warnings
...
The main window can be smaller than our layout, we have no way
of imposing a min size to the QWindow, as we don't know what
the user has in main.qml, so don't qWarn when that happens.
This can be handled in the user side of things though, as our
layout exposes its min size, which the user should honour
2022-06-11 12:07:19 +01:00
Sergio Martins
6bded5e832
remove code line that was a no-op
2022-06-11 10:52:46 +01:00
Sergio Martins
e34b4c4d09
tests: Fix Qt6 qtquick tests regarding mouse grabbing not working
...
QtQuick tests don't work well if run after the QtWidget ones,
so change order.
2022-06-11 00:24:42 +01:00
Sergio Martins
3662f30ea4
vscode: Update the workspace file for Qt6
2022-06-10 23:42:44 +01:00
Sergio Martins
63ff503568
vscode: Remove qtquick workspace files
...
The same build builds both qtwidgets and qtquick
2022-06-10 23:25:34 +01:00
Sergio Martins
1070cbce87
tests: Remove unneeded test skipping on Qt < 5.15
...
Minimum is 5.15 nowadays
2022-06-10 23:12:10 +01:00
Sergio Martins
a1d62522f3
Fix Qt6 build
2022-06-10 19:28:25 +01:00
Sergio Martins
cfd90b6779
tests: Enable tests for QtQuick as they pass now
2022-06-10 19:25:37 +01:00
Sergio Martins
b184c6f830
qtquick: Reduce number of sanity checks during incomplete resizes
...
Fixes the last broken QtQuick test.
2022-06-10 19:24:11 +01:00
Sergio Martins
2aefa9efa0
qtquick: Fix windows being resized bellow their min size
2022-06-10 18:59:53 +01:00
Sergio Martins
5791198c51
qtquick: Fix some benign sizing warnings
...
During resize QtQuick will trigger lots of calls to setSize()
since it updates the width and the height separately.
Run our sanity checks only after with width and height are done
being updated, and not twice
2022-06-10 15:33:16 +01:00
Sergio Martins
a94daba3fc
Bound the suggested floating window geometry
...
Because why not, seems correct. No bug would happen with QtWidgets
since QtWidgets respect the min sizes of their children, but for
QtQuick it's more flaky as there's no intrinsic mechanism for
min sizes, so give it some help
2022-06-10 14:16:57 +01:00
Sergio Martins
8e85e46ee9
tests: Make the view min size be the same as it was in 1.x
2022-06-08 19:02:01 +01:00
Sergio Martins
74dcbd994a
Added MainWindow::internalLayout()
...
Allows the application to add more widgets next to the drop area.
2022-06-08 16:31:35 +01:00
Sergio Martins
118fe3d32e
qtquick: Fix guest view not getting parented when getting added
...
To be improved on milestone 3
2022-06-08 12:22:57 +01:00
Sergio Martins
189fc7356a
Don't install DropArea_p.h twice
...
Adding the fwd header is enough, so it builds with same include
name for both system and submodule install
2022-06-08 08:17:02 +01:00
Sergio Martins
2ef569c114
Add a fwd area for DropArea
2022-06-08 08:09:26 +01:00
Sergio Martins
fb31f893ae
Remove unneeded QJsonDocument include
2022-06-08 00:59:16 +01:00
Sergio Martins
d275226df9
qtquick: Fix Stack creating two TabBar's
...
It's created by the controller, we shouldn't create another one
in the view
2022-06-08 00:32:14 +01:00
Sergio Martins
a5279b5efd
qtquick: Minor refactoring, add TabBar_qtquick::qmlTabs()
2022-06-08 00:00:41 +01:00
Sergio Martins
81007f629f
qtquick: Fix flaky handling of tabs
...
The flickable of TabBar from QtQuickControls has a bogus contentX
when removing and readding tabs. Instead implement tabAt() via
iteration and checking which tab contains the point
2022-06-07 23:34:54 +01:00
Sergio Martins
060fe44e71
Remove some unneeded QApplication includes
2022-06-07 17:14:05 +01:00
Sergio Martins
3c13f51017
tests: Also resize the view, not only the window when creating main window
...
Both are needed. This is how it worked in v1
2022-06-07 00:24:38 +01:00
Sergio Martins
ad9cdad927
qtquick: Don't do geometry changes at destruction
...
It's unneeded and makes tests fail. Setting visibility would trigger
a bunch of code that we don't want at destruction time
2022-06-06 23:53:22 +01:00
Sergio Martins
31992dcb83
tests: Fix tst_honourGeometryOfHiddenWindow on XCB
...
The suggested height should be smaller than the floating window
min-size.
2022-06-06 23:35:31 +01:00
Sergio Martins
a5ecfbdd91
tests: Fix createMainWindow having different behavior between frontends
2022-06-06 23:03:53 +01:00
Sergio Martins
0929fb1c75
qtquick: Fix showing qtquick window not setting the root item visible
2022-06-06 15:43:53 +01:00
Sergio Martins
4515c85f91
Don't call "Frame::isMDI" when layout is being destroyed
...
Just emit the signal always, QtQuick will reread the property.
It's better than doing a complex solution
2022-06-06 15:30:34 +01:00
Sergio Martins
230f562cb4
qtquick: Fix floating window being deleted at construction
...
When the window is hidden we destroy it, but not while it's
still being constructed.
2022-06-06 14:58:09 +01:00
Sergio Martins
3758dc7dda
Fix weird logic in FloatingWindow::isBeingDeleted()
2022-06-06 14:48:58 +01:00
Sergio Martins
464624f2a5
qtquick: Don't dereference FloatingWindow while it's being destructed
...
Caught by UBSAN
2022-06-06 13:53:31 +01:00
Sergio Martins
0be61b0a1b
qtquick: Don't delete dock widgets in frame view dtor
...
views shouldn't delete controllers
2022-06-06 13:44:53 +01:00
Sergio Martins
5faf36700b
Use qGuiApp instead of qApp
...
As QtQuick applications might not have QApplication.
2022-06-06 13:24:38 +01:00
Sergio Martins
995df8e3e8
qtquick: Remove qFatal in TabBar_qtquick::tabsAreMovable
...
It wasn't implemented in v 1.x either.
2022-06-06 11:29:14 +01:00
Sergio Martins
14189dc601
Make LayoutSaver deserializeWindowGeometry deal in Window instead of View
2022-06-06 11:23:07 +01:00
Sergio Martins
9c881ec53e
Normalize how we set top level window geometry
...
Prefer Window API, since for QtQuick the root view isn't so tighly
coupled with the QWindow as in QWidgets world. Hide the difference in
Window_qtwidgets.cpp, which now prefers the QWidget API whenever possible,
as that's better tested than using QWindow direclty.
2022-06-06 11:17:42 +01:00
Sergio Martins
581451c342
Remove old ViewWrapper::asDropArea()
...
It's unneeded, and it wasn't implemented for QtQuick
2022-06-06 10:28:44 +01:00
Sergio Martins
eb198736b8
qtquick: Fixed drag indicators not working on main window
...
ViewWrapper::asDropArea() was dummy. Will remove it.
2022-06-06 10:23:48 +01:00
Sergio Martins
e8f390f2ad
tests|qtquick: Don't create lots of spurious QQuickView
...
Most of the times we just want to create a dock widget which
will be parented immediately, we don't need the window.
2022-06-06 10:13:19 +01:00
Sergio Martins
2beb4982b0
qtquick: Make Window_qtquick::rootView() behave like in v 1.x
...
The MainWindow might not be the QQuickView's root item, but
version 1.x would still return that. So preserve that, since it's
what tests expect.
We can improve after having tests passing.
2022-06-06 09:42:06 +01:00
Sergio Martins
46159d88bd
Add Window::containsView()
2022-06-06 09:25:45 +01:00
Sergio Martins
fbff1ed4a7
qtquick: Fix min size being violated in FloatingWindow ctor
...
Only set the suggested geometry after we added the frame.
This is the behaviour in 1.x too.
2022-06-06 09:24:38 +01:00
Sergio Martins
6bd87113b4
Simplify some code, add a View::transientWindow() shortcut
2022-06-05 14:19:08 +01:00
Sergio Martins
7e3a82ed3e
qtquick: Fix setting of transient parent window
...
We need to go through Window, not through View.
This even makes things cleaner, as parentView() shouldn't go across
window boundaries. That's the case for QtWidgets but it's not consistent
with QtQuick. Our View abstraction has saner rules
2022-06-05 14:12:22 +01:00
Sergio Martins
f9efe2755e
Fix LayoutSaver not restoring geometry correctly
...
"normalGeometry" was repeated twice due to typo
2022-06-05 13:31:08 +01:00
Sergio Martins
a88beb7574
qtquick: Implement missing methods for classic indicators
2022-06-05 12:53:22 +01:00
Sergio Martins
792aaf76da
Normalize handling of close event for Frame and FloatingWindow too
...
Fixes windows not closing correctly for QtQuick
2022-06-05 12:47:53 +01:00
Sergio Martins
f11a6a6a8c
Honour View::closeRequested signal
...
This noramalizes how both qtwidgets and qtquick were handling it.
Fixes tests related to close events in qtquick
2022-06-05 03:23:19 +01:00
Sergio Martins
6d926ee6e4
qtquick: Remove two more unneeded signals
2022-06-05 02:39:52 +01:00
Sergio Martins
666d4be478
qtquick: Fix wrong signal being emitted
...
It's the controller signal that is connected
2022-06-05 02:30:45 +01:00
Sergio Martins
ce88a00b4b
tests: Don't enable these qtquick tests yet
...
Was commited by mistake
2022-06-05 01:14:32 +01:00
Sergio Martins
075a9d30f0
qtquick: Make Layout::floatingWindow()
...
The layout might be parented to other intermediate stuff.
2022-06-05 01:12:18 +01:00
Sergio Martins
ec4e22b5ae
qtquick: Move the ClassicIndicator Q_PROPERTIES to the view
...
as that's what will be exposed to QtQuick
2022-06-05 00:54:30 +01:00
Sergio Martins
56ca80e8fc
qtquick: Fix crash when dereferencing incomplete stack controler
...
The stack controller CTOR was still in the stack (pun intended), then
dereferenced by tabbar. Instead, call Stack_qtquick::init() to intitialize
the the TabBar. At this point the Stack controller is already usable.
2022-06-04 21:30:43 +01:00
Sergio Martins
ec144472ce
Remove unneeded QWidget reference
2022-06-04 21:23:49 +01:00
Sergio Martins
991ced33f6
Rename createTabWidget() to createStack()
...
as done with the other classes already
2022-06-04 21:21:22 +01:00
Sergio Martins
78357b53a4
move some todos to milestone 3
2022-06-04 20:55:42 +01:00
Sergio Martins
16529c6704
qtquick: Port code that emitted frameGeometryChanged()
...
It's a public signal used by client code
2022-06-04 20:52:49 +01:00
Sergio Martins
1ead71442f
qtquick: Remove old rubber band code, this has been ported already
2022-06-04 20:41:57 +01:00
Sergio Martins
a3f2e8ec9a
qtquick: Rename tabBarObj to tabBarViewObj
...
Makes it clear it's a view
2022-06-04 20:39:41 +01:00
Sergio Martins
a2b5f40ed1
qtquick: Implement Stack_qtquick::tabBarObj()
2022-06-04 20:38:40 +01:00
Sergio Martins
d63a9db5a2
Port wayland commented out code
2022-06-04 20:30:20 +01:00
Sergio Martins
03a17c3a9d
Fix TODO about renaming variable
2022-06-04 20:26:35 +01:00
Sergio Martins
0f8823664c
qtquick: Remove old references to FrameQuick
2022-06-04 20:24:12 +01:00
Sergio Martins
cdaa03a413
qtquick: Fix Frame_qtquick::updateConstriants() not being called yet
2022-06-04 20:22:49 +01:00
Sergio Martins
e25a940ad1
qtquick: Implement DockWidget_qtquick::frameVisualItem()
2022-06-04 20:18:41 +01:00
Sergio Martins
9332eb3bf8
Remove unneeded FrameOptions argument from createFrame()
...
It's passed to the controller, the view doesn't need it.
2022-06-04 20:08:26 +01:00
Sergio Martins
84561a9d67
tests: Remove unused color argument from createDockWidget()
2022-06-04 20:03:43 +01:00
Sergio Martins
f1f722f1ce
Replace TODOv2 tags with TODOm2 and TODOm3 tags
...
Not all todos are required for milestone m2
2022-06-04 19:53:25 +01:00
Sergio Martins
e5b82e0a45
qtquick: Fix frame not getting parented to DropArea
2022-06-04 12:32:20 +01:00
Sergio Martins
6c5f477c31
cmake: Remove qtquick presets, they are unneeded now
...
The build will build both frontends now.
2022-06-04 12:15:23 +01:00
Sergio Martins
20546acc4e
cmake: Remove unneeded condition for old Qt
...
5.15. is the minimum nowadays
2022-06-04 12:07:51 +01:00
Sergio Martins
87319c69d2
cmake: Swap if/else branches to remove a negation
2022-06-04 12:05:59 +01:00
Sergio Martins
dc36435b35
cmake: Make the frontend discovery shorter
...
The fatal messages aren't needed, replaced by a REQUIRED find_package.
Added missing QtQuickControls find package from one branch, it was
only looking for QtQuick.
2022-06-04 12:03:26 +01:00
Sergio Martins
ea9bf1ef0f
cmake: Remove unneeded negation
2022-06-04 11:48:53 +01:00
Sergio Martins
adbaedef89
cmake: Don't require the user to specify a frontend.
...
It would error-out with "OFF is not a frontend"
Just use find_package instead and enable any compatible frontend.
2022-06-03 19:18:53 +01:00
Sergio Martins
2fafef87df
cmake: Replace ${PROJECT_NAME} with the actual project name
...
Because:
- Doesn't select the whole option name on double-click
- Not easily greppable on the terminal
It make's sense for any reusable cmake code though, we can replace
with ${PROJECT_NAME} again after factoring out any of our non-reusable
cmake code into a reusable module, if any.
2022-06-03 19:14:01 +01:00
Sergio Martins
d06c6e8f11
EGLFS: Don't raise the main window when docking
...
EGLFS doesn't honour that the floating windows should be
on top and will make the floating windows go behind.
It's also unneeded to raise it on eglfs, since it's fullscreen.
2022-06-03 14:42:08 +01:00
Waqar Ahmed
cd88e19648
cmake: Add KDDockWidgets_FRONTENDS option
2022-06-03 16:10:41 +05:00
Sergio Martins
a2f1c1347a
cmake: Explicitly add QtWidgets as dependency of our widgets frontend
2022-06-02 23:33:20 +01:00
Sergio Martins
596c330a77
Make numSideBySide_recursive() ignore invisible items
...
This amends previous commit, which missed a code path
2022-06-02 16:49:12 +01:00
Sergio Martins
9f96eff663
Make numSideBySide_recursive() ignore invisible items
...
We have invisible items that just remember the position of
other items.
2022-06-02 16:30:02 +01:00
Sergio Martins
3260c65a6c
Add DropLocation_Horizontal and DropLocation_Vertical
...
So we can quickly use a bitwise and to see if an arbitrary
drop location is vertical or horizontal.
2022-06-02 16:16:24 +01:00
Sergio Martins
2c8ceb67ef
Allow segmented indicators to disable individual segments
...
The application developer might now want to show some segments.
Now he can use Config::setDropIndicatorAllowedFunc(), which previously
only worked for classic indicators
2022-06-02 16:02:00 +01:00
Sergio Martins
982904e2ba
Pass the DropArea to setDropIndicatorAllowedFunc() too
...
So the lambda can have more advanced usage and inspect the
target layout before allowing or disallowing the drop.
For our use case, we want to limit max 3 dock widgets side by side,
for example.
2022-06-02 15:19:01 +01:00
Sergio Martins
b2b75cd5bb
Fix typo in snippet
2022-06-02 14:44:14 +01:00
Sergio Martins
90ad1a7f23
Added MultiSplitter::numSideBySide_recursive()
...
Since ItemBoxContainer isn't exported.
2022-06-02 14:01:47 +01:00
Sergio Martins
f5622732ce
Added ItemBoxContainer::tst_numSideBySide_recursive()
2022-06-02 13:59:20 +01:00
Sergio Martins
e74055c1fd
qtquick: Move titlebar invokables to the view
...
As that's what's exposed to QtQuick
2022-06-01 08:53:11 +01:00
Sergio Martins
1acafd8a6c
Remove unneeded MultiSplitterConfig
...
Config.cpp is enough
2022-05-31 23:31:29 +01:00
Sergio Martins
529cedfcbf
Remove the last occurrences of KDDOCKWIDGETS_QTWIDGETS
...
Don't define it in cmake anymore as it's official dead
2022-05-31 22:43:35 +01:00
Sergio Martins
affd1d12ae
tests: Move the last qtwidgets only test to tst_qtwidgets.cpp
...
tst_docks.cpp is now completely rid of the widget ifdefs
2022-05-31 15:14:16 +01:00
Sergio Martins
300bd89728
tests: Port a bunch of KDDOCKWIDGETS_QTWIDGETS defines
...
These already existed in version 1.0, so just use the proper
guard. They won't be made generic at this point
2022-05-31 15:09:36 +01:00
Sergio Martins
61fb31b62a
tests: Move a qtquick only test to tst_qtquick
2022-05-31 15:05:27 +01:00
Sergio Martins
58f1900b06
Port lazy separator resize
2022-05-31 14:43:47 +01:00
Sergio Martins
b6038bd7d7
Port two instances of KDDOCKWIDGETS_QTWIDGETS
...
These are OK, so just rename to the new macro
2022-05-31 14:19:02 +01:00
Sergio Martins
07853bdc4d
Remove the last two remaining KDDOCKWIDGETS_QTQUICK ifdefs
2022-05-31 14:14:31 +01:00
Sergio Martins
6289e92e54
qtquick: Fix resizing root view
...
And uncommented the qtquick test for this, which now passes.
Moved the test to its own qtquick tests file.
2022-05-31 14:06:36 +01:00
Sergio Martins
0a1023aa83
Remove qFatal from ViewWrapper_qtquick::setAttribute()
...
It's ok to be a no-op
2022-05-31 11:33:19 +01:00
Sergio Martins
bc6417c923
Added Window::framePosition()
2022-05-31 11:33:08 +01:00
Sergio Martins
b201737149
Abstract mouse grabbing
...
It's done via the platforms, not via ifdefs anymore
2022-05-31 11:06:25 +01:00
Sergio Martins
c93911016f
tests: remove unused already ported class
2022-05-31 10:37:51 +01:00
Sergio Martins
2e92357adc
Add View::setZOrder()
...
Only relevant to QtQuick.
Removes some ifdefs.
2022-05-31 10:37:14 +01:00
Sergio Martins
8223f462c6
Remove Q_OBJECT from inside comments, so cmake doesn't trigger moc
...
Fixes a warning where moc says "No relevant classes found"
2022-05-31 10:08:55 +01:00
Sergio Martins
b9b8bfc430
Fix Werorr build due to missing override
2022-05-31 10:05:39 +01:00
Sergio Martins
f9df3c5872
windows: Port system move support
2022-05-30 23:42:41 +01:00
Sergio Martins
9881e0488f
windows: Port FloatingWindow's nchittest code
...
Only DragController needs to be ported on Windows now
2022-05-30 23:36:54 +01:00
Sergio Martins
5a4342c0af
windows: Port FloatingWindow::nativeEventFilter()
2022-05-30 23:26:26 +01:00
Sergio Martins
c244d7628d
windows: Port AeroSnap to the new API
2022-05-30 23:19:58 +01:00
Sergio Martins
ab830bb6ee
windows: Port nchittest code
2022-05-30 23:10:21 +01:00
Sergio Martins
827008a96a
windows: Port some code from QWindow to Window
...
Removed the respectives Q_OS_WIN_TODO as they compile now
2022-05-30 22:54:20 +01:00
Sergio Martins
340e65df0b
windows: Remove some Q_OS_WIN_TODO from FloatingWindow
2022-05-30 22:44:52 +01:00
Sergio Martins
83cc6f1b0c
Add Window min/max size getter
2022-05-30 22:27:58 +01:00
Sergio Martins
35a44574a0
windows: Port a few leftovers
2022-05-30 22:07:42 +01:00
Sergio Martins
7a21857ea7
Added Window::property()
2022-05-30 22:05:43 +01:00
Sergio Martins
94afae2729
windows: Reviewed and ported a bunch of Q_OS_WIN_OLD usages
...
Those are fine. Will tackle the difficult ones next.
2022-05-30 22:04:35 +01:00
Sergio Martins
d8e703275f
windows: Replace Q_OS_WIN with Q_OS_WIN_TODO so we can start porting
...
Now it builds. This way I can port each Q_OS_WIN one by one and make
sure everything still builds, without risking breaking Linux/macOS.
2022-05-30 21:55:49 +01:00
Sergio Martins
08dc12e8d7
Move globalGeometry() into View
...
Allows to remove some cruft
2022-05-30 19:50:58 +01:00
Sergio Martins
31d43b6608
qtquick: Port inDisallowedDragView()
2022-05-30 19:45:58 +01:00
Sergio Martins
ab9396af61
Remove unneeded KDDockWidgets::isWindow()
2022-05-30 19:35:20 +01:00
Sergio Martins
30ca6769e4
qtquick: Use the fallback mouse grabber
...
This code was needing porting.
2022-05-30 19:31:30 +01:00
Sergio Martins
22f6f4b2f1
Rename DockWidget::parentChanged() to parentViewChanged() for clarity
...
As this about the visual parent
2022-05-30 19:25:24 +01:00
Sergio Martins
b19f2dfbed
Remove unneeded ifdefs
2022-05-30 19:23:12 +01:00
Sergio Martins
82f3cd9c5f
Remove some unneeded ifdefs from MDIArea.cpp
...
Trying to get rid of them as some need to get ported
2022-05-30 19:20:11 +01:00
Sergio Martins
567308934e
qtquick: Properly comment out a QtWidgets specific code path
...
Fixes crash when hovering with mouse
2022-05-30 19:17:49 +01:00
Sergio Martins
4d1add5221
qtquick: Fix assert that assumed the content item only had 1 child
...
QQuickWindow has other things like popup overlays parented to
the content item too.
2022-05-30 19:14:22 +01:00
Sergio Martins
c619c72094
tests: Introduce an env var to allow to run a subset of tests
...
by frontend
2022-05-30 18:57:59 +01:00
Sergio Martins
e2bb4fb830
qtquick: Register the main window and dock widget instantiators
2022-05-30 18:46:02 +01:00
Sergio Martins
5c0176f35b
qtquick: Implement min/max size for the wrappers
2022-05-30 18:43:48 +01:00
Sergio Martins
095dbe1a7f
qtquick|examples: Initialize the platform
...
Fixes a crash.
There's more (unrelated) crashes though, will look at those next.
2022-05-30 18:39:35 +01:00
Sergio Martins
230317551b
Move installMessageHandler() to Platform.h
...
It's not Qt specific, as other frontends might want to install
their own handler
2022-05-30 18:31:14 +01:00
Sergio Martins
a48ce5ccff
tests: Don't fail due to benign warnings
2022-05-30 18:07:14 +01:00
Sergio Martins
10cf965be2
Fix inifinite loop in ViewWrapper_qtquick::maximumSize
2022-05-30 17:59:12 +01:00
Waqar Ahmed
39c058cd29
Fix messageHandler installation for Qt backends
2022-05-30 20:28:44 +05:00
Waqar Ahmed
2815a5e84a
Fix build errors
2022-05-30 17:11:05 +05:00
Sergio Martins
08dc4540f8
qtquick: Make customtitlebar example compile
2022-05-30 12:20:44 +01:00
Sergio Martins
bcb0668ace
qtquick: Make mdi example compile
2022-05-30 12:16:11 +01:00
Sergio Martins
0b36b7c7e8
qtquick: Port the example
2022-05-30 12:01:04 +01:00
Sergio Martins
2421e607a9
Users now instantiate DockWidget view instead of controller
...
The controllers are private and not intentend for the public.
2022-05-30 11:45:43 +01:00
Sergio Martins
403f0626b4
tests: Comment the QtQuick examples one by one
...
so we can uncomment them one by one too as we port them
2022-05-30 10:15:16 +01:00
Sergio Martins
1bb0b13d77
qtquick: Make MainWindowInstantiator compile
2022-05-29 23:27:27 +01:00
Sergio Martins
1787a69edb
qtquick: Make DockWidgetInstantiator compile
2022-05-29 23:16:56 +01:00
Sergio Martins
04b9590d59
cmake: Compile tst_qtwidgets only if QtWidgets frontend is built
...
The QtQuick frontend is now buildable withotu the QtWidgets one.
2022-05-29 22:14:45 +01:00
Sergio Martins
c36832d71c
Port tst_viewguard away from QtWidgets
2022-05-29 22:07:38 +01:00
Sergio Martins
eff711b9ca
Port MainWindowMDI to the new architecture
...
Has a qtquick implementation now.
2022-05-29 21:57:08 +01:00
Sergio Martins
340f618060
Split MainWindowMDI in two, so it can be reused by QtQuick
2022-05-29 21:09:24 +01:00
Sergio Martins
58c246cedc
Remove unneeded qtquick ifdef
2022-05-29 20:55:42 +01:00
Sergio Martins
e27f142ec8
Fix KDDockWidgets::initFrontend() not initializing qtquick
...
As a drive-by add the required ifdefs
2022-05-29 20:27:50 +01:00
Sergio Martins
6d760cb5e1
Rename Some _p.h headers to .h
...
Easier for vscode to toggle between header the source
2022-05-29 20:24:11 +01:00
Sergio Martins
85f02d8ceb
DockRegistry doesn't depend on QtWidgets anymore
2022-05-29 20:14:25 +01:00
Sergio Martins
fe87380d83
Layout.cpp no longer depends on QtWidgets
2022-05-29 20:09:26 +01:00
Sergio Martins
20c41fa3b1
qtquick: Implement Platform_qtquick::tests_createNonClosableView()
2022-05-29 19:54:37 +01:00
Sergio Martins
34d4ba6f64
Remove TODO, it has been renamed already
2022-05-28 20:01:32 +01:00
Sergio Martins
bdb5c533f2
Remove unused forward declaration
2022-05-28 19:55:55 +01:00
Sergio Martins
07bcea1226
cmake: Make QtQuick frontend build without QtWidgets frontend
...
Fails to link but compiles.
2022-05-28 19:50:59 +01:00
Sergio Martins
f645a4345f
Don't run tests on unsupported frontends
...
If kddw wasn't compiled with QtQuick support then don't run the
QtQuick tests.
2022-05-28 16:06:17 +01:00
Sergio Martins
1c0c594abe
cmake: Add qtwidgets/qtquick ifdefs
...
Code now builds without QtQuick if needed
2022-05-28 16:02:14 +01:00
Sergio Martins
c77b9628b4
cmake: Only link to QtWidgets when building qtwidgets frontend
...
And the same for QtQuick
2022-05-28 15:34:59 +01:00
Sergio Martins
a3750ea79a
cmake: allow to build qtquick and qtwidgets independently
...
Still hardcoded to on, but the sources are now separated
2022-05-28 15:13:22 +01:00
Sergio Martins
4cd362dc33
cmake: Set minimum Qt6 version to 6.2
...
Anything else is untested
2022-05-28 14:31:39 +01:00
Sergio Martins
812892f3f2
bump version to 2.0
2022-05-28 14:25:25 +01:00
Sergio Martins
2e6924ec43
qtquick: Remove isWrapper
...
Will readd it if it's really needed
2022-05-28 11:57:20 +01:00
Sergio Martins
56a871b86b
tests: Remove unneeded setContentsMargin() call
2022-05-27 15:50:16 +01:00
Sergio Martins
8354043337
qtquick: Don't abort when setContentsMargins() are called
...
It wasn't implemented for version 1.x either
2022-05-27 15:48:55 +01:00
Sergio Martins
410d893de9
qtquick: Implement the missing methods in ViewWrapper
2022-05-27 15:39:08 +01:00
Sergio Martins
406dd19285
qtquick: Don't dereference null FloatingWindow controller
...
Controller is already gone
2022-05-27 14:29:51 +01:00
Sergio Martins
586ed8d70b
Replace View_qtquick::windowIsBeingDestroyed with View::aboutToBeDestroyed
...
Easier if it's generic.
2022-05-27 14:26:34 +01:00
Sergio Martins
da8539820e
qtquick: Find the correct controller when using ViewWrapper
2022-05-27 14:00:19 +01:00
Sergio Martins
267bc4ec79
tests: Test that a floating window is created
2022-05-27 13:35:52 +01:00
Sergio Martins
fb8639969c
Delete QObject::setParent() in the controller
...
To find places where we're setting parent on the controller instead
of in the view. Fix such case where the dock widget view
wasn't being parented to the frame view.
2022-05-27 13:25:06 +01:00
Sergio Martins
5fdbc12524
Add some asserts
2022-05-27 12:53:22 +01:00
Sergio Martins
18651bbf7a
qtquick: Add some qFatal to some unimplemented methods
...
So I can easy get feedback they are missing impl.
2022-05-27 12:47:44 +01:00
Sergio Martins
bcaf0737e9
Move Platform::createMainWindow() to dev mode
...
This is for tests only
2022-05-27 12:11:43 +01:00
Sergio Martins
ad7f5f5970
tests: Remove some manual creation of QQuickView
...
It's abstracted by the platform now
2022-05-27 12:11:43 +01:00
Sergio Martins
652286760b
qtquick: Fix creation of main window
...
It wasn't initializing the controller
2022-05-27 10:57:54 +01:00
Sergio Martins
df0dde80ef
Remove unneeded "initView" parameter from MainWindow
2022-05-27 10:41:50 +01:00
Sergio Martins
03f1a6930c
Added Platform::createMainWindow()
...
Called by tests and layout linter to create a main window.
Simplifies creation of the main window, we can now remove one of the ctors.
Before we supported both the controller creating the view and vice-versa,
while this is convenient it's complex to support, due to order or initializations.
Now, you a create a view, and it creates the controller behind the scenes.
MainWindow is special in this sense, as it's created by the end user, it's
not something internal we want in the ViewFactory.
2022-05-27 10:36:54 +01:00
Sergio Martins
e20a8ba396
Remove unneeded KDDOCKWIDGETS_QTQUICK ifdef
2022-05-26 23:24:38 +01:00
Sergio Martins
73dd788fa1
cmake: Remove unneeded -DKDDOCKWIDGETS_QTQUICK
2022-05-26 23:20:27 +01:00
Sergio Martins
ebb623f080
Initialize static resources in the correct platform
...
Non-Qt platforms won't have to do this
2022-05-26 23:16:02 +01:00
Sergio Martins
1dde7e3e99
Add a generic interface for the classic indicator window
...
this removes QWidget references from ClassicIndicators.cpp.
Both the QtQuick and QtWidgets impl will implement this new
interface, which is what ClassicIndicators.cpp uses now
2022-05-26 23:10:26 +01:00
Sergio Martins
fc74698dac
Remove some unused qtwidget includes from controllers/
2022-05-26 10:02:28 +01:00
Sergio Martins
c554bdc68c
Fix DropArea only looking for QtWidget children
...
Instead of using findChildren(), just ask the layout for the
items.
tst_floatingWindow now doesn't crash anymore when looking for
the layout items.
2022-05-26 09:58:23 +01:00
Sergio Martins
4a8ac4a309
Remove unneeded assignment, since we're using scoped rollback
2022-05-26 09:54:31 +01:00
Sergio Martins
042cabbe5d
Use a RAII class to emit floatingChanging()
...
Otherwise during reparenting the signal can be emitted by mistake.
Now we only check at the end if we need to emit it.
2022-05-26 09:29:37 +01:00
Sergio Martins
1e1204a991
Merge branch '1.6'
2022-05-25 00:38:49 +01:00
Sergio Martins
4727c9c7fc
MainWindow: Allow to avoid the immediate QWidget::create()
...
In case you're going to put the main window into a layout you
don't want to have it create a QWindow.
2022-05-25 00:36:40 +01:00
Allen Winter
6c42a2d40e
Merge branch '1.6'
2022-05-24 17:22:41 -04:00
Allen Winter
f8ca5ca1ef
KDDockWidgetsConfig.cmake.in - make sure QuickControls2 is found
...
if building for QTQUICK we'll have dependencies
on the Qt libraries QtQuick and QuickControls2
2022-05-24 17:20:16 -04:00
Sergio Martins
a85c56a25a
Implement ViewWrapper::is()
2022-05-23 23:37:25 +01:00
Sergio Martins
ac51ffc7d4
tests: Add tests for DockWidget and FloatingWindow ctor
...
To catch potential QML errors in the .qml files.
2022-05-23 23:06:32 +01:00
Sergio Martins
c648e5fbba
qtquick: View::rootView() now returns itself if no parent
...
This matches QWidget::window() behaviour
2022-05-23 22:51:57 +01:00
Sergio Martins
6fd88a8570
qtquick: Add missing properties to floating window
...
They return QObject as they can't be fwd declared in Qt 6 and might
have circular dependency.
2022-05-23 22:31:54 +01:00
Sergio Martins
bab0c99d13
tests: Added tst_separator
...
Helps finding problems in the respective qml file
2022-05-23 19:12:32 +01:00
Sergio Martins
79ef648a27
tests: Added tst_stack and tst_tabbar
...
Finds errors in the respective qml files
2022-05-23 19:00:21 +01:00
Sergio Martins
0f55a2f87a
tests: Add tst_titlebar
...
At least for the ctor, which already helps to find bugs in
the .qml file
2022-05-23 18:07:56 +01:00
Sergio Martins
87e9cbc388
tests: Add tst_frame
2022-05-23 17:15:43 +01:00
Sergio Martins
821002ce43
qtquick: Add QML interface to TitleBar_qtquick
2022-05-23 17:12:35 +01:00
Allen Winter
ea00ecf33d
qt6-kddockwidgets.dsc - fix package list
2022-05-23 12:00:29 -04:00
Sergio Martins
dab7195408
tests: Fix view factory being overridden
...
It's set during init
2022-05-23 16:39:03 +01:00
Sergio Martins
349816dab7
qtquick: Add QML interface for Frame
...
Since the controllers won't be QObjects eventually, we need the
C++ views to hold the properties.
2022-05-23 15:55:54 +01:00
Sergio Martins
46968556bb
tests: Add missing viewwrapper ctest
2022-05-23 14:59:48 +01:00
Allen Winter
bf255c104f
distro/ - update for ubuntu22.04 and fedora36
2022-05-22 10:04:17 -04:00
Sergio Martins
e09a328281
qtquick: Add missing isMDI Q_PROPERTY
2022-05-21 10:36:41 +01:00
Sergio Martins
8c757955b5
qtquick: Fix signal connection in Frame
2022-05-21 10:33:14 +01:00
Sergio Martins
e7d20a403a
qtquick: Dont' crash in frame ctor
2022-05-21 10:26:12 +01:00
Sergio Martins
bafa21d11c
tests: Abort tests if there were warnings
2022-05-21 00:00:14 +01:00
Sergio Martins
07fc7d0437
tests: Move waitForDeleted() into Platform
...
So each platform can implement their own.
Meaning old Testing.cpp can be deleted too.
2022-05-20 16:41:59 +01:00
Sergio Martins
cc1f75b1b3
tests: Move our message filter into Platform_qt
...
So it can be reused by other tests
2022-05-20 16:29:14 +01:00
Sergio Martins
4a7446e57b
qtquick: Build QmlTypes.cpp
...
Still a bit commented out
2022-05-20 15:02:33 +01:00
Sergio Martins
fc0fa1c58c
qtquick: Return the correct paths for qml files
2022-05-19 19:28:48 +01:00
Sergio Martins
bb4f5a5037
Mass renaming of last usages of FrameworkWidgetFactory
2022-05-19 08:12:29 +01:00
Sergio Martins
09eb303bab
Rename some methods from FrameworkWidget to View
2022-05-19 08:00:20 +01:00
Sergio Martins
4708b2c25d
Rename FrameworkWidgetFactory_qtwidgets|qtquick to ViewFactory_*
2022-05-19 07:51:50 +01:00
Sergio Martins
e514a8c3e1
Rename FrameworkWidgetFactory to ViewFactory
...
We now deal in views instead of widgets, and the "Framework"
part was redundant. It's also shorter now
2022-05-18 23:12:43 +01:00
Sergio Martins
aefbbd5738
Allow the classic/segmented views be created by FrameworkWidgetFactory
...
Instead of the controllers. We only allow the user to customize
the views.
2022-05-18 23:10:27 +01:00
Sergio Martins
ab881c9b5a
Fix fwd declaration typo
2022-05-18 22:54:49 +01:00
Sergio Martins
e54ebd096c
Both ClassicIndicatorsWindow qtquick and qtwidgets build
...
They don't clash anymore. Rename them to include the suffix.
Next step is abstracting the creation of IndicatorWindow so we
remove the last qtwidget traces from ClassicIndicators.cpp
2022-05-18 05:27:24 +01:00
Sergio Martins
6054ccfdf2
Move Indicator class into .cpp file
...
It's impl detail
2022-05-18 05:19:24 +01:00
Sergio Martins
2fda6d11e1
Removed the qtquick/qtwidgets ifdefs from ClassicIndicatorsWindow_*
...
They now each have their own implementation.
qtquick one still not compiling, as it duplicates symbols.
2022-05-18 05:10:01 +01:00
Sergio Martins
34c25a065a
Copy ClassicIndicatorsWindow.cpp into qtwidgets and qtquick
...
No other changes made.
In preparation to remove the ifdefs.
2022-05-18 05:03:15 +01:00
Sergio Martins
89ceb01b59
Remove some classes that were copied instead of renamed
2022-05-18 04:49:54 +01:00
Sergio Martins
65c1b53ea0
tests: Some include cleanup
2022-05-18 04:48:31 +01:00
Sergio Martins
522b2623be
Moved DropIndicatorOverlay into controllers/ folder
2022-05-18 04:47:01 +01:00
Sergio Martins
d2bf83e4ac
Rename DropIndicatorOverlayInterface to DropIndicatorOverlay
...
We don't suffix our base classes with "Interface"
2022-05-18 04:39:21 +01:00
Sergio Martins
30c3a047d1
Move the indicator classes into controllers/indicators/
2022-05-18 04:35:33 +01:00
Sergio Martins
2b6c18dbcd
Move the drop indicators into Controllers namespace
2022-05-18 04:24:16 +01:00
Sergio Martins
7b486bb28c
qtwidgets: Add views for the Classical and Segmented indicators
...
Copied from indicators/
2022-05-18 04:10:01 +01:00
Sergio Martins
10b61f0e30
Remove unused Type::DropIndicatorOverlayInterface
2022-05-17 23:45:54 +01:00
Sergio Martins
1b35810766
Add Platform::createView()
...
For when kddw internalls need to create an empty view.
Use case will be to create the parent widget for the drop indicators.
2022-05-17 23:43:41 +01:00
Sergio Martins
fc0160213e
Remove old MDILayoutWidget_p.h file
...
It has been renamed already
2022-05-17 22:18:40 +01:00
Sergio Martins
a039f102a3
Remove some unneeded QWidget includes
2022-05-17 22:16:00 +01:00
Albert Astals Cid
9b8759c472
Add the possibility of setting the margin used for overlay docks
2022-05-17 15:32:28 +01:00
Sergio Martins
41efefa21e
Port away from ViewWrapper_qtwidgets in the backend
...
Only qtwidgets frontend is allow to use this type
2022-05-16 23:10:04 +01:00
Sergio Martins
cc8ee097a3
Remove last usage of QWidgetOrQuick type
2022-05-16 23:04:29 +01:00
Sergio Martins
1bacb31949
tests: Use generic view instead of QWidget NonClosableWidget
2022-05-16 22:55:46 +01:00
Sergio Martins
be75247dba
tests: Remove some unused includes
2022-05-16 22:37:22 +01:00
Sergio Martins
6bc68fece8
tests: Remove instances of QTextEdit in tests
...
It's generic now
2022-05-16 22:30:57 +01:00
Sergio Martins
be8250acb7
tests: Remove instances of QLineEdit from the tests
...
It's now generic
2022-05-16 21:59:43 +01:00
Sergio Martins
8372ffc0d7
tests: Remove all instances of QPushButton from tst_docks
...
Now uses generic alternatives that will work with other frontends too
2022-05-16 21:29:46 +01:00
Sergio Martins
a10187ed5d
tests: Port away further from "QWidgetOrQuick"
2022-05-16 20:01:08 +01:00
Sergio Martins
7fbd1ea920
Added Platform::startDragDistance()
...
As its value is per platform.
2022-05-15 22:31:40 +01:00
Sergio Martins
ef4a0214ed
Added Platform::isQtWidgets()
...
Removes it from Utils_p.h
2022-05-15 22:23:34 +01:00
Sergio Martins
d5ac23a8d2
qtquick: Implement DefaultWidgetFactory_qtquick
...
Requires implementing some pure-virtuals in the views too
2022-05-15 22:14:51 +01:00
Sergio Martins
7434865967
Move Layout.cpp to controllers/ folder
...
as it's a controller
2022-05-15 21:30:31 +01:00
Sergio Martins
f29d3bf5f8
Move Layout into Controllers namespace
2022-05-15 21:22:26 +01:00
Sergio Martins
97baed0ef9
Rename layoutWidget variable/method name to layout
...
It's a controller, so don't suffix it with Widget/View
2022-05-15 21:12:01 +01:00
Sergio Martins
378f380968
Rename LayoutWidget to Layout , since it's not a view
...
Controllers shouldn't be suffixed
2022-05-15 21:04:07 +01:00
Sergio Martins
8e506aa327
Rename LayoutWidget.cpp to Layout.cpp , as it's a controller
2022-05-15 16:51:55 +01:00
Sergio Martins
df96b7ab81
Move MDILayout into Controllers namespace
2022-05-15 16:47:05 +01:00
Sergio Martins
20cd7b04a5
Rename MDILayoutWidget class to MDILayout
...
Since it's a controller, we strip the suffix
2022-05-15 16:27:51 +01:00
Sergio Martins
fa16020d61
Rename MDILayoutWidget to MDILayout and move it to controllers/
...
Since it's not a view, remove the "Widget" suffix
2022-05-15 16:24:57 +01:00
Sergio Martins
5ba4e0ee9d
qtquick: Added MDILayout_qtquick
2022-05-15 16:17:28 +01:00
Sergio Martins
a27ee4944a
qtquick: Added DropArea_qtquick
2022-05-15 16:12:25 +01:00
Sergio Martins
f537ff007c
qtquick: Remove type registring from MultiSplitterConfig.cpp
...
It's specific to QtQuick
2022-05-15 15:38:04 +01:00
Sergio Martins
c563fc7d42
Fix path of ClassicIndicatorsOverlay.qml
2022-05-15 15:33:43 +01:00
Sergio Martins
9d0f137f9d
qtquick: FloatingWindow and MainWindow are now ported and compile
2022-05-15 15:29:54 +01:00
Sergio Martins
bcc823e900
qtquick: Do the boring boilerplate porting for MainWindow/FloatingWindow
...
Mostly interesting things left to port there only.
2022-05-15 14:26:49 +01:00
Sergio Martins
23b2ade6bd
qtquick: Port some commented out code
2022-05-15 14:13:21 +01:00
Sergio Martins
9bebf50d4d
qtquick: Some initial porting for DockWidgetInstantiator
2022-05-15 14:10:21 +01:00
Sergio Martins
6b98322d96
qtquick: Ported rubberband to the new architecture
2022-05-15 14:02:36 +01:00
Sergio Martins
97faaea983
qtquick: Store the public class in 'q' pointer
...
As usual in Qt
2022-05-15 13:54:16 +01:00
Sergio Martins
35c7964365
qtquick: More porting of DockWidget_qtquick
...
Compiles now, but some things are commented out still.
2022-05-15 13:51:32 +01:00
Sergio Martins
65f74077d3
tests: Replace a usage of QWidgetOrQuick with View
2022-05-15 13:00:08 +01:00
Sergio Martins
d8cf526b5a
Remove some dead code
2022-05-15 12:58:06 +01:00
Sergio Martins
5ce2c0eefd
Replace another usage of QWidgetOrQuick with View
2022-05-15 12:56:55 +01:00
Sergio Martins
1a47d52ed9
Make View::handle() non virtual
...
So we can still do comparisons if ~View_qtwidgets was already called.
Otherwise it would be calling a pure-virtual.
2022-05-15 12:55:55 +01:00
Sergio Martins
383e4f8abd
tests: Use tests_createView() instead of MyWidget2
...
Decouples tests from Qt a bit more
2022-05-15 12:20:30 +01:00
Sergio Martins
9698baefd0
tests: Remove unused HostedWidget
2022-05-15 12:20:30 +01:00
Sergio Martins
c5f05694aa
Fix build due to missing include
2022-05-15 11:41:46 +01:00
Sergio Martins
cda924ac74
Ported RubberBand from QWidget to View
2022-05-14 10:36:53 +01:00
Sergio Martins
f719697852
Remove DockWidget::setWidget(QWidget)
2022-05-14 09:38:55 +01:00
Sergio Martins
df61c35314
Implemented ViewWrapper::sizePolicy()
2022-05-14 09:26:07 +01:00
Sergio Martins
a3f80ef2f8
Add .DS_Store to .gitignore
2022-05-13 15:33:15 +01:00
Sergio Martins
e6f05a7815
docs: Added documentation about the basic concepts.
...
Will add images next.
2022-05-13 00:39:00 +01:00
Sergio Martins
1ce6d3721e
Add a mkdocs.yml file
...
So we can start writing internal documentation
2022-05-12 23:41:33 +01:00
Sergio Martins
07be3dd0d4
Port away from DockWidget::widget()
...
Use guestView() instead
2022-05-11 23:59:10 +01:00
Sergio Martins
f5fe7e6cc8
tests: Port away from QWidget further
...
DockWidget::widget() is getting removed in favor of guestView()
2022-05-11 23:51:57 +01:00
Sergio Martins
6d9fa9eecd
cmake: Add an lcov preset and disable it on the dev preset
...
It's not very good for incremental development as one needs
to constantly remove the gcda files
2022-05-11 17:25:06 +01:00
Sergio Martins
313be585ae
tests: More focus tests
2022-05-11 17:23:31 +01:00
Sergio Martins
8a725298de
Added View::hasFocus()
2022-05-11 00:02:18 +01:00
Sergio Martins
721402b710
Remove a few usages of DockWidget::widget()
...
Use View instead of QWidget
2022-05-10 23:43:07 +01:00
Sergio Martins
73e6822a1d
Added View::focusPolicy()
2022-05-10 23:23:27 +01:00
Sergio Martins
9f7c4cb217
Removed the DockWidgetBase typedef
...
That existed only to ease porting
2022-05-10 22:53:16 +01:00
Sergio Martins
855b572656
cmake: Enable gcov code coverage by default for dev preset
2022-05-09 23:46:27 +01:00
Sergio Martins
93e388e04f
tests: tst_multisplitter is now run against all platforms
2022-05-09 17:38:22 +01:00
Sergio Martins
146b929b5d
qtquick: Implement View::maximumSize() and test
2022-05-09 17:28:48 +01:00
Sergio Martins
5f38814fd2
qtquick: Fix crash during instantiation of Separator_qtquick
...
The qml file would call into the view which would call into the
controller while its d ptr wasn't initialized yet
2022-05-09 16:31:49 +01:00
Sergio Martins
45a364c44b
qtquick: Normalize location of Separator.qml
...
We don't want any qml files outside of qtquick/ folder
2022-05-09 15:44:45 +01:00
Sergio Martins
d35afdf81c
qtquick: Compile our qrc file too
...
Updated paths
2022-05-09 15:40:20 +01:00
Sergio Martins
5f7eb335e6
qtquick: Warn and bailout whenever we can't find the requested QML file
2022-05-09 15:37:36 +01:00
Sergio Martins
9173226be7
tests: Normalise signature of argc/argv to match QApplication's
...
Fixes crash when passing "platform -xcb", because argc was being
passed by value, decremented in QApplication, then going out
of bounds in QTest
2022-05-09 15:16:36 +01:00
Sergio Martins
5d8da8aab6
qtquick: Compile and return Separator in the framework factory
2022-05-09 14:41:21 +01:00
Waqar Ahmed
df00c13899
Add code coverage
2022-05-09 16:45:41 +05:00
Waqar Ahmed
d1567322ec
Fix unused variable warning
2022-05-09 16:44:18 +05:00
Sergio Martins
eb42d9e3f0
workaround linking examples
2022-05-09 12:17:15 +01:00
Sergio Martins
79eb41298c
qtquick: Port Separator to the new view architecture
2022-05-09 10:25:58 +01:00
Sergio Martins
e0f48c9f32
Added convenience View_qtquick::createQQuickItem()
2022-05-09 10:06:43 +01:00
Sergio Martins
f033e4eb36
qtquick: Fix the qml engine not being set
2022-05-08 23:13:44 +01:00
Sergio Martins
8751216f62
qtquick: Added a FrameworkWidgetFactory too
...
The impl is dummy, but at least Config doesn't return a nullptr
one, meaning we can have more involved tests for QtQuick
2022-05-08 23:12:20 +01:00
Sergio Martins
cfeb59ee8f
qtquick: Move m_qmlEngine from Config to Platform_qtquick
...
As it's QtQuick specific it should be in the qtquick frontend folder.
2022-05-08 20:16:23 +01:00
Sergio Martins
3c340aee40
tests: Remove last traces of QWidget from tst_multisplitter
2022-05-08 19:56:25 +01:00
Sergio Martins
2b2c5efd1a
tests: Don't instance Separator_qtwidgets directly
...
So it can support qtquick
2022-05-08 19:50:15 +01:00
Sergio Martins
985224f24b
tests: Run tst_view on offscreen by default
...
Moved the QPA offscreen defaulting to Platform_qt
2022-05-08 19:38:52 +01:00
Sergio Martins
97f26743e5
tests: Decouple tst_multisplitter from QWidget more
...
It now asks the platform to create a test view instead of
using one that inherits from QWidget.
2022-05-08 19:33:04 +01:00
Sergio Martins
a3bf159281
tests: Minor, add two QCOMPARE
2022-05-08 19:21:28 +01:00
Sergio Martins
543427255f
tests: Make the maxSize test compabitle with 1.0
...
we didn't call QWidget::setMaximumSize(), we just set a hint
2022-05-08 19:17:53 +01:00
Sergio Martins
8eba26fd53
tests: minor, add 2 QVERIFY
2022-05-08 19:09:39 +01:00
Sergio Martins
17b6b7f7b9
tests: minor, add a QCOMPARE for min position
2022-05-08 18:38:48 +01:00
Sergio Martins
0997d48d60
tests: Test View: Also set max size
2022-05-08 17:10:56 +01:00
Sergio Martins
6e6bd92d5e
Minor debug improvement
2022-05-08 16:56:54 +01:00
Sergio Martins
a6e0fdb6b9
qtwidgets: Add missing layoutInvalidated() emittions
...
So tst_multisplitter can use generic View instead of its own
QtWidget specific implementation
2022-05-08 16:53:22 +01:00
Sergio Martins
7d27d76448
Port layoutInvalidated signal to KDBindings
...
This removes triplication between qtquick, qtwidgets and tests.
It also allows us to remove the usage of old-style Qt connect.
2022-05-08 15:23:40 +01:00
Sergio Martins
418c4514df
tests: Remove some unneeded overridden methods in tst_multisplitter
2022-05-08 15:13:42 +01:00
Sergio Martins
bd675c09a1
Remove unused and old Widget_qwidget/Widget_quick
2022-05-08 14:00:00 +01:00
Sergio Martins
bacaa0127a
qtquick: Move remaining contents from old/ into views/
...
They are not ported yet, bet let's do things in batches so we have less
context switches.
2022-05-08 13:54:56 +01:00
Sergio Martins
76b1a394f2
qtquick: Ported the old DockWidgetQuick to the new architecture
...
Mostly anyway. Facing several blockers that need to be ported first,
for example DockWidget::setWidget() is still receiving QWidget
2022-05-08 13:27:37 +01:00
Sergio Martins
984bcd5f06
qtquick: Ported Frame view to the new architecture
2022-05-08 12:20:33 +01:00
Sergio Martins
7ba5d1de3b
qtquick: Remove old TabWidgetQuick
2022-05-06 18:50:43 +01:00
Sergio Martins
16cca5a719
qtquick: Move LayoutSaverInstantiator to new location
2022-05-06 18:48:33 +01:00
Sergio Martins
9d5c7bfc53
qtquick: Ported TabWidget to the new architecture
2022-05-06 18:04:25 +01:00
Sergio Martins
62c25eec2e
Merge branch '1.6'
2022-05-05 14:28:47 +01:00
Sergio Martins
58b8633e3d
Added KDDockWidgets::InitialVisibilityOption::PreserveCurrentTab
...
So you can insert into a tab group without changing the current
tab, if you want.
2022-05-05 14:28:07 +01:00
Sergio Martins
bc3126ebee
Merge branch '1.6'
2022-05-05 10:46:14 +01:00
Sergio Martins
a743eafca1
Added DockWidgetBase::currentTabIndex()
2022-05-05 10:45:55 +01:00
Sergio Martins
d6f56169e1
qtquick: Ported TabBar to the new architecture
2022-05-03 22:01:47 +01:00
Sergio Martins
c0d9e3247b
qtquick: Ported TitleBar to the new architecture
2022-05-03 20:24:20 +01:00
Sergio Martins
0a1a783054
Implemented ViewWrapper::window()
...
Implementation was missing for qtquick and add a bug for qtwidgets.
2022-05-03 20:02:14 +01:00
Sergio Martins
dc9a0145e2
tests: Rename ViewWrapper tests, they still said "View::"
2022-05-03 19:46:30 +01:00
Albert Astals Cid
2446519024
SideBar_p.h: Fix includes to make it usable from external projects
2022-05-03 10:43:37 +01:00
Sergio Martins
9f532fb543
qtquick: Implement ViewWrapper::minSize()
2022-05-02 23:40:14 +01:00
Sergio Martins
b719435ae8
qtquick: Implement ViewWrapper::objectName()
2022-05-02 23:27:09 +01:00
Sergio Martins
16816d47d6
Added Window::screen()
...
Which allows to make View::screen() non-virtual
2022-05-02 23:24:49 +01:00
Sergio Martins
a693a995b1
qtquick: Implement ViewWrapper_qtquick::grabMouse and releaseMouse
2022-05-02 23:19:21 +01:00
Sergio Martins
f8a287675b
qtquick: Implement ViewWrapper::setParent and childViews
2022-05-02 23:10:00 +01:00
Sergio Martins
e462098cce
tests: Move tst_view.cpp's main into a separate file, so it can be shared
2022-05-02 22:40:33 +01:00
Sergio Martins
3d2e45b5d5
tests: Add test for View::closeRequested
2022-05-02 22:00:15 +01:00
Sergio Martins
a49faeced6
Remove some duplicate TODOs, already in header
2022-05-02 21:35:04 +01:00
Sergio Martins
401ebc586e
qtquick: Move all inline View methods into .cpp file
2022-05-02 21:33:07 +01:00
Sergio Martins
cccd3a47f0
View::closeWindow() is no longer virtual.
...
Implementation is common to all frontends.
Renamed it to closeRootView() to be consistent.
2022-05-02 17:54:00 +01:00
Sergio Martins
96912515a8
View::windowGeometry() is no longer virtual.
...
Implementation is the same for all frontends.
2022-05-02 17:33:44 +01:00
Sergio Martins
04785a8b49
View::parentSize() is no longer virtual
...
The implementation is common to all frontends.
2022-05-02 17:30:47 +01:00
Sergio Martins
2b129380d6
qtquick: Move a few implementations to cpp file
2022-05-02 17:28:41 +01:00
Sergio Martins
a6e698b0fe
tests: Add a test for View::objectName
2022-05-02 17:23:39 +01:00
Sergio Martins
33d7d730f4
tests: Add a test for View::minSize()
2022-05-02 17:21:31 +01:00
Sergio Martins
5607fab8db
tests: Add test for View::sizeHint
2022-05-02 10:29:46 +01:00
Sergio Martins
c2ae9abfb5
tests_createView() now receives a struct
...
As we'll be passing more parameters
2022-05-02 10:20:19 +01:00
Sergio Martins
a8cb498eb5
Amend previous commit, use *Controller as suffix
2022-05-02 00:05:18 +01:00
Sergio Martins
d0c1b94585
Remove *View and *Widget suffixes from layouts
...
They are controllers, not views.
2022-05-02 00:01:44 +01:00
Sergio Martins
e17f6c0066
Add some missing const
2022-05-01 23:58:14 +01:00
Sergio Martins
a550567a4c
Rename asMultisplitterView to asDropArea
...
It's no longer a view.
2022-05-01 23:56:41 +01:00
Sergio Martins
3fabf34bee
Renamed View::windowHandle() to View::window()
...
windowHandle() is missnamed in Qt because QWidget::window() was already
taken in Qt4. But we can make it better here.
2022-05-01 23:09:18 +01:00
Sergio Martins
0d02be6387
qtquick: Implement View::rootView()
2022-05-01 23:00:19 +01:00
Sergio Martins
fff3adf967
Rename View::window() to View::rootView()
...
window() was an artifact of Qt4 times, when QWindow didn't exist yet.
2022-05-01 22:52:00 +01:00
Sergio Martins
4b41291830
qtquick: Fix geometry() always returning 0,0 as position
2022-05-01 22:42:23 +01:00
Sergio Martins
8dd8eabf1a
tests: tests_createView now can create visible views too
2022-05-01 22:21:08 +01:00
Sergio Martins
1591ed49da
tests: Added tests for View::geometry,pos,x,y,width,height,rect
2022-05-01 21:15:27 +01:00
Sergio Martins
a069a812db
tests: Remove qDebug() from doctest based tests
...
TestExplorer will fail to work if we print to stderr. Instead
we now print to stdout.
2022-05-01 20:17:51 +01:00
Sergio Martins
3416a74723
Don't make View::move(QPoint) pure-virtual
...
We already have a virtual overload, just call it.
2022-05-01 20:12:32 +01:00
Sergio Martins
58afb97eb2
qtquick: Move the rest of old/QWidgetAdapter_quick to View_qtquick
2022-05-01 20:01:46 +01:00
Sergio Martins
738a78d12b
qtquick: Implement View::windowHandle() and Window_qtquick::rootView()
...
For QtWidgets it now calls create() in the ctor so we have a window
during tests.
2022-05-01 14:38:20 +01:00
Sergio Martins
545c45e78d
qtquick: Port a bunch of methods from the old QWidgetAdapter
2022-05-01 13:11:32 +01:00
Sergio Martins
0a3c2433e7
qtquick: Implement setGeometry and related methods
2022-05-01 12:46:14 +01:00
Waqar Ahmed
df7627c08a
Use QVariant::userType instead of QVariant::type
2022-05-01 02:43:31 +05:00
Sergio Martins
b089b49b28
qtquick: Implement and test View::hide() too
2022-04-30 11:47:02 +01:00
Sergio Martins
7547163d2d
qtquick: Implement View::isVisible/setVisible
2022-04-30 11:42:53 +01:00
Sergio Martins
95f61629a9
tests: Print the name of the platform we're testing
2022-04-30 11:33:02 +01:00
Sergio Martins
3227ffab81
qtquick: Implemented and tested View::parentView/childViews
...
tst_view is now enabled for QtQuick too
2022-04-30 11:27:47 +01:00
Sergio Martins
1ecc42d50c
tests: Fix memory leaks in tst_view
2022-04-30 11:19:12 +01:00
Sergio Martins
712751e89b
tests: Make tst_view test View, not ViewWrapper
2022-04-30 11:08:54 +01:00
Sergio Martins
b6d87d10c4
Add a TestHelpers_ file for each platform
...
So we don't have too much ifdefed stuff that's only for tests in
the main files.
2022-04-30 10:31:31 +01:00
Sergio Martins
59e5759bc2
qtquick: initialize the the QQmlEngine during tests
2022-04-30 01:20:09 +01:00
Sergio Martins
ee256284cc
Remove View::isWindow(), use isRootView() instead.
...
QWidget::isWindow() is misnamed in Qt, it's an artifact from Qt4
times.
2022-04-30 01:10:24 +01:00
Sergio Martins
f3934ebd2c
Rename View::isTopLevel() to isRootView()
2022-04-30 01:06:03 +01:00
Sergio Martins
22a43eb9af
Add 3rdparty/doctest
...
It's header only.
2022-04-30 00:56:28 +01:00
Sergio Martins
ba92225678
Implement View_qtquick::setParent and setObjectName
2022-04-30 00:43:27 +01:00
Sergio Martins
496451c434
Implemented Platform_qtquick::tests_createView()
...
Creates a view for us to test with.
2022-04-29 19:15:02 +01:00
Sergio Martins
9d52f40632
Make the qtquick files compile
...
They weren't being built.
Build-system is simplified for now.
2022-04-29 19:00:40 +01:00
Sergio Martins
c55cac97d0
tests: Add unit-test for View::setParent()
2022-04-29 18:46:28 +01:00
Sergio Martins
8d09acdf5f
tests: Fix warning about requiring to call init after qApp
2022-04-29 18:05:24 +01:00
Sergio Martins
fcf02fc8bf
tests: Move isGammaray() into Platform_qt
2022-04-29 15:52:46 +01:00
Sergio Martins
721d344533
tests: Delete platform when test finishes
2022-04-29 15:47:54 +01:00
Sergio Martins
9dc53f9755
tests: Create the QApplication in Platform ctor
...
Other frontends won't use QApplication, and QtQuick might even use
just QGuiApplication eventually
2022-04-29 15:36:16 +01:00
Sergio Martins
aa72a8cd5a
Add Platform_qtwidgets::init(), so we can share some code with ctors
2022-04-29 15:09:43 +01:00
Sergio Martins
099a9018df
Make it easier for tests to init the platform
...
Only a single static method is needed now, instead of 2.
2022-04-29 14:34:32 +01:00
Sergio Martins
34b07ef340
Delete the Platform when a test is complete
...
So that we support testing multiple platforms in the same test run
2022-04-29 14:05:35 +01:00
Sergio Martins
3907660dde
Set s_platform to nullptr when dtor runs
2022-04-29 13:53:36 +01:00
Sergio Martins
3d1b450cbb
Remove View::minimumSizeHint()
...
It's a QWidget specific concept, so move it to the qtwidgets
frontendcode. QtQuick won't need it.
2022-04-29 00:27:07 +01:00
Sergio Martins
93ccaff407
test: Fix test failure due to unimplemented wrapper method
2022-04-28 21:27:32 +01:00
Sergio Martins
a2d17fd0b9
Added Platform::frontendTypes()
...
Needed by the tests
2022-04-27 10:44:44 +01:00
Sergio Martins
9fa80d2061
vscode: Remove the Qt6 build folder from the Qt5 namespace
2022-04-26 23:40:35 +01:00
Sergio Martins
5ef9f4e8ac
vscode: Configure TestMate extension, tell it where the tests are
2022-04-26 23:39:48 +01:00
Sergio Martins
bcd639599a
Port tst_viewguard.cpp to doctest
...
doctest will be the unit-test framework for new tests, since we'll
have a lot of non-Qt code.
2022-04-26 23:35:25 +01:00
Sergio Martins
1b8ac876ce
Port away from WidgetType typedef
...
Introduces View::childViews(), required for the porting
2022-04-26 00:13:07 +01:00
Sergio Martins
420a85943a
Finally remove View::asQWidget()
...
Soon we can start the QtQuick port to the new architecture
2022-04-26 00:00:23 +01:00
Sergio Martins
00bee2edcb
Move the "kddockwidgets_qwidget" property hack into the Qt platform
...
This removes the last usages of asQWidget() from the generic part.
2022-04-25 20:44:05 +01:00
Sergio Martins
41383bf7a4
Remove more asQWidget() instances, only 3 remaining now
2022-04-25 20:25:56 +01:00
Sergio Martins
3bb0c6a8d2
Move MDIArea to qtwidgets/ as it was never ported to QtQuick
...
Can be ported if needed
2022-04-25 20:16:25 +01:00
Sergio Martins
0f61ef63a2
Split DropArea and MDILayout into View/Controller
2022-04-25 18:50:41 +01:00
Sergio Martins
6ebb432932
Port LayoutWidget away from QWidget
...
DropArea and MDILayout now inherit from it, in addittion to QWidget.
This mean DropArea can now be split into View/Controller alone,
without having to port LayoutWidget and MDILayout in the same commit,
which would be hard to review.
2022-04-24 12:57:20 +01:00
Sergio Martins
b08c49e788
Update KDBindings/signal.h
...
Has support for scoped connection handle now.
It disconnects the connection when deleted
2022-04-24 12:56:06 +01:00
Sergio Martins
1b6fa1bd36
Rename Type::MultiSplitter to Type::DropArea
...
MultiSplitter was removed
2022-04-23 15:28:17 +01:00
Sergio Martins
dc6d77e266
Fold MultiSplitter into DropArea
...
The separation was never very useful. There's was always only
one derived class, the DropArea. Merge the two.
2022-04-23 15:22:38 +01:00
Sergio Martins
4f5ffa2370
Add DropArea_qtwidgets stub
2022-04-23 14:42:03 +01:00
Sergio Martins
860a1a1bb0
Move DropArea into Controllers namespace
...
In preparation for View/Controller split.
2022-04-23 12:14:30 +01:00
Sergio Martins
daa6afd14c
Move DropArea into controllers/
...
In preparation to split it into View/Controller.
This is just the move, no code changed yet.
Next will be the namespace change.
2022-04-23 11:46:11 +01:00
Sergio Martins
28754ec260
Fold DropAreaWithCentralFrame into DropArea
...
This separation was never useful
2022-04-23 00:17:20 +01:00
Sergio Martins
ab0208b603
Remove the remaining asQWidget usages from WidgetResizeHandler
...
Remaining ones in the code base are because DropArea isn't ported
to View yet, that will come next
2022-04-21 23:15:04 +01:00
Sergio Martins
358dfd4cb7
Replace some usages of asQWidget with asQObject
...
That at least allows us to start the QtQuick port
2022-04-21 22:57:57 +01:00
Sergio Martins
6d2d5ca0ed
Add View::setMouseTracking()
2022-04-21 22:50:46 +01:00
Sergio Martins
e71c54f041
Add View::setCursor()
2022-04-21 22:41:52 +01:00
Sergio Martins
f9c3a301b5
Add View::render()
2022-04-21 22:31:11 +01:00
Sergio Martins
2c162630f4
Add View::setWindowOpacity()
2022-04-21 22:24:18 +01:00
Sergio Martins
8015e49bee
Add Platform::screenSizeFor(window), removes more asQWidget() usage
2022-04-21 22:10:59 +01:00
Sergio Martins
3f97845c9c
Use Window instead of QWindow in a few more places
2022-04-21 21:50:58 +01:00
Sergio Martins
4946cdeed3
Add Platform::screenNumberFor, removes more asQWidget() usage
2022-04-21 21:47:55 +01:00
Sergio Martins
eff3798987
Remove a few unused functions
2022-04-21 20:20:49 +01:00
Sergio Martins
554deb22da
Add View::releaseKeyboard(), removes some asQWidget() usage
2022-04-21 20:13:10 +01:00
Sergio Martins
0249b0e933
Remove more usages of asQWidget()
...
Adds View::mapTo()
2022-04-20 23:18:41 +01:00
Sergio Martins
2f59fb197b
Remove more usages of asQWidget()
2022-04-20 23:07:16 +01:00
Sergio Martins
38df31e99f
Port away from qApp->sendEvent()
2022-04-19 19:38:20 +01:00
Sergio Martins
a6cbfbf065
Rename tests_sendEvent() to sendEvent()
...
Non-test code will also need it
2022-04-19 19:32:56 +01:00
Sergio Martins
28b210586c
Remove deprecated and now unused Widget_*h classes
2022-04-19 19:28:15 +01:00
Sergio Martins
33073c75ee
tests: Remove the last usage of asQWidget() from tests/
...
Now only a few remaining in src/
2022-04-19 19:26:34 +01:00
Sergio Martins
23b2ea7195
tests: Remove last usage of asQWidget() from tst_docks.cpp
2022-04-19 19:20:46 +01:00
Sergio Martins
80beeb7ffb
tests: Remove last 2 usages of asQWidget from tst_qtwidgets.cpp
...
That method will be removed from View soon
2022-04-19 19:17:48 +01:00
Sergio Martins
d2b5bedfa1
tests: Remove another usage of deprecated asQWidget()
2022-04-19 19:14:58 +01:00
Sergio Martins
d5cec9f5de
tests: Move QtWidget specific tests to tst_qtwidgets.cpp
...
Let's have less ifdefs
2022-04-19 19:07:57 +01:00
Sergio Martins
05deea3cd8
tests: Move some ifdefed code to their respective platforms
2022-04-19 17:44:36 +01:00
Sergio Martins
7632278ba8
Remove asQWidget() instances from tst_multisplitter
...
This test is QWidget only, but we want to remove View::asQWidget(),
so just cast directly here.
2022-04-19 16:55:33 +01:00
Sergio Martins
faf3971044
Merge branch '1.6'
2022-04-19 15:54:26 +01:00
Sergio Martins
6166e5805c
Don't show middle dock indicator if frame isn't dockable
...
This was implemented but the logic was wrong.
Fixes central persistent showing the central indicator.
2022-04-19 15:53:42 +01:00
Sergio Martins
8e4e998e74
tests: port away from QApplication::topLevelAt()
2022-04-14 23:44:39 +01:00
Sergio Martins
995882d2d1
tests: More porting away from asQWidget()
2022-04-14 19:06:41 +01:00
Sergio Martins
c8b896bdd6
tests: Remove casts to QTabBar
2022-04-14 18:31:41 +01:00
Sergio Martins
201e631a0b
tests: Remove some QPointer usage
...
Which in turn also removes some asQWidget() usage
2022-04-14 18:22:32 +01:00
Sergio Martins
a3d1990857
tests: Port more tests away from asQWidget()
2022-04-14 18:05:23 +01:00
Allen Winter
ba79f754dc
Merge branch '1.6'
2022-04-14 12:40:48 -04:00
Allen Winter
b1379f0bef
.pylintrc - initial pylint config file
2022-04-14 12:40:17 -04:00
Allen Winter
f3da0f0547
various - fix some misspellings
2022-04-14 12:27:29 -04:00
Allen Winter
61a4373459
Merge branch '1.6'
2022-04-14 12:01:28 -04:00
Allen Winter
b2fc0c3eb1
various - update copyright year
2022-04-14 12:01:05 -04:00
Sergio Martins
924b32b3c5
tests: Port some QWindow based utils to Window::Ptr
...
So it doesn't depend on Qt
2022-04-13 23:49:29 +01:00
Sergio Martins
664798ee6e
tests: Remove some asQWidget() calls
2022-04-13 22:28:04 +01:00
Sergio Martins
2dd39ad0cb
Merge branch '1.6'
2022-04-12 17:02:17 +01:00
Sergio Martins
6e7268e42a
Workaround QTBUG-102430, don't move still maximized window
...
When dragging a maximized window we show normal, but we can
only start moving it when the window managers acknowledges the new
state. The state in QWidget isn't reliable.
2022-04-12 16:37:14 +01:00
Sergio Martins
7e6c5b2d9f
Save the last known window state from the window manager POV
...
Required for QTBUG-102430
2022-04-12 14:56:20 +01:00
Sergio Martins
9a9676cb7a
Add a TODOv2 comment about writing the same fix for QtQuick
2022-04-11 22:33:45 +01:00
Sergio Martins
aff86c3e0f
Add a comment regarding QTBUG-102430
2022-04-11 22:31:26 +01:00
Sergio Martins
d4fe17a0bf
Workaround FloatingWindow::windowStateChanged regarding QTBUG-102430
...
QWidget::windowStateChanged isn't useful as it's emitted once sync
and another async, with the same value. Only the async one is useful
as it will represent the real window manager state. Then we can do
further moves.
The QWindow one happens to be good (async), so use that one instead.
2022-04-11 22:10:30 +01:00
Sergio Martins
90bd78846a
tests: Port away from a few Qt specific waitForEvent
...
Removes a bunch of asQWidget() from the tests
2022-04-11 15:14:51 +01:00
Sergio Martins
31db3d9562
Port away from QTest::qWaitForWindowActive, it's Qt specific
...
Simpliy moved it to Platform_qt
2022-04-11 11:37:31 +01:00
Sergio Martins
52d91d350b
Remove qtwidgets usage from Config
2022-04-11 01:51:41 +01:00
Sergio Martins
432ff65cc2
Remove QTimer hacks from Platform
...
It's now instantiated after qApp, so it's safe
2022-04-11 01:48:48 +01:00
Sergio Martins
037140b980
Add KDDockWidgets::initPlatform()
...
Instead of using the static variable, which is initialized before
having QApplication.
Will allow us to remove the QTimer from Platform init
2022-04-11 00:55:28 +01:00
Sergio Martins
8cd05c7314
Add Platform::createDefaultFrameworkWidgetFactory()
2022-04-10 23:54:52 +01:00
Sergio Martins
ec0e841bb8
Introduce qtwidgets/FrameworkWidgetFactory_qtwidgets
...
It doesn't scale to support all platforms with ifdefs, instead, use one
file per platform
2022-04-10 21:15:10 +01:00
Sergio Martins
613a18f60c
Delete operator== for ViewWrapper
...
Fixes a bug in the tests too
2022-04-10 20:47:33 +01:00
Sergio Martins
d6fd54cec4
Por all usages of QWindop/windowHandle to KDDockWidgets::Window
...
Removes a lot of asQWidget() code and is also prepared for non-Qt
views.
2022-04-09 19:21:56 +01:00
Sergio Martins
4e47518a3f
Merge branch '1.6'
2022-04-08 14:27:28 +01:00
Sergio Martins
ab2843f3ef
Update ChangeLog
2022-04-08 14:12:35 +01:00
Sergio Martins
0e5247e039
Use FloatingWindow::isMaximizedOverride() instead of isMaximized()
...
This is for issue #286 .
Allows users to workaround buggy window managers.
2022-04-08 14:12:35 +01:00
Sergio Martins
6413266df3
Linux: Fix dragging of maximized floating windows
...
They should restore their normal size when the drag starts
(cherry picked from commit 1305dee081 )
2022-04-08 14:12:35 +01:00
Allen Winter
c6ce421432
CMakeLists.txt - Python bindings are not supported in Unity builds
...
fixes #284
2022-04-08 08:42:06 -04:00
Sergio Martins
47f773ab7c
Use FloatingWindow::isMaximizedOverride() instead of isMaximized()
...
This is for issue #286 .
Allows users to workaround buggy window managers.
2022-04-08 12:17:37 +01:00
Sergio Martins
5a8f176860
Add Window
...
A non-Qt abstraction around QWindow
2022-04-08 11:45:15 +01:00
Sergio Martins
8cfb10ef10
Use View::setParent() instead of QWidget::setParent()
2022-04-07 22:54:50 +01:00
Sergio Martins
95671f9d9a
Add Platform_qt, a baseclass for both Qt frontends
...
So we can share some code between QtQuick and QtWidgets
2022-04-07 23:48:40 +01:00
Sergio Martins
427af43904
Remove some QtWidgetisms from DockRegistry
2022-04-07 23:16:43 +01:00
Sergio Martins
4944ad5882
Add Platform::qobjectAsView()
...
to be removed once we port away from Qt, but needed for now to
support QtQuick
2022-04-07 23:10:01 +01:00
Sergio Martins
59f9824cc2
Fix typo during porting of test
2022-04-07 22:48:09 +01:00
Sergio Martins
71f0b644f2
Port away from including TitleBar_qtwidgets in tests
2022-04-07 22:43:56 +01:00
Sergio Martins
b60b54327b
Port away from Item::guestAsQObject()
...
Use Item::guestView() instead.
2022-04-07 22:27:22 +01:00
Sergio Martins
0f2da43737
Rename guestWidget to guestView
...
As we deal in View now
2022-04-07 20:12:47 +01:00
Sergio Martins
558bd42447
tests: Remove more QWidget dependencies
2022-04-07 00:49:36 +01:00
Sergio Martins
7107bfe3e6
Remove _qtwidget include from utils.h
2022-04-07 00:40:25 +01:00
Sergio Martins
be150c1c52
Port DockRegistry away from QGuiApplication::focusObjectChanged
...
Use the Qt agnostic way, from Platform.h
2022-04-07 00:24:06 +01:00
Sergio Martins
9f4cb1a13e
Port FocusScope away from QGuiApplication
2022-04-05 23:01:29 +01:00
Sergio Martins
0addad590e
ViewGuard: Add a -> const operator too
...
So we can call it if const
2022-04-05 23:00:20 +01:00
Sergio Martins
793e48150a
Don't access qApp directly from Platform's ctor
...
QApplication might not be created yet, so delay it
With a timer for now. Don't guarantee this will stay.
Explicit init by the user might be an alternative.
2022-04-05 22:29:01 +01:00
Sergio Martins
3ba4bc2d08
Add Platform::focusedView() and respective signal
...
Implemented as QGuiApplication::focusObjectChanged() for Qt,
other frontends will have their own impl.
2022-04-05 21:53:52 +01:00
Sergio Martins
43faf85eb4
Add View::isNull()
...
ViewWrappers don't have ownership of the gui element.
The gui element might have been deleted, leaving us with a
stale wrapper
For impl simply use a QPointer in the QtWidgets and QtQuick
backends
2022-04-05 21:50:21 +01:00
Sergio Martins
ad3febd87e
Add copyright headers to tst_viewguard
2022-04-05 21:29:35 +01:00
Sergio Martins
3e4d172765
ViewGuard: Add a copy-ctor
2022-04-05 21:29:35 +01:00
Waqar Ahmed
607ec01feb
Extend tst_viewguard to test signal trigger after destruction
2022-04-06 01:13:50 +05:00
Sergio Martins
dc14a309a7
ViewGuard: Fix potential crash if the ViewGuard is deleted.
...
There was nothing disconnecting from the lambda.
Probably KDBindings needs a ConnectionHolder RAII class
2022-04-05 20:28:05 +01:00
Sergio Martins
fdc56b938e
ViewGuard: Fix ctor and assign operator having different behaviours
...
The difference was very small: The ctor honoured View::inDtor()
while the assign op didn't. It's easy to make them behave the same
by creating a setView() method
As a side-effect the duplicate connect() is also gone now
2022-04-05 20:25:14 +01:00
Sergio Martins
4b62714ef5
ViewGuard: Fix clear() not disconnecting
...
When clear is called we should disconnect the signal, as it won't
be needed anymore. Benign though.
2022-04-05 20:18:09 +01:00
Sergio Martins
2763aec6c2
ViewGuard: Fix English typo in comment
2022-04-05 20:15:05 +01:00
Sergio Martins
73b874ec0b
Remove stray qDebug from Platform.cpp
2022-04-05 20:10:24 +01:00
Sergio Martins
124b521308
ViewGuard: Add copyright headers
...
Some formatting too.
2022-04-05 20:09:24 +01:00
Sergio Martins
e09d4e2d3b
Merge branch '1.6'
2022-04-05 17:27:37 +01:00
Sergio Martins
1f638d2c7a
tests|qtquick|Windows: Stabilize a test
...
The warning is benign and unrelated to anything kddw is doing
2022-04-05 17:26:38 +01:00
Sergio Martins
0897263fc9
Merge branch '1.6'
2022-04-05 17:14:21 +01:00
Albert Astals Cid
7b73393095
Fix position of right overlay dockwidgets when there's a toolbar on the left
2022-04-05 17:13:29 +01:00
Albert Astals Cid
570f2c7e30
Fix position of right overlay dockwidgets when there's a toolbar on the left
2022-04-05 17:11:01 +01:00
Waqar Ahmed
b573d3f0f7
Introduce ViewGuard: A weak ptr to View
2022-04-05 17:05:17 +05:00
Sergio Martins
862c5f21d4
Update ChangeLog
...
For 1305dee081
Fixes #286
I might backport to 1.6 if I'm happy with it
2022-04-05 12:21:01 +01:00
Sergio Martins
1305dee081
Linux: Fix dragging of maximized floating windows
...
They should restore their normal size when the drag starts
2022-04-05 12:18:57 +01:00
Waqar Ahmed
84497f422d
Fix fallthrough warning
2022-04-05 10:11:46 +01:00
Sergio Martins
ccd7557c75
Add View::beingDestroyed signal
...
It's emitted in ~View
2022-04-05 10:11:37 +01:00
Sergio Martins
1116eff816
Don't create ViewWrappers with nullptr
...
Instead return a null shared ptr
2022-04-04 22:36:16 +01:00
Sergio Martins
55ab08129a
Deal the wrappers in shared_ptr instead of unique_ptr
...
Easier to pass around and better for our use case, where we
actual can have shared usage
2022-04-04 22:14:19 +01:00
Sergio Martins
c94705593f
Update qtquick stubs
...
Not compilable yet, but not in cmake either
2022-04-04 21:54:27 +01:00
Sergio Martins
4f0f82f6b4
Add ViewWrapper_qtquick stub
2022-04-04 21:52:41 +01:00
Sergio Martins
b76e45064f
Add View_qtquick stub
2022-04-04 19:06:17 +01:00
Sergio Martins
97653f03be
qtquick: Move old (unported) files to old/ folder
...
We'll start moving them to views/ and cleaning/porting them
2022-04-04 18:35:12 +01:00
Waqar Ahmed
96f3100f77
Cleanup nlohmann_qt_helpers
2022-04-04 22:27:29 +05:00
Waqar Ahmed
06501c8a70
Header include guards for nlohmann_qt_helpers
2022-04-04 22:20:59 +05:00
Waqar Ahmed
dc93db9276
Add nlohmann QDebug helper
2022-04-04 22:20:59 +05:00
Waqar Ahmed
d6e678883c
remove toVariantMap/fromVariantMap functions
2022-04-04 21:51:16 +05:00
Waqar Ahmed
3c424474ee
Restore layout using nlohmann directly
2022-04-04 21:51:16 +05:00
Sergio Martins
631736b202
Abstract away a call to qApp->activePopupWidget()
...
It's now generic and doesn't depend on QApplication.
Removes an ifdef.
2022-04-04 16:43:01 +01:00
Sergio Martins
495ef0dd6a
Move QmlTypes references out of DockRegistry
...
As it's specific to QtQuick
2022-04-04 16:36:17 +01:00
Sergio Martins
2a379d8735
Add Platform_qtquick
...
CMake hacked for now. Not sure if we should allow building
both QtWidgets and QtQuick frontends at the same time
2022-04-04 16:30:57 +01:00
Sergio Martins
6fcc55ce60
Add missing include
2022-04-04 16:30:41 +01:00
Sergio Martins
a36f85aae3
Add Platform and Platform_qtwidgets
...
So we can start removing QtWidgets vs QtQuick ifdefs.
Each "platform" will implement the differences
2022-04-04 16:21:35 +01:00
Sergio Martins
ac5cb637e7
Move DebugWindow to qtwidgets
...
As it's QtWidgets specific
2022-04-04 14:51:15 +01:00
Allen Winter
185ef5eb63
appveyor.yml - exclude wip/v2 branch
2022-04-04 14:51:15 +01:00
Waqar Ahmed
46b4e50a23
Save layout directly using nlohmann
2022-04-04 12:28:06 +05:00
Sergio Martins
e593233b8f
Renamed views_qtwidgets/ into qtwidgets/views/
...
As there will be some files that are specific to QtWidgets and
but aren't views
2022-04-03 23:51:02 +01:00
Sergio Martins
852ff762c5
Rename views_qtquick/ qtquick/views/
2022-04-03 23:44:31 +01:00
Sergio Martins
c12b0c161f
Port layoutlinter away from direct QtWidget dependencies
2022-04-03 23:43:02 +01:00
Sergio Martins
84fb080d13
Remove more QWidget dependencies
2022-04-03 23:40:01 +01:00
Sergio Martins
81e5d14e4f
Cleanup DropArea and base classes re receiving QWidget
...
They receive View now
2022-04-03 23:19:53 +01:00
Sergio Martins
ad1b77f79e
Add MainWindow view interface
2022-04-03 22:25:57 +01:00
Sergio Martins
6cbf7247ce
Fix crash, was mis-ported
2022-04-03 21:29:04 +01:00
Sergio Martins
d5700d94e6
MainWindow controller now receives View parent instead of QWidget
2022-04-03 21:23:03 +01:00
Sergio Martins
e9f287e2d7
More porting away from _qtwidgets
2022-04-03 21:09:37 +01:00
Sergio Martins
79f9f72ef4
DockWidget: decouple more from QtWidgets
2022-04-03 20:06:31 +01:00
Sergio Martins
a70b419c34
Remove one usage of DockWidget_qtwidgets
2022-04-03 00:23:39 +01:00
Sergio Martins
3cdd33f42f
Add Frame view interface
2022-04-02 23:57:48 +01:00
Sergio Martins
2f0cbf83e9
Added SideBar view interface
2022-04-02 22:47:26 +01:00
Sergio Martins
f2aaf65674
Added TabBar view interface
...
Removes some dependencies to QtWidget
2022-04-02 22:38:33 +01:00
Sergio Martins
5681a5a231
Add a Stack view interface
...
So that stack controller doesn't depend on QtWidgets
2022-04-02 19:36:25 +01:00
Sergio Martins
aab3de29e1
Add a title bar interface, so we don't need to depend on TitleBar_qtwidgets
2022-04-02 18:50:35 +01:00
Sergio Martins
08d84337e7
Remove some unneeded includes
2022-04-02 15:45:06 +01:00
Sergio Martins
9b18ffb05c
Port away from asQWidget()->screen(), use screen() directly
2022-04-02 15:45:00 +01:00
Sergio Martins
dcdd9333d4
Remove a bunch of asQWidget() calls
2022-04-02 15:34:38 +01:00
Waqar Ahmed
7bb363d3b2
Start moving layout saving to use nlohmann without involving Qt
2022-04-02 00:41:15 +05:00
Waqar Ahmed
c8127c1b36
Add QRect, QSize, QStringList nlohmann helpers
2022-04-02 00:40:20 +05:00
Waqar Ahmed
57dc7396ee
Allow using system nlohmann
2022-04-01 23:47:27 +05:00
Waqar Ahmed
c781e82c37
Move nlohmann_qt_helpers.h to src
2022-04-01 23:45:15 +05:00
Waqar Ahmed
ea1fbf021d
Move nlohmann into a subdirectory of 3rdparty
...
This helps us to use system one.
2022-04-01 23:44:35 +05:00
Sergio Martins
a754743014
More porting away from using Frame_qtwidgets directly in backend
2022-03-31 23:40:20 +01:00
Sergio Martins
c95d857483
Port away from casting to Frame_qtwidgets in most places
...
it's generic now
2022-03-31 23:17:27 +01:00
Sergio Martins
8ea346ca4a
Added View::asFrameController()
2022-03-31 18:39:52 +01:00
Sergio Martins
1b3f90d73f
Port away from casting to FloatingWindow_qtwidgets in the backend
...
Backend shouldn't know _qtwidget types exist
2022-03-31 18:36:40 +01:00
Sergio Martins
6687485e4c
Introduce View::handle() and View::equals()
...
So we can compare two windows without calling asQWidget().
2022-03-31 17:34:37 +01:00
Sergio Martins
79abef21a5
Introduce View::parentView()
...
Similar to QWidget::parentWidget(), but not tied to QWidgets.
Allows to start removing some asQWidget() calls, as seen in Frame::floatingWindow(),
did it for POC.
Still need to find a generic way to compare 2 QWidget pointers
2022-03-31 16:47:37 +01:00
Sergio Martins
3fe1a8e79f
Add View::asFloatingWindowController()
2022-03-31 16:27:37 +01:00
Sergio Martins
076125e0cf
Add Controller::is()
2022-03-31 12:37:07 +01:00
Sergio Martins
0d8479b206
Add Controller::type()
2022-03-31 12:28:34 +01:00
Sergio Martins
cb2930f0e9
Move Type enum out of View, into KDDockWidgets namespace
2022-03-31 11:45:28 +01:00
Sergio Martins
2574e91634
Add convenience View::is(Type)
2022-03-30 23:09:08 +01:00
Sergio Martins
17cac581b8
Don't access side bar controller before it's initialized
...
As detected by UBSAN
2022-03-30 19:57:59 +01:00
Sergio Martins
b6bc3810bd
tests: Remove unneeded deletion of top-level windows
...
They are deleted automatically nowadays
2022-03-30 19:36:17 +01:00
Sergio Martins
15cb93ed43
Port away from Controller::window() returning a QWidget
...
It now returns a ViewWrapper, which is agnostic to QtWidgets
2022-03-30 19:30:18 +01:00
Sergio Martins
bc09ec8a6a
Merge branch '1.6'
2022-03-30 15:34:58 +01:00
Allen Winter
1354fa8a4a
appveyor.yml - exclude wip/v2 branch
2022-03-30 10:30:10 -04:00
Sergio Martins
1a85363faf
Preserve order of tabs when re-docking a tabbed group
...
Since our workaround isn't an atomic operation, each dock widget
was saving its new tab index while we were in the middle of a restore.
So be sure we set their correct index and restore "current" at the end.
Fixes #279
2022-03-30 15:26:11 +01:00
Sergio Martins
7f021248bf
vscode: Remove ms-vscode.cpptools based launchers from linux/macOS
...
Replaced them with CodeLLDB based launchers.
This allows to not depend on binary-blob from microsoft and reduces
having to have 2 configs, now macOS uses the same one as Linux.
2022-03-30 14:49:42 +01:00
Sergio Martins
9d8d6f33ef
Update ChangeLog with 3rdparty JSON library dependency
2022-03-30 11:51:31 +01:00
Sergio Martins
15601fc3c9
Split MainWindow into view/controller
2022-03-30 11:51:31 +01:00
Waqar Ahmed
eb3ad6b5a3
Use nlohmann for layout save/restore instead of QJson*
2022-03-30 11:51:26 +01:00
Waqar Ahmed
2434455d41
Add nlohmann helpers for qt
2022-03-30 11:51:13 +01:00
Waqar Ahmed
62fe37be9f
Add nlohmann::json
2022-03-30 11:50:45 +01:00
Sergio Martins
f2957e35d5
Moved MainWindow into Controllers namespace
...
All renamings and movings are done, next step is to make the controller
a proper controller, and same for the view.
2022-03-25 11:30:40 +00:00
Sergio Martins
ba08d0c131
Fix clang build due to -Wweak-vtables
...
That's to be fixed in KDBindings first
2022-03-25 11:30:04 +00:00
Sergio Martins
65a6201121
Fix unused private field warning on clang
...
More methods to be implemented soon, but let's have at least 1
now to get rid of the warning
2022-03-25 11:29:49 +00:00
Sergio Martins
9fba1e9799
Rename Controller::DockWidgetBase to Controller::DockWidget
...
As done for other controllers
2022-03-25 10:53:02 +00:00
Sergio Martins
8656108e81
Renamed MainWindowBase to MainWindow
...
As done for other controllers
2022-03-25 10:47:20 +00:00
Sergio Martins
63b5109113
Rename Views::MainWindow to Views::MainWindow_qtwidgets
...
As done for other views
2022-03-25 10:41:46 +00:00
Sergio Martins
264b08a731
Move MainWindow view into Views namespace
2022-03-25 10:40:16 +00:00
Sergio Martins
0c686c1339
Renamed MainWindowBase.h to MainWindow.h
...
As done for other controllers
2022-03-25 10:30:07 +00:00
Sergio Martins
27007184aa
Rename MainWindow.h to MainWindow_qtwidgets.h
...
Just like the other views.
2022-03-25 10:27:25 +00:00
Sergio Martins
7e2f448ae1
Moved MainWindowBase/MainWindow into controllers/view folder
...
This is just the move, not ported yet
2022-03-25 10:21:07 +00:00
Sergio Martins
90a9159748
Introduce ViewWrapper - a non-owning view
...
In many cases we need to access widgets that weren't created by
KDDW, in that case we have no View. Since all our APIs want to
deal in View and not in QWidget, we need a way to wrap stuff like
QWidget::window() and windowHandle()
All methods are unimplemented. Will only implement those that
are required/used.
2022-03-25 10:03:46 +00:00
Sergio Martins
e0e6d1fd3e
Merge both Logging_p.cpp into the same one
...
the multisplitter abstraction is no longer the way we want to
abstract the framework
2022-03-24 16:59:50 +00:00
Sergio Martins
123fcdde1f
Remove unused backend_temp_includes/ folder
2022-03-24 16:53:27 +00:00
Sergio Martins
15956ab222
Move all the QtQuick files to views_qtquick/
...
It's not ported yet, bet at least they are in their final folder
and not polutting the rest
2022-03-24 16:43:27 +00:00
Sergio Martins
c6d95c42a8
Split most widgets into a Controller and a View
...
Controllers don't have any GUI and don't depend on the frontend
technology.
Views are implemented in a specific GUI tech (QtWidgets, QtQuick, etc).
For now only QtWidgets work. There's still a lot to decouple.
This will make it easier to introduce non-Qt backends.
2022-03-24 16:05:37 +00:00
Sergio Martins
bec69e17a2
Fix QtQuick build
2022-03-21 15:40:07 +00:00
Allen Winter
fe7497ab92
Merge branch '1.6'
2022-03-15 08:09:25 -04:00
Allen Winter
057b33179a
Changelog - we didn't have a formal 1.5.1 release
...
move the 1.5.1 changes to 1.6.0 since we never had a 1.5.1
2022-03-15 08:08:14 -04:00
Allen Winter
030b3c34d2
CMakeLists.txt, Changelog - open for version 1.7
2022-03-15 08:04:35 -04:00
Allen Winter
4945e6318c
CMakeLists.txt - set version to 1.5.99 (ie. Release Candidate)
2022-03-15 08:00:46 -04:00
Allen Winter
339edf1143
appveyor.yml - re-enable testing on Windows
2022-03-15 07:59:43 -04:00
Allen Winter
f98ce37c12
appveyor.yml - fix PATH on Windows
...
forgot the Qt "bin"
2022-03-15 07:58:39 -04:00
Sergio Martins
743dbc0718
Added dockWidgetInserted|Removed signals to TabBarWidget
...
Since QTabBar doesn't have them.
Useful for custom tab bars
2022-03-12 12:47:26 +00:00
Sergio Martins
fd4588de0f
TitleBarWidget: Mark members as protected
...
So custom titlebars have more power
2022-03-12 12:31:53 +00:00
Sergio Martins
6ba10cfe12
Added TitleBar::tabBar()
...
Useful for people writing custom titlebar's with style that depends
on the current tab
2022-03-11 18:21:49 +00:00
Sergio Martins
096176dc72
Don't dereference potentially nullptr
2022-03-10 18:37:28 +00:00
Sergio Martins
25b04d7ed8
MDI: Fix another case of showing resize handles wrong
...
the logic for 'y' only makes sense if 'x' is bounded and vice-versa
2022-03-10 10:55:17 +00:00
Sergio Martins
e345e89c35
MDI: Fix case where resize cursor would be shown for frame bellow
...
Was already fixed a few days ago, but this is the case for nested
mdi.
2022-03-09 19:08:29 +00:00
Sergio Martins
a97663294c
example: Allow to test propagation of close event in the mdi example
2022-03-09 17:18:11 +00:00
Sergio Martins
bb4cf802f5
examples: Remove more duplicate MyWidget.cpp/h files
...
share with main example instead
2022-03-09 16:42:15 +00:00
Sergio Martins
701069617c
example: Allow to test propagation of close event in the mdi example
2022-03-09 16:30:26 +00:00
Sergio Martins
a8c50f1876
example: Remove duplicate minimal-mdi/MyWidget.cpp
...
It was using the cpp from the main example but the header from
minimal-mdi. Instead, share both the impl and the header
2022-03-09 16:27:25 +00:00
Sergio Martins
61cca1e5ec
Forward QCloseEvent to the MDI widgets too
...
Fixes case where docked MDI widgets were not able to block a close
2022-03-09 16:11:55 +00:00
Sergio Martins
7db9938b85
Fix MainWindow not propagating close events to docked widgets
...
Nested FloatingWindows already supported it, so make it consistent.
Personal take: In a non-docking world, users can override their
main window close event and prevent a close, to save a document
or such. However, in a docking world, the main window developer
won't know which widgets are docked, so forwarding needs to happen,
as some might have documents to save.
2022-03-09 15:47:02 +00:00
Sergio Martins
01cc915734
Further move onCloseEvent to base class
...
So that it can be reused by MDI layouts too
2022-03-09 14:58:35 +00:00
Sergio Martins
3454b67a45
Refactor: Move close event logic from FloatingWindow to DropArea
...
So main window can use it too
2022-03-09 14:39:20 +00:00
Sergio Martins
21765efbac
example: Added --blocks-close-event
...
Makes dock widget #0 reject the close event, meaning it won't close.
2022-03-09 12:46:20 +00:00
Allen Winter
60a1e46453
CMakeLists.txt - fix setting KDDockWidgets_DEPS
...
broken with last commit
2022-03-08 12:06:53 -05:00
Allen Winter
8b8ef7f2b0
CMakeLists.txt - find COMPONENTS to search for Qt modules
2022-03-08 12:01:13 -05:00
Sergio Martins
c0e8fe3869
Update ChangeLog regarding #44 and #96 being fixed
2022-03-07 16:38:40 +00:00
Sergio Martins
524dff9105
Don't try to restore to previous position if there isn't any
2022-03-07 16:36:38 +00:00
Sergio Martins
0099a19a82
Make redocking floating windows with tabs possible
...
TitleBar::isFloating() was returning false, while it should
have returned true.
Fixed by making isFloating() simpler and dumb. isFloating() should
only say if it belongs to a floating window or not. It shouldn't
contain any logic about whether button should be visible or not.
There's already logic elsewhere that will hide the float button
in case there's nesting.
Fixes issue #96 and #44
2022-03-07 15:56:15 +00:00
Sergio Martins
e6b8636e88
MDI: Fix resize cursor appearing for frames that had others on top
2022-03-04 11:34:35 +00:00
Sergio Martins
86419fd979
MDI: Fixed closing dock widget in MDI would close main window
...
We only close the window when the window is a FloatingWindow and
it's the last frame
2022-03-03 17:52:13 +00:00
Eism
220471f746
Corrected the updating of normal geometry for window
2022-02-14 15:34:01 +00:00
Sergio Martins
ca3fe4070a
Port layouting signals to KDBindings
2022-02-12 16:15:07 +00:00
Sergio Martins
bef7aab7f6
Move kdbindings to src/3rdparty
2022-02-12 14:45:12 +00:00
Sergio Martins
d4bcc96f2f
Add KDBindings to 3rdparty
...
To replace Qt in the backend.
2022-02-12 14:45:12 +00:00
Sergio Martins
b5003f8fb8
Make sure the layouting builds standalone
...
Goal will be for it to be C++ only, eventually.
backend_temp_includes/ is to be removed, but required to build currently.
2022-02-12 14:45:12 +00:00
Sergio Martins
412860abac
tests: Use QT_NO_KEYWORDS too
2022-02-12 14:43:37 +00:00
Sergio Martins
2eeb4aac27
Fix Item_p.h being exposed in public API
...
Forward declare Item instead
2022-02-12 14:37:19 +00:00
Sergio Martins
bfb2ec701e
cmake: Add a dedicated ASAN preset
...
It's not doing well on Windows, so make the default be a non-asan
build
2022-02-11 22:55:54 +00:00
Sergio Martins
54bf24d5d4
Added Config::setDropIndicatorAllowedFunc()
2022-02-11 19:49:23 +00:00
Sergio Martins
76cbb760ed
Minor refactoring before introducing DropIndicatorAllowedFunc
...
Deals with all the false case first
2022-02-11 19:07:28 +00:00
Sergio Martins
4824a398ab
Move DropIndicatorOverlayInterface::DropLocation enum to namespace scope
...
It's public now
2022-02-11 18:14:26 +00:00
Sergio Martins
a502a8250b
Fix possible nullptr dereference
2022-02-11 17:42:09 +00:00
Sergio Martins
85fb4ff671
indicators: Prepare the visibility to be more granular
...
Currently either all or none inner indicators can be hidden/shown,
and same of the outter.
We'll soon allow some of them to be hidden, selectively, by the
client app.
2022-02-11 17:37:26 +00:00
Sergio Martins
6db3ccc87f
.gitignore: Add a few clangd files
2022-02-11 17:10:22 +00:00
Sergio Martins
5811cab164
segmented indicators: Fix potential bugs due to decoupled drop types
...
The returned QVector was indexed by the enum values, but the enum
is flag based now, no longer sequential. Instead of depending
on ordering of the enum, let's instead return a QHash where the
type is coupled with the corresponding QPolygon already
2022-02-11 17:08:30 +00:00
Sergio Martins
1387c2f573
segmented indicators: Use the base class logic
...
Instead of repeating it
2022-02-11 16:58:12 +00:00
Sergio Martins
79cc347cd8
Refactor: Move indicator visibility logic into base class
2022-02-11 16:42:07 +00:00
Sergio Martins
e62bde3152
Improve documentation for MainWindowOption_HasCentralWidget
...
Fixes issue #272
2022-02-11 14:36:19 +00:00
Sergio Martins
81abb3cea5
Fix build on OpenBSD
...
Fixes #265
2022-02-11 14:31:00 +00:00
Sergio Martins
ecd3c20adf
Fix build with Qt5+C++20
...
Error was:
qvector.h:532:18: error: use of overloaded operator '!=' is ambiguous (with operand types 'int *' and 'QTypedArrayData<int>::iterator')
while (i != d->begin())
2022-02-10 11:01:14 +00:00
Sergio Martins
755d53432b
Fix "drag to detach" MDI windows when in nested MDI mode
...
We were deleting the draggable, causing the drag to stop
2022-02-04 17:54:43 +00:00
Sergio Martins
e00a552bf8
Add DragController::currentStateChanged() signal
2022-02-04 17:52:54 +00:00
Sergio Martins
faf93fe597
Add DragController::isIdle()
2022-02-04 17:48:42 +00:00
Sergio Martins
4f8aac7df3
Fix floating windows not restoring to previous position
...
The dock widget wrapper that we deleted had that info. We need
to preserve it.
2022-02-04 16:57:44 +00:00
Sergio Martins
719803ecfa
Fix a test with offscreen QPA
...
We were pressing on pos 6,6 to start a drag but that triggered
a window resize instead.
2022-02-04 16:10:13 +00:00
Sergio Martins
f0ef24383b
Debug++
2022-02-04 16:10:13 +00:00
Sergio Martins
4f8b174a8d
Fixed Frame::isFloating() for the nested MDI case
2022-02-04 15:17:11 +00:00
Sergio Martins
675b166956
Added the last crash fix to the ChangeLog
2022-02-04 15:11:17 +00:00
Sergio Martins
b13ba1e42e
Fix crash due to use of native widgets on Windows
...
Qt has corner cases when all of its widgets are native widgets.
This particular crash was a loop between QWidget::create()
and QWidget::createWinId().
2022-02-02 13:21:14 +00:00
Sergio Martins
481dae64c3
nested_mdi: Fix floating windows not going back to their previous location
...
When floating a mdi window that was nested in a drop area, clicking the
float button should put it back to the MDI area.
2022-01-30 02:55:02 +00:00
Sergio Martins
6b04e20a7e
Add some doxygen
2022-01-30 02:40:53 +00:00
Sergio Martins
8a3ee35993
Fix firstParentOfType() going through different windows
2022-01-30 02:15:58 +00:00
Sergio Martins
146c656e29
Minor: Use OOP, add ItemRef::isInMainWindow()
2022-01-29 21:43:41 +00:00
Sergio Martins
a190e2dfbf
Fix -Wshadow warning
2022-01-29 20:57:19 +00:00
Sergio Martins
d0daff6771
vscode: Add an entry to run the mdi with dock widgets example
2022-01-29 20:15:29 +00:00
Sergio Martins
721795b113
Remove LastPosition struct, move its members to Position
...
It was an unneeded indirection that didn't provide added semantics
2022-01-29 19:29:03 +00:00
Sergio Martins
40231b7fae
Minor coding style
2022-01-29 19:02:17 +00:00
Sergio Martins
1d0300ecc8
Fix another unused variable
2022-01-26 00:14:01 +00:00
Sergio Martins
ce20628555
Remove unused variable - fixes Werror build
2022-01-25 23:23:54 +00:00
Sergio Martins
d0dcac6b03
Make DockWidgetBase::setMDIPosition|setMDISize support nesting
...
They now honour Option_MDINestable.
Before they would bail out assuming they weren't in a MDI area.
Now they look further up the hierarchy to find our MDIArea, if any.
2022-01-25 20:14:04 +00:00
Sergio Martins
2b1aa44eff
Fix crash when floating nested mdi
2022-01-24 19:18:55 +00:00
Sergio Martins
ae42dffcb1
Update Changelog regarding new nested MDI feature
2022-01-24 18:48:00 +00:00
Sergio Martins
21adfe06ad
Add an example for nested docking within MDI
2022-01-24 18:31:10 +00:00
Sergio Martins
7de26139a2
Restore source-compat for TabWidgetWidget()
2022-01-24 15:47:06 +00:00
Sergio Martins
894ff9fea0
Minor: Fix overridden signature
2022-01-24 15:34:37 +00:00
Sergio Martins
942c462586
Fix release build
2022-01-24 15:27:24 +00:00
Sergio Martins
128645693c
nested_mdi: Fix DnD over dock widgets docked in MDI
...
Dragging was always detecting the main window's drop indicator
overlay. Make it transparent for mouse events, so that
QWidget::childAt() doesn't pick it, and we can see the inner
drop areas.
2022-01-23 23:31:50 +00:00
Sergio Martins
86bceb4c48
nested mdi: Fix detaching inner dock widgets
...
Only the outter-most MDI frame is dragged in MDI mode. The inner ones
are dragged in normal docking mode, they become real floating windows.
2022-01-23 21:46:37 +00:00
Sergio Martins
ea64aae861
tests++
2022-01-23 21:46:37 +00:00
Sergio Martins
d1645dff73
tests: Remove unneeded sleep
2022-01-23 21:46:37 +00:00
Sergio Martins
a72e018f3b
nested mdi: Also test floating a nested MDI
2022-01-23 21:46:37 +00:00
Sergio Martins
66b0ba8902
Added MDIArea::frames()
2022-01-23 21:46:37 +00:00
Sergio Martins
18457d80aa
nested mdi: Get rid of unneeded drop area mdi wrapper when floating
...
When floating, the FloatingWindow has its own DropArea for nesting.
We delete the redundant level of wrappers when floating.
2022-01-23 21:46:37 +00:00
Sergio Martins
95c12dbd4c
nested mdi: Fix floating picking the wrong title bar
...
Use DockWidget::titleBar() which will always travel the hierarchy
and pick the first visible title bar. We have more nesting now.
2022-01-23 21:46:37 +00:00
Sergio Martins
c7682a3524
Use QScopedValueRollback, it's more expressive
2022-01-23 21:46:37 +00:00
Sergio Martins
4922363e71
Simplify expression
2022-01-23 21:46:37 +00:00
Sergio Martins
9f6ec0244f
nested mdi: More tests for closing docks
2022-01-23 21:46:37 +00:00
Sergio Martins
747e987f28
test++
2022-01-23 21:46:37 +00:00
Sergio Martins
68e01c70ee
nested mdi: Delete wrappers once we close the last nested DW
2022-01-23 21:46:37 +00:00
Sergio Martins
296b2a3370
nested mdi: Fix MDI's frame title not being updated
...
Before we didn't need to update it because there was only 1
dock widget. But now, if there's more than one we need to set the
application's name instead of the dock widget's name as title.
2022-01-23 21:46:37 +00:00
Sergio Martins
074bc26be9
Added DropArea::mdiDockWidgetWrapper()
2022-01-23 21:46:37 +00:00
Sergio Martins
f8e6ecf821
Remove DropArea::setIsMDIWrapper(), use ctor instead
...
This propery is meant to be set only once, so enforce it via
compiler.
2022-01-23 21:46:37 +00:00
Sergio Martins
3e70a2cc71
nested mdi: Added DockWidgetBase::Private::isMDIWrapper
2022-01-23 21:46:37 +00:00
Sergio Martins
65ced9604f
nested mdi: Fixed title bar visibility
...
When there's only one docked widget we only show 1 title bar.
Just like happens with a FloatingWindow
2022-01-23 21:46:37 +00:00
Sergio Martins
45b0536c6a
Added DropArea::hasSingleFrame()
...
For readability
2022-01-23 21:46:37 +00:00
Sergio Martins
8c8f5a8fda
Introduce Option_MDINestable
...
Should allow MDI dock widgets to also accept drops.
Befor, each MDI "window" only had 1 dock widget, but now each
MDI "window" a layout of dock widgets.
This is implemented by nesting the actual dock widget inside
a wrapper drop area. This drop area gives the drop support.
There's still bugs and more tests to fix before merging.
2022-01-23 21:46:37 +00:00
Sergio Martins
22a9ce2596
Merge branch '1.5'
2022-01-21 12:01:38 +00:00
Sergio Martins
93b664414b
X11: Add support for robust z-order detection
...
Qt doesn't provide any way to know which window is directly
bellow the cursor. Generally this is fine since floating windows
are always on top of the main window. However, if Qt::Tool is removed,
then they can be behind, and KDDW can't know which window to overlay
the drop indicators onto.
This patch uses XLib's XQueryTree to solve this.
This is still experimental, hence disabled by default.
For now it's disabled by default, since it's experimental.
You can turn it on by passing -DKDDockWidgets_XLib=ON
Fixes bug #256
(cherry-picked from b20ce0895b as it's safe enough)
2022-01-21 11:56:48 +00:00
Sergio Martins
866788674f
Minor: Added Utils::isXCB()
2022-01-21 11:56:48 +00:00
Mauro Persano
f13f0129d4
Add API to set center widget margins on MainWindow
...
We can't change the margins by subclassing MainWindow and overriding
centerWidgetMargins, since the margins are initialized in MainWindow's
constructor. This adds public API to MainWindow to allow us to change
the margins later on.
2022-01-20 22:37:36 +00:00
Sergio Martins
22ffc6c7ea
Fix QtQuick build
2022-01-20 22:37:36 +00:00
Mauro Persano
d1767b5534
Don't render frame for central persistent widget
...
When the main window has a central persistent widget, make sure the
containing tab widget doesn't render a frame around it.
2022-01-20 22:08:17 +00:00
Allen Winter
2fbe4f872e
Merge branch '1.5'
2022-01-20 08:15:23 -05:00
Allen Winter
93e60a743e
update copyright year
2022-01-20 08:05:26 -05:00
Allen Winter
328a14b46a
src/private/FloatingWindow.cpp - fix compile with mingw
...
NOMINMAX should only be defined with MSVC on Windows.
2022-01-20 07:50:24 -05:00
Allen Winter
9c17b44ad7
Merge branch '1.5'
2022-01-19 16:23:47 -05:00
Allen Winter
cf40cadce8
cmake/KDAB/modules/KDQtInstallPaths.cmake - sync to upstream
2022-01-19 16:23:28 -05:00
Sergio Martins
16c43b8c24
Make cmake config file honour KDDockWidgets_X11EXTRAS
2022-01-12 09:55:02 +00:00
Allen Winter
8391d85d48
appveyor.yml - add libxkbcommon on ubuntu for qt6
2022-01-09 10:17:39 -05:00
Allen Winter
e59e5d7a71
appveyor.yml - add builders for Qt6
2022-01-09 09:50:58 -05:00
Sergio Martins
aa3c3272ee
Fix examples build on macOS and Windows
...
For some reason a X11 dependency was commited by mistake.
2022-01-08 18:39:16 +00:00
Sergio Martins
1d8fad245a
Fix build with 5.12
...
This is a special request from a customer who can't upgrade right
now.
Min is still 5.15 in CMakeLists.
2022-01-07 17:55:53 +00:00
Sergio Martins
789c531f3d
Fix parent of the MDIArea layout
...
Fixes tests on QtQuick. On QtWidgets it would get reparented
so tests already passed.
2022-01-07 17:45:37 +00:00
Sergio Martins
5b87fb4435
Add an examples/mdi_with_docking/ example
2022-01-07 17:31:20 +00:00
Sergio Martins
402f0b9d90
Add a fwd header for MDIArea.h
2022-01-07 17:27:45 +00:00
Sergio Martins
37567d3980
Introduce MDIArea, a widget that can host MDI dock widgets
...
This is a public wrapper to MDILayoutWidget. The latter is private
and has internals we don't want to expose. Instead create a public
class with a thin API.
You no longer need to create a MainWindowMDI to have MDI support.
You can now have a normal MainWindow (with normal docking) and
add some dock widget that as a MDIArea as widget.
2022-01-07 17:13:16 +00:00
Sergio Martins
6cef4cea2c
Port frameParent() to firstParentOfType()
2022-01-07 14:59:33 +00:00
Sergio Martins
aea2bf971b
Add TestDocks::tst_mdi_mixed_with_docking
...
Tests that we can dock a MDI Layout.
Meaning the main window would support both docking and MDI.
This basic test passes. But there's still a lot of bugs to fix
2022-01-07 12:50:25 +00:00
Sergio Martins
00a0e455e7
Make MDILayoutWidget::addDockWidget's initial opt param optional
...
It's seldom needed
2022-01-07 12:41:24 +00:00
Sergio Martins
d5c7fbfedd
Install MDILayoutWidget_p.h too
2022-01-07 12:32:39 +00:00
Sergio Martins
bea6c09494
CMake: Add a clang -ftime-trace preset
...
Just for profiling build times.
2022-01-06 13:54:34 +00:00
Allen Winter
0adb130d4b
src/private/FloatingWindow.cpp - on Windows, define NOMINMAX
...
else windows.h will define the max() macro which doesn't
play nice with the std::numeric_limits::max()
Issue #266
2021-12-27 08:09:09 -05:00
Allen Winter
92d0d74641
src/private/FloatingWindow.cpp - on Windows, define NOMINMAX
...
else windows.h will define the max() macro which doesn't
play nice with the std::numeric_limits::max()
Issue #266
2021-12-27 07:56:00 -05:00
Sergio Martins
4d4f2a0183
Merge branch '1.5'
2021-12-22 17:07:24 +00:00
Alistair Baxter
f1e19ec59c
Ensure that floating windows are not positioned off-screen when they are shown
...
At points when a Rect is to be used to position a floating widget,
test to see if it overlaps any of the system's screens.
If it does not, adjust the Rect to within the closest screen edges.
2021-12-22 16:48:45 +00:00
Sergio Martins
64b5564f99
README: Clarify that for QtQuick we suggest Qt6
2021-12-22 16:08:55 +00:00
Sergio Martins
66cc9ddc03
Updated ChangeLog
...
Closes #259
2021-12-22 15:39:00 +00:00
Eism
336f1146d3
Fixed the restoration of geometry when user closed maximized window
2021-12-22 15:31:26 +00:00
Mauro Persano
29b1a434c4
Make lazy resize rubber bands optionally top-level
...
To workaround MFC bug
2021-12-14 11:32:45 +00:00
Allen Winter
c0c8399bd7
README.md - add a bit of info about Qt private packages on linux
...
related to issue#257
2021-11-26 09:04:30 -05:00
Sergio Martins
b20ce0895b
X11: Add support for robust z-order detection
...
Qt doesn't provide any way to know which window is directly
bellow the cursor. Generally this is fine since floating windows
are always on top of the main window. However, if Qt::Tool is removed,
then they can be behind, and KDDW can't know which window to overlay
the drop indicators onto.
This patch uses XLib's XQueryTree to solve this.
This is still experimental, hence disabled by default.
For now it's disabled by default, since it's experimental.
You can turn it on by passing -DKDDockWidgets_XLib=ON
Fixes bug #256
2021-11-25 20:59:16 +00:00
Sergio Martins
e67f55af51
Minor: Added Utils::isXCB()
2021-11-25 17:22:58 +00:00
Allen Winter
f1410948f8
Merge branch '1.5'
2021-11-24 16:51:38 -05:00
Allen Winter
30185d5b2a
This is would become version 1.5.1
2021-11-24 16:49:11 -05:00
Allen Winter
9990300006
distro/qt5-kddockwidgets.spec - add BuildRequires for SUSE
...
libqt5-qtbase-private-headers-devel is needed
2021-11-24 12:32:06 -05:00
Allen Winter
573e82e9eb
update 1.5.0 release date
2021-11-24 12:20:15 -05:00
Allen Winter
07a135a10a
ECMGeneratePriFile.cmake - restore "Fix issues with pri file"
...
commit b81c32b1c9
Author: Jacob Young <jacobly0@users.noreply.github.com >
Date: Mon Dec 28 20:46:28 2020 -0500
2021-11-24 12:14:16 -05:00
Sergio Martins
fc172b66f8
Explain that changing window manager flags isn't portable
...
This restriction comes from Qt itself, not from KDDW.
Relates to bug #256
I will however try to reproduce it
2021-11-24 11:16:36 +00:00
Sergio Martins
2be0d5d1d9
Add a warning about using private headers and ABI compat
2021-11-24 10:04:52 +00:00
Allen Winter
3007b46892
ready for 1.5 release
2021-11-22 08:16:54 -05:00
Allen Winter
1419db80a2
OBS distro fixes
2021-11-19 18:03:22 -05:00
Allen Winter
5376ceec7e
prep for the 1.5.0 release
2021-11-19 15:39:19 -05:00
Allen Winter
d3a3e7502e
appveyor.yml - temporarily disable testing on Windows
...
until I have the time to figure out a proper solution
2021-11-19 12:22:20 -05:00
Allen Winter
50c3f9b899
appveyor.yml - add bin to PATH on Windows
...
to fix 'ctest' on Windows
2021-11-19 11:00:44 -05:00
Allen Winter
8845fae147
appveyor.yml - fix typo
2021-11-19 10:23:55 -05:00
Allen Winter
0c291116b9
appveyor.yml - install mesa on ubuntu
2021-11-19 10:05:07 -05:00
Allen Winter
f0fa0281bf
CMakeLists.txt - fix default install location on Windows
2021-11-19 09:59:56 -05:00
Allen Winter
313a17a96c
appveyor.yml - add Qt to PATH
2021-11-19 08:58:07 -05:00
Allen Winter
9e2b1d3e44
move github CI to appveyor for all platforms
2021-11-19 08:33:43 -05:00
Allen Winter
d832750eb7
CMakeLists.txt - increase min Qt to version 5.15
2021-11-18 09:07:36 -05:00
Allen Winter
a82a283b4b
CMakeLists.txt - increase min Qt to version 5.15
2021-11-18 09:06:50 -05:00
Sergio Martins
77392709e2
Merge branch '1.5'
2021-11-18 14:03:00 +00:00
Sergio Martins
b6770217bb
README: Mention 5.15 is required
...
5.12 no longer compiles
2021-11-18 14:01:59 +00:00
Sergio Martins
c8b22e7ea5
Fix "Unpin" button not showing up in overlayed widgets
2021-11-18 12:15:23 +00:00
Sergio Martins
8dcaaaf853
tests|Qt6: Ignore benign warning coming from QQC material style
...
Needs to be fixed in Qt
2021-11-17 17:00:16 +00:00
Sergio Martins
32ecdb5b37
README-QtQuick: Bump the patch revisions of min supported Qt
...
Probably works with earlier, but not tested
2021-11-17 15:59:46 +00:00
Sergio Martins
099c7eafc8
tests: Fix QtQuick tests
...
normal geometry isn't supported for QWindow, only QWidget.
2021-11-17 15:41:50 +00:00
Sergio Martins
f872d6fbc1
tests: Fix issue found by ASAN
...
We need to ungrab the window before deleting it.
2021-11-17 15:12:06 +00:00
Sergio Martins
3e21787efb
qtquick: Fully qualify setPersistentCentralWidget() arguments
...
So it works from QtQuick too
2021-11-17 14:13:01 +00:00
Allen Winter
58fcd8d04d
conan/conanfile.py - change to version 1.5.0
2021-11-15 09:57:14 -05:00
Allen Winter
6fd0b4ddee
CMakeLists.txt, Changelog - this will be version 1.6
2021-11-15 09:55:47 -05:00
Allen Winter
95d5146fce
CMakeLists.txt - increase version for release candidate
2021-11-15 09:51:21 -05:00
Sergio Martins
ea6adafc13
Fix QtQuick build
...
Fixes #254
2021-11-09 09:45:15 +00:00
Allen Winter
f65cb2c0ce
README.md - minor
2021-11-04 17:20:51 -04:00
Sergio Martins
fbde2bd202
cmake: Allow to not create "docs" target
...
Fixes integrating KDDW as sub-repo of other projects that
already define "docs" target. It would conflict.
namespacing the target name would be another optionm but in doubt
keep things simple
2021-11-03 09:14:25 +00:00
Sergio Martins
0cee15c0d3
Don't do relative positioning restore if main window changed screen
...
We only shift floating windows position for simple cases.
Fixes floating windows being restored out of bounds in some cases.
2021-11-02 19:11:29 +00:00
Sergio Martins
4b56a336a0
Fix build on macOS
2021-10-19 14:34:27 +01:00
Sergio Martins
56bec0db04
Replace KDDOCKWIDGETS_RUBBERBAND_IS_TOPLEVEL with config option
...
This way one doesn't need to rebuild KDDW to make the rubber band
top-level.
Added it as internal option, as this will seldom be used.
2021-10-17 11:17:41 +01:00
Allen Winter
dd979d191f
CMakeLists.txt, python/CMakeLists.txt - some restructuring
2021-10-13 17:33:32 -04:00
Sergio Martins
a5f37f851b
Fix relative inner resizing not working properly
...
When we resize the main window then we also resize the inner
dock widgets in the same proportion (based on saved percentages),
during a resize we should not recompute those percentages due to
rounding errors.
They were being recomputed by mistake, since only the root Item
was blocking them, but the function recurses into inner items
Fixes #186
2021-10-13 18:33:45 +01:00
Sergio Martins
052d8680dc
Add a test for #186
...
Was hard to reproduce, doesn't happen with many other layouts
2021-10-13 15:37:02 +01:00
Sergio Martins
21e8aae823
Add a test for #238
...
Which I can't reproduce yet, but at least tests another case.
2021-10-12 18:36:50 +01:00
Sergio Martins
0e866079da
qtquick: Fix parentChanged() passing the wrong argument
...
QQuickItem::parentChanged(QQuickItem *parent) passes the *new*
parent, not *this*
Fixes #243 which is actually invalid, but uncovered this bug.
For #243 you can just use sender(), or connect to a lambda that
captures the dock widget.
2021-10-12 11:46:16 +01:00
Sergio Martins
a8bd6ba840
Fix corrupt layout when restoring old JSON
...
If the old *.json file doesn't know about some new docked widget
then we need to float it before restoring the main window
Fixes #237
2021-10-12 11:16:15 +01:00
Sergio Martins
96aefdd3c7
Make tst_restoreNonExistingDockWidget more minimal
...
dock1 isn't required
And it's ok that dock2 remains open, the bug is actually that it
doesn't get resized when we resize the main window
2021-10-11 00:50:53 +01:00
Sergio Martins
753fe57b30
Add a failing test for bug #237
2021-10-11 00:25:10 +01:00
Sergio Martins
9587c1b1e3
Add a test for issue #245
...
I can't repro still. Will wait for more feedback from reporter.
2021-10-10 19:32:27 +01:00
Sergio Martins
bc1b296440
README: Explain that StyleSheets are not supported
...
It's intentional.
Closes #246
2021-10-10 19:20:00 +01:00
Allen Winter
5626b0120d
PySide[2,6]ModuleBuild.cmake - restore noisy compiler warnings removal
...
somehow got lost
2021-10-05 17:08:32 -04:00
Allen Winter
e5d2f5f857
PySide[2,6]ModuleBuild.cmake - restore noisy compiler warnings removal
...
somehow got lost
2021-10-03 16:54:26 -04:00
Allen Winter
3eb52c46b1
python/examples/main.py - add instructions to generate rc_assets.py
2021-09-30 15:57:22 -04:00
Allen Winter
aaa64bf769
Merge pull request #248 from KDAB/pyside6-unittest
...
Fixed unit test for PySide6
2021-09-30 15:49:17 -04:00
Renato Araujo
b7b1d6d4e9
Fixed unit test for PySide6
2021-09-30 06:04:52 -07:00
Allen Winter
a90417de55
python/examples-qt6/main.py - uncomment rc_assets
...
commented by mistake
2021-09-29 17:17:54 -04:00
Allen Winter
73f08df224
Merge pull request #247 from KDAB/python38
...
Fixed module import for python 3.8
2021-09-29 16:41:26 -04:00
Renato Araujo Oliveira Filho
db9babbdca
Fixed module import for python 3.8
2021-09-29 13:36:16 -07:00
Allen Winter
463dd2261e
various - spelling fixes
2021-09-28 16:45:44 -04:00
Allen Winter
4dd66969af
examples/dockwidgets/MyTitleBar_CSS.h - add multiple include guard
2021-09-28 16:36:55 -04:00
Allen Winter
2c98003219
CMakeLists.txt,python/tests/CMakeLists.txt - minor coding style
2021-09-28 16:28:51 -04:00
Allen Winter
dd853a8f72
python/tests/ - add copyright+license header
2021-09-28 16:24:35 -04:00
Allen Winter
88d5e6b29d
Merge pull request #242 from KDAB/python-unittest
...
Fixed import module for windows and python 3.7
2021-09-28 16:03:40 -04:00
Renato Araujo
71e5d8cc31
Fixed import module for windows and python 3.7
...
create unit test
2021-09-28 14:45:52 -03:00
Allen Winter
15b3843172
../KDAB/modules/PySide6ModuleBuild.cmake - set INSTALL_PATH for Mac
...
on Mac we need to set the rpath to "@loader_path"
2021-09-27 16:42:07 -04:00
Allen Winter
3cffe3b3be
../KDAB/modules/PySide2ModuleBuild.cmake - set INSTALL_PATH for Mac
...
on Mac we need to set the rpath to "@loader_path"
2021-09-27 16:27:54 -04:00
Allen Winter
9dd87b7777
python/PyKDDockWidgets/CMakeLists.txt - fix TARGET_SONAME_FILE
...
TARGET_SONAME_FILE isn't supported on Windows
2021-09-27 15:46:23 -04:00
Allen Winter
b057cf905b
python/examples-qt6/main.py - uncomment rc_assets
...
commented by mistake
2021-09-27 12:59:59 -04:00
Allen Winter
d7943d30d8
cmake/KDAB/modules/PySide6ModuleBuild.cmake - add rpath property
...
follow PySide2ModuleBuild.cmake
2021-09-27 12:59:19 -04:00
Renato Araujo Oliveira Filho
1826d68841
Install library so into python module dir
...
We do the same a PySide and install the target library into the python
module this. This way the bindings can work without need to export
system paths.
2021-09-25 11:02:18 +01:00
Allen Winter
dc1e5103e2
docs/api/CMakeLists.txt - use INSTALL_DOC_DIR
...
install api docs files to ${INSTALL_DOC_DIR},
not to ${CMAKE_INSTALL_DOCDIR}
2021-09-20 17:28:48 -04:00
Sergio Martins
33c5647e57
Don't create duplicate central frame with restoring
...
When using MainWindowOption_HasCentralFrame we have a persistent
central frame which is never destroyed. When restoring a layout
we shouldn't create it, as it exists already.
2021-09-20 12:26:45 +01:00
Waqar Ahmed
f6f772edc5
Fix leaks in kddockwidgets_example
2021-09-17 11:27:09 +01:00
Allen Winter
7e460d8f34
examples/main.py, examples-qt6/main.py - uncomment import
...
uncomment the import rc_assets (commented by mistake)
2021-09-12 11:24:28 -04:00
Waqar Ahmed
7af2095f2f
Allow switching tabs via context menu in the tabs area
...
This change allows you to switch tabs via the context menu. The context
menu only shows up if you click on the empty area beside the tabs.
Can be tested with `--allow-switch-tabs-via-menu` option in the example.
Fixes #232
Signed-off-by: Waqar Ahmed <waqar.ahmed@kdab.com >
2021-09-11 12:46:23 +01:00
Waqar Ahmed
8307598d5d
tests: Fix tests, only repro in some distros
2021-09-11 12:17:50 +01:00
Waqar Ahmed
13fe276dbe
Fix possible division by zero
2021-09-11 12:05:00 +01:00
Sergio Martins
13a5a472cd
Fix build
2021-09-08 23:17:39 +01:00
Sergio Martins
b5c11ce199
example: Add an example about using stylesheets
2021-09-08 23:14:47 +01:00
Sergio Martins
83c8c22736
Add a TitleBar::isFocused property so we can use with qss
...
This has nothing to do with QWidget::hasFocus, but regarding our
focus scope support
2021-09-08 22:31:51 +01:00
Sergio Martins
c8ca7bf9e1
Allow TitleBarWidget to honour the stylesheet background color
2021-09-08 20:22:20 +01:00
Milian Wolff
0184deb54d
Don't set CMAKE_MODULE/SHARED_LINKER_FLAGS in PARENT_SCOPE
2021-09-08 18:01:47 +02:00
Milian Wolff
389042f3cc
Unbreak clang+asan build
...
Don't set -Wl,--no-undefined in such a configuration as it's not
supported, contrary to gcc+asan.
2021-09-08 16:13:03 +01:00
Sergio Martins
736358a71f
cmake: Introduce KDDockWidgets_X11EXTRAS option, default ON
...
Use -DKDDockWidgets_X11EXTRAS=OFF to disable it, if you don't want
to link to Qt5X11Extras.
I've added a new option instead of relying on auto-detection, because
I want to make it difficult to disable it when on X11, it's opt-out.
X11Extras is needed when window managers don't have compositors, in
that case we use icons without transparency.
2021-09-07 12:19:20 +01:00
Sergio Martins
bffe671679
Fix QtQuick build
2021-09-04 20:11:35 +01:00
Sergio Martins
fafc0b7946
Fix "normal geometry" not being restored
...
When restoring a maximized window, calling QWidget::showNormal()
on it wouldn't set it's previous non-maximized size.
QWidget::normalGeometry() doesn't have a setter, so use private API.
2021-09-04 19:59:03 +01:00
Sergio Martins
3574feea98
Added isNormalWindowState()
...
As QWidget doesn't have it.
2021-09-04 13:38:06 +01:00
Sergio Martins
25b48920bb
Make FloatingWindow::normalGeometry() virtual
...
So it can be overridden by QtQuick, since there's no "normal geometry"
for QWindow.
Also useful to workaround window manager bugs in a class derived from FloatingWindow.
2021-09-03 15:33:46 +01:00
Sergio Martins
e22ca48674
Fix QtQuick build
2021-09-03 00:18:42 +01:00
Sergio Martins
3b9773f872
Add support for restoring minimized/maximized floating window state
2021-09-02 18:32:35 +01:00
Sergio Martins
3e3cf10fff
Allow to override FloatingWindow maximization/minimization
...
So users can workaround bugs in window managers / Qt, such as QTBUG-95478
The custom behavior needs to be done in a FloatingWindow sub-class,
as a generic workaround which doesn't break other window managers isn't
possible
2021-09-02 18:08:13 +01:00
Sergio Martins
421b401b4f
qtquick: Added QWidgetAdapter::isMinimized()
2021-09-02 17:31:05 +01:00
Sergio Martins
a0c97e3388
Fix layout save restore when using MainWindowOption_HasCentralWidget
...
Those checks don't make sense anymore
2021-09-02 11:05:57 +01:00
Sergio Martins
d2a3968897
tests: Add tests for MainWindowOption_HasCentralWidget
2021-09-02 10:53:08 +01:00
Sergio Martins
4ea7953a76
Don't allow to overlay central widget
2021-09-02 10:52:56 +01:00
Sergio Martins
0cc0972eea
Don't allow to close/float/tab persistent central widget
...
Fixes corner cases with MainWindowOption_HasCentralWidget
2021-09-02 10:30:34 +01:00
Sergio Martins
77b5d1630d
Added DockWidget::isPersistentCentralDockWidget()
2021-09-02 10:24:43 +01:00
Sergio Martins
f962989484
Fix MainWindow::addDockWidgetAsTab with MainWindowOption_HasCentralWidget
...
When using central widget no tabs are supported
2021-09-02 10:17:37 +01:00
Sergio Martins
1ccdf445eb
Introduce MainWindowOption_HasCentralWidget
...
You can now set an arbitrary widget as "central widget".
It's similar to MainWindowOption_HasCentralFrame, however the widget
won't be detachable and won't show tabs.
Similar to what you'd get with QMainWindow central widget concept.
Example:
QWidget *myWidget = new MyWidget();
mainWindow->setPersistentCentralWidget(myWidget);
Fixes #225
2021-08-30 10:12:46 +01:00
Sergio Martins
3fb8861eee
Remove "EXPERIMENTAL" comment from MDI option
...
MDI doesn't have known bugs
2021-08-29 17:43:21 +01:00
Allen Winter
78381badd1
docs/api/Doxyfile.cmake - not generating latex
...
hard-code LATEX_CMD_NAME to latex since we won't
be generating the latex documentation; else we
have an ununitialized variable for @LATEX_COMPILER@
2021-08-25 15:26:32 -04:00
Allen Winter
8b1a9f2a41
README.md - Add info about Using in Qt6 projects
2021-08-24 09:24:30 -04:00
Sergio Martins
9ee52a0011
Merge branch '1.4'
2021-08-22 16:34:25 +01:00
Sergio Martins
240169ce23
Fix bug where the central frame would be detached
...
We don't allow detaching the central frame.
Fixes #228
2021-08-22 16:33:19 +01:00
Allen Winter
97a431f367
docs/api/Doxyfile.cmake - set PAPER_TYPE to a4
...
a4wide is no longer supported
2021-08-19 12:29:44 -04:00
Allen Winter
3769ad9615
python/PyKDDockWidgets/CMakeLists.txt - link to Python3 dev libs
2021-08-19 11:28:18 -04:00
Allen Winter
8332ab3ddc
CMakeLists.txt - add LINKER_FLAGS fo various platforms
...
set CMAKE_SHARED_LINKER_FLAGS and CMAKE_SHARED_LINKER_FLAGS
- Linker warnings should be treated as errors
- Do not allow undefined symbols, even in non-symbolic shared libraries
2021-08-19 11:23:54 -04:00
Allen Winter
3b4a2f134f
docs/api/Doxyfile.cmake - don't use fullpaths to makeindex
...
@MAKEINDEX@ expands to the fullpath /usr/bin/makeindex
breaks 'make pdf' in build/docs/api/latex
2021-08-19 11:23:34 -04:00
Allen Winter
5899e3716c
CMakeLists.txt - Enable hidden visibility by default
...
"It's just good practice, catching some problems with missing
export macros that would otherwise only affect Windows,
and reducing the number of exported symbols on Unix."
2021-08-16 17:34:08 -04:00
Allen Winter
25bc05ae40
docs/api/CMakeLists.txt - introduce user variable QCH_INSTALL_DIR
...
provide a user settable variable (as in -DQCH_INSTALL_DIR=/path)
to override the qch file default installation location.
2021-08-16 17:29:48 -04:00
Allen Winter
f42629a6e5
docs/api/CMakeLists.txt - install the doxygen tagsfile
2021-08-16 17:28:58 -04:00
Allen Winter
192cb2daaa
buildsystem - a bit of re-organizing the docs/api CMake
2021-08-16 17:28:09 -04:00
Allen Winter
63cc87af2d
docs/api/Doxyfile.cmake - update and consistency
2021-08-16 17:25:31 -04:00
Allen Winter
3e1ea3ec67
Changelog - mention Qt6 co-installability
2021-08-16 17:21:26 -04:00
Allen Winter
c27a09c13c
Merge branch '1.4'
2021-08-16 13:28:02 -04:00
Allen Winter
b3486ebca8
CONTRIBUTORS.txt - update
2021-08-16 13:27:43 -04:00
Albert Astals Cid
6a7230e546
Update qt6-kddockwidgets.spec for new paths
2021-08-12 15:39:43 +02:00
Allen Winter
ca173de71d
CMakeLists.txt - fix typo "set(d fault_build_type)"
2021-08-12 07:35:40 -04:00
Allen Winter
5732e8ed14
CMakeLists.txt - minor reorganizing
2021-08-11 19:49:19 -04:00
Albert Astals Cid
5cc7a0864b
Fix KDDockWidgetsConfig to require the proper Qt version
...
And for Qt5X11Extras we only require it if building the Qt5 one
2021-08-11 16:26:10 +02:00
Albert Astals Cid
e4671f175c
Install the qt6 cmake targets in prefix lib/cmake/KDDockWidgets-qt6
...
So it does not collide with the qt5 files
2021-08-11 16:19:05 +02:00
Albert Astals Cid
17fd6b2454
Make Make qt5/qt6 documentation coinstallable
2021-08-11 15:44:19 +02:00
Albert Astals Cid
7ed3945d58
Make qt5/qt6 includes coinstallable
...
Even if they are "the same file" it's always good to not have packages
trying to install over the same files.
Since we don't want users to have to change their existing
#include <kddockwidgets/DockWidget.h>
We install the qt6 includes in include/kddockwidgets-qt6/kddockwidgets
and change the cmake target INTERFACE_INCLUDE_DIRECTORIES to be
"${_IMPORT_PREFIX}/include/kddockwidgets-qt6"
so everything is transparent for the user
2021-08-11 15:22:29 +02:00
Allen Winter
35de0a2fef
python/examples-qt6 - PySide6 and PyKDDockWidgetsQt6 version
2021-08-10 08:52:54 -04:00
Allen Winter
8a0e475f21
python/examples - "PySide" => "PySide2"
2021-08-10 08:43:12 -04:00
Allen Winter
63d14f2345
python/CMakeLists.txt - fix typo
2021-08-10 08:35:40 -04:00
Allen Winter
e91849759c
python/CMakeLists.txt - use PyKDDockWidgetsQt6 namespace for Qt6
...
follow PySide6 naming convention
2021-08-10 08:29:50 -04:00
Allen Winter
ee3a3af408
Merge branch '1.4'
2021-08-10 08:21:11 -04:00
Allen Winter
c470c89fc6
PySide6ModuleBuild.cmake - sync
2021-08-10 08:20:32 -04:00
Allen Winter
73cfa64ebb
python/PyKDDockWidgets/__init__.py.cmake - minor comment fix
2021-08-10 08:18:48 -04:00
Sergio Martins
ffe5d5f6cb
Merge branch '1.4'
2021-08-10 10:05:13 +01:00
Sergio Martins
aff4450b42
cmake: Install QWidgetAdapter_quick_p.h too
...
Fixes #224
2021-08-10 10:04:11 +01:00
Allen Winter
d40580c550
buildsystem - rename QT_MAJOR_VERSION to Qt_VERSION_MAJOR
...
as this is consistent with CMake style and other projects
2021-08-04 16:18:31 -04:00
Allen Winter
8e19b81eb9
cmake/KDAB/modules/KDQtInstallPaths.cmake - sync
2021-08-04 16:17:27 -04:00
Kevin Funk
d5191696e1
cmake: Remove explicit policy version settings
...
These are NEW by default already for the required CMake version
2021-08-04 07:55:54 +02:00
Allen Winter
1d01466181
Merge branch '1.4'
2021-08-03 07:18:37 -04:00
Allen Winter
1cead0e2b8
python/CMakeLists.txt - adapt to new upstream FindPySide
2021-08-03 07:17:50 -04:00
Allen Winter
aff4d426b8
Merge branch '1.4'
2021-08-02 19:15:00 -04:00
Allen Winter
4597cdeda8
cmake/Python - sync
2021-08-02 19:13:46 -04:00
Allen Winter
2e7f0bf51d
cmake/KDAB/module - sync
2021-08-02 19:11:39 -04:00
Allen Winter
fa551b84f6
Merge branch '1.4'
2021-08-01 11:19:17 -04:00
Allen Winter
ce105212ab
Doxyfile.cmake - more setting consistency
2021-08-01 11:18:21 -04:00
Allen Winter
31d4b62181
cmake/KDAB/modules/KDQtInstallPaths.cmake - sync
2021-07-30 13:04:12 -04:00
Allen Winter
7ec542a211
post-merge cleaning
...
rearrange top-level CMakeLists.txt
2021-07-29 17:04:45 -04:00
Allen Winter
e615d1c618
Merge branch '1.4'
2021-07-29 16:47:45 -04:00
Allen Winter
ce349d0fcd
buildsystem - improve installing to non-KDAB location
2021-07-29 16:42:07 -04:00
Allen Winter
c86813b1cb
CMakeLists.txt - remove CMake option KDDockWidgets_UNINSTALL
...
no longer needed since the uninstall target is created
only for "rooted" projects (ie. non-submodules)
2021-07-29 12:59:15 -04:00
Allen Winter
1fe651aaa7
CMakeLists.txt - re-organize. implement PROJECT_IS_ROOT
...
set KDDockWidget_IS_ROOT for detecting if this project
is being used inside another parent-parent (eg. submodule)
If not IS_ROOT then we don't build tests, examples, etc.
2021-07-29 12:56:39 -04:00
Allen Winter
ba7809236b
CMakeLists.txt - follow using PYSIDE_CUSTOM_PREFIX
2021-07-29 12:55:09 -04:00
Allen Winter
84814b3c59
FindPySide2.cmake,FindPySide6.cmake - sync
2021-07-29 12:54:09 -04:00
Allen Winter
73ca6e6671
buildsystem - install the Python bindings into standard "site-packages"
...
Follow Python standards and install the bindings into
<prefix>/lib/pythonX.Y/site-packages
sync the Python cmake files with KDAB repository
2021-07-23 12:05:02 -04:00
Sergio Martins
a26759f340
Remove .uncrustify file, as we use clang-format now
2021-07-22 10:13:32 -07:00
Sérgio Martins
200ef12b4a
Fix close icon being too dark
...
Fixes #208
2021-07-22 18:11:53 +01:00
Allen Winter
990fac9a0a
open for 1.5 - new features
2021-07-16 13:02:05 -04:00
Allen Winter
31ec4cdecb
Merge branch '1.4'
2021-07-16 12:59:32 -04:00
Allen Winter
1d968bd902
CMakeLists.txt, Changelog - open for 1.4.1
2021-07-16 12:59:12 -04:00
Allen Winter
69a632cfc2
conan/conanfile.py - Qt5.12 is required since 1.4.0
2021-07-16 12:53:21 -04:00
Allen Winter
9a784f1222
ready for 1.4.0 release
2021-07-16 11:13:13 -04:00
Allen Winter
4a390696d5
CMakeLists.txt - Set default CMAKE_BUILD_TYPE to Release for non-dev
...
In non-developer situations default CMAKE_BUILD_TYPE=Release
2021-07-16 09:42:43 -04:00
Allen Winter
68aaccadab
CMakeLists.txt - move the python bindings buildtype check
2021-07-16 09:38:56 -04:00
Allen Winter
3940228b59
various cmake files - minor coding style
2021-07-16 09:18:03 -04:00
Allen Winter
f8abe48c82
CMakeLists.txt - add more doc
2021-07-16 09:11:00 -04:00
Sergio Martins
86db81e5b7
README-QtQuick: Remove sentence about failing Qt6 tests
...
It was a false-positive, everything passes
2021-07-15 23:53:01 +01:00
Sergio Martins
34676f016f
qtquick: Blacklist a Qt6 test
...
Works fine manually.
Qt6 refactored input event handling, which broke our Tests::doubleClickOn(QWindow).
2021-07-15 23:50:06 +01:00
Sergio Martins
4448891315
tests: Increase timeout when trying to active dock widgets
...
When running with ASAN everything is slower.
Added a warning to tests fail sooner if this happens.
2021-07-15 20:50:58 +01:00
Sergio Martins
fc1f12b77c
cmake: Qt6 QtQuick clangcl preset needs help finding Qt6 plugins
...
The same was already done to the regular msvc one
2021-07-15 20:18:55 +01:00
Sergio Martins
a50057f5d2
cmake: Fix running the clangcl Qt6 presets on Windows
...
They need to set PATH
2021-07-15 20:14:48 +01:00
Sergio Martins
d7b32e475e
cmake: Normalize preset build dir of my clangcl preset
2021-07-15 20:11:30 +01:00
Allen Winter
e32aaccaac
Merge branch '1.4'
2021-07-15 13:30:58 -04:00
Allen Winter
8b695eec79
.codespellrc - codespell config
2021-07-15 10:26:20 -04:00
Allen Winter
c85904c67e
2 more misspelling fixes for contractions.
2021-07-15 10:25:53 -04:00
Allen Winter
22a709a39e
fix more misspellings
2021-07-15 10:14:04 -04:00
Allen Winter
4f4a5de700
fix misspellings found by codespell
2021-07-15 09:46:53 -04:00
Sergio Martins
08ecbb2ca6
qtquick: Mention Qt6+qtquick has failing tests
2021-07-15 10:59:23 +01:00
Sergio Martins
048b494874
cmake: Fix dev-qtquick6 preset
...
When running it, we need to set the correct qml import path,
otherwise it picks up Qt 5.
2021-07-14 23:31:57 +01:00
Allen Winter
1539d7233b
make/ECMGenerateHeaders.cmake - avoid uninit value
...
see upstream MR at:
https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/161
2021-07-14 16:00:32 -04:00
Sergio Martins
214dbdf359
qtquick: Fix clazy-connect-not-normalized
2021-07-14 16:10:07 +01:00
Allen Winter
473ce60340
cmake/ECM/modules/ECMGenerateHeaders.cmake - add missing
2021-07-13 18:39:58 -04:00
Allen Winter
74ba8c6bd2
src/CMakeLists.txt - coding style
...
consistent indentation, etc.
2021-07-13 16:59:53 -04:00
Allen Winter
11a1023e79
src/CMakeLists.txt - generate and install camelcase headers
...
for public headers and exported classes only
2021-07-13 16:58:25 -04:00
Sergio Martins
3302401a36
Merge branch '1.4'
2021-07-13 17:34:58 +01:00
Sergio Martins
3c5f07ac79
Update ChangeLog
2021-07-13 17:34:00 +01:00
Renato Araujo Oliveira Filho
c0c1383254
Python: Create bindings for InitialOption
...
Added bindings for missing enums
Added InitialOption as value type
Task-Id: #198
2021-07-13 17:33:50 +01:00
Renato Araujo Oliveira Filho
ec4a4d1c86
Python: Create bindings for InitialOption
...
Added bindings for missing enums
Added InitialOption as value type
Task-Id: #198
2021-07-13 17:33:09 +01:00
Sergio Martins
5ef330f479
vscode: Fix the build dir paths
...
They changed in the cmake preset
2021-07-13 17:32:54 +01:00
Allen Winter
bbdbadd630
CMakeLists.txt - add missing option() and feature_summary()
...
also some minor coding style and some more comments
2021-07-13 08:20:50 -04:00
Allen Winter
80a1483617
QtQuick support is no longer expermental
2021-07-13 08:06:30 -04:00
Sergio Martins
13a7d27046
vscode: Fix the build dir paths
...
They changed in the cmake preset
2021-07-13 08:27:21 +01:00
Sergio Martins
8800c02403
Fix persistent central frame becoming invisible
...
Wouldn't affect functionality but would have a different color.
Fixes #220
2021-07-13 08:19:05 +01:00
Allen Winter
dd9ec48979
DragController.cpp - fix multi-line comment [-Werror=comment]
...
caused by clang-format
2021-07-12 17:37:59 -04:00
Allen Winter
262d703608
cmake/ECM - sync with upstream
...
except for ECMEnableSanitizers.cmake which has local
changes we intend to upstream, if accepted.
2021-07-12 17:21:15 -04:00
Allen Winter
5629e1dfc2
.clang-format - set ColumnLimit to 0
...
else clang-format grows lines for you
2021-07-12 17:07:55 -04:00
Allen Winter
7001aa58ce
clang-format on code base
2021-07-12 17:05:37 -04:00
Allen Winter
d87898b59e
private/DragController.cpp - don't include QWindow more than once
2021-07-12 17:04:15 -04:00
Allen Winter
d1078adad2
.clang-format - SortIncludes: false
2021-07-12 16:41:32 -04:00
Allen Winter
e4f0fae7e5
.clang-format - ColumnLimit: 150
...
because SPDX tag lines are longer than 100 already
2021-07-12 16:38:08 -04:00
Sergio Martins
4b06706d61
Port away from deprecated QWidget::isTopLevel()
...
Fixes Qt6 warnings about it
2021-07-10 07:18:27 -07:00
Sergio Martins
7e1331bd76
cmake|Qt6: Add presets for clang-cl
2021-07-10 06:56:36 -07:00
Sergio Martins
f735f25fb0
cmake|qtquick: Add a preset for building with clang-cl
2021-07-10 06:52:35 -07:00
Sergio Martins
750c089ab0
windows: Use -Werror for clang-cl too
2021-07-10 06:49:14 -07:00
Sergio Martins
3088f33837
Fix non-windows build
2021-07-10 06:44:48 -07:00
Sergio Martins
1d598d2585
windows: Fix all clang-cl warnings
...
Mostly int vs uint conversions.
In preparation to add -Werror
2021-07-10 06:43:04 -07:00
Sergio Martins
768c51f01c
windows: Fix a -Wunused-lambda-capture warning
2021-07-10 06:27:23 -07:00
Sergio Martins
a2e2b32fc3
cmake: Don't pass -fvisibility=hidden to clang-cl
...
It's not supported
2021-07-10 06:22:24 -07:00
Sergio Martins
a6abf73669
cmake: Add a preset for clang-cl
...
clang has different warnings, so would like to build with it in
CI too.
2021-07-10 13:57:48 +01:00
Sergio Martins
a6e62ec74d
qtquick|tests: trying to stabilize a test in CI
...
Can't repro locally.
2021-07-10 13:44:15 +01:00
Sergio Martins
93441a5754
cmake: Use unity build for our release builds
...
Unity is much faster to build, specially on Windows
2021-07-10 13:38:24 +01:00
Sergio Martins
fe57686715
cmake: Remove "-qtwidgets" suffix from preset names
...
Only variants need a suffix (python, qtquick, static, etc).
The default is a qtwidgets build
2021-07-10 13:22:27 +01:00
Sergio Martins
330f5aebdf
cmake: Add -Wundef
2021-07-09 22:26:01 +01:00
Sergio Martins
02c17e59dd
relax a warning about not finding dock widget to restore
...
If the user provided a factory and it returns nullptr on purpose
then don't warn, it's intentional by the user
2021-07-06 23:12:49 +01:00
Sergio Martins
be8af12a90
cmake: Remove unneeded custom preset settings
...
I have this locally now, as it didn't have any kddw specific config
and I'm using it cross project, so makes more sense to have it
in a central location outside of kddw.
2021-07-05 22:51:09 +01:00
Sergio Martins
238193f56b
qtquick: DockWidget now receives QQmlEngine as param
...
If nullptr then the usual Config::qmlEngine() will be used.
2021-07-04 18:41:52 +01:00
Sergio Martins
54233085a4
tests: Add a warning to the blacklist
...
Don't abort on:
"Populating font family aliases took"
2021-07-03 21:51:02 +01:00
Sergio Martins
2241b938c9
qtquick|minor: Decouple a bit more from Config::self().qmlEngine()
...
Moves it up one layer, will be easier to remove
2021-07-03 17:26:59 +01:00
Sergio Martins
631d036c26
qtquick: Exclude two clazy-old-style-connect warnings
...
Those two cases are fine and required
2021-07-03 16:44:04 +01:00
Sergio Martins
d70f795dea
qtquick: Fix a -Wclazy-func-args-by-value
2021-07-03 16:39:25 +01:00
Sergio Martins
0be99d3e79
qtquick: Fix -Wclazy-missing-qobject-macro
2021-07-03 16:33:21 +01:00
Sergio Martins
45aab49be7
qtquick: Fix -Wclazy-fully-qualified-moc-types
...
Might even fix a few bugs as QML is very picky about this
2021-07-03 16:31:15 +01:00
Sergio Martins
2c66238791
qtquick: Fix a -Wclazy-returning-void-expression and missing Q_EMIT
2021-07-03 16:27:36 +01:00
Sergio Martins
bec1ddae67
qtquick: Fix a -Wclazy-range-loop-reference
2021-07-03 16:27:30 +01:00
Sergio Martins
913d3b263d
cmake: Don't build the examples when using the clazy preset
...
The clazy warning set is more strict for the library than for the
examples. For CI purposes and -Werror it's the library that matters.
2021-07-03 16:24:15 +01:00
Sergio Martins
614e20a183
cmake: Add a preset for clazy qtquick
2021-07-03 16:19:28 +01:00
Sergio Martins
f9f270980d
tests: Fix flaky test
...
The center indicator isn't exactly at the center of the window,
so this would fail sometimes. This is a quick workaround.
Will all API to the dock indicator interface if this isn't enough.
2021-07-03 10:46:26 +01:00
Sergio Martins
763b878ca1
qtquick|README: Mention that C++17 is required
2021-07-02 22:58:03 +01:00
Sergio Martins
d3d040adee
qtquick: Fix tab current widget being wrong when current is removed
...
When the current dock widget is removed we need to assign another
one. QTabBar does this automatically.
Fixes #215
2021-07-02 22:54:20 +01:00
Sergio Martins
31f5cc10cf
qtquick: Add qWarning() when there's no current index in tabWidget
2021-07-02 22:34:46 +01:00
Sergio Martins
38c9a3d9c6
qtquick: Require C++17
...
Fixes build due to not finding <optional>
2021-07-02 22:33:34 +01:00
Sergio Martins
362f2d5750
qtquick: Add a failing test for #215
2021-07-02 16:56:40 +01:00
Sergio Martins
463b6a1322
qtquick: Fix using initial visibility option
...
Needs to be fully qualified.
Added an example.
Fixes #212
2021-07-02 16:41:49 +01:00
Sergio Martins
00a95ac468
Fix invisible tabbar from eating hover events
...
Fixes #214
2021-07-02 16:15:04 +01:00
Sergio Martins
966f30e356
qtquick: Fix dock widgets not getting title
...
Title can be set before onComplete(), so we need to remember it
Fixes #218
2021-07-02 15:05:55 +01:00
Sergio Martins
f0217f53c2
qtquick: Update README with warning against QtGraphicalEffects
2021-07-02 00:02:23 +01:00
Sergio Martins
ced1c4dcc8
TabWidgetWidget: Don't hardcode margins, so we support DPI != 96
...
For people using font DPI instead of DPR
2021-07-01 22:17:31 +01:00
Sergio Martins
e1578436d0
Added Flag_ShowButtonsOnTabBarIfTitleBarHidden
2021-07-01 18:08:41 +01:00
Sergio Martins
701df72db6
Remove some ifdefs regarding 5.9
...
The one missing QT_VERSION_CHECK was even wrong and triggering
even with Qt 5.15.
2021-07-01 16:54:44 +01:00
Sergio Martins
c4ebef1f1e
Remove an ifdef only relevant to older Qt
2021-07-01 16:50:01 +01:00
Allen Winter
6f0eb7a2f2
Merge branch '1.3'
2021-06-30 12:19:37 -04:00
Allen Winter
be6c3ca2df
move OBS files into a distro folder, add qt6 project
2021-06-30 12:19:09 -04:00
Sergio Martins
18b49686f1
tests|qtquick: Remove the XFAIL, fixed by #211
2021-06-29 00:15:48 +01:00
Eism
02d4611501
Fixed toggling dock widgets
2021-06-29 00:16:14 +01:00
Sergio Martins
2fe8117e80
tests: Add a QVERIFY
2021-06-28 23:46:58 +01:00
Sergio Martins
457ea402d5
qtquick|example: Fix toggling not working on non-current tab
...
A non-current tab isn't visible, its dock widget is however opened.
Relates to #211
2021-06-28 23:30:05 +01:00
Sergio Martins
89623eb8b4
tests|qtquick: Add a test for weirdness reported in #211
...
Not the exact issue from #211 , but more tests will follow
2021-06-28 22:27:11 +01:00
Sergio Martins
df02382387
cmake: Add a personal preset config
...
So I can build on my mac from my linux box
2021-06-28 21:04:07 +01:00
Allen Winter
7470d62b7c
Merge branch '1.3'
2021-06-26 09:42:06 -04:00
Allen Winter
9eb9018f47
docs/api/CMakeLists.txt - fix link from mainpage to README-bindings
2021-06-26 09:40:44 -04:00
Allen Winter
d7bcbe666c
Require Qt5.12 or higher
2021-06-26 08:46:52 -04:00
Sergio Martins
aaa5b4ba26
README: Mention 6.1 is the first Qt6 version we support
...
Nobody is using 6.0 in production, so let's forget about it
2021-06-25 23:28:28 +01:00
Allen Winter
720dad1ed6
clean comment of double words "to to" and "the the"
2021-06-25 10:21:33 -04:00
Sergio Martins
6417db6d91
Added Config::InternalFlag_DisableTranslucency
...
In case one doesn't want to use the env variable
2021-06-25 14:38:19 +01:00
Sergio Martins
ec681e99ca
Disable translucency when KDDW_NO_TRANSLUCENCY env var is set
...
Useful for running on weird window managers which don't support
transparent windows.
2021-06-25 14:31:00 +01:00
Sergio Martins
47ef203643
qtquick|minor: Remove a call to Config::self().qmlEngine()
2021-06-23 19:03:40 +01:00
Sergio Martins
844aa2f36a
qtquick|minor: Move qml engine one level up
2021-06-23 18:37:34 +01:00
Sergio Martins
e2e8f10948
Fix QtQuick tests
2021-06-22 23:40:40 +01:00
Sergio Martins
1c49e2297a
Fix QtQuick build
2021-06-22 23:22:02 +01:00
Sergio Martins
6f031e3c33
Windows: Fix initial FloatingWindow size in HDPI
...
When:
- Screen A (100%), B (150%)
- MainWindow on screen B
- Trying to open a floating window on screen A (via setGeometry())
The Qt Windows QPA would error out when setting the geometry and it
would be too small.
The solution is to call setGeometry() before we create the QWindow.
Too much of an edge case to risk putting this on 1.3 branch.
Will be in 1.4.0.
Fixes #191
2021-06-22 23:09:38 +01:00
Sergio Martins
f74fd52d53
DebugWindow: When dumping windows don't dump the DebugWindow itself
2021-06-22 17:27:27 +01:00
Sergio Martins
2d4cef670b
Fix build with qtquick
2021-06-21 08:50:36 +01:00
Sergio Martins
dfaf455624
Add support for the rubber bands to be top-level
...
Worksaround a bug where they can't be transparent when embedded
in a MFC application
2021-06-20 21:26:43 +01:00
Allen Winter
5d2e09de36
.reuse/dep5 - add more files
2021-06-19 10:34:45 -04:00
Allen Winter
c86de50032
.resuse/dep5 - REUSE copyright+license for artwork, etc
2021-06-19 09:55:48 -04:00
Sergio Martins
5ff720f432
Export DropArea, has some useful symbols
2021-06-18 17:51:36 +01:00
Sergio Martins
6f7e47324c
Minor: improve an include
2021-06-18 17:50:42 +01:00
Sergio Martins
b68f81779c
Fix possible crash
...
Observed with an MFC application
2021-06-18 16:02:33 +01:00
Sergio Martins
4c1b433269
Fix a -Wclazy-fully-qualified-moc-types error
2021-06-17 22:02:35 +01:00
Sergio Martins
7c63da18ed
Remove some dead code
...
Both if branches already return something
2021-06-17 13:03:00 +01:00
Sergio Martins
6f2e5ecc3b
Add a missing qglobal.h include
2021-06-17 13:00:48 +01:00
Sergio Martins
759cf33f08
Windows: Link to Dwmapi.lib via pragma
...
So I don't have to figure out some exotic non-cmake build systems
It's more self-contained this way anyway.
2021-06-16 12:41:40 +01:00
Sergio Martins
77279d21ef
Fixed a MSVC warning about unreachable code
2021-06-16 12:32:25 +01:00
Sergio Martins
46872fdfe8
Fix build if each header is built individually, probably
...
This header is included by QWidgetAdapter.h, but if some exotic
build system builds QWidgetAdapter_widgets_p.h individially then
we need to forward declare some functions
2021-06-15 21:35:55 +01:00
Sergio Martins
79fe9c2875
cmake: Remove private/ from our PRIVATE include path
...
Because some build systems don't support public/private includes,
and would require us to add private/ to the public include path.
This allows for an easier integration with some more exotic
build systems
2021-06-15 19:53:05 +01:00
Allen Winter
f04ea37ac2
appveyor.yml - disable email notification on build_success
2021-06-15 12:04:01 -04:00
Sergio Martins
d2db92f1e7
Remove private/multisplitter/ from private include path
...
It's not needed.
Even wrong since then ../LayoutSaver_p.h would work
2021-06-15 16:46:07 +01:00
Sergio Martins
206433e430
Fix embedding in non-KDDW QMainWindow
...
Supports the case of having our KDDW MainWindow parented to another
main window. Was broken on Windows.
2021-06-14 06:43:06 +01:00
Allen Winter
fb1f3fa931
CMakeLists.txt - ECM doesn't support generating pri files for Qt6 yet
2021-06-09 09:12:14 -04:00
Allen Winter
3d106ae2f1
python/CMakeLists.txt - fix for Qt6Widgets_VERSION
2021-06-08 19:01:31 -04:00
Sergio Martins
05f0a6463b
Remove unnused AnimatedIndicators
2021-06-08 16:53:12 +01:00
Allen Winter
7b5d5d0f31
buildsystem - fix some --warn-uninitialized
2021-06-08 10:44:33 -04:00
Allen Winter
20174989a6
Merge branch '1.3'
2021-06-08 09:20:33 -04:00
Allen Winter
80d48adc07
docs/api/Doxyfile.cmake - set PROJECT_NUMBER to major.minor
...
don't use the patch level in the PROJECT_NUMBER
2021-06-08 09:19:53 -04:00
Allen Winter
3454185df4
Merge branch '1.3'
2021-06-07 17:14:25 -04:00
Allen Winter
9de0868c74
open for 1.3.2 (unknown yet if there will be such a thing)
2021-06-07 17:13:07 -04:00
Allen Winter
66cb6c7dee
kddockwidgets.spec - fix for CentOS
2021-06-07 16:32:17 -04:00
Allen Winter
1ce67b1c8f
prep for 1.3.1 release
2021-06-07 16:09:03 -04:00
Allen Winter
a9bb5b2f42
README.md - in Using section talk about CMAKE_PREFIX_PATH
...
was mistakenly CMAKE_MODULE_PATH
2021-06-07 16:01:27 -04:00
Allen Winter
97ca7fd2a0
CONTRIBUTORS: sync with master
2021-06-07 15:32:42 -04:00
Roman Pudashkin
b85e291d40
need to remove the old filter instead of the new one
2021-06-05 16:09:04 +01:00
Allen Winter
b3e3752789
.travis.yml, appveyor.yml - tweak email notification
...
notify on failures only
2021-05-28 08:41:16 -04:00
Sergio Martins
7cd6928b87
README: Add a travis "Build Passing" label
2021-05-25 22:07:33 +01:00
Sergio Martins
bb1b3c7b7b
Fix non-windows developer build
...
Build was complaining about unused function
2021-05-25 14:06:14 +01:00
Allen Winter
49c7cea3a5
.travis.yml - apt install libqt5x11extras5-dev
2021-05-25 08:54:33 -04:00
Allen Winter
64f5009297
.travis.yml appveyor.yml - add travis-ci and appveyor CI
2021-05-25 08:48:01 -04:00
Eism
0ab701bab6
qtquick: Fix detecting top level geometry
...
For QtQuick we want the QWindow geometry. For QtWidget it just works,
as the top level widget as the same geometry as the window, unlike
QQuickItem.
Fixes issue #199
2021-05-24 11:45:37 +01:00
Sergio Martins
1721415799
Fix more warnings at shutdown
2021-05-23 22:42:26 +01:00
Sergio Martins
26269459db
qtquick: Fix some warnings at shutdown
2021-05-23 22:37:42 +01:00
Sergio Martins
675da6b2e2
qtquick: Fix test on linux
...
Querying drop indicator doesn't work if indicator window
isn't visible, so actually do a full drag.
For issue #199
2021-05-23 22:06:05 +01:00
Sergio Martins
517bfca259
Add a unit-test for issue #199
2021-05-23 12:20:20 +01:00
Eism
3e30685eb4
Expose MainWindowBase::windowGeometry(), so it can be used
...
Just moves the code from private to public.
For issue #199
2021-05-23 11:34:53 +01:00
Roman Pudashkin
95cbba4618
qtquick: Fix crash by using deleteLater()
...
For issue #200
2021-05-22 10:22:58 +01:00
Sergio Martins
d89c6b9c06
qtquick|windows: Fix potential crash with offscreen QPA
...
Which also fixes a test. Now all tests pass.
The explanation was added in a comment.
2021-05-21 23:46:42 +01:00
Sergio Martins
4bda994d5c
qtquick: Fix Qt6 warning about "mouse" being injected
2021-05-21 16:44:30 +01:00
Sergio Martins
2b4f6f33af
qtquick: Fix Qt6 build
2021-05-21 16:38:12 +01:00
Sergio Martins
62500a322f
qtquick: Fix calling titleBarFilename() function
...
Probably worked before, but the argument was bogus, as the
function doesn't accept arguments
2021-05-21 09:47:09 +01:00
Sergio Martins
ae58a8b9df
Fix boolean variables being accessed before initialization
...
As detected by ASAN:
ClassicIndicators.cpp:66:12: runtime error: load of value 190, which is not a valid value for type 'bool'
2021-05-21 09:24:58 +01:00
Sergio Martins
2a8732fdcd
cmake: Add preset for qtquick developer-build
2021-05-20 23:40:23 +01:00
Sergio Martins
19931ec18e
cmake: Fix my Qt6 builds
2021-05-20 23:38:47 +01:00
Sergio Martins
b981fc4b7d
qtquick: Fix tst_dockWindowWithTwoSideBySideFramesIntoCenter()
...
Moving windows around is async for QtQuick and needs a wait
2021-05-20 22:44:58 +01:00
Sergio Martins
4b2f268921
qtquick: fix tst_positionWhenShown on Windows
2021-05-20 22:44:26 +01:00
Sergio Martins
7fb5a8d444
Merge branch '1.3'
2021-05-20 18:54:18 +01:00
Sergio Martins
913cc16371
Fix failing test on Windows due to the button hack
...
During tests, our mouse button isn't really pressed, as we
send fake press events. Only use the workaround in production.
2021-05-20 18:47:32 +01:00
Sergio Martins
4e8a9ff8ed
tests: fix a flaky test on Windows
...
The drop area doesn't fill the floating window, so the
center was off and the drop didn't happen
Additionally, disabled AeroSnap, for debugging purposes, so we can
actually see the window moving, otherwise it doesn't move, since
we can't fake a native drag. It's just a visual bonus, doesn't
affect the correctness.
2021-05-20 18:28:23 +01:00
Sergio Martins
68034de1a7
cmake: Fix ASAN not actually being enabled
...
Was only enabled for the tests.
Needed to move it up.
2021-05-20 16:41:10 +01:00
Sergio Martins
f67d8615ca
cmake: Remove manually setting ASAN on Windows
...
It's done by ECM now
2021-05-20 16:30:23 +01:00
Sergio Martins
4483c921ea
ECM: Added MSVC sanitizer support
...
Written by me, will squash it once upstream has it.
There's some patches in review upstream.
2021-05-20 16:19:48 +01:00
Sergio Martins
e8732ecfc0
ECM: sync sanitizers with upstream
2021-05-20 16:19:06 +01:00
Sergio Martins
71a538651a
Enable ASAN on Windows too
2021-05-18 16:00:54 -07:00
Sergio Martins
18c9963124
qtquick|tests: Fix tst_lastFloatingPositionIsRestored
...
We need to compare the position of the Window
2021-05-18 15:00:21 -07:00
Sergio Martins
cd0f2f4e33
Introduced Config::setDropIndicatorsInhibited(bool)
...
Allows you to disable support for drop indicators while dragging
2021-05-18 18:00:04 +01:00
Sergio Martins
fc028ec0be
Minor refactoring
2021-05-18 17:49:14 +01:00
Sergio Martins
2dbdb9f7eb
qtquick: Fix restoring QWindow's geometry
...
We need to resize the QWindow.
Fixes issue #196
2021-05-17 22:46:56 +01:00
Sergio Martins
50f6e76e81
qtquick|examples: Don't call them "MainWindow"
...
Rather "main layout", as they are not top-levels, unlike for
QWidgets
As suggested in issue #196
2021-05-17 22:27:34 +01:00
Sergio Martins
c6af93adcb
qtquick: When saving geometry, save the QWindow geometry
...
As that's what we'll restore. The "MainWindow" isn't an actual
main window, and it's parented in some QtQuick hierarchy.
Will help with issue #196 , which isn't fixed yet.
Should be fixed in the restore part next.
2021-05-17 22:20:44 +01:00
Sergio Martins
bd985781b9
Minor refactoring
2021-05-17 22:13:17 +01:00
Sergio Martins
70ecdaf54c
Add a failing test for issue #196
2021-05-17 21:12:59 +01:00
Allen Winter
a04287b9b3
README - adjust copyright date
2021-05-16 11:08:08 -04:00
Allen Winter
be8d00f0c8
buildsystem - KD namespace the KDAB cmake modules
2021-05-16 11:03:21 -04:00
Allen Winter
b08797c400
docs/api/footer.html - add Copyright and generatedby
2021-05-16 10:58:01 -04:00
Sergio Martins
2836edd32d
qtquick: Add a test to see that main window position is restored
...
Will improve it with QtQuick corner cases
2021-05-10 23:04:37 +01:00
Allen Winter
92f6886217
Merge branch '1.3'
2021-05-10 15:40:46 -04:00
Allen Winter
0c9518dc74
.krazy - skip CMakePresets.json
...
the json formatter saves it without a trailing newline
no need to test this generated file
2021-05-10 15:40:00 -04:00
Allen Winter
944ee7c7dc
Merge branch '1.3'
2021-05-10 12:58:13 -04:00
Allen Winter
917dbf09f6
README.md, README-bindings.md - breakout python bindings readme.
...
The python bindings info is getting long and detailed
so move to its own README.
2021-05-10 12:56:59 -04:00
Sergio Martins
d732be4e17
Merge branch '1.3' into master
2021-05-04 23:41:23 +01:00
Sergio Martins
18dbbb291a
Cancel drag when Qt doesn't detect that mouse was released
...
On Windows there can be a case where Qt doesn't receive the mouse
release event. When releasing very fast after starting the drag.
Fixes #166
2021-05-04 23:36:50 +01:00
Sergio Martins
3bb7922f2c
comments++
2021-05-02 13:05:27 +01:00
Sergio Martins
4aedba3b2b
Minor: Pass QPoint by value, as it's a small POD class
2021-05-02 13:01:27 +01:00
Eism
99c0e99b26
Implemented the method for adjusting the position of a dragged item
2021-05-02 13:00:43 +01:00
Sergio Martins
28ab554cb3
comments++
2021-05-02 12:49:07 +01:00
Sergio Martins
cd80a47c93
qtquick|tests: Fix tst_layoutEqually
...
Resizing QtQuick's QWindow is async, doesn't propagate the size
immediately to the content QQuickItem.
Meaning we were passing a too small/old size to the layout.
Add qMin() so we don't pass sizes that are smaller than the layout's
min-size.
2021-05-02 12:30:53 +01:00
Sergio Martins
eb05b54b0e
Added DockWidgetInstantiator::close()
2021-05-02 11:35:16 +01:00
Sergio Martins
bbbce6f694
qtquick: Fix close() not hidding the widget
...
QtQuick will emit a "visibleChanged(true)" when setting nullptr,
which we need to inhibit so it behaves like QtWidgets.
2021-05-02 11:22:26 +01:00
Sergio Martins
ba0d515330
qtquick: Don't run tst_maxSizedFloatingWindow
...
We only support max-size constraints for QtWidgets, for now.
2021-05-02 00:19:47 +01:00
Sergio Martins
69154c0384
qtquick: Make setParent(nullptr) to hide the widget too
...
As done for QtWidgets.
Fixes a case where closing the dock widget wouldn't hide it.
As reported by Roman
2021-05-02 00:11:58 +01:00
Sergio Martins
66ac5e9d2f
qtquick: Install DockWidgetQuick.h too
2021-05-01 20:46:01 +01:00
Sergio Martins
4924b951cc
qtquick: Don't include private header in public header
...
Q_PROPERTIES in Qt6 don't support forward declarations.
Return a QObject instead.
2021-05-01 20:38:06 +01:00
Allen Winter
96f7def396
Merge branch '1.3'
2021-05-01 15:38:38 -04:00
Sergio Martins
4556f1c949
quick|cmake: Don't install a few qtwidgets includes
...
Install their qtquick counterparts instead
2021-05-01 20:20:59 +01:00
Sergio Martins
a4cca3bcc2
Merge pull request #195 from RomanPudashkin/setTabbingAllowedFunc_fix
...
Fixed the API for disabling the tab indicator
2021-05-01 20:10:44 +01:00
Sergio Martins
6254c2089f
Add two new contributors
2021-05-01 20:05:46 +01:00
Sergio Martins
89f50769b6
cmake: Remove unneeded build presets
...
The default/implicit one is enough for those cases
2021-05-01 19:59:14 +01:00
Sergio Martins
a24f5e31b9
Merge pull request #192 from RomanPudashkin/setMaximumSize_fix
...
Fixed changing of the maximum size for widgets
2021-05-01 20:00:26 +01:00
Allen Winter
b338f183e1
CONTRIBUTORS.txt - added more contributors
2021-05-01 12:30:48 -04:00
Sergio Martins
8ab8e0524b
Workaround Qt bug which broke the focus chain
...
Focusing a tab widget would focus an hidden tab bar, which makes
the propagation stop
Fixes #180
2021-04-30 15:59:27 +01:00
Sergio Martins
affb48f44d
Fix restoring side-bar widget when it was deleted previously
...
We need to consult the user's widget factory, just as we do
for other cases where the dock widget is missing
2021-04-29 21:36:56 +01:00
Sergio Martins
d5b2336b69
refactoring: Move the dockWidgetFactoryFunc() call
...
It's now an impl-detail of DockRegistry::dockByName().
Just pass DockByNameFlag::CreateIfNotFound.
Allows this functionality to be used in other places
2021-04-29 21:29:58 +01:00
Sergio Martins
580e3a6a2c
Coding style: Replace a bool argument with an enum
...
Since we'll be adding more enumerators
2021-04-29 21:20:26 +01:00
Roman Pudashkin
e3d5203f1a
fixed the API for disabling the tab indicator
2021-04-29 21:50:17 +02:00
Sergio Martins
9e42b11272
Minor coding styling
2021-04-29 18:15:45 +01:00
Sergio Martins
ce93c3b739
qtquick: Fix memory leak
2021-04-29 18:15:33 +01:00
Sergio Martins
6a8e00bfa2
tests: Test restoring with DeleteOnClose and sidebar widgets
...
sidebar dock widgets which were deleted should still call
the user's dock widget factory
To be done next
2021-04-29 18:06:41 +01:00
Sergio Martins
0b5a99860f
qtquick: Fix calling QWindow::setTitle()
...
For QtWidgets, it happens fine in FloatingWindow's constructor,
because we get the corresponding QWindow already. But for QtQuick
the QWindow is only created afterwards, so we have to delay
setting the title.
2021-04-29 17:18:35 +01:00
Sergio Martins
3f012a2ef1
Remove a bogus setWindowTitle()
...
Setting a widget would change the top-level window title!
By luck people set the widget before docking, but doesn't have
to be that way.
2021-04-29 16:23:22 +01:00
RomanPudashkin
a102e4ae1e
fixed changing of the maximum size
2021-04-29 13:20:56 +02:00
Sergio Martins
03f5817488
Merge branch '1.3'
2021-04-28 22:08:57 +01:00
Sergio Martins
0f2edfdb4e
Fix hidding the pin/auto-hide icon when side-by-side in floating
...
An else {} branch was missing.
Also just simplify the code, and call supportsAutoHideButton()
which wasn't being used.
Also removed some bogus updateAutoHideButton() calls from
the CTOR, needs to use singleShot() since the method is virtual,
the derived class isn't constructed yet
2021-04-28 22:06:42 +01:00
Sergio Martins
d289134b15
Add a unit-test for disabling RelativeFloatingWindowGeometry
...
Fixes #175
2021-04-28 21:27:47 +01:00
Sergio Martins
7475c7cc71
Remove unneeded include
2021-04-28 21:15:08 +01:00
Sergio Martins
7958eeeded
Fully qualify LayoutSaver_p.h includes
...
Now that it's installed
2021-04-28 21:13:44 +01:00
Sergio Martins
f29f773555
Add a LayoutSaver_p.h fwd header
2021-04-28 21:10:23 +01:00
Sergio Martins
a113205881
Install LayoutSaver_p.h
...
Moved it into private/ too, not sure why it was in src/
For issue #175
2021-04-28 21:08:41 +01:00
Sergio Martins
7830ccb017
Move LayoutSaver::Private to the header
2021-04-28 21:00:26 +01:00
Sergio Martins
6a205a5406
Move some Layout::Private method definitions out of the class
...
In preparation to move the class to an header
2021-04-28 20:55:16 +01:00
Sergio Martins
d91a42930d
Expose LayoutSaver::Private
2021-04-28 18:01:37 +01:00
Sergio Martins
6f3df707f4
Split RestoreOption_RelativeToMainWindow into more granular options
...
Mostly so we can have RestoreOption_RelativeToMainWindow but
without restoring floating windows
Said options are internal (for now?), we'll need more feedback before
turning them public (since once public forever public)
For issue #175
We'll add some private API so users can change the flags in the next
commit
2021-04-28 17:43:24 +01:00
Sergio Martins
f388b11d0d
Added MainWindowBase::frameCountChanged()
...
So you can know when the layout added or removed dock widgets
Fixes #190
2021-04-28 16:28:04 +01:00
Sergio Martins
66d12fef82
fix build
2021-04-27 23:56:58 +01:00
Sergio Martins
83c744041e
Merge branch '1.3'
2021-04-27 23:52:17 +01:00
Sergio Martins
dcac39a35f
Don't restore window's maximized state when using RestoreOption_RelativeToMainWindow
...
We don't restore main window's geometry either
Fixes issue #184
2021-04-27 23:50:40 +01:00
Sergio Martins
c4d3ba71b2
Fix crash due to MainWindow not clearing m_overlayedDockWidget
...
When we close the overlayed widget we need to clear this variable
Added 1 real fix and a prophylactic check too.
2021-04-27 23:49:26 +01:00
Sergio Martins
74c74593e2
Don't restore window's maximized state when using RestoreOption_RelativeToMainWindow
...
We don't restore main window's geometry either
Fixes issue #184
2021-04-26 19:19:06 +01:00
Sergio Martins
62591bc360
quick: Use logical dpi factor of 1 for now
...
Only physical dpi scaling suported currently
2021-04-25 21:24:56 +01:00
Sergio Martins
1fca162fb2
quick|example: Enable hpdi scaling
2021-04-25 10:47:07 +01:00
Sergio Martins
82967435ea
Added QtQuickHelpers::logicalDpiFactor()
2021-04-25 10:37:47 +01:00
Sergio Martins
7738354be1
Minor coding style fix
2021-04-25 10:26:09 +01:00
Sergio Martins
0d2166770e
quick: Add a QtQuickHelpers class into the context
...
Will have some useful stuff there. Don't have a better place to put them.
2021-04-25 10:24:07 +01:00
Sergio Martins
9d7de9ea4d
Fix sizing of widgets that skip LayoutSaver's restore
...
LayoutWidget::onResize() was bailing out early, but the actual
restore hadn't even started
2021-04-23 19:39:07 +01:00
Sergio Martins
5aa3ba25cc
cmake: Add a Gammaray friendly preset
...
ASAN doesn't like Gammaray injection
2021-04-23 19:01:10 +01:00
Sergio Martins
b330f902fd
tests: Move class into the header
...
File is getting too big
2021-04-23 18:03:49 +01:00
Sergio Martins
aa76dfba02
LayoutSaver: Support the user's factory func doing remapping
...
While restoring a layout, we expect all widgets to exist already,
but we allow the user to create them delayed, by providing
us a factory function.
What we're supporting in this commit is the ability of the user's
factory function returning a dock widget with an ID different
than the one that was requested. We then save that mapping so the
rest of the layout restore works with the new ID.
2021-04-23 14:55:01 +01:00
Sergio Martins
b3c2d87a9b
Remove unused MULTISPLITTER_LAYOUT_MAGIC_MARKER
2021-04-23 14:35:29 +01:00
Sergio Martins
cc1347adf8
qtquick: Don't use native windows drop shadow with round corners
...
When using the Windows native drop shadow, the client area needs
to be rectangular, otherwise a white line appears at the top
2021-04-23 11:47:37 +01:00
Sergio Martins
df0a80b320
qtquick: Config::InternalFlag_UseTransparentFloatingWindow
...
Don't use a transparent floating window by default.
This matches QtWidgets behaviour.
It's only use would be to get round corners, but doesn't work well
with Window's drop shadow
2021-04-23 11:39:57 +01:00
Sergio Martins
26f7557834
cmake: Disable CCACHE when running the clazy preset
2021-04-23 09:50:51 +01:00
Sergio Martins
e6c2f29532
cmake: Specify which clazy checks to use
...
Trivial now with cmake presets
2021-04-22 15:44:16 +01:00
Sergio Martins
37cc16fe17
Fix a -Wsign-conversion warning
...
error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
2021-04-21 20:35:56 +01:00
Sergio Martins
c7ac88836a
Fix some clazy errors
...
Mostly about using qualified names for methods called from QML
2021-04-21 20:25:45 +01:00
Sergio Martins
536e048f1c
Fix build with Qt 5.9
...
The needed overload was introduced in Qt 5.10 only
2021-04-21 19:08:30 +01:00
Sergio Martins
4671848428
vscode: Also add C_Cpp.autocompleteAddParentheses to the other workspaces
2021-04-20 23:03:36 +01:00
Sergio Martins
4449785e2c
vscode: Enable C_Cpp.autocompleteAddParentheses
2021-04-20 23:02:35 +01:00
Sergio Martins
39deb9ee83
tests: Minor refactoring, reduce copy-paste
2021-04-20 23:02:07 +01:00
Sergio Martins
2266f4a75c
Fix FloatingWindow max size when there's tabbed dock widget
...
We don't support this case yet
2021-04-20 22:56:26 +01:00
Sergio Martins
06b680f603
Also update FloatingWindow's max size when children change constraints
...
A dock widget can change its max size later in life, so we need
to react to that
2021-04-20 22:52:08 +01:00
Sergio Martins
ec6be7d1a5
Fix potential crash
2021-04-20 22:51:43 +01:00
Sergio Martins
37040bfc9e
Also update FloatingWindow max-size when adding nested dock widgets
...
We only support FLoatingWindow max-size when there's 1 frame.
When adding more, we need to remove the max size
2021-04-20 22:34:36 +01:00
Sergio Martins
1f4f7ec0e5
FloatingWindow now honours max size of the docked widget
...
Only if there's a single dock widget though.
Tabbed cases are more complicated as QStackedLayout doesn't
propagate size constraints
2021-04-20 21:00:33 +01:00
Sergio Martins
a31571ab2c
Bound FloatingWindow::maxSizeHint()
...
Can't be bigger than Qt's hardcoded limit
Fixes a warning emitted by Qt
2021-04-20 20:57:14 +01:00
Sergio Martins
714ef2adb8
cmake: Fix a preset name
...
We don't have dev-qtquick6.
Should probably be added.
2021-04-20 20:22:24 +01:00
Sergio Martins
e447bbf03b
vscode: Don't specify tasks
...
The cmake extension takes care of this
2021-04-20 20:18:32 +01:00
Sergio Martins
3846b638fb
cmake: Add build presets too
...
This is new in cmake 3.20 and makes the vscode experience much better
2021-04-20 20:16:44 +01:00
Sergio Martins
6ae8a203d9
qtquick: Fix build
2021-04-20 19:43:26 +01:00
Sergio Martins
1dbd491738
Minor: Move a comment to another place
2021-04-20 19:16:14 +01:00
Sergio Martins
e8693edb33
Minor refactoring: Factor out the FloatingWindow max size code
...
Created FloatingWindow::maxSizeHint()
2021-04-20 19:13:32 +01:00
Sergio Martins
5cbad00cb5
Minor coding style: bail out early
2021-04-20 18:47:34 +01:00
Sergio Martins
c6e4deb0ca
Merge branch '1.3'
2021-04-19 09:47:43 +01:00
Sergio Martins
693fb84a3e
Fix DockWidgetBase::isFocusChanged() not being emitted
...
The previous commit fixed that the dock widget wasn't
getting focused on tab change, but didn't fix the signal.
When changing tabs, FocusScope::setFocused() would bailout
early because it was already focused, so never emitted
the signal for the new focused dock widget.
Refactored the code a bit and it's more robust now.
Setting the current focused widget is now centralized in
DockRegistry. Before it was split in two different places.
Fixes issue #188
2021-04-19 09:42:59 +01:00
Sergio Martins
b0a7d5d4a0
Merge branch '1.3'
2021-04-19 00:16:39 +01:00
Sergio Martins
818acc0ff1
Fix edge case when focusing FocusScope and tab bar is focused
...
When we focus a FocusScope we focus the last focused widget
inside that scope. But it could happen that the last focused widget
was the tab bar itself, which isn't very useful.
Fixes issue #188
2021-04-19 00:15:15 +01:00
Sergio Martins
819fec6061
Implement missing function body
2021-04-18 23:56:21 +01:00
Allen Winter
4ea8c98243
cmake/QtInstallPaths.cmake - don't cache the QT_FOO variables
...
makes changing Qt versions easier
2021-04-16 07:55:40 -04:00
Sergio Martins
95317a7336
Add signal DockWidget::aboutToDeleteOnClose()
...
It's emitted when the dock widget is going about deleted due to
the DeleteOnClose functionality
2021-04-14 15:24:15 +01:00
Allen Winter
9b6abfbbc3
src/private/quick/MainWindowInstantiator_p.h - fix include guard
2021-04-12 08:41:13 -04:00
Sergio Martins
4bee3023d2
SegmentedIndicators: Don't show inner segments when having only 1 frame
2021-04-12 10:52:48 +01:00
Sergio Martins
45f12db8d3
windows: Fix place of export macro for namespace
2021-04-12 10:02:50 +01:00
Sergio Martins
9956b3fed3
qt6: Fix KDDW build on Windows
...
Namespace needs to be exported due to Q_NAMESPACE
2021-04-12 09:57:49 +01:00
Sergio Martins
374e837aa9
Allow to style SegmentedIndicator
2021-04-09 17:01:20 +01:00
Sergio Martins
6ffd3e574f
qtquick: Add support for LayoutSaver
...
You can now instantiate LayoutSaver {} in QML and save/restore
layouts
2021-04-08 23:23:24 +01:00
Sergio Martins
8a3706f6cb
docs: document LayoutSaver's internals
...
explains the 2-phase restore
2021-04-08 20:46:13 +01:00
Sergio Martins
faa16ad910
docs: Add some doxygen to LayoutSaver
2021-04-08 20:39:23 +01:00
Sergio Martins
eb69e25622
qtquick: More invokables
2021-04-08 20:33:48 +01:00
Sergio Martins
b006bb0c3c
vscode: Remove empty MIModes
...
On MSVC they are not required, and the editor highlights them
as wrong
2021-04-08 19:58:00 +01:00
Sergio Martins
02ed50b336
vscode: Add launches for qtwidgets
2021-04-08 19:47:39 +01:00
Sergio Martins
f0023bc084
README-QtQuick: Mention workaround for lagging windows
2021-04-08 12:23:26 +01:00
Sergio Martins
6502f7760d
README-QtQuick: Mention there's some slowness in some rare setups
2021-04-08 11:53:42 +01:00
Sergio Martins
7606691ea3
QtQuick: Add more properties to DockWidgetInstantiator
2021-04-08 10:28:21 +01:00
Sergio Martins
257a1e9474
vscode: Remove tests_launcher from launchers
...
It's not something devs need to run manually
2021-04-07 22:44:36 +01:00
Sergio Martins
9f02ccbb48
qtquick: Add more properties to DockWidgetBase.h
2021-04-07 22:42:33 +01:00
Sergio Martins
a18199e9a2
vscode: Add launches for qtquick
2021-04-07 22:41:44 +01:00
Sergio Martins
cdd6f998c4
qtquick: Add a missing Q_ENUM
2021-04-07 22:20:15 +01:00
Sergio Martins
df21b6fc6f
qtquick Add a bunch of invokables to the MainWindowInstantiator_p.h
2021-04-07 22:16:54 +01:00
Sergio Martins
edf7dee78e
qtquick: Add more properties and Q_INVOKABLE to main window
2021-04-07 22:05:51 +01:00
Sergio Martins
f723e5ea59
qtquick: Add some properties to main window
2021-04-07 21:48:05 +01:00
Sergio Martins
748243f512
qtquick: Allow to call addDockWidget() from QML
2021-04-05 22:56:08 +01:00
Sergio Martins
e7d37402d7
Rename DefaultSizeMode::None
...
Fixes QtQuick warnings about two different enum class having an
enumerator called "None"
Known QML limitation with "enum class"
2021-04-05 22:33:11 +01:00
Sergio Martins
7c101ae3af
qtquick: comments++
2021-04-05 20:41:59 +01:00
Sergio Martins
cf9cdd8b3b
qtquick: Add some Q_INVOKABLE to MainWindowBase
2021-04-05 20:37:58 +01:00
Sergio Martins
b18783c17a
qtquick: Add some Q_ENUM_NS
2021-04-05 20:36:38 +01:00
Sergio Martins
201d06d878
qtquick: Use MainWindowOption instead of int for the property too
2021-04-05 20:32:11 +01:00
Sergio Martins
742ef7d529
qtquick: Use the MainWindowOptions enum instead of int
2021-04-05 20:28:57 +01:00
Sergio Martins
3d73fc10cd
qtquick: Add some Q_INVOKABLE to DockWidgetBase.h
...
So these methods can be called from QML
2021-04-05 18:50:25 +01:00
Sergio Martins
075c1b06f7
qtquick: Add some Q_INVOKABLE to DockRegistry
...
So they can be called from QML if the user wants
2021-04-05 18:42:15 +01:00
Sergio Martins
2706a3d379
qtquick: Add "Close All" option in the example
2021-04-05 18:31:56 +01:00
Sergio Martins
e476dce1d4
qtquick: Fix some undefined warnings at shutdown
2021-04-05 18:06:07 +01:00
Sergio Martins
2f25657cfa
Fix QtQuick build
2021-04-05 17:08:47 +01:00
Sergio Martins
1167545199
Update Changelog
2021-04-05 16:51:36 +01:00
Sergio Martins
fcd1fae77e
qtquick: Add a MenuBar to the example, allows to toggle
2021-04-05 16:48:13 +01:00
Sergio Martins
06db10561c
qtquick: Use QQmlApplicationEngine in the examples
...
So we can add menus and such
2021-04-05 16:41:45 +01:00
Sergio Martins
ead9e8945e
qtquick: Allow to add the guest widget declaratively
...
This is an alternative to setting source
2021-04-05 16:22:56 +01:00
Sergio Martins
15d4f77d5d
Revert "qtquick: Remove unused QQuickItem::classBegin()"
...
This reverts commit e4fdf33cfc .
Looks like it's needed.
Need to debug why calling QQuickItem::classBegin cause the main window
to not show anything
2021-04-05 15:59:59 +01:00
Sergio Martins
c903a64726
Use a QQuickItem as MainWindowInstantiator's parent
...
This is simpler, no need for QWidgetAdapter
2021-04-05 15:47:12 +01:00
Sergio Martins
8fa63a8773
qtquick: Remove unneeded private import
2021-04-05 15:06:57 +01:00
Sergio Martins
8a0e6c90b9
qtquick: the user will now use "MainWindowLayout" instead of "MainWindow"
...
As MainWindow wasn't actually a window.
While for QtWidgets it makes sense for it to be a QMainWindow, in
QtQuick let's make it easy to embed a dock widget layout.
Also, our MainWindowQuick doesn't have any menus and what not that
QMainWindow has.
2021-04-05 15:04:27 +01:00
Sergio Martins
e4fdf33cfc
qtquick: Remove unused QQuickItem::classBegin()
...
No need to override it
2021-04-05 14:56:06 +01:00
Sergio Martins
548e38fca0
qtquick: Don't create two main windows with the same name
2021-04-05 14:48:51 +01:00
Sergio Martins
c804c806e1
Add DockRegistry::containsMainWindow(uniqueName)
2021-04-05 14:48:43 +01:00
Sergio Martins
7c291691aa
qtquick: Fix customtitlebar example
2021-04-05 14:43:51 +01:00
Sergio Martins
cec8cf25ef
Rename MainWindowWrapper to MainWindowInstantiator
...
Makes it consistent with DockWidgetInstantiator.
Creates the main window onComplete, no need for the user
to call init() explicitly anymore
2021-04-05 14:42:46 +01:00
Sergio Martins
5a2812ecf3
qtquick: Fix undefined variable error in example
2021-04-05 14:35:40 +01:00
Sergio Martins
0f09ba717f
qtquick: Move the "Another" button into the main window
2021-04-05 14:09:59 +01:00
Sergio Martins
1026abbbf4
qtquick: Make DockWidgetInstantiator a QQuickItem instead of only QObject
...
Can be put in Repeater now
2021-04-05 13:57:57 +01:00
Sergio Martins
5b578c86e8
qtquick: Fix build
2021-04-05 13:50:15 +01:00
Sergio Martins
d7e4a782c1
qtquick: Add missing signal
...
Fixes tests
2021-04-05 06:43:59 +01:00
Sergio Martins
d65dfeceb0
Fix QtQuick developer build
2021-04-05 06:34:44 +01:00
Sergio Martins
e9a7a3a5f5
Merge branch '1.3'
2021-04-05 06:27:45 +01:00
Jacob Young
8504252142
Handle tab icon updates
...
Closes PR #135
2021-04-05 06:26:47 +01:00
Sergio Martins
19730ab6a4
Fix crash when using MainWindow::layoutEqually()
...
When distributing space we should honour the other widgets
min-size too, and not give too much
Since the layouting code is complex, this won't be backported to
1.3
2021-03-31 15:23:24 +01:00
Sergio Martins
44ae75110b
Added MainWindowBase::closeAllDockWidgets()
2021-03-31 10:51:20 +01:00
Sergio Martins
4ab2a93d59
Merge branch '1.3'
2021-03-31 10:01:18 +01:00
Sergio Martins
f82ea82403
Harden Item::layoutEqually()
...
Could cause an infinit loop if the layout was corrupted
2021-03-31 10:00:28 +01:00
Sergio Martins
fff6c004e0
Pass -warn-uninitialized to cmake
2021-03-26 13:46:02 +00:00
Allen Winter
75c7744e59
move the class private header up in the include order
2021-03-23 08:36:24 -04:00
Allen Winter
1e8bdba2dd
minor spelling fix
2021-03-23 07:47:31 -04:00
Allen Winter
2587831855
src/MainWindowMDI.cpp - add trailing newline
2021-03-23 07:46:27 -04:00
Allen Winter
f00a283722
fix SPDX-FileCopyrightText: and Author: lines
2021-03-23 07:44:37 -04:00
Sergio Martins
e3b333aca8
Make DockWidget::raise() raise the frame in MDI mode
2021-03-18 15:08:54 +00:00
Sergio Martins
c9602c2b0a
Merge branch '1.3' into master
2021-03-15 18:25:25 +00:00
Sergio Martins
c660c80a15
Added DockWidgetBase::frameGeometryChanged()
2021-03-15 18:25:01 +00:00
Sergio Martins
6f889d1c3b
Fix indicator overlay z-order when using Flag_KeepAboveIfNotUtilityWindow
...
The overlay window needs to be on top
Fixes #181
2021-03-15 18:23:00 +00:00
Sergio Martins
80577832d7
Add a file with QtQuick TODO items
...
Will be updating this as I go.
Mostly only more elegant API is needed at this point.
Closing #49 as all questions were answered.
Fixes #49
2021-03-14 15:41:57 +00:00
Allen Winter
7a18ef77cd
buildsystem - fix more cmake --warn-unitialized
...
* PROJECT_VERSION - explicitly set for ECMSetupVersion
* SHIBOKEN_CUSTOM_PATH - init (rename to SHIBOKEN_CUSTOM_PREFIX)
* PYSIDE2_CUSTOM_PREFIX - init
* PYSIDE_EXTRA_INCLUDES (removed, not used)
Task-Id: KDDW-30
2021-03-13 17:27:47 -05:00
Allen Winter
e29f7cb1d3
CMakeLists.txt - fixup a bit of documentation
2021-03-13 17:08:55 -05:00
Sergio Martins
8970274810
cmake: Fix some --warn-uninitialized warning
2021-03-13 09:51:06 +00:00
Sergio Martins
d57fd8bfd3
cmake: Uncomment the QtQuick option
...
People can try it now
2021-03-13 09:39:23 +00:00
Sergio Martins
8507866891
cmake: Remove the fat warning about QtQuick
...
It can be tried now
2021-03-13 09:37:31 +00:00
Sergio Martins
425d53fbe3
cmake: Remove unused ${RESOURCES_QUICK} variable
2021-03-13 09:35:56 +00:00
Sergio Martins
b0cb983830
qtquick: relax the warning about removing dock widget twice
...
can happen due to benign reentrancy
2021-03-10 13:38:22 +00:00
Sergio Martins
02515d8956
MDI: Fix dock widget size getting out of sync with the layout item
...
When resizing with mouse, update the layout item too.
Wasn't a big deal, as this is MDI, layout doesn't do much. But
last used geometries werent being saved
2021-03-09 20:30:41 +00:00
Sergio Martins
447b4337dd
Add DockWidget::frameGeometry()
2021-03-09 17:55:36 +00:00
Sergio Martins
633daf124e
Fix some warnings about shadowing methods
2021-03-09 15:43:36 +00:00
Sergio Martins
446560931b
MDI: Fix docked widget geometries not being remembered when floating
...
We shouldn't move the Frame directly. Instead, do it through the
layout, which will then remember the last docked geometry
2021-03-07 16:56:37 +00:00
Sergio Martins
9fe11a7ad5
qtwidgets|MDI: Fix showing resize handles
...
if there was no frame being resized it would be nullptr, and hence
enter that block.
QtQuick not affected since it uses mouse areas to change the cursor
shape
2021-03-05 12:19:16 +00:00
Sergio Martins
b099994ac5
qtquick|MDI: Remove the QtQuick special case
...
Now behaves as QtWidgets
2021-03-05 12:05:19 +00:00
Sergio Martins
a8d56ef4e6
qtquick6: Fix build
2021-03-04 13:57:25 +00:00
Sergio Martins
1f8d212dee
Qt6: Fix build
...
Types in properties can't be forward declared anymore
2021-03-04 13:27:58 +00:00
Sergio Martins
64ea87f4cc
Add missing fwd header for Frame_p.h
2021-03-04 13:27:32 +00:00
Sergio Martins
e6fef433d5
Added DockWidgetQuick::frame()
2021-03-03 17:59:43 +00:00
Sergio Martins
2f212031b3
qtquick|MDI: Don't set a size smaller than its min
2021-03-03 17:03:06 +00:00
Sergio Martins
586ab710f6
qtquick: Expose the tabbar height property
2021-03-03 16:36:23 +00:00
Sergio Martins
d263ae649e
Allow to configure the MDI popup threshold
2021-03-03 16:33:32 +00:00
Sergio Martins
c81ca45e41
qtquick|MDI: Improvements for resizing
2021-03-03 15:21:22 +00:00
Sergio Martins
9ce50fa305
qtquick: Minor refactoring, deal in CursorPosition
2021-03-03 14:59:24 +00:00
Sergio Martins
f0240deaeb
qtquick: Use Q_NAMESPACE for the KDDockWidgets namespace
2021-03-03 14:40:24 +00:00
Sergio Martins
017f06dcfb
qtquick|MDI: Improvements for the resize handler
...
More margin, fixed sizes of some handlers and fixed z order
2021-03-03 13:47:14 +00:00
Sergio Martins
54f17cb546
qtquick: Remove unneeded mouse area from frame
...
Just to simplify things. Let's just have the resize handlers.
A target can have many event sources.
2021-03-03 13:22:12 +00:00
Sergio Martins
f174ab6ebc
qtquick: Create ResizeHandlerHelper.qml to save some code
2021-03-03 12:57:37 +00:00
Sergio Martins
263f936690
Fix dock widgets in MDI getting bogus sizes
...
Setting the Item's min-size would resize the guest while the
guest was being set
2021-03-03 12:20:40 +00:00
Sergio Martins
bd903a0353
qtquick: Fix Frame's minimum size
...
It wasn't accounting for the margins, and the "heightWhenVisible"
property was Nan, making the entire expression be 0
2021-03-03 10:08:37 +00:00
Sergio Martins
5040d3a6b6
qtquick: Allow to update the size constraints from QML
2021-03-03 10:02:45 +00:00
Sergio Martins
3684da776d
Added DockWidgetQuick::frameVisualItem()
2021-03-03 09:27:27 +00:00
Sergio Martins
bc17c8e5b3
MDI: Don't active other resize handlers when resize in progress
...
When we're resizing a docked dock widget, the other dock widget's
resize handlers should be disabled
2021-03-02 22:21:12 +00:00
Sergio Martins
778c647782
qtquick: Register Frame
2021-03-02 22:14:07 +00:00
Sergio Martins
2a91f6279b
qtquick: Minor code refactoring
...
Uses less code
2021-03-02 22:05:48 +00:00
Sergio Martins
4ef2ddbfec
Add DockRegistry::frameInMDIResize()
...
Only emitted in a MDI layout. Emitted when one dockwidget is
being resized
2021-03-02 22:00:54 +00:00
Sergio Martins
ff06f0cc73
Fix build
2021-03-02 21:06:57 +00:00
Sergio Martins
a37ab34fae
qtquick|MDI: When dragging don't trigger the resize drag handlers
...
MouseArea.enabled, even if false, will change the cursor shape.
So explicitly change the cursor to ArrowShape
2021-03-02 20:58:44 +00:00
Sergio Martins
cb2ffe66af
qtquick|MDI: Fix resizing inner MDI dock widgets
...
It was flaky. The mouse move events came from global event filter
but the mouse press came from the Frame's mouse area. Sometimes the
QQuickWindow wouldn't deliver the press to the frame if it was done
outside, while the moves were changing the cursor shape since
we had a treshold
Now we guarantee that whenever the cursor changes the resize
will really happen
2021-03-02 14:40:42 +00:00
Sergio Martins
16b0770d72
qtquick: Fix minor qml warning
2021-03-02 14:31:15 +00:00
Sergio Martins
3fe44ee735
qtquick: Enable transparency for the floating window
...
You can now have windows with round corners
2021-03-02 12:19:51 +00:00
Sergio Martins
40d1a72300
qtquick: Fix QtQuick min-sizes not working when wrapped
2021-03-02 11:02:15 +00:00
Sergio Martins
4d428d42f6
Added DockWidgetBase::setMDIZ(int z)
...
Sets the Z order of the dockwidget within the MDI layout
2021-03-02 10:43:07 +00:00
Sergio Martins
7e9896263b
Update .gitignore
2021-03-02 10:22:57 +00:00
Sergio Martins
cf0665c9b6
Added DockWidgetBase::setMDISize()
...
Only for dock widgets in MDI layout, where they are freely resizable
2021-03-02 10:21:29 +00:00
Sergio Martins
93c011c69d
Added DockWidgetBase::setMDIPosition(QPoint pos)
...
Moves the window within the layout.
Only applies to MDI layouts.
2021-03-01 23:41:53 +00:00
Sergio Martins
f50c0b9d06
qtquick: Fix typo
2021-03-01 23:24:29 +00:00
Sergio Martins
6fc79d942b
qtquick: add a way to disable the default mouse redirectors
...
So user can use his own
2021-03-01 23:23:04 +00:00
Sergio Martins
d01228d9ff
Fixes cases where actualTitleBarChanged() wasn't emitted
2021-03-01 23:02:56 +00:00
Sergio Martins
b58d766d54
qtquick: Add Q_INVOKABLE to DockWidgetBase::setFloating()
2021-03-01 22:38:23 +00:00
Sergio Martins
79cbb96a38
Remove some unneeded qDebug
2021-03-01 22:34:15 +00:00
Sergio Martins
aabaeacb81
Improve a warning
2021-03-01 22:30:31 +00:00
Sergio Martins
3ab3e6d41b
qtquick: Don't allow to have two redirectors for the same source
...
One event source can only have one redirector
2021-03-01 22:23:46 +00:00
Sergio Martins
f2f4afd0bb
qtquick: Allow the user to customize the titlebar margins
2021-03-01 20:50:46 +00:00
Sergio Martins
0d62c43b9e
qtquick: keep the original parent of the guest around
...
For debug purposes
2021-03-01 19:58:00 +00:00
Sergio Martins
1614d5702c
Allow to call DockWidget::setWidget(nullptr)
...
In case you need to change ownership
2021-03-01 19:56:46 +00:00
Sergio Martins
610b9542e9
qtquick: Expose the event source for debug purposes
2021-03-01 17:13:54 +00:00
Sergio Martins
946f32a274
qtquick: debug++
2021-03-01 17:12:09 +00:00
Sergio Martins
c7a6bc015e
qtquick: Minor performance optimization
...
Only check the properties for mouse events
2021-03-01 16:54:32 +00:00
Sergio Martins
19fd1635e6
Remove userType() from public API for now
...
If added, will need to be through overloads, to not break source
compat. Will add them once there's a need.
2021-03-01 16:34:22 +00:00
Sergio Martins
74b034a195
Merge branch '1.3'
...
Fixes #172
2021-03-01 15:48:45 +00:00
David Faure
581139d099
SideBarButton: use color roles from the widget palette
2021-03-01 16:42:59 +01:00
Sergio Martins
e5492ea906
qtquick: Allow to override the mouse redirector
2021-03-01 14:50:14 +00:00
Sergio Martins
623133a0dc
qtquick: Add DockWidgetQuick::actualTitleBar()
...
It's a pointer o either Frame::titleBar() or FloatingWindow::titleBar().
It's the same as Frame::actualTitleBar().
2021-03-01 14:35:14 +00:00
Sergio Martins
6baa8f2dbb
qtquicl: Fix invisible tab bar eating mouse events
2021-03-01 14:19:39 +00:00
Sergio Martins
d2739d7218
qtquick: disable tabbar mouse area if tabbar hidden
2021-03-01 13:15:30 +00:00
Sergio Martins
5702101935
Add a Q_PROPERTY for Frame::actualTitleBar()
2021-03-01 12:50:25 +00:00
Sergio Martins
35d45a7523
qtquick: Fix some places which weren't forwarding userType
2021-02-28 20:44:19 +00:00
Sergio Martins
e37c1f0e8c
qtquick: Pass the userType all the way to titleBarFilename()
2021-02-28 20:33:46 +00:00
Sergio Martins
ac0d35ef12
Fix clazy warning
2021-02-28 19:03:16 +00:00
Sergio Martins
15e63381a9
Added DockWidgetBase::setUserType(int)
...
This is an opaque value which KDDW won't try to interpret or do
anything with it other than forward it to the FrameworkWidgetFactory.
Which if specialized by the user he can have different title bars
for different said "dock widget types"
2021-02-28 18:57:35 +00:00
Sergio Martins
aa49ddacd5
qtquick: Allow the user to change the contents margin for Frame
2021-02-28 18:13:55 +00:00
Sergio Martins
f68e876bcb
qtquick: Make the setWidget(QQuickItem) overload also fill parent
2021-02-28 16:05:44 +00:00
Sergio Martins
6b82ded399
qtquick: Allow derived FloatingWindow to override margins
2021-02-28 16:04:28 +00:00
Sergio Martins
000e67a09e
qtquick: Register DockWidgetBase
2021-02-28 15:26:05 +00:00
Sergio Martins
1b6aa4c3d1
qtquick: Inject the dock registry into the context
...
Useful to call from QML if needed
2021-02-28 15:01:05 +00:00
Sergio Martins
8912a2c842
Remove debug
2021-02-28 14:50:12 +00:00
Sergio Martins
4de50db68c
Added DockWidgetQuick::setWidget(QQuickItem*) overload
...
And expose it to QML
2021-02-28 14:48:09 +00:00
Sergio Martins
6b95e4aac9
Allow to add to MDI area and start as hidden
...
It will remember its position
2021-02-28 00:51:12 +00:00
Sergio Martins
c27658822e
Add MainWindowMDI::addDockWidget() taking QPointF
2021-02-28 00:24:08 +00:00
Sergio Martins
8ec980c1e8
Add convenience DockRegistry::mdiMainWindowByName()
2021-02-28 00:20:33 +00:00
Sergio Martins
a952c5829a
qtquick: Add MainWindowMDI.qml
...
A convenience wrapper
2021-02-27 23:48:15 +00:00
Sergio Martins
20e1b55a8a
qtquick: make sure our QML types are registered early on
2021-02-27 15:52:31 +00:00
Allen Winter
a2605868db
Merge branch '1.3'
2021-02-26 18:30:03 -05:00
Allen Winter
67be35b9f8
CMakeLists.txt - don't create the dummy docs target
...
it can conflict when used as a submodule
2021-02-26 18:29:10 -05:00
Allen Winter
b15eb1e62f
Merge branch '1.3'
2021-02-26 17:09:08 -05:00
Allen Winter
d2e3ec0448
buildsystem - add a 'docs' target
...
only available with cmake -DKDDockWidgets_DOCS=true
2021-02-26 17:07:58 -05:00
Allen Winter
828c403fe5
Merge branch '1.3'
2021-02-26 16:40:18 -05:00
Allen Winter
53d3bc86ea
conan - support build_with_qt6
2021-02-26 16:35:33 -05:00
Allen Winter
6ed8742cc1
buildsystem - install library with "-qt6" when built for Qt6
2021-02-26 16:35:08 -05:00
Sergio Martins
7bd047f6e6
qtquick: Make DockWidget.qml be a Rectangle
...
So user can change its color
2021-02-26 19:29:30 +00:00
Sergio Martins
482757b1cc
qtquick: Don't hardcode "FloatingWindow.qml"
...
Allow the user to specify their impl
2021-02-26 19:21:42 +00:00
Sergio Martins
c143f832c6
qtquick: Don't hardcode "Frame.qml"
...
Allow the user to specify their impl
2021-02-26 19:12:53 +00:00
Sergio Martins
67a173ef53
qtquick: Don't hardcode "DockWidget.qml"
...
Allow the user to specify their impl
2021-02-26 18:57:31 +00:00
Sergio Martins
c2c37488a3
Merge branch '1.3'
2021-02-26 17:26:35 +00:00
Sergio Martins
8c1840b9cf
Fix popups in overlayed dockwidgets not working
2021-02-26 17:26:04 +00:00
Sergio Martins
1088e37cd4
Improve warning
2021-02-26 17:00:22 +00:00
Sergio Martins
4d6c3dac3d
qtquick: Warn there's no QQmlEngine set
2021-02-26 16:58:58 +00:00
Sergio Martins
adf29873ef
Define KDDOCKWIDGETS_QTQUICK when linking against QtQuick KDDW
...
This is added when building, but also needs to be in the public
interface
2021-02-26 16:47:04 +00:00
Sergio Martins
772afe29ea
Merge branch '1.3'
2021-02-26 15:45:46 +00:00
Sergio Martins
9c78953800
Fix tests on linux
...
Native title bar is specific to Windows
2021-02-26 15:38:00 +00:00
Sergio Martins
ff67b9bcbc
Merge branch '1.3' into master
2021-02-26 15:20:32 +00:00
Sergio Martins
103de4f910
Update ChangeLog
2021-02-26 15:15:29 +00:00
Sergio Martins
7c3f06f98f
When using a native title bar make floating window geometry smaller
...
When undocking a dock widget, the size of the dock widget should
be maintained
Fixes #174
2021-02-26 15:12:43 +00:00
Sergio Martins
6ac77a7662
Use the flags instead of the enum
2021-02-26 14:36:22 +00:00
Sergio Martins
610b85d01a
Minor readability improv: replace bool with enum
...
CC issue #174
2021-02-26 14:32:55 +00:00
Sergio Martins
d4d222ebd3
Update ChangeLog
2021-02-25 22:01:54 +00:00
Sergio Martins
5cbed1d34b
if native title bar + Qt::Tool, double-click should redock
...
When using the native Windows title bar with Qt::Tool, double-clicking
the title bar should redock the window.
Fixes #173
2021-02-25 21:59:43 +00:00
Sergio Martins
ba4a2eef5c
Also cancel a drag if we receive a non-client double click
2021-02-25 21:58:12 +00:00
Sergio Martins
acdf03fc84
Merge branch '1.3' into master
2021-02-24 13:56:28 +00:00
Sergio Martins
a6f19e07c4
Fixed Flag_NativeTitleBar not hidding the client title bars
...
When restoring the layout the native title bar would be visible
Fixes #170
2021-02-24 13:52:44 +00:00
Sergio Martins
f07301bb1e
Update ChangeLog
2021-02-24 12:10:38 +00:00
Sergio Martins
2116e3741b
Improve restoring layout when RestoreOption_RelativeToMainWindow is used
...
Doesn't make much sense to apply a scalling factor to the floating window's
position. Instead we should apply the factor to the delta position between
the main window and the floating window
Fixes #171
2021-02-23 21:02:01 +00:00
Sergio Martins
1f11c732ed
Remove unused function
2021-02-23 20:16:32 +00:00
Sergio Martins
e42bee27a4
Remove unused function
2021-02-23 20:14:25 +00:00
Sergio Martins
b36dcf1325
Fix macOS developer-build due to unused variable
2021-02-22 10:46:56 +00:00
Sergio Martins
421746c943
Margins now honour logical dpi and update when changing screen
2021-02-22 00:02:57 +00:00
Sergio Martins
f544ac58e6
Apply the logical DPI factor to the MainWindow contents margins
2021-02-21 23:42:11 +00:00
Sergio Martins
6047275cfa
Add a localDpiFactor helper
...
As we don't do everything via QStyle. layout margins for example
still need a manual factor
2021-02-21 23:02:49 +00:00
Sergio Martins
630d832f50
Emit DockRegistry::windowChangedScreen()
...
We now have a signal we can connect to adapt sizes to logical
dpi changes
2021-02-21 19:45:35 +00:00
Sergio Martins
e0a34465d8
MDI: Raise dock widget when clicking on it
2021-02-21 16:26:16 +00:00
Sergio Martins
443a4049c3
qtquick|MDI: Also support raising non top-level windows
...
If we drag mdi windows around they'll raise now
2021-02-21 15:44:56 +00:00
Sergio Martins
54980e7585
Fix Qt6 build on Windows
2021-02-20 21:42:44 +00:00
Sergio Martins
14ff8bb26b
Fix mingw build
2021-02-19 11:33:01 +00:00
Sergio Martins
615bb0ee3f
Fix linux developer-build
2021-02-19 11:25:02 +00:00
Sergio Martins
986fd8c13b
CustomFrame: Don't use QWindow::fromWinId()
...
as that creates a new QWindow
2021-02-18 18:43:43 +00:00
Sergio Martins
ec1cc27815
Added DockRegistry::windowForHandle()
2021-02-18 18:39:35 +00:00
Sergio Martins
3874e2d886
CustomFrame: Added a recursion guard
2021-02-18 18:32:14 +00:00
Sergio Martins
1afcf21529
CustomFrame: Same some cpu cycles in case we don't care about the events
2021-02-18 18:21:32 +00:00
Sergio Martins
4c0f3bd7cb
Fix build with older compilers
2021-02-18 17:50:14 +00:00
Sergio Martins
9aafa2a662
CustomFrame: the native event handling now honours the features
2021-02-18 15:50:12 +00:00
Sergio Martins
029ba1202e
CustomFrame: Add a NativeFeatures enum
...
Replaces the htCaptionRect. As we don't want to pass many arguments,
instead just pass a struct which describes which native features
to enable
2021-02-18 15:14:52 +00:00
Sergio Martins
b5043b2b87
CustomFrame: Move the features enum up 1 level
2021-02-18 14:40:20 +00:00
Sergio Martins
52ce80fd97
CustomFrame: Use an enum instead of bool return in our callback
2021-02-18 14:22:26 +00:00
Sergio Martins
cd19c5eb38
CustomFrame: Allow to specify a callback for QWindow opt-in
...
Which QWindows should get a custom frame is up to you. Just
return true in the callback.
2021-02-18 14:10:40 +00:00
Sergio Martins
0d101d779f
Fix unused variable warning
2021-02-18 11:29:02 +00:00
Milian Wolff
1ff6f43eac
Allow disabling the uninstall target
...
Prevents clashes when kddockwidgets is included as a submodule
into a project that already defines an uninstall target.
2021-02-17 20:47:49 +01:00
Sergio Martins
98d892f643
CustomFrame: Apply the drop-shadow code initially
2021-02-17 19:46:56 +00:00
Milian Wolff
cc80afff7d
Fix compile on Linux
2021-02-17 20:36:37 +01:00
Milian Wolff
91ad74e3ad
Relay status tip events to the parent of FloatingWindow
...
That allows the status bar of the main window - if available - to
show the event contents.
2021-02-17 20:36:37 +01:00
Sergio Martins
b128d25fbe
Added convenience FloatingWindow::mainWindow()
2021-02-17 19:35:54 +00:00
Sergio Martins
8b23769ccc
Remove some debug code
2021-02-17 18:17:48 +00:00
Sergio Martins
13f84ab518
Fix QtQuick build
2021-02-17 18:14:57 +00:00
Sergio Martins
feadc1ff9e
Add a CustomFrameHelper class
...
So we can reuse the custom frame for arbitrary windows
2021-02-17 18:02:51 +00:00
Sergio Martins
f75c3a123e
Merge branch '1.3' into master
2021-02-17 17:44:05 +00:00
Sergio Martins
12dfe49d9b
Fix unused variable warning
2021-02-17 17:14:10 +00:00
Sergio Martins
545618964d
Only apply the async mouse compensation when undocking
...
Not needed when moving regular windows
2021-02-17 17:01:03 +00:00
Sergio Martins
a6f3f21b70
Added Draggable::isWindow()
2021-02-17 16:54:15 +00:00
Sergio Martins
e6135f49fb
Make WidgetResizeHandler::handleWindowsNativeEvent() more generic
...
Decoupled it from the KDDW specific parts. Can now be used
by non FloatingWindow widgets
2021-02-16 20:28:59 +00:00
Sergio Martins
cd3a1c869e
Add missing include
2021-02-16 19:32:00 +00:00
Sergio Martins
8bb21b12aa
Add a fwd header for WidgetResizeHandler_p.h too
2021-02-16 19:29:19 +00:00
Sergio Martins
f500791ba3
FloatingWindow: This setup code is windows only
2021-02-15 22:15:26 +00:00
Sergio Martins
4ebc4e9546
Fix Linux build
2021-02-15 22:09:27 +00:00
Sergio Martins
94ee2e55fd
Move FloatingWindow::setupWindow() into a reusable function
...
So other QWindow can use this
2021-02-15 22:03:44 +00:00
Sergio Martins
e3c370eb6b
Revert "Move FloatingWindow::setupWindow() into a reusable function"
...
This reverts commit 6fea5af585 .
Need to fix the windows build first
2021-02-15 10:43:15 -08:00
Sergio Martins
6fea5af585
Move FloatingWindow::setupWindow() into a reusable function
...
So other QWindow can use this
2021-02-15 18:29:19 +00:00
Sergio Martins
e9e149d55e
Remove unused include
2021-02-15 17:48:13 +00:00
Sergio Martins
bb5d98164f
fix windows build
2021-02-15 09:45:55 -08:00
Sergio Martins
8941f41d1c
Moved NCHITTESTEventFilter to WidgetResizeHandler
...
It's a better fit there.
2021-02-15 17:36:22 +00:00
Sergio Martins
d45e17b603
Minor styling: Remove one level of ifdefing
2021-02-15 17:32:05 +00:00
Sergio Martins
c2b3e6b36e
Remove some unneeded debug info
2021-02-15 17:28:29 +00:00
Sergio Martins
b8405c01f1
Export WidgetResizeHandler
2021-02-15 17:25:49 +00:00
Sergio Martins
3d191da07e
Remove the unity build option, there's already a CMake way
...
-DCMAKE_UNITY_BUILD should do the same thing.
Disabling it by default since the project is too small for the gains,
and because it screws up the compile_commands.json which I need
for vscode
2021-02-14 23:28:46 +00:00
Sergio Martins
aeb61993a4
Use QT6_DIR in the presets file
...
Removes the hardcoded "gcc"
2021-02-14 23:08:06 +00:00
Sergio Martins
3679e1da3a
Pass a QStyleOption in Button::sizeHint()
...
Allows to use the logical dpi of the screen the widget is in
2021-02-14 22:41:02 +00:00
Sergio Martins
52aefd23f0
Improve comments
2021-02-14 22:40:23 +00:00
Sergio Martins
76a2b84925
Windows: Support scalable icons without requiring AA_EnableHighDpiScaling
2021-02-14 22:22:04 +00:00
Sergio Martins
a89b2c7ed1
Add a comment
2021-02-14 19:54:49 +00:00
Sergio Martins
5dd4eb2d20
Honour the logical DPI for sizing title bar buttons
...
Some Linux window managers manipulate the logical DPI instead of
the device pixel ratio.
2021-02-14 19:39:05 +00:00
Sergio Martins
600661a570
Minor: Move Button::paintEvent() into the .cpp file
2021-02-14 19:22:41 +00:00
Sergio Martins
92f6453d26
Minor refactoring
...
Adds scalingFactorIsSupported(dpr) to utils, to workaround a bug
on earlier Qt
2021-02-14 19:17:15 +00:00
Sergio Martins
8bf3aa9b4d
Use sizeHint() for title bar buttons
...
In preparation for using style pixel metrics, which is more
HDPI friendly
2021-02-14 18:43:49 +00:00
Sergio Martins
c52db1945b
Minor rename for readability
2021-02-14 17:52:36 +00:00
Sergio Martins
09a10cd791
Minor rename for readability
2021-02-14 17:42:35 +00:00
Sergio Martins
07fd577894
MDI|qtquick: Fix resize cursor not being shown
...
the docked widgets were resizable but the cursor didn't change
shape
2021-02-14 17:41:01 +00:00
Sergio Martins
ed900b8531
MDI|qtquick: Allow to resize the docked windows with mouse
...
Was already possible for QtWidgets. For QtQuick we weren't
receiving the mouse events in Frame.
2021-02-14 17:26:03 +00:00
Sergio Martins
fa010357b3
Add Frame::isMDIChanged() signal
2021-02-14 17:21:28 +00:00
Sergio Martins
da6ffc85ef
Fix transparency of QtQuick MDI example
2021-02-14 16:33:02 +00:00
Sergio Martins
b7c23087e1
MDI|qtquick: Don't use private API in the example
2021-02-14 13:30:34 +00:00
Sergio Martins
656f482cad
qtquick: fix build
2021-02-14 13:17:45 +00:00
Sergio Martins
5e03003b94
Add MDI to the ChangeLog
2021-02-14 13:05:34 +00:00
Sergio Martins
48b5b27d42
Introduce MainWindowMDI
...
User no longer needs to use private API
2021-02-14 13:02:48 +00:00
Sergio Martins
fccb815d5a
Fix QtQuick build
2021-02-13 18:56:18 +00:00
Sergio Martins
544d3b026a
MDI windows will now poput into floating mode
...
when dragged behond the edges
Please enter the commit message for your changes. Lines starting
2021-02-13 18:30:59 +00:00
Sergio Martins
15ff882919
MDI: Raise window when we're dragging it
...
Otherwise it's appearing under others, possibly
2021-02-13 16:29:32 +00:00
Sergio Martins
18d405bdfb
MDI: Don't let windows escape its parent
2021-02-13 16:19:05 +00:00
Sergio Martins
4379e7c544
MDI|Item: Allow widget to resize itself outside of the layout domain
...
With a normal KDDW layout, we don't allow the user to arbitrarily
resize widgets, all the resizes are done via dragging Separator,
which interacts closly with the layout.
With MDI however there's no separators. The user is resizing the
widget and the layout doesn't know about it, and it's fine for MDI
2021-02-13 14:17:42 +00:00
Sergio Martins
51e2be9b7b
MDI: Don't paint the titlebar over the frame
2021-02-13 14:06:24 +00:00
Sergio Martins
f2b21d04b3
mdi example: Show KDAB logo
2021-02-13 14:02:22 +00:00
Sergio Martins
a73f35af22
MDI: Implement internal move
...
You can now move internal windows around without them becoming
floating
2021-02-13 13:03:14 +00:00
Sergio Martins
7b3ef03924
Add Draggable::isMDI()
2021-02-13 12:16:28 +00:00
Sergio Martins
a4d03c1514
Add a mdi-example
...
Don't want the main example to be too complex
2021-02-13 12:01:01 +00:00
Allen Winter
eccdee0081
buildsystem - add an uninstall target
...
uses the KDE extra-cmake-module ECMUninstallTarget.cmake
2021-02-12 15:18:01 -05:00
Sergio Martins
48f3390d71
Delete resize handler when floating a MDI dock widget
...
When it's floating it will use native resizing, or the resize handler
from the floating window. Not its own.
2021-02-11 20:09:22 +00:00
Sergio Martins
df6f1e6c8f
Added Frame::isMDI()
2021-02-11 20:00:54 +00:00
Sergio Martins
3c95081aee
MDI: Support internal resize
...
You can now resize docked MDI widgets
2021-02-11 19:37:05 +00:00
Sergio Martins
329a980510
WidgetResizeHandler: Fix case if parent's target wasn't top-level
...
By luck parentGeometry was in global space. Force it to be in global
space, as the target might be more nested.
Will be used by MDI, where Frame's parent is the MDI layout
2021-02-11 19:35:40 +00:00
Sergio Martins
d8605e9ce3
Minor styling: Reduce nesting, process invariant early
2021-02-11 19:15:36 +00:00
Sergio Martins
7dcc6dc114
Frame now takes care of its own resize handler
...
No need to set it from outside
2021-02-11 18:56:45 +00:00
Sergio Martins
64db52fd17
Move the CursorPositions header to the enums header instead
...
Otherwise will have to include WidgetResizeHandler_p.h
where I don't want to. And make it an installed header etc.
2021-02-11 18:52:21 +00:00
Sergio Martins
c0957024ec
Remove some unneeded qDebug
2021-02-10 22:25:45 +00:00
Sergio Martins
649571a2eb
Minor styling for the MDI example
2021-02-10 20:16:19 +00:00
Sergio Martins
60adb0d50b
qtquick: Add a MDI example
...
Instead of poluting the normal example
2021-02-10 20:06:50 +00:00
Sergio Martins
f751d7c24e
TitleBar is now HDPI aware even without the Qt::AA_ properties set
...
It will just query the style, which is already HDPI aware.
2021-02-10 15:17:04 +00:00
Sergio Martins
5ec5ade62f
qtquick: Add a MDI example
2021-02-10 00:19:29 +00:00
Sergio Martins
788c497cbb
Don't crash if it's a MDI layout
2021-02-10 00:01:47 +00:00
Sergio Martins
f6c274b82f
qtquick: Remove unneeded dependency to DockArea
2021-02-09 23:50:52 +00:00
Sergio Martins
5a6b4a6fdd
Don't use transparent titlebar if docked MDI
...
As the dock widgets can overlap over eachother
2021-02-09 23:27:10 +00:00
Sergio Martins
ef212b8c0f
Added TitleBar::isMDI()
2021-02-09 22:38:16 +00:00
Sergio Martins
aa2f46fd00
Added TitleBar::mainWindow()
2021-02-09 22:15:31 +00:00
Sergio Martins
a30808e6b7
Implement ItemFreeContainer::removeItem()
2021-02-09 20:17:59 +00:00
Sergio Martins
f23c55dfec
Implement ItemFreeContainer::restore()
2021-02-09 19:56:12 +00:00
Sergio Martins
583d3188ca
Implement ItemFreeContainer::clear()
2021-02-09 19:51:53 +00:00
Sergio Martins
ae81f64d07
MDI: Comment that these methods don't make sense for MDI
2021-02-09 19:47:51 +00:00
Sergio Martins
8dca2e346c
Add experimental MDI support
2021-02-09 19:25:28 +00:00
Sergio Martins
b995986318
Decouple MainWindow a bit more from DropArea
2021-02-09 18:04:11 +00:00
Sergio Martins
0579b6dcd3
Add a basic MDI layout
...
Not fully functional yet, and no API for end user yet.
2021-02-09 17:44:49 +00:00
Sergio Martins
4d147c7ff3
Remove two drop area dependencies
2021-02-09 17:34:40 +00:00
Sergio Martins
baf5f088dc
Remove more unneeded references to DropArea
...
reference its base class instead
2021-02-09 16:58:24 +00:00
Sergio Martins
2adaacb922
Remove unused AnimatedIndicators files
2021-02-09 16:54:23 +00:00
Sergio Martins
bc6870f4ee
Move the serialize/deserialize functions into base class
2021-02-09 16:52:16 +00:00
Sergio Martins
c6abaf22c1
Decouple WindowBeingDragged from DropArea
2021-02-09 16:41:26 +00:00
Sergio Martins
e04e066177
Remove unneeded DropArea::numFrames()
2021-02-09 16:34:58 +00:00
Sergio Martins
6ad01f4994
Make Frame deal in LayoutWidget instead of its derived class DropArea
2021-02-09 16:32:42 +00:00
Sergio Martins
f6ad75e214
Rename Frame::setDropArea() to Frame::setLayoutWidget()
...
Made it private too.
2021-02-09 16:29:29 +00:00
Sergio Martins
a76864450e
Remove unneeded Frame::dropArea()
2021-02-09 16:25:56 +00:00
Sergio Martins
3fe9994322
Remove some debug statements which are unneeded
2021-02-09 16:25:19 +00:00
Sergio Martins
3bcfcc40c0
Minor decoupling between DropArea and DockWidgetBase
2021-02-09 16:23:49 +00:00
Sergio Martins
92b54f949b
More MultiSplitter decoupling
2021-02-09 16:17:49 +00:00
Sergio Martins
a73746fe8b
tests: Use the MultiSplitter base class in a few places
2021-02-09 16:12:22 +00:00
Sergio Martins
da1fddffe1
Decouple MultiSplitter from MainWindow and FloatingWidget
...
They deal in its base class instead (LayoutWidget)
2021-02-09 16:05:56 +00:00
Sergio Martins
e3b0feb967
DockWidgetBase.cpp uses MultiSplitter's base class now
2021-02-09 15:54:47 +00:00
Sergio Martins
4e6811cfdc
qtquick: Fix build
2021-02-09 15:47:54 +00:00
Sergio Martins
cc47e46e1f
Move lots of methods from MultiSplitter to its base class
...
Should be almost done now
2021-02-09 15:45:22 +00:00
Sergio Martins
4246d99b93
DockRegistry now deals in LayoutWidget
...
Instead of its derived class MultiSplitter
2021-02-09 15:40:44 +00:00
Sergio Martins
ba38e3c1aa
Move lots of methods from MultiSplitter to its base class
2021-02-09 15:38:30 +00:00
Sergio Martins
83aa64928d
Remove duplicate connect
2021-02-09 15:22:12 +00:00
Sergio Martins
5fbff7211b
Move lots of methods from MultiSplitter to its base class
2021-02-09 15:09:07 +00:00
Sergio Martins
eb67f19e3e
Placeholders now receive LayoutWidget instead of the derived class
2021-02-09 14:41:31 +00:00
Sergio Martins
2130a31dfd
Add another base class to MultiSplitter
...
MultiSplitter is the QWidget that holds the layout. But we also
want to support other types of layouts, such as MDI.
2021-02-09 12:37:08 +00:00
Sergio Martins
f3ce208ec1
Merge branch '1.3'
2021-02-09 10:52:55 +00:00
Sergio Martins
146478eb5e
cmake: No need to build the fuzzer during development
2021-02-09 10:52:28 +00:00
Sergio Martins
05413d5a99
Open master for 1.4
2021-02-09 10:44:28 +00:00
Allen Winter
eac726fcb8
open for 1.3.1
2021-02-08 17:05:21 -05:00
Allen Winter
b25af85234
kddockwidgets.spec - OBS fix
2021-02-08 16:42:51 -05:00
Allen Winter
02167a0788
CMakeLists.txt - ECMGeneratePriFile needs CMake v3.12 or above
2021-02-08 16:15:25 -05:00
Allen Winter
54cce9aa41
OBS - update for 1.3.0 release
2021-02-08 15:35:43 -05:00
Allen Winter
73cdc7136c
README.md - a bit of formatting, spelling fixes
2021-02-08 15:25:06 -05:00
Allen Winter
1567a2b847
docs/api/CMakeLists.txt - copy some files needed by the markdown
...
The markdown to html conversion by doxygen doesn't copy
some files referred to in the README.md
2021-02-08 15:24:11 -05:00
Allen Winter
9fe795f8dd
README.md, CONTRIBUTORS.txt - thank you contributors
...
those who have signed the KDAB Copyright License Agreement
2021-02-08 12:29:06 -05:00
Allen Winter
0d6cfd183d
.krazy - exclude the postfix checker
2021-02-08 12:28:45 -05:00
Allen Winter
bba36d041b
minor for Krazy
2021-02-08 12:11:46 -05:00
Sergio Martins
710716f658
Update ChangeLog regarding v1.3.0 release date
2021-02-08 12:15:30 +00:00
Sergio Martins
b39798ac24
qtquick: Fix build
2021-02-08 11:22:25 +00:00
Sergio Martins
1f8fbb8518
Export the DockWidgetBase pimpl for unit-tests
2021-02-08 03:16:50 -08:00
Sergio Martins
51dc666181
Added DockWidget::setFloatingGeometry()
...
Closes #144
2021-02-07 17:26:01 +00:00
Sergio Martins
2a6e716e07
Fix typo in README
2021-02-07 17:04:09 +00:00
Allen Winter
01d68f30e4
docs/api/Doxyfile.cmake - add reimp alias
2021-02-07 07:41:08 -05:00
Allen Winter
1b73d01de8
src/DockWidgetQuick.h - minor doxygen fix
2021-02-07 07:36:55 -05:00
Allen Winter
a421cb0b01
various - include private header first, remove header dupes
2021-02-07 07:07:49 -05:00
Allen Winter
2177336d65
minor spelling
2021-02-07 06:56:49 -05:00
Allen Winter
059a8cc38f
TabWidgetQuick_p.h,TabWidgetQuick.cpp - update copyright year
2021-02-07 06:50:03 -05:00
Sergio Martins
4c33cd6409
Sidebar overlays now maintain their size when toggled
...
Fixes #155
2021-02-06 22:55:14 +00:00
Sergio Martins
ea48d52447
refactor MainWindowBase::updateOverlayGeometry()
...
Receives a size instead of a bool now.
2021-02-06 22:30:21 +00:00
Sergio Martins
85f4be750a
Remove bogus sizing
2021-02-06 21:43:05 +00:00
Sergio Martins
0ba37a347b
Save last overlayed location
...
For issue #155
2021-02-06 20:12:39 +00:00
Sergio Martins
6ee1900331
Add a test for issue #155
2021-02-06 19:43:26 +00:00
Sergio Martins
44bf1ef322
qtquick: Move dummy QAction class into the pimpl header
...
No need for it to be in the public header
2021-02-06 18:20:44 +00:00
Sergio Martins
863691c313
Remove some private API from DockWidgetBase.h
...
Moved it into the pimpl
2021-02-06 16:32:13 +00:00
Sergio Martins
97d7cbf657
ChangeLog: Mention we have experimental QtQuick support
2021-02-06 15:56:13 +00:00
Allen Winter
3089535de6
CMakeLists.txt, conan/conanfile.py - this is version 1.3.0
2021-02-06 10:31:17 -05:00
Sergio Martins
36818093c6
Merge branch '1.2'
2021-02-06 15:20:08 +00:00
Allen Winter
e5857df439
conan/conanfile.py - upgrade version number
2021-02-06 10:09:32 -05:00
Allen Winter
42d25dc1a5
fwd_headers/kddockwidgets/KDDockWidgets.h - update copyright year
2021-02-06 10:07:55 -05:00
Sergio Martins
3b5e78bfba
ChangeLog: Add release date of 1.2.1
2021-02-06 13:02:50 +00:00
Sergio Martins
639dce7c53
Remove the QtQuick presets from the 1.2 branch
...
It's for master only
2021-02-06 12:46:18 +00:00
Sergio Martins
882f54647c
ChangeLog removed mention to 1.3 from the 1.2 branch
2021-02-06 12:43:56 +00:00
Sergio Martins
38443048b8
Merge branch '1.2'
2021-02-05 16:42:07 +00:00
Sergio Martins
621c3dbeca
Also clear the overlay internals when floating an overlay
...
Fixes a crash.
Relates to #162
2021-02-05 16:32:41 +00:00
Sergio Martins
f1e4f7ecda
Add another test
2021-02-05 14:34:12 +00:00
Sergio Martins
249d1b6790
Remove from the sidebar when floating a widget
...
Fixes #162
2021-02-05 12:35:03 +00:00
Sergio Martins
894e0fd03a
Added test for issue #162
2021-02-05 11:49:52 +00:00
Allen Winter
ec1f009914
CLA - switch to a form-fillable PDF version
2021-02-04 16:26:34 -05:00
Allen Winter
697417b906
CLA - switch to a form-fillable PDF version
2021-02-04 16:17:53 -05:00
Sergio Martins
dadf57c184
Merge branch '1.2'
2021-02-04 19:59:29 +00:00
Sergio Martins
7caa83be19
Also hide overlay when clicking on empty space of a main window
2021-02-04 19:56:35 +00:00
Sergio Martins
e745d38b1e
Improve the test a bit
...
clicking on the bottom is not very effective as that's where the
bottom sidebar is
2021-02-04 19:52:21 +00:00
Sergio Martins
6d389315bf
Add test for issue #157
2021-02-04 19:31:31 +00:00
Sergio Martins
024d56505a
Merge branch '1.2'
2021-02-04 13:30:35 +00:00
Sergio Martins
daec97ad66
Don't require QtX11Extras for WASM
...
Fixes #163
2021-02-04 13:30:04 +00:00
Sergio Martins
a98daead1d
README: Improve paragraph about reporting bugs
...
Mention that sha1 and which operating system are important too
2021-02-03 13:34:33 +00:00
Sergio Martins
2c5cf77cf2
Fix build with cmake Visual Studio generator
...
Fixes #156
2021-02-02 23:02:04 +00:00
Sergio Martins
a6b9a82e9c
Fix crash when hosting QQuickWidget
...
There's no need to check if invisible widgets are candidates
for docking. There's usually no downside either, except that
QQuickWidget is very sensitive with when its platform window
is created, so don't force the creation.
Will cherry-pick to 1.2 if no regression is found
Fixes #150
2021-01-31 13:05:20 +00:00
Sergio Martins
02cf9d1cd2
Make FloatingWindowWidget::m_vlayout protected
...
So users can override
2021-01-30 14:28:30 +00:00
Sergio Martins
cde814b216
Add a static FloatingWindow::s_windowFlagsOverride member
...
The user can now change which window flags FloatingWindow will get,
as his own risk.
Not doing it via public API such as FrameworkWidgetFactory as I don't
want to encourage or support this. The amount of combinations that
can go wrong is open ended.
Fixes #149
2021-01-30 13:59:42 +00:00
Sergio Martins
5f435cd8c7
minor comment: Don't mention deprecated flag
2021-01-30 13:40:07 +00:00
Sergio Martins
6ccd98ca01
Move DockWidgetBase::eventFilter() into the private class
...
Fixes issue #151 where the user is overriding eventFilter too
and getting into some edge cases.
Could be worked around in user code, but it's always good to have
less protected and private API in public classes.
2021-01-29 20:20:01 +00:00
Sergio Martins
799f2a81a7
Remember previous tab position when toggling float
...
This was already the case, but didn't work in case the tabs
were re-oredered by the user manually
Fixes #154
2021-01-29 19:15:23 +00:00
Sergio Martins
eb9fa6f567
Add unit-test for issue #154
2021-01-29 19:07:32 +00:00
Sergio Martins
9ebd595202
Remove stray debug
2021-01-29 18:32:23 +00:00
Sergio Martins
b50d301f44
Add DockWidget::tabIndex()
2021-01-29 18:32:10 +00:00
Sergio Martins
b01b8908ea
qtquick: Fix build
...
That test is QtWidgets only
2021-01-29 18:23:37 +00:00
Sergio Martins
78c2cdddc4
minor: Make indexOfDockWidget() take a const dock widget
...
So it can be called from const places
2021-01-29 18:22:20 +00:00
Sergio Martins
1eaac74fb0
README: reword the getting involved section a bit
...
Explain that patches as images are not good when reporting bugs
2021-01-29 12:02:14 +00:00
Sergio Martins
ee759a5459
Don't trigger "Delete on Close" when sending to the sidebar
2021-01-28 22:40:41 +00:00
Sergio Martins
e9d19805d7
Add a force close to DockWidgetBase::Private
...
So we can add an argument there, without changing public API
2021-01-28 22:19:21 +00:00
Sergio Martins
1f74ba43f0
Add some includes to DockWidgetBase_p.h
...
It's not included directly, but let's be nice to IDEs.
2021-01-28 21:54:45 +00:00
Sergio Martins
bc1e686455
Create DockWidgetBase_p.h and move the pimpl there
...
So we can reuse the pimpl and not have to expose public API
for implementation details
2021-01-28 21:44:12 +00:00
Allen Winter
5cc0552c57
Merge pull request #153 from KDAB/fix-missing-source
...
Added missing layout_saver wrapper file in the source list
2021-01-28 10:01:38 -05:00
Renato Araujo Oliveira Filho
6c06bc6af8
Added missing layout_saver wrapper file in the source list
2021-01-28 11:30:25 -03:00
Sergio Martins
2193c131a8
Merge branch '1.2'
...
Should fix #152
2021-01-27 23:38:51 +00:00
Sergio Martins
9a38626af5
Allow more private includes to be used from installed dir
2021-01-27 23:31:59 +00:00
Sergio Martins
f0c243f6d1
Add KDDockWidgets.h fwd_header
2021-01-27 23:27:04 +00:00
Sergio Martins
f0441f1a08
Normalize some dock_exports.h includes
...
In case these files are ever included from an installed location
2021-01-27 23:00:32 +00:00
Sergio Martins
8a9d9f9fce
Merge branch '1.2'
2021-01-27 22:55:36 +00:00
Sergio Martins
db06c496cf
Remove dependencies to LayoutSaver_p.h
...
Only the impl needs to include it
2021-01-27 22:51:41 +00:00
Sergio Martins
2aa97e6565
Add a fwd header for DragController_p.h
2021-01-27 22:28:57 +00:00
Sergio Martins
68597cac22
install two more private includes
2021-01-27 22:27:46 +00:00
Sergio Martins
afa543ec79
Fix .clang-format
...
Was complaining about Cpp14 not being a valid enumerator
2021-01-27 22:07:26 +00:00
Sergio Martins
d1df6e910b
Add a .clang-format file
2021-01-27 22:00:06 +00:00
Sergio Martins
74ae567ced
vscode: Update workspace files
...
formats code you've changed now
2021-01-27 21:32:06 +00:00
Allen Winter
8d657c5b18
Merge branch '1.2'
2021-01-27 11:59:27 -05:00
Allen Winter
802bdc102f
src/CMakeLists.txt - fix Windows library versioning
...
was broken for RelWithDebInfo builds
2021-01-27 11:55:51 -05:00
Sergio Martins
218d18793d
Remove some unneeded horizontal line from MyCentralWidget
...
The difference is minimal and probably looks very bad with dark
and custom themes.
Let's minimize the amount of hardcoded styling.
2021-01-26 19:32:10 +00:00
Sergio Martins
723c29e33b
Merge pull request #119 from JPatriceR/add-LayoutSaver-python-binding
...
Add binding for LayoutSaver class
2021-01-26 14:58:56 +00:00
Sergio Martins
2e248c6658
README: Add a paragraph about versioning and API/ABI compat
2021-01-26 14:36:30 +00:00
Sergio Martins
7fbd66d54c
Merge branch '1.2'
2021-01-26 14:26:26 +00:00
Sergio Martins
4bede063ae
Make DockWidgetBase::eventFilter() protected
...
The users might want to override it
Fixes #148 and restores source compat with v1.1
2021-01-26 14:25:30 +00:00
Sergio Martins
cbc5fec119
Added Config::setDisabledPaintEvents()
...
Makes our internal widgets not override QWidget::paintEvent(),
which gives full power to the user to stylesheets.
Was already possible, but required the user to override the
internal widgets via the widget factory
For issue #146
2021-01-24 10:51:58 +00:00
Sergio Martins
81927b088b
Add CustomizableWidget enum
2021-01-24 10:15:02 +00:00
Sergio Martins
5556edd83b
vscode: prefix the vscode workspaces with "code."
...
Easier to open on command line if they have the same prefix
2021-01-23 12:41:31 +00:00
Sergio Martins
2834532b5f
example: Add a keyboard shortcut to toggle dock widgets visiblity
2021-01-21 16:22:43 +00:00
Sergio Martins
17638bc29f
Fix regression with DockWidget::toggleAction()
...
Added unit-test too.
While we're processing the toggle action triggering isOpen() is
always false.
2021-01-21 16:16:29 +00:00
Jean-Patrice Laude
67b48cc417
Add binding for LayoutSaver class
2021-01-20 16:53:32 +01:00
Sergio Martins
451996016a
Merge pull request #128 from CE-Programming/fix/pri
...
Fix issues with pri file.
2021-01-19 22:38:37 +00:00
Sergio Martins
52b9a9223d
Update ChangeLog
2021-01-19 22:25:00 +00:00
Sergio Martins
d5b80b0bbd
Fix offset when dragging too fast
...
On Windows, when we start a drag, we switch to native dragging in
mid-flight, so that AeroSnap still works
Fixes #121
2021-01-19 22:23:20 +00:00
Sergio Martins
ae14e49338
Add a comment, explains why we switch to native drag
2021-01-19 21:53:35 +00:00
Sergio Martins
c23bce9829
Minor coding style: Remove nested ifdef
2021-01-19 21:50:31 +00:00
Sergio Martins
40a549ca29
Fix double delete screwing with lastPositions()
...
Fixes #141
2021-01-18 23:37:17 +00:00
Sergio Martins
cac435a2a5
tests: Add missing cleanup
2021-01-18 22:52:54 +00:00
Sergio Martins
b81f50402a
qtquick: Fix build
2021-01-18 20:42:41 +00:00
Sergio Martins
44587cb947
Don't require LayoutSaver_p.h to be installed
...
It's impl detail that doesn't need to be installed
2021-01-18 20:37:22 +00:00
Sergio Martins
54314273a0
Merge branch '1.2'
2021-01-18 19:40:18 +00:00
Sergio Martins
de068dc6ff
Use less relative includes, some of them were wrong
...
The example now includes them, so we can detect build failures
if they get wrong again
Fixes #140
2021-01-18 18:57:15 +00:00
Allen Winter
64f537ad1e
Merge branch '1.2'
2021-01-18 10:15:07 -05:00
Allen Winter
312c89f884
src/CMakeLists.txt - fix kddockwidgets_version.h install destination
2021-01-18 10:14:37 -05:00
Renato Araujo Oliveira Filho
d9fd7eb3a5
Fix python bindings build
...
Task-Id: KDABCI-692
2021-01-18 10:10:51 -05:00
Allen Winter
af9206f350
Merge pull request #142 from KDAB/python-build-fix
...
Fix python bindings build
2021-01-18 10:07:04 -05:00
Allen Winter
7c99bb084e
Merge branch '1.2'
2021-01-18 10:05:27 -05:00
Allen Winter
1a2757b00a
Generate and install kddockwidgets_version.h
...
defines a version string and other useful versioning macros
Issue#138
2021-01-18 10:03:21 -05:00
Renato Araujo Oliveira Filho
1e7a2110b1
Fix python bindings build
...
Task-Id: KDABCI-692
2021-01-18 11:58:42 -03:00
Sergio Martins
243146fe49
Update ChangeLog
2021-01-17 23:24:58 +00:00
Sergio Martins
370d139dfc
Fix Flag_NativeTitleBar
...
It shouldn't use the FloatingWindow::isInDragArea() code path
2021-01-17 23:11:41 +00:00
Sergio Martins
c4e7db34a4
Minor readability improvement
2021-01-17 22:51:37 +00:00
Sergio Martins
a4f6b72157
Fix FloatingWindow::isInDragArea() returning false even with HTCAPTION
...
If the last clicked position is HTCAPTION then we're sure we're
dragging. Problem with comparing the rect is that mouse events are
async, and by the time we use the mouse event pos the window is already
somewhere else. So just use HTCAPTION, which is 100% correct.
Fixes #103
2021-01-17 16:28:11 +00:00
Sergio Martins
de3ca6dba5
vscode: Remove launch.json
...
We'll do this per workspace file instead
2021-01-17 14:10:19 +00:00
Sergio Martins
bdfcfdd0fe
Update ChangeLog
2021-01-16 22:39:11 +00:00
Sergio Martins
dbf357ce66
Fix restoring window maximized state
...
Fixes #81
2021-01-16 22:37:30 +00:00
Sergio Martins
e950cf7fc3
tests: Add a test for issue #81
2021-01-16 21:38:36 +00:00
Sergio Martins
8dfad1c910
vscode: Update the workspace files
...
Now autogenerated from CMakePresets.json.
Added the Qt6 one too.
2021-01-16 19:40:36 +00:00
Sergio Martins
107d4e973c
Remove a script I'm no longer using
2021-01-16 15:50:27 +00:00
Sergio Martins
e33766a4fa
examples: Illustrate Config::Flag_CloseOnlyCurrentTab
2021-01-16 13:19:37 +00:00
Sergio Martins
6a550c6c4a
Added Config::Flag_CloseOnlyCurrentTab
...
When clicking on the TitleBar's close button it closes all the
dock widgets in the tab, by default. With the new option it will
close only the current tab
2021-01-16 13:06:29 +00:00
Sergio Martins
a0fc2a8ce7
Minor logic readability fix
...
They are mutually exclusive
2021-01-16 12:00:43 +00:00
Sergio Martins
ab257b3468
float docked widgets that have LayoutSaverOption::Skip before restore
2021-01-15 21:30:38 +00:00
Sergio Martins
e6bdb28484
Added convenience DockWidgetBase::skipsRestore()
2021-01-15 20:17:45 +00:00
Sergio Martins
c52446f3b0
Merge branch '1.2'
2021-01-15 09:27:17 +00:00
Sergio Martins
9cadfb26d9
Fix toggleAction() when dock widget is in the sidebar
...
It should toggle the overlay, not dock the widget
Fixes #139
2021-01-15 09:24:11 +00:00
Sergio Martins
7d5ea8f908
tests++
2021-01-15 09:20:58 +00:00
Sergio Martins
161b33370e
Add more tests
2021-01-15 09:04:05 +00:00
Sergio Martins
8dd7a90b34
Add convenience DockWidgetBase::isInSideBar()
2021-01-15 08:52:17 +00:00
Sergio Martins
7ff865a36f
tests: Add test for #139
2021-01-15 08:44:21 +00:00
Sergio Martins
d0b8ee606a
Honour LayoutSaverOption::Skip for floating windows with many dock widgets
...
If all dock widgets in the floating window have the Skip flag then the
FloatingWindow can too
2021-01-14 18:33:29 +00:00
Sergio Martins
c6c3b16fd2
LayoutSaver: Add some utility functions
2021-01-14 18:11:29 +00:00
Sergio Martins
64a6cbb2e4
Add all|anyDockWidgetsHave overloads taking a LayoutSaverOption
2021-01-14 18:01:54 +00:00
Sergio Martins
e1cf532437
tests: Add an XFAIL for a LayoutSaverOption::Skip case
2021-01-14 17:57:37 +00:00
Sergio Martins
67f2127710
Add one more unit-test regarding DeleteOnClose
2021-01-14 17:51:02 +00:00
Sergio Martins
9111b424a1
TitleBar: Also update the auto/hide button
...
For completeness, doesn't mean it's actually needed.
For issue #137 .
2021-01-14 11:39:15 +00:00
Sergio Martins
772b51216f
Merge branch '1.2'
2021-01-13 23:15:03 +00:00
Sergio Martins
a79a2f5ecb
Fix restoring non-closable state
...
For issue #137
A simpler solution than on master, doesn't include the refactoring.
2021-01-13 23:13:39 +00:00
Sergio Martins
585c0d64ed
Fix close button enable state not being restored with LayoutSaver
...
Fixes #137
2021-01-13 23:07:49 +00:00
Sergio Martins
7ddb95a417
Add a single TitleBar::updateButtons()
...
updateCloseButton() can now be private
2021-01-13 23:07:49 +00:00
Sergio Martins
02648eb54e
Update ChangeLog re PySide6
2021-01-13 22:51:18 +00:00
Sergio Martins
54a1050fbb
Add unit-test for issue #137
2021-01-13 22:23:44 +00:00
Sergio Martins
f997b2d2f0
qtquick: Fix build
2021-01-13 13:31:33 +00:00
Sergio Martins
8f61e57b57
Add DockWidget::Option::Option_DeleteOnClose
2021-01-13 12:54:18 +00:00
Sergio Martins
cfcff6f2d7
Minor rename
2021-01-12 22:49:07 +00:00
Sergio Martins
44d7cc0588
Add FloatingWindow::allDockWidgetsHave(option) and the any* variant
2021-01-12 22:42:38 +00:00
Sergio Martins
c91275d091
vscode: Use workspace files instead of project settings
...
So we can build for QtQuick too with different settings
2021-01-12 15:20:29 +00:00
Sergio Martins
69c88919c0
cmake: Export a compile_commands.json which helps vscode
...
Need to disable unity build otherwise intellisense can't find
our source files in the compile_commands.json. Only for the dev-*
presets anyway
2021-01-12 14:25:11 +00:00
Sergio Martins
e0e6f55868
Introduce DockWidgetBase::LayoutSaverOptions enum
...
The first enumerator is "Skip", meaning the dock widget won't
be affected by save/restore. It won't disappear while restoring,
and won't be shown if already hidden. (only applies to floating widgets)
2021-01-11 23:33:32 +00:00
Sergio Martins
7698584ee0
Fix potential invalid index when restoring layout
...
We save the index of each FloatingWindow when saving a layout,
but when restoring we might not want to restore all FloatingWindows,
for example, if we use a LayoutSaver with another affinity.
So, the index in Position::deserialize() should be a index to
LayoutSaver::Layout::floatingWindows, and not to DockRegistry::self()->floatingWindows()
since the later might be smaller.
2021-01-11 21:55:47 +00:00
Sergio Martins
d034722ba9
LayoutSaver: Add some utilities
2021-01-11 21:16:02 +00:00
Sergio Martins
e1e07c95ba
Merge pull request #134 from KDAB/python6
...
Added PySide6 support
2021-01-11 19:35:53 +00:00
Renato Araujo Oliveira Filho
4e79c68a7d
Added PySide6 support
...
Task-Id: KDDW-27
2021-01-11 16:31:49 -03:00
Sergio Martins
d80325ec8f
Merge branch '1.2' into master
2021-01-10 23:11:17 +00:00
Sergio Martins
e9925785ab
Cancel the drag if the draggable is destroyed
...
Can be destroyed for reasons we can't control or simply destroyed
because the draggable was docked/undocked
Fixes #120
2021-01-10 23:07:57 +00:00
Sergio Martins
81efda2d11
Add a QPointer guard for the draggable
...
So we can detect if it was deleted meanwhile
2021-01-10 23:00:19 +00:00
Sergio Martins
36eef80192
Also pass InitialOption to addDockWidgetToContainingWindow()
...
So you can control initial size and such
2021-01-09 13:58:56 +00:00
Sergio Martins
306bf26f66
Remove some qCDebug I never needed
2021-01-09 13:27:30 +00:00
Sergio Martins
e07fb7f121
DockWidget::addDockWidgetToContainingWindow() now accepts docking to main window
...
Was already stated in the docs that it would work with a main window but implementation
only allowed floating window.
Fixes #132
2021-01-09 13:24:06 +00:00
Sergio Martins
bc86cfcb1f
Move Item::insertItem() to the derived class
...
Item itself doesn't know how to insert into the layout.
We'll soon have a new derived class which will do things differently
2021-01-09 00:11:59 +00:00
Sergio Martins
63bb7e31cd
Remove unused method
2021-01-08 22:32:42 +00:00
Sergio Martins
1840d50fc0
Move LayoutBorderLocation out of Item
...
It only affect the box layout
2021-01-08 22:24:53 +00:00
Sergio Martins
c6fd4e4bc4
Remove duplicate Location enum
...
No longer needed
2021-01-08 22:11:03 +00:00
Sergio Martins
46210203f7
Rename ItemContainer to ItemBoxContainer
2021-01-08 22:02:02 +00:00
Sergio Martins
5a2d000ddd
qtquick: Fix weak vtable
2021-01-08 18:25:14 +00:00
Sergio Martins
c73c26e5cb
tests: Fix overloaded signal "parentChanged()"
2021-01-08 18:24:51 +00:00
Sérgio Martins
39c3e4fd13
Fix flags being compared against internal flag enum
2021-01-08 17:09:49 +00:00
Sergio Martins
011d83b7d9
tests: Also restore the internal flags
2021-01-08 09:03:24 -08:00
Sergio Martins
26f1b75976
tests: delete the dockwidgets when each test ends
...
Will save us from doing manual cleanup.
2021-01-08 08:45:28 -08:00
Sergio Martins
309a90d3a6
tests: Fix a test on windows
2021-01-08 08:28:41 -08:00
Sérgio Martins
946e1e977e
tests: Make sure our own stuff is deleted
...
but don't care about other stuff.
Other QWindows might be deleted delayed. We care more about
DockWidget and MainWindow due to their unique names. They need to
be deleted before the next test starts.
2021-01-08 15:43:04 +00:00
Sergio Martins
7f1347f15d
Overload DragRegistry::floatingWindows() to return windows being deleted too
2021-01-08 15:38:18 +00:00
Jacob Young
b81c32b1c9
Fix issues with pri file.
2021-01-07 20:43:47 -05:00
Sergio Martins
2e498f644b
Remove unneeded multisplitter examples
...
We use the top-level examples instead
2021-01-07 16:45:29 +00:00
Sergio Martins
ee0272e036
Merge pull request #129 from mateoconlechuga/master
...
Add support for setting toggle action icon
2021-01-07 16:09:34 +00:00
Sergio Martins
4aa87c1758
Merge branch '1.2'
2021-01-07 11:15:29 +00:00
Sergio Martins
3b1158b82f
Fix potential crash uncovered by UBSAN
...
m_inCtor might be read before being initialized since when
the earlier members are initialized they can call back into
Frame.
2021-01-07 11:13:56 +00:00
Sergio Martins
1aee98bebd
README-WASM: Minor correction, library is static
2021-01-07 11:13:56 +00:00
Allen Winter
b5a6433950
Merge branch '1.2'
2021-01-06 10:55:54 -05:00
Allen Winter
077264fd54
CopyrightAssignmentForm.docx - update email address
2021-01-06 10:55:26 -05:00
Kevin Funk
bee653cf80
Streamline README.md a bit
2021-01-06 16:04:14 +01:00
Sergio Martins
e1363aadaa
Remove inclusion of moc from .cpp file
...
doesn't play nice with cmake unity build on older cmake
2021-01-06 14:40:40 +00:00
Sergio Martins
43877ca712
README: Added url of our WASM demo
2021-01-06 14:35:46 +00:00
Sergio Martins
f7cc54ad38
Merge branch '1.2'
2021-01-06 12:00:13 +00:00
Sergio Martins
538f318fac
README-WASM: Minor correction, library is static
2021-01-06 11:07:52 +00:00
Sergio Martins
f0376fa7a2
Disable unity build on the stable branch
...
Fixes a build failure on ubuntu.
Will probably only enabled for development.
2021-01-06 10:59:13 +00:00
Sergio Martins
0d2bccc15e
Deprecate AddingOption
...
Will probably be removed in v1.5
2021-01-05 20:32:14 +00:00
Sergio Martins
842b89c36d
Restore source-compat with 1.2
...
It's not very hard. Just added the old enum and an implicit ctor.
2021-01-05 19:09:11 +00:00
Sergio Martins
1d74c67bd4
Merge pull request #130 from dangelog/more-build-fixups
...
More build fixups
2021-01-04 15:23:55 +00:00
Sergio Martins
ea0dd04bd9
Fix build with installed KDDW
2021-01-04 14:48:26 +00:00
Giuseppe D'Angelo
a5dbab096b
More build fixups
2021-01-04 15:17:47 +01:00
mateoconlechuga
f1f555d5ab
Add support for setting toggle action icon
...
This adds support for a custom icon to be displayed in a QMenu.
2021-01-03 19:36:56 -07:00
Sergio Martins
5b60a929ab
Merge branch '1.2'
2021-01-04 00:20:56 +00:00
Sergio Martins
f4404dcbe0
qt6: disable -Wconversion
...
the long long int to int conversions due to the Qt6 containers
are harmless
2021-01-04 00:12:55 +00:00
Sergio Martins
dd81e02d94
Fix Qt6 build
2021-01-03 22:17:25 +00:00
Sergio Martins
f4643aeefd
Merge branch '1.2'
2021-01-03 22:15:33 +00:00
Sergio Martins
e563ffb673
Add presets for Qt6 dev build
2021-01-03 22:12:56 +00:00
Sergio Martins
4cceec82ac
Remove unused variable
...
Should fix MingW build with -Werror
2021-01-03 21:24:21 +00:00
Sergio Martins
4b868e2078
README: Mention that Qt6 is supported and MSVC 2013 won't be
2021-01-03 21:22:41 +00:00
Allen Winter
875544a449
Merge branch '1.2'
2021-01-02 09:32:20 -05:00
Allen Winter
a2f4c972a6
update copyright year
2021-01-02 09:27:50 -05:00
Sergio Martins
2b0a6e5d06
README: Mention VS 2013 isn't supported anymore
...
We're getting an ICE
2020-12-28 22:42:24 +00:00
Sergio Martins
5f7e645ed6
Merge branch '1.2'
2020-12-28 22:28:15 +00:00
Sergio Martins
59c90c01f9
README: Mention that Qt6 is supported and MSVC 2013 won't be
2020-12-28 22:27:38 +00:00
Sergio Martins
92063ab61b
Remove some duplicate code, Qt does the same already
...
Recently Qt implemented something similar. Since we only support
aero snap with Qt 5.15 we dont need KDDW's native win32 code anymore
cc issue #121
2020-12-28 13:06:37 -08:00
Sergio Martins
003ec5aa5b
Probably fix namespaced build
2020-12-28 19:35:03 +00:00
Sergio Martins
02bf43b468
Add InternalFlag_DontShowWhenUnfloatingHiddenWindow
...
It's an internal knob you can turn so that setFloating(false)
doesn't show the dockwidget. Only adding this flag in case you need
to support both KDDW and QDW at the same time, or during porting/evaluation.
Fixes #125
2020-12-28 19:19:46 +00:00
Sergio Martins
50e1285839
Move more internal enumerators into the internal enum
...
the public enum is now clean
2020-12-28 14:36:42 +00:00
Sergio Martins
3fb6574322
Move Flag_internal_NoAeroSnap into its own enum
...
Enumerators not intended for the public shouldn't be in the
public enum. Move it to a private enum.
2020-12-28 14:01:16 +00:00
Sergio Martins
fa2501d5e4
Merge branch '1.2'
2020-12-28 12:35:04 +00:00
Jacob Young
0fe58fd160
Fix filename case so that it will build on a case-sensitive filesystem.
2020-12-28 12:34:03 +00:00
Sergio Martins
01f3042f48
Merge pull request #127 from CE-Programming/fix/case
...
Fix filename case so that it will build on a case-sensitive filesystem.
2020-12-28 12:24:23 +00:00
Sergio Martins
6719dd2b9e
Allow to pass a preferred initial size to MainWindow::addDockWidget()
...
fixes #95
2020-12-28 11:59:09 +00:00
Sergio Martins
08c058b214
Remove unimplemented DefaultSizeMode::SizePolicy
...
It's public API so don't expose enumerators that don't work
2020-12-28 10:58:37 +00:00
Jacob Young
e4502d4f64
Fix filename case so that it will build on a case-sensitive filesystem.
2020-12-28 03:07:30 -05:00
Sergio Martins
db928a0fca
refactor: Move the DefaultSizingMode enum into InitialSizingOption
...
It's another enum that affects the initial sizing.
No behaviour was change in this commit.
Needed for issue #95
2020-12-28 00:17:13 +00:00
Sergio Martins
5582f37a18
Introduce InitialOption struct
...
addDockWidget() received a AddingOption enumerator. But that
enum isn't enough, as we also want to be able to specify an initial
QSize.
So, instead of adding yet another parameter to addDockWidget(), we
create a struct to old those "initial settings".
Implies a minor source break, but trivial to fix in user code,
just rename the enumerator.
Honouring preferredSize will be a followup.
Needed for issue #95
2020-12-27 20:22:02 +00:00
Sergio Martins
a28e152a37
Remove duplicate DefaultSizeMode enum
...
It's already in Item_p.h
2020-12-27 13:56:58 +00:00
Sergio Martins
d6dea6f426
TabWidget: Remove paint event hack
...
Origin unknown, came from "initial commit".
Can't notice any difference without it. Users can do such hacks
by overriding it
2020-12-27 12:58:12 +00:00
Sergio Martins
d29f9fdd0d
Fix install location of TabWidget_p.h
...
It moved location in the repo recently
2020-12-27 12:39:08 +00:00
Sergio Martins
a2a80df5df
Add static function DockWidgetBase::byName()
...
So users don't have to use private API.
Fixes issue #126
2020-12-27 11:41:16 +00:00
Sergio Martins
48ce3a972f
DockWidget: Move some clutter to the end of the file
...
So users not using doxygen can quickly see the API
2020-12-27 11:34:44 +00:00
Sergio Martins
9fae250897
DockWidget: Make the serialization methods private
...
They are not for the public
2020-12-27 11:32:38 +00:00
Sergio Martins
4dd703dcb2
Remove another unneeded qWait
2020-12-24 11:57:18 +00:00
Sergio Martins
e46b5b2edf
tests: Remove a few unneeded qWaits regarding QStateMachine
...
We don't use QStateMachine anymore
2020-12-24 11:55:45 +00:00
Sergio Martins
7febcf2170
qtquick: Uncomment another TabBar that passes now
2020-12-24 11:53:13 +00:00
Sergio Martins
012ed4cf1d
qtquick: Uncomment another test regarding tab widget
2020-12-24 11:43:13 +00:00
Sergio Martins
18283c4d1a
qtquick: Enable another QTabBar test
2020-12-23 23:37:37 +00:00
Sergio Martins
2bb46b1cdf
Uncomment another tab test
2020-12-23 23:11:09 +00:00
Sergio Martins
113263a4a1
qtquick: Enable one more QTabBar test
2020-12-23 22:47:36 +00:00
Sergio Martins
a6ca44cde6
qtquick: double-clicking a tab will detach it now
2020-12-23 20:37:59 +00:00
Sergio Martins
894be60a75
tests: Add pressOn/doubleClickOn that receives a QWindow
...
Easier as we don't need to know the actual QWidget/QQuickItem
receiver. The QWindow will deliver it.
2020-12-23 20:36:50 +00:00
Sergio Martins
244a1bec24
Merge branch '1.2'
2020-12-23 14:34:39 +00:00
Sergio Martins
51d78ba20b
cmake: Allow to not build the fuzzer
...
Slight build improvement locally.
Still build by the CI anyway.
Did the same for the linter.
2020-12-23 13:36:43 +00:00
Sérgio Martins
8291025dfa
tests: Make the tests run much faster
...
tst_docks is already run in parallel. Then it was running
again sequentially!
2020-12-23 13:32:15 +00:00
Sergio Martins
6ea1d4ca58
Minor coding style
2020-12-22 18:58:51 +00:00
Sergio Martins
771bf10951
Merge branch '1.2'
2020-12-22 18:48:22 +00:00
Sergio Martins
67a3270324
cmake: Add a setting to enable -Werror without developer build
...
Enabled for clazy, for example
2020-12-22 18:16:35 +00:00
Sergio Martins
cd859d6725
Fix a bunch of clazy warnings
2020-12-22 17:01:50 +00:00
Sergio Martins
092b4afe4a
Add a clazy preset
2020-12-22 16:05:10 +00:00
Sergio Martins
f8d0ffe7ba
Fix a few clazy warnings
2020-12-22 16:02:55 +00:00
Sergio Martins
10f47a701f
Fix -Wclazy-copyable-polymorphic
2020-12-22 15:38:50 +00:00
Sergio Martins
d3224ed266
Fix -Wclazy-qstring-arg
2020-12-22 15:28:29 +00:00
Sergio Martins
2ccb5391bb
Fix -Wclazy-detaching-temporary
2020-12-22 15:14:28 +00:00
Sergio Martins
5c0c9799a4
Fix build with clang -Wsigness
2020-12-22 15:14:13 +00:00
Sergio Martins
5ccbb5b056
build-all.dart: no need to pass the cmake variables
...
they are already in the preset
2020-12-22 12:28:32 +00:00
Sergio Martins
fc04455e93
build-all.dart: Update the usage comment
2020-12-22 12:15:15 +00:00
Sergio Martins
4ae8f461cb
Merge branch '1.2'
2020-12-22 11:56:45 +00:00
Giuseppe D'Angelo
17539e5b88
Frame: stop using "virtual" signals
...
They don't work as expected across DLL boundaries on MSVC: connecting
to Frame::isFocusedChanged using the PMF syntax fails.
The reason has to do with how MSVC implements pointers to virtual
function members: they are "regular" function pointers to a DLL-local
stub that implements the virtual call. For that reason, a connect()
happening in client code would generate a pointer for the signal that
doesn't compare equal to the same pointer generated from inside KDDW;
and moc-generated code relies on this comparison to find the index of
the signal.
Just avoid the whole thing: rename the non-signal virtual call into a
"callback", and reimplement it in the first QObject subclass to turn it
into a proper signal.
2020-12-22 11:54:44 +00:00
Sergio Martins
e53b9c71da
Update build-all.dart with the contents from master
...
Adding the --tests option should have been done in 1.2 branch
2020-12-21 20:19:59 +00:00
Sergio Martins
9275f852d6
CMakePresets: Enable sanitizers for our developer builds
2020-12-21 20:06:40 +00:00
Sergio Martins
dd8f46880f
qtquick: Implement TabBarQuick::tabAt()
...
Also redirect the mouse press event to our C++ counterpart.
2020-12-21 17:09:55 +00:00
Sergio Martins
e9159a08bd
Fix build when usign installed TabWidget_p.h
2020-12-21 13:31:10 +00:00
Sergio Martins
cf89891e4f
Merge branch '1.2'
2020-12-21 12:43:31 +00:00
Sergio Martins
1cc8824f84
Workaround shiboken crash, found by Milian
2020-12-21 12:41:09 +00:00
Sergio Martins
b73c526c57
qtquick: Move the event redirector to the base class
...
Instead of having it in TitleBarQuick.
It will be needed by the TabWidget too
2020-12-20 17:12:44 +00:00
Sergio Martins
add577c46f
qtquick: Fix title not changing when we changed current tab
...
added unit-test too
2020-12-20 16:30:25 +00:00
Sergio Martins
9ddd65ea71
qtquick: tidy some connects
2020-12-20 15:37:17 +00:00
Sergio Martins
b15afa9231
Move TabWidget instantiation to base class Frame
...
Instead of being instantiated by both FrameQuick and FrameWidget
2020-12-20 14:21:39 +00:00
Allen Winter
f8dfde2784
README.md - add a "Using" section
2020-12-20 08:27:00 -05:00
Sergio Martins
6e0898a31e
Remove some methods from TabWidgetQuick
...
Reuse more from base class.
2020-12-20 13:19:07 +00:00
Sergio Martins
8b98dafba2
TabBar::numDockWidgets() doesn't need to be virtual
2020-12-20 12:32:50 +00:00
Sergio Martins
a123437d03
qtquick: Implement the TabWidget backend
...
Not yet connected to the GUI.
2020-12-20 12:06:29 +00:00
Sergio Martins
616c871da7
qtquick: initialize the tab widget via the factory
2020-12-20 11:25:50 +00:00
Sergio Martins
925c9725b3
qtquick: Build TabBarQuick too
2020-12-20 01:09:02 +00:00
Sergio Martins
1a173a7c72
Add a TabWidgetQuick.cpp
...
Doesn't do much yet
2020-12-20 01:02:55 +00:00
Sergio Martins
a959da46db
qtquick: Build TabWidget.cpp too
...
Not being used yet though.
2020-12-20 01:01:20 +00:00
Sergio Martins
a9c70d086c
qtquick: Move TabWidget_p.h out of widgets/
...
To be shared with qtquick
2020-12-20 00:07:07 +00:00
Sergio Martins
48bacb2811
build-all: Add option to run the tests
2020-12-19 23:30:09 +00:00
Sergio Martins
6b846fcdff
qt6: Use more 'auto' to fix some Wconversion errors
2020-12-19 22:54:06 +00:00
Sergio Martins
fdc97fecaf
build-all: Don't test the unity variations by default
2020-12-19 22:16:29 +00:00
Sergio Martins
86983d58f5
Merge branch '1.2'
2020-12-19 20:05:19 +00:00
Sergio Martins
58f7edb0bc
build-all: Build with unity turned off too
...
As it often finds builds failures to do missing includes
2020-12-19 20:00:05 +00:00
Sergio Martins
302bbeceb0
Merge branch '1.2'
2020-12-19 19:02:46 +00:00
Sergio Martins
cd9e16398c
qtquick: Fix the build for Qt6
...
And added cmake presets for Qt6
2020-12-19 18:59:33 +00:00
Sergio Martins
1e1ea8db34
qtquick: fix build
2020-12-19 18:04:54 +00:00
Sergio Martins
7ac3ea1fcf
Merge branch '1.2'
2020-12-19 17:52:52 +00:00
Sergio Martins
3f661d0322
Add dev-scripts/build-all.dart
...
This script builds all our supported configurations.
Useful if you don't have access to KDAB CI, or if you don't want
to wait for the results.
2020-12-19 17:51:29 +00:00
Sergio Martins
8dad079df5
Add a CMakePresets.json
...
Contains the configrations we support:
QtWidgets, QtQuick, static, Python and developer-build
2020-12-19 16:07:49 +00:00
Sergio Martins
1727e50489
Merge branch '1.2'
2020-12-19 15:44:59 +00:00
Sergio Martins
1ab9688f58
Fix Python build
2020-12-19 15:44:44 +00:00
Sergio Martins
613b1b8524
Allow the user to change the absolute min and max widget sizes.
...
It's not hardcoded anymore
2020-12-19 15:34:37 +00:00
Sergio Martins
ae5edc9ebf
Added README-troubleshooting
...
Fixes issue #114
2020-12-19 14:59:40 +00:00
Sergio Martins
d0c15b5da2
Add missing include
2020-12-19 14:59:04 +00:00
Sergio Martins
ccbd15c922
Merge branch '1.2'
2020-12-19 14:12:10 +00:00
Sergio Martins
7b9673e4e2
Shrink the overlay popup when we shrink the main window
...
Should be enough for issue #118
2020-12-19 14:10:01 +00:00
Sergio Martins
7fbcbbacdf
Preserve overlay size when resizing main window
...
For issue #118
2020-12-19 14:09:27 +00:00
Sergio Martins
d1f48b0685
Save the last overlayed size
...
We might want to restore it
2020-12-19 14:09:27 +00:00
Allen Winter
9ee6b91f61
Merge branch '1.2'
2020-12-18 13:04:02 -05:00
Allen Winter
e6c89c0564
setup for 1.2.1
2020-12-18 13:02:49 -05:00
Sergio Martins
8b97088c70
Fix QtQuick build
2020-12-18 17:39:24 +00:00
Sergio Martins
e5809c06c7
Enable resizing the overlayed dock widgets
...
Fixed WidgetResizeHandler to not allow it to resize the overlay
bigger than its parent
For issue #116
The size isn't remembered though. Next time you open the overlay
it will have the previous size.
2020-12-18 17:15:54 +00:00
Sergio Martins
23b69d4e9e
Fix overlay disappearing when we were resizing
...
We allow the user to click 4px outside of the overlay for better
resizing. But we also had code that would hide the overlay if we
clicked elsewhere. So these two requirements were in conflict.
So, before hidding, check if the frame accepted the press.
Also for issue #118
2020-12-18 16:02:35 +00:00
Sergio Martins
0f468033fb
Commit the code needed for resizing overlays/popups
...
Still not happy with it, so the actual part that enables it
is commented out
Also for issue #118
2020-12-18 15:35:43 +00:00
Sergio Martins
468074cda8
Fix min/max not being respected when resizing overlay popup
...
While the min size wasn't set the min size hint was.
Use our wrapper which honours the size hint.
Also for isssue #118
2020-12-18 15:32:43 +00:00
Sergio Martins
7acbe0c62e
Make the WidgetResizeHandler margin public
2020-12-18 15:23:52 +00:00
Sergio Martins
2c1a70280a
WidgetResizeHandler: Fix the geometry calculation for non-toplevels
2020-12-18 15:20:58 +00:00
Sergio Martins
d2fa5efafe
Add Utils::globalGeometry()
2020-12-18 14:29:44 +00:00
Sergio Martins
a437bc5d07
Minor WidgetResizeHandler cleanups
2020-12-18 12:11:28 +00:00
Sergio Martins
2447bb12c8
WidgetResizeHandler: Dont' accept the release if we're not resizing
2020-12-18 11:58:08 +00:00
Sergio Martins
1082d5e8e1
Added WidgetResizeHandler::setAllowedResizeSides()
2020-12-18 10:43:36 +00:00
Sergio Martins
3b1ac9a2d0
Merge branch '1.2'
2020-12-17 20:38:49 +00:00
Sergio Martins
4635405fb5
Allow WidgetResizeHandler to act on global event filter
...
Needed for widgets which are not top-levels
2020-12-17 19:47:19 +00:00
Sergio Martins
c481875e55
Fix WidgetResizeHandler::cursorPosition() for negative positions
...
Usually we don't get negative relative positions, since we're
tracking top-level widgets which wouldn't receive exterior mouse
events to begin with.
But we want the WidgetResizeHandler to work for embedded widgets
too, for example for the sidebar overlays.
2020-12-17 19:47:19 +00:00
Sergio Martins
62f50f9458
Minor coding style
2020-12-17 19:47:19 +00:00
Sergio Martins
c86252665c
Make WidgetResizeHandler::mouseMoveEvent() return bool
...
Returns true if it consumed the event
2020-12-17 19:47:19 +00:00
Sergio Martins
d141863ffb
Make a method private
2020-12-17 19:47:19 +00:00
Sergio Martins
e99b9678e4
Add WidgetResizeHandler::restoreMouseCursor()
2020-12-17 19:47:19 +00:00
Sergio Martins
e0a034748d
Factor out setting the mouse cursor
...
We'll soon also need to call qApp's set cursor
2020-12-17 19:47:19 +00:00
Sergio Martins
c3377431cc
docs++
2020-12-17 19:47:19 +00:00
Allen Winter
2fb70009cc
OBS - updates
2020-12-17 14:40:16 -05:00
Allen Winter
289ddffbe2
prep for 1.2.0 release
2020-12-17 14:40:16 -05:00
Sergio Martins
54738bbea2
Simplify WidgetResizeHandler::cursorPosition() impl
2020-12-17 18:51:40 +00:00
Sergio Martins
5c6eb352d6
Use the CursorPosition enum as flags
2020-12-17 18:46:31 +00:00
Sergio Martins
f657399ef8
Make enum public so we can use Q_ENUM
2020-12-17 18:44:48 +00:00
Sergio Martins
be0f72ca25
Remove unneeded method
2020-12-17 17:05:55 +00:00
Sergio Martins
31598d8334
Make a variable private
2020-12-17 16:59:21 +00:00
Sergio Martins
5e64463a8c
Remove some Item_p.h/multisplitter includes
...
that's private API for the layouts, don't want them exposed higher
in the stack
2020-12-17 13:48:50 +00:00
Sergio Martins
27ffb64eb4
Merge branch '1.2'
2020-12-17 12:45:33 +00:00
Sergio Martins
c4ffe10e12
Fix non unity build
2020-12-17 12:24:12 +00:00
Sergio Martins
efcad6d2be
Update ChangeLog
2020-12-17 11:53:12 +00:00
Sergio Martins
c7dc7bdb3d
Bump so version on master
2020-12-17 11:15:42 +00:00
Sergio Martins
b6925c928a
Clear sidebars before restoring them
...
If restoring a state without a sidebar, the existing sidebars
should hide
Fixes issue #116
2020-12-17 10:51:16 +00:00
Sergio Martins
75368d334a
Don't restore the popup/overlay state
...
popups are perishable
2020-12-17 10:15:39 +00:00
Allen Winter
d39ce8f66e
tests/Testing.cpp - include <QTest>, not <QtTest>
2020-12-16 17:10:07 -05:00
Allen Winter
805ea41d8a
Rubberband_quick.h, RubberBandQuick.h - adjust include guard
2020-12-16 17:04:06 -05:00
Allen Winter
d7ed2494be
CMakeLists.txt - add documentation for the new options
2020-12-16 17:01:47 -05:00
Allen Winter
0990337cdc
examples/qtquick/CMakeLists.txt - add license+copyright header
2020-12-16 16:51:03 -05:00
Allen Winter
e41cdb6f78
various - fix misspellings
2020-12-16 16:49:22 -05:00
Sergio Martins
666673a251
Added a comment
2020-12-16 18:46:56 +00:00
Sergio Martins
34cb2ae5f0
Restore the SideBars when restoring a layout
...
For issue #116
2020-12-16 18:27:29 +00:00
Sergio Martins
51d8c2ff3e
tests: Group the "Save/restore" tests together
2020-12-16 18:15:06 +00:00
Sergio Martins
aa9f50d0f4
Serialize the SideBar to JSON too
...
Part 1 of 2 for issue #116
2020-12-16 17:58:05 +00:00
Sergio Martins
b7c36a2ec9
Stabilize a test with 5.9
...
Minor differences in the frame's min-sizes, no point in spending
more time on such old Qt version just so tests pass.
2020-12-16 17:24:33 +00:00
Sergio Martins
e18fb7ffd8
Remove unneeded private moc include
...
Doesn't play nice with unity builds
2020-12-16 15:48:32 +00:00
Sergio Martins
96439339c7
cmake: Add a missing QtQuick header to the source list
2020-12-16 15:46:31 +00:00
Sergio Martins
04d418b2e9
same for QtQuick
2020-12-16 15:42:48 +00:00
Sergio Martins
c04d856322
cmake: Add the header files to the source list too
...
So they are automoced with unity build
2020-12-16 15:40:25 +00:00
Sergio Martins
1c41c33f33
Merge the two qrc files that are only for QtQuick
2020-12-16 11:53:36 +00:00
Sergio Martins
1dae128511
Fix the static build
...
The other library qrc is only needed for QtQuick
2020-12-16 11:41:15 +00:00
Sergio Martins
eab80c0545
Fix a -Wmismatched-tag warning
2020-12-16 10:54:47 +00:00
Sergio Martins
288c3df30b
Add missing include
2020-12-15 23:11:52 +00:00
Sergio Martins
e8728e8a35
qtquick: Fix the qrc not being included
2020-12-15 23:07:11 +00:00
Sergio Martins
94bfc4f2d1
qtquick: Fix build
2020-12-15 23:02:13 +00:00
Sergio Martins
d2da07508a
Replaced an include with a fwd decl
2020-12-15 22:58:10 +00:00
Sergio Martins
7082e40cd5
Fix non-developer build
...
These exports are needed
2020-12-15 21:56:22 +00:00
Sergio Martins
2c8bbd10f7
Remove the export macros from the old library
...
We now use only 1 library, so use the same export macros
2020-12-15 21:41:10 +00:00
Sergio Martins
ed8a401fe8
Meld kddockwidgets__multisplitter into kddockwidgets lib
...
It's overkill to have it in a separate library.
Simplifies deployment.
Speeds up build, as it was breaking paralellism.
2020-12-15 21:00:41 +00:00
Sergio Martins
72428075f0
Fix -Wshadow warnings
2020-12-15 20:38:20 +00:00
Sergio Martins
562db7c812
qtquick: Fix build
...
Missing include guards
2020-12-15 13:38:35 +00:00
Sergio Martins
3ee15d1307
Give python a bit of help building KDDW
2020-12-15 12:15:23 +00:00
Sergio Martins
cf232dda34
Enable Unity Builds unconditionally
...
Projects using KDDW won't need to modify KDDW, so there's no impact
on incremental builds
2020-12-15 11:13:41 +00:00
Sergio Martins
bfeac02a45
cmake: Make KDDW build faster with a unity build
2020-12-12 15:18:39 +00:00
Sergio Martins
22f4c36eb0
cmake: remove duplicate set of qtquick/qtwidget cmake options
...
Let's simply things and only use one set. If the top-level requires
QtQuick then so will multisplitter. It's not mix-and-match.
2020-12-12 14:11:26 +00:00
Allen Winter
3dc56ea4ef
Merge branch '1.1'
2020-12-12 08:20:10 -05:00
Allen Winter
cbedc06e97
various - prep for 1.1.1 release
2020-12-11 16:56:04 -05:00
Sergio Martins
8f85f28ed4
Merge branch '1.1'
2020-12-11 16:44:07 +00:00
Sergio Martins
b5c2757874
Updated Changelog with v1.1.1
2020-12-11 16:36:37 +00:00
Sergio Martins
46f57ffbbc
Merge branch '1.1'
2020-12-10 21:39:54 +00:00
Sergio Martins
fb6e2afd7b
Windows: Don't start a drag when it's a resize
...
There were a few pixels where you could click where, very near the
border where it would start a drag while it shouldn't.
The drag state machine then was in an invalid state which could lead to
a crash.
Fixes issue #110
2020-12-10 21:16:42 +00:00
Sergio Martins
f74eb73326
qt6: Use only one CMake option for Qt6
...
We still had OPTION_QT6 leftovers
2020-12-09 14:09:20 +00:00
Sergio Martins
ceb796d807
qt6: Don't set the HDPI attributes
...
They don't do anything on Qt6, but warn.
2020-12-09 12:23:17 +00:00
Sergio Martins
9a9488117c
Add a State dtor, fixes a -Wweak-vtables warning
2020-12-09 11:13:55 +00:00
Sergio Martins
e55d75ba98
qt6: Fix build on Windows
2020-12-08 23:21:51 +00:00
Sergio Martins
742763e6e5
qt6: Remove unneeded Qt5Test find
...
It's already found in the root CMakeLists.txt
2020-12-08 22:56:59 +00:00
Sergio Martins
d7242f17b7
examples: Add AUTORCC
...
Fixes standalone examples not showing images
2020-12-08 22:36:23 +00:00
Sergio Martins
eba395dc4c
Fix build
2020-12-08 22:31:21 +00:00
Sergio Martins
89635d8b98
qt6: build is fixed now
2020-12-08 21:47:35 +00:00
Sergio Martins
f475312f11
qt6: Port away from QStateMachine
...
QStateMachine was moved to qtsxml module, which is not ported to
Qt6 yet.
We use QStateMachine for the semantics it gives us, not because of
its implementation. The implementation is trivial, so do it outselves.
We used very little from QStateMachine.
2020-12-08 19:55:52 +00:00
Sergio Martins
9f604829dd
qt6: Use AUTORCC instead of qt5_add_resources
...
As this works with both Qt5 and Qt6
2020-12-08 18:11:34 +00:00
Sergio Martins
85f829f97a
qt6: Remove an hardcoded Qt5 lib
2020-12-08 16:38:08 +00:00
Sergio Martins
e3bb0b3d48
qt6: Link to StateMachine
2020-12-08 16:36:00 +00:00
Sergio Martins
22c0b6f9b6
qt6: Fix build of FloatingWindow.cpp
...
QWidget::nativeEvent() changed signature
2020-12-08 16:33:35 +00:00
Sergio Martins
200cb7aded
qtquick: Fix build with gcc
2020-12-08 15:06:21 +00:00
Sergio Martins
4999fdd819
qtquick: Remove the native child widget case
...
This can only happen for QtWidgets. With QtQuick all items are
alien, never native
2020-12-06 15:48:31 +00:00
Sergio Martins
76aca4139a
Minor cleanup
2020-12-05 23:37:56 +00:00
Sergio Martins
64276cb872
qtquick: Fix clicking on close button of floating window
...
Since we're using native events on windows we were using the whole
title bar for dragging, but obviously the buttons don't serve for
window dragging
2020-12-05 23:28:04 +00:00
Sergio Martins
aad63d117b
qtquick: Enable aero-snap on Windows
...
The events simply need to be forward from QWindow to the FloatingWindow.
That happens automatically for QWindow/QWidget, but not with
QWindow/QQuickItem, so add this behaviour to QtQuick too, so it behaves
the same as QtWidgets and we have a single code path for aero snap
2020-12-05 15:20:26 +00:00
Sergio Martins
bd66af0a9f
Remove unused logging categories
2020-12-05 14:29:13 +00:00
Sergio Martins
a21d80279e
qtquick: Fix background of indicator being black on macOS
2020-12-03 19:15:34 +00:00
Sergio Martins
4347aefc8f
Fix a -Wweak-vtable warning on macOS
2020-12-03 18:45:08 +00:00
Sergio Martins
b6341154fb
qtquick: Fix a test
...
The tests are not prepared for the min-size of the floating window
to change (QLayout helped with that). We need to write some kind
of constraint propagation first, until then we use a static
size for the non-contents
2020-12-03 18:24:26 +00:00
Sergio Martins
16f6692b79
qtquick: Add an example of how to instantiate a dock widget from QML
...
Instead of using C++
2020-12-03 14:58:59 +00:00
Sergio Martins
6c1026956a
qtquick: titlebar's height is reduced to 0 when invisible
...
otherwise we see an empty space when it's not visible
2020-12-02 23:33:04 +00:00
Sergio Martins
97679abb02
qtquick: silence warning
...
not worth it
2020-12-02 23:29:15 +00:00
Sergio Martins
e173a4cfff
qtquick: Also allow for custom titlebar for the Frame
2020-12-02 23:24:28 +00:00
Sergio Martins
26971ef1e2
qtquick: Add an example of a custom title bar
2020-12-02 23:20:44 +00:00
Sergio Martins
d7bde47105
qtquick: Don't hardcode the title bar height in C++
...
It's now in QML and the user is allowed to change it
2020-12-02 22:58:11 +00:00
Sergio Martins
143c82291d
qtquick: The user can now choose another titlebar file
2020-12-02 22:43:01 +00:00
Sergio Martins
979b2fdd40
qtquick: Set the frameworkwidget factory as a context prop
2020-12-02 22:38:17 +00:00
Sergio Martins
46337d900b
qtquick: Load the titlebars with a loader
...
in followup commit the source will be user configurable
2020-12-02 21:43:57 +00:00
Sergio Martins
ec1f1bea9a
qtquick: Move some style code to TitleBar.qml
...
Doesn't belong in the base component
2020-12-02 21:30:55 +00:00
Sergio Martins
d207028d60
qtquick: Document and add proper interface to TitleBarBase.qml
2020-12-02 16:17:46 +00:00
Sergio Martins
a237eae508
qtuick: Add a customtitlebar example stub
...
Not custom yet.
2020-12-02 15:48:51 +00:00
Sergio Martins
243396f22b
qtquick: Move the example into a sub-directory
...
We'll have other qtquick examples
2020-12-02 14:52:10 +00:00
Sergio Martins
f240bf5d40
Disable Aero-snap for QtQuick, for now
2020-12-01 20:33:52 +00:00
Sergio Martins
785db1b50c
qtquick: Fix detaching windows not working smoothly
...
Use the global event filter, as grabing isn't reliable in QtQuick.
Either not the same item is getting the mouse moves and release, or
it's because QtQuick internally is also setting/unsetting grabbers,
as seen in the source code
2020-12-01 20:14:46 +00:00
Sergio Martins
b6a7048a4f
Fwd declare QWidget, no need to include in the header
2020-12-01 19:48:41 +00:00
Sergio Martins
52bff59024
Remove duplicated logic regarding mouse events
2020-11-30 23:14:00 +00:00
Sergio Martins
bba0195196
Move "mouseEvent()" function to Utils_p.h
...
So it can be reused
2020-11-30 23:00:30 +00:00
Sergio Martins
41fdb9c7df
qtquick: Fix non-developer build
2020-11-30 18:37:39 +00:00
Sergio Martins
c1c1da25a8
Fix build with vs2013
2020-11-30 14:11:21 +00:00
Sergio Martins
b4e7b97646
examples: Fix non-developer build
2020-11-30 12:25:29 +00:00
Sergio Martins
2c687fe469
qtquick: Implement the rubber band
...
When hovering a drop indicator we now see the blue rubberband
2020-11-29 22:31:11 +00:00
Sergio Martins
10e0402afa
Fix build
2020-11-29 19:51:37 +00:00
Sergio Martins
ebb1179167
fix namespace
2020-11-29 19:41:30 +00:00
Sergio Martins
15c196d865
qtquick: Move Rubberband to its own file
2020-11-29 19:23:10 +00:00
Sergio Martins
e897ce6e8e
qtquick: Add a replacement for QAction
...
So we don't depend on QtWidgets lib
2020-11-29 18:44:00 +00:00
Sergio Martins
83d9db1b64
qtquick: multisplitter lib no longer depends on QtWidgets
...
Added a QSizePolicy replacement.
KDDW for QtQuick still needs to link to QtWidgets, but it's a
step forward
2020-11-29 18:08:49 +00:00
Sergio Martins
60331fc654
qtquick: Remove some unneeded QtWidget includes
2020-11-29 17:57:14 +00:00
Sergio Martins
e8f16dd172
qtquick: Don't build ObjectViewer
2020-11-29 17:50:51 +00:00
Sergio Martins
44bd451362
qtquick: stabilize tests with offscreen QPA
2020-11-29 15:17:29 +00:00
Sergio Martins
1d2a791dfc
qtquick: Fix DND operation never ending
...
When double-clicking a title bar we're getting: Press, Release,
Press and never the Release. We get the MouseDblClickEvent instead,
so handle that
2020-11-29 14:40:03 +00:00
Sergio Martins
a4ba45b423
qtquick: Fix flickering the first time we drag over
2020-11-28 19:27:18 +00:00
Sergio Martins
12576970c6
qtquick: Fix dragged window being behind in Z order
...
For QtWidgets, when we raise something that's not a top-level
it won't raise. So do the same thing for QtQuick
2020-11-28 18:28:43 +00:00
Sergio Martins
e0ee7d14b0
qtquick: Remove warning about we not implementing keyboard ungrab
...
I don't see it in QQuickItem API, so we also don't grab it to
begin with
2020-11-28 17:53:39 +00:00
Sergio Martins
66f447ad3f
qtquick: Fix crash when hovering over titlebar
...
It would think we were over a drag indicator, because during an instant
the overlay window has 0x0 size but the indicators are still visible.
Fix by only showing the overlay window (visible property) when it has
the correct size
2020-11-28 17:11:46 +00:00
Sergio Martins
75db599142
tests: Make DropArea::hover() return the chosen drop location
...
Just for tests.
2020-11-28 16:47:19 +00:00
Sergio Martins
a5c65ae039
Introduce NullIndicators and a Config option for it
...
Mostly for debugging purposes, but also useful if anyone doesn't
want to display indicators
2020-11-28 14:11:39 +00:00
Sergio Martins
5c055e0b8d
examples: Add a flag to disable aero-snap
...
For development/debugging purposes only
2020-11-28 00:39:30 +00:00
Sergio Martins
090483f04e
qtquick: Add some flags to the example
...
Mostly for debugging at this point
2020-11-28 00:18:41 +00:00
Sergio Martins
953219f6f3
qtquick: Minor refactoring
...
Removed some hardcoded QLineEdit casts, that code is now generic.
2020-11-27 18:47:03 +00:00
Sergio Martins
8356bb0c3c
Introduce KDDockWidgets::widgetAt()
...
Only repro for QtWidgets for now, but already useful to remove some
QApplication includes
2020-11-27 18:29:46 +00:00
Sergio Martins
758548f7a2
qtquick: Only Windows needs Angle
2020-11-27 17:11:45 +00:00
Sergio Martins
2aa16eb6d9
examples: comment out the old multisplitter example
...
It's not for end users. Might even delete it
2020-11-27 17:07:44 +00:00
Sergio Martins
9d6cef24c1
qtquick: Use Angle on Windows
...
It's aero-snap friendly. Otherwise shows black artifacts.
We can however use normal GL and use FramelessWindowhint instead
2020-11-27 16:46:21 +00:00
Sergio Martins
52999d4cc9
qtquick: Don't process native events when being deleted
2020-11-27 15:03:55 +00:00
Sergio Martins
bc2fff2c04
qtquick: Window resizing works on Linux/mac now
2020-11-27 13:59:27 +00:00
Sergio Martins
40fa4e98f8
qtquick: Fix tests
...
Mouse tracking isn't implemented, so warns
2020-11-27 11:06:47 +00:00
Sergio Martins
a07f63a2c7
qtquick: Fix build on Windows
2020-11-26 23:30:55 +00:00
Sergio Martins
39c9a4da9b
qtquick: Enable native event handling for the floating windows
...
Same as done with QtWidgets, now hopefully we have native window
resize
2020-11-26 23:26:15 +00:00
Sergio Martins
e0aa547393
qtquick: Start using the WidgetResizeHandler
...
It's no longer commented out in FloatingWindow.
Doesn't do much for QtQuick, but at least we don't have different
code paths
Making it work is next.
2020-11-26 23:13:46 +00:00
Sergio Martins
08eab8882f
qtquick: Call FloatingWindow::setupWindow() at the correct time
...
We need a QWindow. While that's done very early, and automatically
for QtWidgets, for QtQuick it's done later, by us, manually
2020-11-26 22:52:23 +00:00
Sergio Martins
04723ac3a9
Minor refactoring, moved code into a function
2020-11-26 22:46:14 +00:00
Sergio Martins
c25043fa00
qtquick: Enable more QtWidget paths that compile fine
...
Just needed a dummy create() function
2020-11-26 22:28:57 +00:00
Sergio Martins
5372920cd0
qtquick: Port NCHITTESTEventFilter
2020-11-26 21:53:48 +00:00
Sergio Martins
28ae4c3b8c
Add helper to get FloatingWindow by its WId
2020-11-26 21:42:45 +00:00
Sergio Martins
6158ebd520
qtquick: Fix our QtQuick QLineEdit clashing with the QWidgets one
...
Some indirect include is making it clash. Cleaner to use a different
name anyway
2020-11-26 21:28:01 +00:00
Sergio Martins
b77430e574
Remove two more unneeded QApplication includes
2020-11-26 19:35:46 +00:00
Sergio Martins
fad81d595a
qtquick: Remove some dependencies to QApplication
2020-11-26 19:31:32 +00:00
Sergio Martins
0980a7f601
qtquick: Port qtTopLevelForHWND() to Windows
...
Deals in QWindow instead of QWidget
2020-11-26 18:54:58 +00:00
Sergio Martins
46830713e0
stabilize test on Windows
2020-11-26 18:27:17 +00:00
Sergio Martins
cd796db0ff
Add helper topLevelForHandle()
2020-11-26 17:53:28 +00:00
Sergio Martins
29da5f4a8a
qtquick: Fix another include
...
Fixes the multisplitter build on Windows, which has a more picky
linker
2020-11-26 17:18:55 +00:00
Sergio Martins
315bdc71e5
qtquick: Include the correct include
...
Not the widget one
2020-11-26 17:17:18 +00:00
Sergio Martins
a8965bea91
Fix a unit-test
...
Broke it by mistake
2020-11-26 17:00:10 +00:00
Sergio Martins
bf259c7ffc
qtquick: Fix build on mac
...
Mostly due to -Werror and clang having more warnings
2020-11-26 16:45:12 +00:00
Sergio Martins
8a990451d7
Fix casting -1 to WId on mac
2020-11-26 15:59:32 +00:00
Sergio Martins
974bdbd637
Fix a -Wweak-vtable warning
2020-11-26 15:55:52 +00:00
Sergio Martins
cb9d77cd18
Fix more -Woverloaded-virtual
2020-11-26 15:17:33 +00:00
Sergio Martins
af10efa587
Fix more -Woverloaded-virtual
2020-11-26 15:15:37 +00:00
Sergio Martins
a0fb47af58
Fix -Woverloaded-virtual
2020-11-26 14:52:04 +00:00
Sergio Martins
598fbdc51b
qtquick: Fix build on mac
...
RubberBand was being compiled twice. We shouldn't compile the
_widget* multisplitter files when using QtQuick.
Also implies tst_multisplitter shouldn't be run when compiling
for QtQuick.
2020-11-26 14:29:17 +00:00
Sergio Martins
81c3f3f0c6
Fix a -Wweak-vtables warning
2020-11-26 13:28:15 +00:00
Sergio Martins
b9962b3df0
qtquick: Make the QWinWidget case specific to QtWidgets
...
With QtQuick we don't have QWinWidget
2020-11-26 13:23:06 +00:00
Sergio Martins
a71386e62a
Fix using qAbs(bool)
...
detected by msvc
2020-11-26 12:59:51 +00:00
Sergio Martins
812ce1c08b
qtquick: Fix floating dock #3 in the example
...
It would go to its previous place (0,0), so don't show it at
start.
Added a unit-test as thought it was a bug, but code is correct.
2020-11-26 12:31:50 +00:00
Sergio Martins
189e82450b
qtquick: Add 2px margin for the the tab widget
...
Mimics QtWidgets
2020-11-26 12:06:52 +00:00
Sergio Martins
a3dbc3739c
qtquick: Make title bar look nicer
2020-11-26 12:02:58 +00:00
Sergio Martins
c8d34375af
qtquick: Add margin to Frame
2020-11-26 11:43:30 +00:00
Sergio Martins
6c3775ea45
qtquick: floating window now has a border and 4px margin
...
Just like the QtWidget one
2020-11-26 11:36:36 +00:00
Sergio Martins
5a72e1adab
qtquick: Fix some colors
2020-11-25 23:52:56 +00:00
Sergio Martins
0f7f310734
qtquick|example: Use the KDAB logs, as we have for QtWidgets
2020-11-25 23:09:53 +00:00
Sergio Martins
e8bf2a5222
qtquick: Remove dummy background color
2020-11-25 22:59:30 +00:00
Sergio Martins
468f545c9a
qtquick: Enable more tests
...
these pass now, too
2020-11-25 22:15:52 +00:00
Sergio Martins
a59ff6dfee
qtquick: Build tests with ctest too
2020-11-25 21:41:46 +00:00
Sergio Martins
4fa415ba05
qtquick: Comment out a few tests
...
We don't support max-size yet
2020-11-25 21:01:37 +00:00
Sergio Martins
d851c60b2f
qtquick: Don't allow the initial window size to be smaller than its min
...
Fixes a test
2020-11-25 20:52:29 +00:00
Sergio Martins
bf097098e5
qtquick: Fix pointer comparison in test
2020-11-25 20:10:32 +00:00
Sergio Martins
8c93b85a24
qtquick: Remove unneeded code
2020-11-25 20:10:13 +00:00
Sergio Martins
f87d67dd59
qtquick: Remove unneeded code
2020-11-25 20:07:08 +00:00
Sergio Martins
bc3278b218
qtquick: tst_positionWhenShown
2020-11-25 17:01:37 +00:00
Sergio Martins
d2c55a67df
qtquick: Fix more tests
2020-11-25 16:28:54 +00:00
Sergio Martins
a3414fd92b
qtquick: Fix tst_addToSmallMainWindow1
2020-11-25 16:10:04 +00:00
Sergio Martins
12f3ba9074
qtquick: Fix some tests
2020-11-25 16:02:42 +00:00
Sergio Martins
034d2c8aee
README: Mention Qt6
2020-11-25 12:31:29 +00:00
Sergio Martins
ad3f4141c8
qtquick|tests: Fix main window QWindow not being resized
2020-11-24 18:40:22 +00:00
Sergio Martins
cde2e4e571
qtquick: Fix tst_constraintsAfterPlaceholder
...
The resize happens sync for QtQuick, so that wait isn't needed
2020-11-24 13:36:10 +00:00
Sergio Martins
e0775467b2
qtquick|tests: Fix verifying frame min size
2020-11-24 13:12:53 +00:00
Sergio Martins
b20ffcde61
tst_negativeAnchorPosition: Fix typo
...
we need to subtract from height(), not width()
2020-11-24 12:44:00 +00:00
Sergio Martins
43bdb6a4c2
qtquick: Bunch of fixes for min-size support
2020-11-24 11:38:13 +00:00
Sergio Martins
929aabdc0d
example: Add --native-title-bar
...
Behind developer mode for now
2020-11-23 21:37:59 +00:00
Sergio Martins
6a90a5125f
TitleBar: these 4 getters are only for development mode
2020-11-23 20:22:45 +00:00
David Faure
77016a619f
Fixes for being used as a subproject
...
* Don't use CMAKE_SOURCE_DIR, always use CMAKE_CURRENT_SOURCE_DIR
* -Werror=undef found that #if was used instead of #ifdef
2020-11-23 21:16:40 +01:00
Sergio Martins
dc328ff7c4
Fix developer mode build on Windows
...
developer mode will make some 'private' in headers be 'public', this
affects name mangling on MSVC.
kddockwidgets_linter didn't have the developer mode macro enabled,
so there was a mangling mismatch when linking
2020-11-23 17:40:06 +00:00
Sergio Martins
dc13665566
Fix forward declaration
2020-11-23 16:53:52 +00:00
Sergio Martins
d1279ab119
Merge branch '1.1'
2020-11-23 15:57:42 +00:00
Sergio Martins
80bf6032f3
Fix FloatingWindow's title when shown in the taskbar
...
The window title isn't only important when using native title bar,
it's also important for showing the correct title in the taskbar
or alt-tab.
For example, if using "minimize support", they'll show in the task bar
Fixes issue #101
2020-11-23 15:52:50 +00:00
Sergio Martins
22437e75c6
qtquick: Override min size for FrameQuick
...
Fixes constriants not propagating from dock widget to frame
2020-11-23 15:45:06 +00:00
Sergio Martins
801e49de9d
Make DockWidgetQuick::minimumSize()/max virtual
...
While for QtWidgets we have layouts which propagate the constraints
up, for QtQuick we don't, so we need to override minimumSize instead
2020-11-23 15:45:06 +00:00
Sergio Martins
a847a574ed
qtquick: Delete the frame visual item delayed
...
If we're in a QML event handler we can't delete the QML item,
it's a QML limitation. We still want to delete the dockwidgets now though
since all tests depend on that.
2020-11-23 15:45:06 +00:00
Sergio Martins
ef8807bc09
Minor style
2020-11-23 15:45:06 +00:00
Allen Winter
d441477fa9
Merge branch '1.1'
2020-11-22 12:25:28 -05:00
Allen Winter
ece7b22bec
apidox - fix doc for enum KDDockWidgets::Config::Flag
...
doxygen likes "///<" (not "///>")
Issue#106
2020-11-22 12:17:38 -05:00
Sergio Martins
97d8e4f18b
qtquick|tests: Be able to deliver a double-click event to a titlebar
...
Needed for tests
2020-11-20 21:44:06 +00:00
Sergio Martins
9937f5d789
qtquick: Fix floating windows having a parentItem
...
they are top-level windows, so shouldn't have a parent item.
Only a QObject::parent()
2020-11-20 16:55:00 +00:00
Sergio Martins
675edfe6db
qtquick: Move the floating button logic one level up, to the base class
...
So QtQuick can use the same logic.
Fixes tst_nonDockable too.
2020-11-20 15:35:46 +00:00
Sérgio Martins
c23d179385
Add support for Qt6
...
Adds the -DKDDockWidgets_QT6=ON option
Also you'll need to port any required Qt6 module first (For example QStateMachine).
2020-11-20 12:36:11 +00:00
Sergio Martins
36af020505
Fix two scoped value rollback being temporaries
2020-11-20 09:55:31 +00:00
Sergio Martins
7b2d195139
qtquick: Put the failing QtQuick tests at the end
...
So they don't corrupt the passing ones.
Approx 40 need to pass now.
2020-11-19 22:59:00 +00:00
Sergio Martins
984ab3bb13
qtquick: Add support for disabling close button
...
For when dockwidget isnt' closable.
Fixes tst_nonClosable() too
2020-11-19 22:12:49 +00:00
Sergio Martins
0331f90791
Move title bar logic regarding close button to base class
...
So QtQuick can use it too
2020-11-19 22:09:40 +00:00
Sergio Martins
b19c53d650
qtquick: Implement some title bar helpers for tests
...
Mostly getters that return the title button state
2020-11-19 21:45:29 +00:00
Sergio Martins
3670cf2377
qtquick: Comment the embedded main window test
...
We don't support that yet
2020-11-19 17:49:27 +00:00
Sergio Martins
864670b0a1
qtquick: Fix some cases where floating windows didn't have parent
...
Happened because floatingWindow->parentWidget() was null. On QtWidgets
this works because QWidget::parentWidget() will return the transient parent
without a problem.
2020-11-19 17:47:02 +00:00
Sergio Martins
0cf148b389
tests: Check for the existence of QWindow at exit, not QWidget
...
So we're clean for QtQuick too
2020-11-19 16:34:30 +00:00
Sergio Martins
921d0892a0
qtquick: Fix tst_setVisibleFalseWhenSideBySide
...
Was also broken (but passed) for QtWidgets.
We don't support hidding widgets with setVisible(false).
2020-11-19 11:59:09 +00:00
Sergio Martins
beb2d9e659
qtquick: Add support for non-closable windows
...
fixes tst_preventClose
2020-11-18 18:13:35 +00:00
Sergio Martins
59168da231
qtquick: Fix crash at exit
...
Don't delete our QWindow if the QWindow is currently deleting us
2020-11-18 18:10:32 +00:00
Sergio Martins
3dbf699c49
qtquick: Fix QtQuick parenting
...
Mimic QtWidgets so we have similar behaviour:
- When a MainWindow is deleted, its associated QWindow is deleted
too.
- When a MainWindow is deleted, it deletes any FloatingWindows
which have it as a transient parent
2020-11-18 16:18:42 +00:00
Sergio Martins
baa7561b13
qtquick: Fix tst_addAndReadd
...
Wasn't even correct for QtWidgets and just passing because the
widget wasn't getting dropped QtWidgets, since the indicator was hidden.
For QtQuick the indicator is also hidden but it's accepting it. To fix.
2020-11-18 14:42:34 +00:00
Sergio Martins
ac5f4b871c
qtquick: Fix tst_honourGeometryOfHiddenWindow
...
We want the geometry of the QWindow
2020-11-18 14:30:08 +00:00
Sergio Martins
52bf449366
qtquick: Fixes for focusing
...
Fixes tst_focus too, and maybe a few other tests
2020-11-18 14:01:55 +00:00
Sergio Martins
08a1c4e6df
qtquick: Implement focus policy
...
fixes tst_dockWidgetGetsFocusWhenDocked
2020-11-18 12:35:46 +00:00
Sergio Martins
156dad6e03
qtquick: Fix IndicatorWindow::posForIndicator()
...
Wasn't even implemented. Should make some tests pass.
2020-11-18 12:06:20 +00:00
Sergio Martins
b642d2df2f
qtquick: Fix dropped widget not being the current tab
2020-11-18 11:44:55 +00:00
Sergio Martins
5cedfab82c
Make DropIndicatorOverlay::posForIndicator() pure virtual
2020-11-18 11:44:02 +00:00
Sergio Martins
af9d62a58c
qtquick: Fix FloatingWindows not being destroyed when empty
...
Also fixes tst_createFloatingWindow
2020-11-17 23:15:33 +00:00
Sergio Martins
0758496b0d
Fix QtQuick build without developer mode
2020-11-17 21:15:07 +00:00
Sergio Martins
a452723919
Fix tests running with a nullptr state machine
2020-11-17 21:08:05 +00:00
Sergio Martins
774e66ba6f
Minor: add an assert
...
Provides a nicer backtrace when it happens.
Currently repro on QtQuick only
2020-11-17 21:04:32 +00:00
Sergio Martins
f13de89db5
tests. Fix utils.h draggableFor() for QtQuick
2020-11-17 20:44:04 +00:00
Sergio Martins
1393ae224f
Fix DockWidget::windowActiveAboutToChange() being emitted too much
...
Was being emitted even when it didn't affect our window.
This caused an explosion of signals when we had many dock widgets.
2020-11-17 18:52:54 +00:00
Sergio Martins
d92d7c258c
tests: Remove stray qDebug
2020-11-17 18:15:38 +00:00
Sergio Martins
619ca74051
Use QFAIL instead of qFatal
...
more elegant, and test can continue, so we see the whole result
2020-11-17 18:15:03 +00:00
Sergio Martins
aa39a71ae5
Rename tst_common to tst_docks
...
Now that tst_docks was all ported let's have the old name again.
Also cmake -jN now works, as tst_docks is called by the tests_launcher
while tst_common was not
2020-11-17 15:44:49 +00:00
Sergio Martins
f4e33c1409
tests: Port the remaining tests to QtQuick
...
Tests now build with QtQuick too.
2020-11-17 15:26:14 +00:00
Sergio Martins
ad96336a36
Also init resources if QT_STATIC is defined
...
Should help with WASM, so you don't need to manually call
Q_INIT_RESOURCE
2020-11-17 11:35:37 +00:00
Sergio Martins
50d1e75709
Fully scope the qrc resource files
...
So they don't clash when KDDW is a static library
2020-11-17 11:33:22 +00:00
Sergio Martins
793c4e509b
Fix crash regarding edge case of dragging window to itself
...
If we're not showing a title bar, then the draggable is the tabbar,
not the floating window.
2020-11-16 22:55:45 +00:00
Sergio Martins
e4a33ad8b7
Added README for wasm
...
Fixes issue #100
2020-11-13 18:45:58 +00:00
Sergio Martins
52cf53ce5c
example: init resources if static
...
Fixes title bar not having icons on WASM
For issue #100
2020-11-13 18:33:13 +00:00
Sergio Martins
8791870efb
Blacklist classical indicators on WASM
...
Use segmented indicators.
Wasm doesn't support top-level windows with translucency, which
is required for the classical indicators
For issue #100
2020-11-13 18:18:25 +00:00
Sergio Martins
4f8c47bfa4
Don't require Qt5X11Extras for web assembly
...
For issue #100
2020-11-13 17:43:38 +00:00
Sergio Martins
ad141df6b1
Merge branch '1.1'
2020-11-13 16:00:49 +00:00
Sergio Martins
72605292b7
Don't show dock/undock icon when dockwidget is not dockable
...
Fixes issue #99
2020-11-13 15:51:26 +00:00
Sergio Martins
1443eff1d9
tests: Port some tests to QtQuick
...
15 to go
2020-11-10 18:00:19 +00:00
Sergio Martins
22d5db32ce
FocusScope: Remove focus when nothing is focused
2020-11-09 15:25:32 +00:00
Sergio Martins
e9a321039f
Renamed signal to windowActiveAboutToChange()
...
Added the 'aboutTo', as the event hasn't been caught by the top-level
window yet
2020-11-09 13:46:16 +00:00
Sergio Martins
b93f115b53
Added DockWidget::windowActiveChanged() signal
...
Tracking the top-level window's 'isActiveWindow' property is difficult
since the dock widget's top-level window is changing all the time
when docking and undocking. So added a convenience signal
2020-11-09 13:35:05 +00:00
Sergio Martins
7faaf2cc69
tests: Port more tests to QtQuick
...
18 to go before we start fixing them
2020-11-08 15:18:16 +00:00
Sergio Martins
978f9d3a5e
tests: Port another test to QtQuick
...
29 to go
2020-11-06 23:52:48 +00:00
Sergio Martins
09793b3481
tests: Port more tests to QtQuick
...
31 to go
2020-11-06 23:33:02 +00:00
Sergio Martins
f4d9a96ddb
Added Config::Flag_KeepAboveIfNotUtilityWindow
...
Which sets Qt::WindowStaysOnTopHint for floating windows.
Usually unneeded, as floating windows are Qt::Tool with a transient
parent, but in case you're using Flag_DontUseUtilityFloatingWindows
then you might want (or not) to keep them above.
2020-11-05 12:11:48 +00:00
Sergio Martins
4ac892038f
Fix QtQuick build
2020-11-04 11:34:35 +00:00
Colin Ogilvie
387ba291be
export FocusScope
2020-11-04 11:32:42 +00:00
Sergio Martins
5d3d189774
tests: Port 1 test to QtQuick
2020-11-03 17:22:50 +00:00
Sergio Martins
a6a1047f75
FocusScope: Also honour widgets embedded in the tab bar
...
A widget embedded in a tab bar (like a line edit) lives outside
the DockWidget but inside the Frame. It should still focus the
current dockwidget.
2020-11-03 17:12:21 +00:00
Sergio Martins
3e70b846e8
FocusScope: Modify the member variable before emitting signal
2020-11-03 16:19:47 +00:00
Sergio Martins
0a2aebd78d
FocusScope: Also focus when the user clicks on tab widget background
...
Relevant when you don't have a title bar
2020-11-03 15:29:13 +00:00
Sergio Martins
ddad0feaf3
tests: Additional 5 tests build for QtQuick now
...
37 to go
2020-11-02 20:04:14 +00:00
Sergio Martins
aba1cce1f6
Merge branch '1.1' into master
2020-11-02 11:37:56 +00:00
Sergio Martins
7318675e84
Clarify comment about fractionaly scalling factors
...
The problem can happen on Windows too.
Fixes issue #94
Nothing more we can do here, it's fixed for Qt 5.15.2.
2020-11-02 11:36:24 +00:00
Sergio Martins
cf700f8eb6
tests: port more tests to QtQuick
...
43 to go
2020-10-30 18:29:59 +00:00
Sergio Martins
2c1d099c83
Fix include here too
2020-10-30 12:27:50 +00:00
Sergio Martins
91ff29ae64
Fix build when KDDW is embedded within a project
2020-10-30 12:21:25 +00:00
Renato Araujo Oliveira Filho
523dfb0d12
Fix python bindings build
2020-10-30 08:36:15 -03:00
Sergio Martins
b84e0f3605
tests: More tests are now building with QtQuick
...
56 to go
2020-10-29 18:11:24 +00:00
Sergio Martins
f72e8e6a1c
tests: Port 5 more tests
2020-10-28 22:57:28 +00:00
Sergio Martins
c6c1fe79c3
Fix QtQuick build
...
src/ is no longer in the include path
2020-10-28 22:15:32 +00:00
Sergio Martins
ea382dcc17
cmake: Install DockRegistry_p.h
...
It's available as private API if anyone wants to use it
2020-10-28 21:55:02 +00:00
Sergio Martins
c142eb8ecd
trying to fix the python build
...
after the include paths changes
2020-10-27 21:40:51 +00:00
Sergio Martins
46c039153e
cmake: Don't export src/ to include path
...
Otherwise applications can't have files named MainWindow.h or
DockWidget.h.
Now all kddockwidgets includes need to be scoped, example:
2020-10-27 17:01:18 +00:00
Sergio Martins
473f03360c
tests: Fix Wweak-vtables warnings
2020-10-26 18:59:21 +00:00
Sergio Martins
3fb3984a72
Merge branch '1.1'
2020-10-26 18:23:17 +00:00
Sergio Martins
9c5e3cf5af
tests: Port another test to QtQuick
2020-10-26 18:22:01 +00:00
Sergio Martins
7419ca806d
tests: Port 2 more tests to QtQuick
2020-10-26 17:32:13 +00:00
Allen Winter
8a51c31663
OBS - update for 1.1.0 release
2020-10-26 12:14:46 -04:00
Sergio Martins
a586a7894b
cmake: Qt5::GuiPrivate is only needed on Windows
2020-10-26 16:14:07 +00:00
Sergio Martins
31fcbebaff
ChangeLog: Add the date of 1.1 release
2020-10-26 15:29:47 +00:00
Sergio Martins
c4cc6b3e6e
tests: Port more tests to QtQuick
2020-10-25 22:39:10 +00:00
Sergio Martins
420ac9044e
Merge branch '1.1' into master
2020-10-23 17:11:45 +01:00
Sergio Martins
392dac5691
Use Qt::WA_PendingMoveEvent instead of Qt::WA_Moved
...
We check if the user provided position before putting a floating
window in a default position. Qt::WA_Moved however has the problem
that it's not cleared, so second time you show a window, it will
have it, even if user didn't set geometry.
Use Qt::WA_PendingMoveEvent instead, which was made for tracking
moves made before the first show.
2020-10-23 17:07:14 +01:00
Sergio Martins
29744c01c6
ChangeLog: Added Config::setTabbingAllowedFunc
2020-10-23 10:33:37 +01:00
Sergio Martins
a16adb9578
Merge branch '1.1'
2020-10-23 10:32:10 +01:00
Sergio Martins
49e488df24
remove roadmap from 1.1 ChangeLog
...
We only have it for master
2020-10-23 10:29:57 +01:00
Sergio Martins
1a3f00eac8
ChangeLog: Added HDPI improvements
2020-10-23 10:29:00 +01:00
Sérgio Martins
c6ea8d5525
ChangeLog: Remove mention to 1.0.1 release
...
We're releasing 1.1 asap
2020-10-23 10:23:52 +01:00
Sergio Martins
7738585d01
tests: Enabled another batch of tests for QtQuick
...
83 of 175 are now building with QtQuick
2020-10-22 20:54:39 +01:00
Sergio Martins
61bc24c6ea
tests: A bunch of drag/mouse functions are not compatible with qtquick
...
In the sense that they build.
2020-10-21 22:43:08 +01:00
Sergio Martins
ae90001d7a
tests: Remove some QWidget ifdefs
...
Works fine for QtQuick too
2020-10-21 21:08:03 +01:00
Sergio Martins
c0ea3a097c
tests: Port a test to qtquick
2020-10-21 21:05:03 +01:00
Sergio Martins
abca57be11
qtquick: Fix tst_stealFrame
...
Now has the same behaviour as with QWidgets
2020-10-20 22:36:45 +01:00
Sergio Martins
645201480c
qtquick: Port two tests
2020-10-20 22:05:29 +01:00
Sergio Martins
8cffba3e22
Merge branch '1.1' into master
2020-10-19 21:25:39 +01:00
Sergio Martins
8f62004f5b
cmake: Remove QTQUICK option for 1.1
...
Leave it in master only.
2020-10-19 21:23:44 +01:00
Sergio Martins
4fff6edb7b
qtquick: Port another test
2020-10-19 21:03:47 +01:00
Sergio Martins
64cff4ba49
qtquick|tests: use auto instead of QPointer<QWidget>
2020-10-19 21:00:18 +01:00
Sergio Martins
ce3c4d5661
qtquick|tests: pass parent to main window
...
Those tests pass now
2020-10-19 20:58:00 +01:00
Sergio Martins
5f333f0934
qtquick: port more tests
2020-10-19 20:53:40 +01:00
Sergio Martins
f70722934c
qtquick: Port more tests
2020-10-19 20:47:09 +01:00
Sergio Martins
b9eb9f10d4
qtquick: Port more tests
2020-10-19 20:26:09 +01:00
Sergio Martins
6f89d94eef
qtquick: Emit Frame::layoutInvalidated() when needed
...
When min/max size changes it needs to be emitted, so layout
notices
2020-10-19 20:06:29 +01:00
Sergio Martins
3a494d706a
qtquick: Implement missing QWidgetAdapter::floatingWindow()
2020-10-19 19:05:10 +01:00
Sergio Martins
2ffbe07bcf
Updated README-Wayland.md
2020-10-19 11:46:22 +01:00
Sergio Martins
371fd361a8
Detach when double-click on tab bar background, if no title bar
...
When a title bar isn't visible, we need a way to detach an entire
group of tabs by double clicking, required for wayland.
Implemented for all platforms, as it makes sense
2020-10-19 11:42:39 +01:00
Sergio Martins
97416607e5
qtquick: Allow to set min-sizes on items
2020-10-18 23:27:10 +01:00
Sergio Martins
51ccbe7c7c
Move TabBar::detachTab() to Frame
...
As the code doesn't have anything specific to QTabBar.
Means QtQuick can reuse it without needing a TabBarQuick.
tst_crash now passes for QtQuick too
2020-10-18 23:07:13 +01:00
Sergio Martins
65599399c7
qtquick: port a bunch of tests
2020-10-18 22:23:51 +01:00
Sergio Martins
c0816d4924
qtquick: Fix tst_negativeAnchorPosition5
...
min sizes weren't bounded
2020-10-18 21:58:46 +01:00
Sergio Martins
2988e97e14
qtquick: Fix build
2020-10-18 20:29:44 +01:00
Sergio Martins
046ceae500
Remove unneeded null check from DropArea::drop()
2020-10-18 12:31:04 +01:00
Sergio Martins
33c0cda582
Minor readability, just call setWindowBeingDragged(true)
...
It's always true here.
2020-10-18 12:28:10 +01:00
Sergio Martins
df7acc1075
Added README-Wayland.md to explain some differences
...
Fixes issue #10
2020-10-17 12:30:57 +01:00
Sergio Martins
3859e4b277
Added Wayland to the README
2020-10-17 12:18:05 +01:00
Sergio Martins
26253b65c7
wayland: Silence warning about qpa not supporting activating
...
"qt.qpa.wayland: Wayland does not support QWindow::requestActivate()"
2020-10-17 12:13:58 +01:00
Sergio Martins
424453ab57
Double clicking on a tab will make it float
...
Also really required for Wayland, where we don't another way to
float a single tab, as the float button affects all of them.
2020-10-17 12:09:47 +01:00
Sergio Martins
d7de0ebd20
Updated ChangeLog
...
- Added wayland for 1.2, it's done. Might need more polishing.
- Removed 1.0.1, let's release 1.1 instead
- Moved QtQuick to 1.3. The december target is still there, but I want
to release 1.2 sooner, since the wayland support is done.
2020-10-17 11:44:45 +01:00
Sergio Martins
bf1c5140cd
Wayland: Fix another missing mapToGlobal
...
Hovering indicators was fine, but dropping was off by a few pixels
vertically due to the menu bar
2020-10-17 11:41:19 +01:00
Sergio Martins
fb7a35db5b
Wayland: Fix indicator hover being off
...
Drag events are in local coords, while DropArea wants it in
global
2020-10-17 11:05:56 +01:00
Sergio Martins
5872c2fbe3
Wayland: Support classical indicators too
...
The Indicator Window is top-level, but on Wayland that can't do,
as we have no way to position it. So parent it. The indicators
are now under the window being dragged, but that's no so bad, as it's
smi-transparent, so you still see the indicator.
2020-10-17 11:02:49 +01:00
Sergio Martins
ba04c70d5a
Minor code re-ordering
2020-10-17 10:30:26 +01:00
Sergio Martins
de1e2d301f
wayland: Support affinities too
2020-10-17 10:27:43 +01:00
Sergio Martins
b67bdf779e
Don't dereference windowBeingDragged->floatingWindow()
...
Add a level of indirection instead, and support for the wayland case
2020-10-16 23:06:30 +01:00
Sergio Martins
78a3221395
Merge branch '1.1' into master
2020-10-16 22:05:14 +01:00
Sergio Martins
f698b56dad
relax test
...
Seems to happen with 5.15 static. It's benign anyway
2020-10-16 22:02:45 +01:00
Sergio Martins
4ed18fdf1d
Introduce Config::setTabbingAllowedFunc(<lambda>)
...
This gives a lot of power to the user to disallow tabbing two dock
widgets, while still allowing them to be docked side by side. As
this can't be achieved with affinities.
Instead of adding API which might not be enough soon, just allow
the user to pass a lambda and implement his very custom requirement.
Fixes #91
2020-10-16 21:56:33 +01:00
Sergio Martins
6e05f13c77
Added FloatingWindow::dockWidgets()
2020-10-16 21:48:47 +01:00
Sergio Martins
cb51d0af11
Merge branch '1.1' into master
2020-10-16 20:53:17 +01:00
Sergio Martins
a146cd81b2
Fix mac tests build
2020-10-16 20:52:22 +01:00
Sergio Martins
8dbd6df456
Merge branch '1.1' into master
2020-10-16 20:35:56 +01:00
Sergio Martins
ac6d845c8d
Skip tests on macOS+offscreen if Qt <= 5.15.0
...
There's a bug in Qt qpa only fixed in 5.15.1
2020-10-16 20:35:04 +01:00
Sergio Martins
cfc9d1abcd
cmake: Fix indentation
2020-10-16 19:43:50 +01:00
Sergio Martins
a66748f6ca
relax test
...
Seems to happen with 5.15 static. It's benign anyway
2020-10-16 17:10:40 +01:00
Sergio Martins
e5f46ead3b
qtquick: Fix build
2020-10-16 17:08:36 +01:00
Sergio Martins
171023558e
Introduce WindowBeingDraggedWayland
...
This is just a cleanup. Instead of having WindowBeingDragged
having both code paths, let's keep the non-wayland platforms code
small and clean.
2020-10-16 17:08:36 +01:00
Allen Winter
059a424b88
Merge branch '1.1'
2020-10-16 08:39:26 -04:00
Sergio Martins
307b22deaf
Wayland: Also allow to drag by tab widget
...
For when we don't have title bar
2020-10-16 13:30:20 +01:00
Sergio Martins
e405688f67
Fixing build with msvc 2013
...
error C2876: 'QMimeData' : not all overloads are accessible
2020-10-16 13:16:13 +01:00
Sergio Martins
68554119f4
Fix -Werror build on mac
2020-10-16 11:46:02 +01:00
Sergio Martins
86a4a740ef
wayland: dropping a single tab or frame now works too
2020-10-16 11:33:09 +01:00
Sergio Martins
0a004b83ca
Add WindowBeingDragged::draggable() getter
2020-10-16 11:16:49 +01:00
Sergio Martins
4fa47403c5
Make DragArea::drop() deal in WindowBeingDragged()
...
Preparing for wayland case.
2020-10-16 10:49:42 +01:00
Sergio Martins
9e418ced53
wayland: Finish WindowBeingDragged::maxSize() and minSize
...
Supports now single dock widgets or single frames
2020-10-16 10:40:34 +01:00
Sergio Martins
bc04863439
Wayland: Dragging a tab or a nested dock widget now shows pixmap
...
TODO: Supporting a drop for those two cases
2020-10-16 10:33:01 +01:00
Allen Winter
77f259a435
README.md - contact info
2020-10-15 16:06:26 -04:00
Sergio Martins
16bcace663
Add some transparency to the QDrag pixmap
...
Looks better
2020-10-15 19:15:40 +01:00
Sergio Martins
52fddaa1cd
wayland: Set a pixmap while DND
...
Since our source window isn't moving, let's at least show a copy
of it on the pixmap
A bunch of tearing going on kwin_wayland/nvidia though.
Weston/nvidia is fine.
Haven't tried kwin_wayland/Intel yet
2020-10-15 19:11:12 +01:00
Sergio Martins
f3d7400c15
wayland: End the drag properly when user cancels the drag
2020-10-15 19:02:46 +01:00
Allen Winter
7ebc3f3533
src/DockWidgetBase.h - fix compile after merge from master
2020-10-15 12:43:29 -04:00
Renato Araujo Oliveira Filho
0ee94b425e
Fixed python bindings generation
2020-10-15 12:38:32 -04:00
Sergio Martins
d44a173945
Wayland: Really end the drag after dropping
...
Fixes a crash on shutdown
2020-10-15 17:27:12 +01:00
Sergio Martins
ac001d6f32
wayland: Don't allow to drop onto itself
...
It was showing the drop indicators in the window being dragged
2020-10-15 16:50:46 +01:00
Sergio Martins
e3de2df69c
wayland: Add initial drag and drop support
...
You can drag a floating window and drop it somewhere
- Only works with segmented indicator style. Classical indicators
require us being able to positioning an overlay, which wayland
doesn't allow us to.
- Detaching inner tabs and dock widgets not implemented yet.
- polishing needed
2020-10-15 16:50:46 +01:00
Sergio Martins
39d3c90b2f
Minor variable rename for readability
2020-10-15 16:50:46 +01:00
Sergio Martins
bca21defa5
wayland: Don't grab mouse or set window opacity
...
Not supported by the QPA and not needed for wayland anyway
2020-10-15 16:50:46 +01:00
Sergio Martins
dd3116ae7f
Minor: remove const, need to pass it somewhere else
2020-10-15 16:50:46 +01:00
Allen Winter
49b3765eae
Merge branch '1.1'
2020-10-15 10:53:41 -04:00
Allen Winter
1f5dd35bec
Merge pull request #93 from KDAB/fix-python-binding
...
Fixed python bindings generation
2020-10-15 10:52:44 -04:00
Renato Araujo Oliveira Filho
6fce8e6161
Fixed python bindings generation
2020-10-15 09:55:32 -03:00
Allen Winter
e57b46979d
buildsystem - fix installation path for Python bindings
2020-10-14 16:27:18 -04:00
Allen Winter
683b67abb0
buildsystem - install libs with symlinks for the major vers
2020-10-14 15:59:53 -04:00
Sergio Martins
6479bcabfb
Make DropArea::drop() receive WindowBeingDragged instead
...
In prep for wayland support
2020-10-14 20:42:51 +01:00
Sergio Martins
a8c9735652
wayland: Add needed API to WindowBeingDragged
...
So it can act as a substitute for FloatingWindow, which we don't
always have during a drag
2020-10-14 20:34:55 +01:00
Sergio Martins
93b25b6a31
Make MultiSplitter::rectForDrop() receive WindowBeingDragged
...
Instead of FloatingWindow, which won't exist on wayland while a
drag is in progress.
2020-10-14 20:25:09 +01:00
Sergio Martins
4eb5a0940e
dont' cast pointer to bool
2020-10-14 19:44:27 +01:00
Sergio Martins
c2cc914b5c
indicators: Depend less on FloatingWindow
...
Deal in terms of WindowBeingDragged instead, as wayland won't have
a floating window being dragged
2020-10-14 19:39:51 +01:00
Sergio Martins
1219ba90af
Add WindowBeingDragged::affinities()
...
So we can deal in WindowBeingDragged instead of FloatingWindow.
For wayland we won't have floating window whilst dragging
2020-10-14 19:22:13 +01:00
Sergio Martins
beef3c7fb5
Specialize StateDragging for wayland
...
Introduces StateDraggingWayland. Wayland is the alien, so don't want
to introduce hacks in the existing clean code.
StateDraggingWayland will deal with the wayland workarounds.
Although the impl only has placeholders for now I'm committing it
because it's already an improvement: broken detachment is no longer
possible. Detached windows were going to a random place on screen.
2020-10-14 18:12:25 +01:00
Sergio Martins
52184ca72b
Added StateBase::isActiveState()
2020-10-14 18:01:48 +01:00
Sergio Martins
78cd7c56f7
Minor: Switch order of ifdefs
...
Will want to add a case for wayland too.
2020-10-14 16:41:17 +01:00
Sergio Martins
7805a1dc25
wayland: Use both client and native titlebar
...
native will be used for moving while client for DND
2020-10-14 16:32:10 +01:00
Sergio Martins
92f426e4c0
wayland: Allow floating windows to properly move
...
They move now, but don't drag yet.
2020-10-14 16:25:05 +01:00
Sergio Martins
90f10042fd
Merge branch '1.1' into master
2020-10-14 15:22:04 +01:00
Allen Winter
697c140883
set version to 1.1.0
2020-10-14 10:07:48 -04:00
Sergio Martins
3369816d31
Merge branch '1.1' into master
2020-10-14 14:59:44 +01:00
Sergio Martins
819725351a
Fix -Wweak-vtables warnings
2020-10-14 14:55:28 +01:00
Allen Winter
860cbd29bc
Merge branch '1.1'
2020-10-13 13:24:03 -04:00
Allen Winter
07db9f9a7a
cmake/Python/FindShiboken2.cmake - clean
2020-10-13 13:23:39 -04:00
Allen Winter
2fd4f9ce97
Merge branch '1.1'
2020-10-13 12:51:38 -04:00
Allen Winter
77d7cd7d58
buildsystem - namespace CMake options
...
OPTION_DEVELOPER_MODE => KDDockWidgets_DEVELOPER_MODE
OPTION_BUILD_PYTHON_BINDINGS => KDDockWidgets_PYTHON_BINDINGS
PYTHON_BINDINGS_INSTALL_PREFIX =>
KDDockWidgets_PYTHON_BINDINGS_INSTALL_PREFIX
OPTION_QTQUICK => KDDockWidgets_QTQUICK
2020-10-13 12:28:49 -04:00
Allen Winter
e5cb42c4fe
CMakeLists.txt - improve installing to non-KDAB location
2020-10-13 11:32:12 -04:00
Allen Winter
1fe1d619a9
footer.html - update tag line
2020-10-13 11:30:14 -04:00
Sergio Martins
697cc34c23
Merge branch '1.1' into master
2020-10-12 18:10:53 +01:00
Sergio Martins
b00d1d80b0
Merge branch '1.0' into 1.1
2020-10-12 18:09:54 +01:00
Sergio Martins
d50fcb80c5
qtquick: Fixed all the layouting spam/warnings
...
Don't layout a view with 0x0.
2020-10-12 17:07:30 +01:00
Sergio Martins
9571ffc30e
Remove unneeded qDebug
2020-10-12 17:05:39 +01:00
Sergio Martins
f4a88276b8
qtquick|tests: ported two more tests
2020-10-11 13:05:51 +01:00
Sergio Martins
4ea254029a
qtquick: Fix tst_negativeAnchorPosition3
...
MainWindow needed a parent.
Also normalized deletion of the floating window.
2020-10-11 13:00:09 +01:00
Sergio Martins
f5e85c2196
qtquick|tests: Add a few more tests
2020-10-11 12:55:25 +01:00
Sergio Martins
926103325c
qtquick: Fix close events not being delivered
...
Also ported some tests from tst_docks to tst_common, which
were failing due to close events not working. Fixed now
2020-10-11 12:42:20 +01:00
Sergio Martins
20b2988165
Unfold an assert into a qWarning+assert
...
Just to print some debug data
2020-10-11 11:58:32 +01:00
Sergio Martins
39aefd312b
qtquick|tests: Don't abort tests due to binding loop warnings
...
Don't want to care about it right now
2020-10-11 11:53:55 +01:00
Sergio Martins
b5478bcb0d
tests: Enable a bunch of tests for QtQuick
...
only one is failing
2020-10-11 11:44:47 +01:00
Sergio Martins
d403557b9e
tests: Abstract QPushButton somewhat
...
Anything refering QPushButton will simply compile with QtQuick.
2020-10-10 21:07:18 +01:00
Sergio Martins
db9884ea64
qtquick: Enable tst_setFloatingSimple and tst_restoreSimple
2020-10-10 20:53:27 +01:00
Sergio Martins
74148aabc3
tests: Don't complain there's a leak if the FloatingWindow is being deleted already
2020-10-10 20:52:56 +01:00
Sergio Martins
7bfac091ae
Rename DockRegistry::nestedwindows() to DockRegistry::floatingWindow
...
which is the naming we use everywhere else
2020-10-10 20:41:42 +01:00
Sergio Martins
60a68817b6
qt_quick: Enable tst_restoreCentralFrame too
...
Removes a warning from FrameQuick. It's benign.
For QtWidgets we also set a -1 tab index to clear
2020-10-10 20:25:46 +01:00
Sergio Martins
a56e6d7fe8
qtquick: Enable tst_simple2
2020-10-10 20:10:43 +01:00
Sergio Martins
1f0b208922
qtquick: Enable tst_resizeWindow too
2020-10-10 12:15:18 +01:00
Sergio Martins
9da147f50e
qtquick: Enable tst_floatingWindowTitleBug too
2020-10-10 11:52:38 +01:00
Sergio Martins
c175451284
qtquick: Fix user geometry not being honoured
...
QtQuick doesn't set Qt::WA_Moved, which we expect. Set this attribute
in the wrappers then.
Fixes the unit-test too.
2020-10-10 11:46:24 +01:00
Sergio Martins
9a88cf3a72
tests: Enable tst_honourUserGeometry for QtQuick
...
It's failing. Will fix.
2020-10-10 11:36:16 +01:00
Sergio Martins
d0255e5310
tests: Use DockWidgetType instead of DockWidget
...
Will be easier to enable QtQuick support
2020-10-10 11:24:32 +01:00
Sergio Martins
2a2fb0a4f2
tests: Enable tst_sizeAfterRedock for QtQuick too
2020-10-10 11:18:40 +01:00
Sergio Martins
b0ad939db8
tests: Enable tst_tabbingWithAffinities for QtQuick
2020-10-10 11:18:40 +01:00
Allen Winter
5abf118b8c
Merge branch '1.1'
2020-10-10 05:30:38 -04:00
Allen Winter
f5099167b6
misspelling--
2020-10-10 05:29:08 -04:00
Sergio Martins
30949bd4c3
quick: Fix test, don't leak window
2020-10-09 19:15:55 +01:00
Sergio Martins
63279c187e
quick: Fix QtQuick not reacting to parent change events
...
- We were calling event() directly, which skiped event filters.
- The handler was calling parent(), but the setParent() call is done
later. So first call setParentItem()
2020-10-09 19:09:45 +01:00
Sergio Martins
fad03f8e0b
Debug++
2020-10-09 19:08:51 +01:00
Sergio Martins
6edfcc4f02
Install DragController_p.h
...
Still private. It's for advanced used only.
2020-10-09 17:26:00 +01:00
Sergio Martins
17df7b5b4e
Install DragController_p.h
...
Still private. It's for advanced used only.
2020-10-09 16:56:43 +01:00
Sergio Martins
62cbd823c9
quick: Assert that we're not using this QtWidgets only function
2020-10-08 16:25:29 +01:00
Sergio Martins
bdcc211308
quick: Resize FloatingWindow and it's QWindow immediately
...
So it matches QtWidgets behaviour, otherwise tests will
break a lot if they have to wait for an event loop for FloatingWindow
to be resized
2020-10-08 16:20:12 +01:00
Sergio Martins
ddeb4611a1
quick: Fix an invalid cast to QWidget
...
We don't have QtWidgets in QtQuick.
Will try to fix it at a build-system level so we catch these
cases sooner.
2020-10-08 16:15:56 +01:00
Allen Winter
ad639c8001
CMakeLists.txt - increase version number for 1.2
2020-10-08 09:48:16 -04:00
Sergio Martins
15dc64d550
quick: Fix positioning windows when floating them
...
- Resizing the FloatingWindow wasn't resizing the QQuickView
- QQuickItems were being created as visible, while QWidgets are
created invisible. Fixed this difference in behaviour
2020-10-07 19:43:40 +01:00
Sergio Martins
03b575d16e
quick: Fix MultiSplitter()::mainWindow()
...
Works now for QtQuick
2020-10-06 21:04:25 +01:00
Sergio Martins
4cacee45e8
Export MultiSplitter
...
Has powerful private api which could be useful
2020-10-06 11:03:52 +01:00
Sergio Martins
873b860203
ItemContainer: Make some getters public
...
They're decent private api for some very custom use cases
2020-10-06 10:53:15 +01:00
Sergio Martins
128ae2d889
Fix separators not being deleted
...
Bug found with QtQuick but also reproducible with QtWidgets.
Added unit-test for both stacks.
2020-10-05 18:25:33 +01:00
Sergio Martins
b0ec0e22e4
quick: Remove unused Separator.qml
...
We have one in multisplitter/ already
2020-10-05 17:34:27 +01:00
Sergio Martins
6aa4e979dc
Added DockWidgetBase::hasPreviousDockedLocation()
2020-10-05 13:52:36 +01:00
Sergio Martins
36f225b859
Fix build with MinGW, no pragma link
...
Instead use cmake to link, which is cleaner anyway.
As a drive-by, remove the QtWidget check from the headers includes,
as QtQuick also needs Dwm lib
2020-10-05 03:15:36 -07:00
Sergio Martins
48a75b2450
Fix namespaced build
2020-10-05 10:21:20 +01:00
Sergio Martins
2af4f939dd
tests|quick: Fix leak
2020-10-04 20:37:00 +01:00
Sergio Martins
b592d21064
quick: Also run tst_resizeWindow2 for QtQuick
2020-10-04 20:22:43 +01:00
Sergio Martins
3cdd5afe7a
quick: Fix ownership of the floating view
...
Not nice to delete it in two places.
2020-10-04 20:16:30 +01:00
Sergio Martins
0ef56c1302
quick: Fix the overlay from minimizing windows being dragged
2020-10-04 19:41:26 +01:00
Sergio Martins
96f7f38a0e
tests|quick: Set a source in the view, so we have a root item
2020-10-04 19:39:13 +01:00
Sergio Martins
689ba7da8f
quick: Make dealing with window flags more stable
...
There's only one place where we need to set the flags, it's when
creating the FloatingWindowQuick. So no need to complex machinery
which is bug propne
2020-10-04 11:12:35 +01:00
Sergio Martins
951aeece6e
quick: Make DockWidgetBase::setWidget() virtual
...
The QtQuick counter-part needs to do some specific things, like
settings anchors.parent: fill on it, and parenting it
2020-10-04 00:01:32 +01:00
Sergio Martins
2ea0d54e6c
quick: Fix floating windows not having the correct window flags
...
Add a unit-test too.
2020-10-03 23:30:13 +01:00
Sergio Martins
1c98fe04ca
Fix build
2020-10-03 23:11:40 +01:00
Sergio Martins
59a9ab6642
tests: Remove org.kde.desktop from warning blacklist
...
It's now solved by not using the kde QQC2 style. So no need to polute
the warning list
2020-10-03 23:07:49 +01:00
Sergio Martins
7ee5949ae2
tests|quick: Fix memory leaks
2020-10-03 23:07:04 +01:00
Sergio Martins
721f08e29b
tests: Show the QQuickView and cleanit up
...
Also commit main.qml I forgot
2020-10-03 22:49:27 +01:00
Sergio Martins
df07133c9d
tests: Silence some QML warnings from KDE theme plugin Kirigami
...
We don't want tests to abort because of that
2020-10-03 22:48:28 +01:00
Sergio Martins
b9e3024720
tst_common now passes for QtQuick
...
Needed a view
2020-10-03 22:10:38 +01:00
Sergio Martins
d848d3e39a
MainWindow: Receive either QWidget or QQuickItem as parent
...
No need to receive the more complex adapters
2020-10-03 22:09:56 +01:00
Sergio Martins
3f26f4c8f2
Remove unused variable
2020-10-03 22:09:26 +01:00
Sergio Martins
dc9d709dd7
quick: Use proper icons for close and float
...
No more red rectangles
2020-10-03 18:55:33 +01:00
Sergio Martins
543f734650
Added DragController::enableFallbackMouseGrabber()
...
So it's easier to test the fallback mouse grabber
2020-10-03 18:37:26 +01:00
Sergio Martins
3fb723a82f
quick: Fix QtQuick build
2020-10-03 18:27:22 +01:00
Sergio Martins
71c2f34ed4
quick: Add needed pure virtual FrameQuick::renameTab()
...
Not needed to have much of an impl, it's just to fix the build.
For QtQuick the tab's titles are updated via bindings
2020-10-03 18:15:56 +01:00
Sergio Martins
d4b3bf9de6
quick: Added support for showMinimized()
2020-10-03 18:11:33 +01:00
Sergio Martins
2b234f313c
quick: Remove some QWidget specific code from MainWindowBase
2020-10-03 18:10:23 +01:00
Sergio Martins
d1b2d17f7d
Allow the normal/restore icon to be different than float/dock
...
Allow we use the same icon, the user might now want to, so allow
them to use a different icon
2020-10-03 14:58:07 +01:00
Sergio Martins
f062ab7a64
TitleBar: Move button construction into the FrameWorkWidgetFactory
...
So it can be more easily overridden by the user.
A virtual in TitleBarWidget is not good enough as we can't call virtuals
when in the ctor
2020-10-03 14:52:44 +01:00
Sergio Martins
f009f57581
Move TitleBarButtonType next to all other enums
2020-10-03 14:29:36 +01:00
Sergio Martins
f86a818e69
TitleBar: Add an enum to describe each button type
2020-10-03 14:24:40 +01:00
Sergio Martins
bb80c2158d
Fix outter_bottom_active.png
...
Was missing an outline for some reason
2020-10-03 13:57:32 +01:00
Sergio Martins
86fa6258f6
Comment++
2020-10-03 13:56:51 +01:00
Sergio Martins
545536fab5
Support high-res icons when on 1.5x scaling and Qt >= 5.15.2
...
Icons look nice now on linux with 1.5x. Windows and macOS don't use
fractional scaling, so not affected
Fixes #11
Will open a separate bug report to get high-res docking indicators.
2020-10-03 13:21:06 +01:00
Sergio Martins
ef23553b66
Fix high-res unauto-hide icon
...
We had it but we were still using the old one in C++
2020-10-03 12:04:39 +01:00
Sergio Martins
fcf56664cc
Add high-res icons for minimize and maximize
2020-10-03 11:50:33 +01:00
Sergio Martins
d932166bcd
Add high-res icons for dock/float
2020-10-03 11:43:15 +01:00
Sergio Martins
0c5783774d
Added high-res close icon
2020-10-03 11:38:26 +01:00
Sergio Martins
aa42ea15f7
Add high-res versions for auto-hide and unauto-hide png
...
1.5x is disabled for now, as Qt < 5.15.2 has a rounding bug
rendering them
2020-10-03 11:28:21 +01:00
Sergio Martins
9dd778d55d
Pass the correct icon size when rendering a button
...
Needed when rendering with different scaling
2020-10-03 10:57:54 +01:00
Sergio Martins
ac35a919f4
Don't show center/tab docking indicator when there's no affinity
...
If the dock widget can't dock there as tabbed, don't show the
indicator
2020-10-02 17:35:15 +01:00
Sergio Martins
a32c5017e6
Minor: Remove unneeded variable
2020-10-02 17:24:50 +01:00
Sergio Martins
7995a6d13b
Windows: Fix dragging sometimes not showing indicators
...
DragController thought there was a resize going on.
The hardcoded margins in FloatingWindow::isInDragArea() arent
needed anymore.
iPlease enter the commit message for your changes. Lines starting
2020-10-02 17:05:16 +01:00
Sergio Martins
d4ec2eec88
Windows: Added support for drop shadow for floating windows
2020-10-01 18:31:46 +01:00
Sergio Martins
12ad3b3484
Fix floating window's border, was appearing black
...
QPen was unused
2020-10-01 18:22:07 +01:00
Sergio Martins
9a53c36c14
Also honour affinities when dropping into a dock widget as tabbed
...
Fixes #89
2020-10-01 17:55:19 +01:00
Sergio Martins
8fb3802343
tests: Add an xfail for an affinities bug
...
This is for #89 . They shouldn't be allowed to tab
together since they have different affinities
Minor refactoring in drop area so we can call DropArea::drop()
directly without having to move the mouse, as that's not relevant
for this test.
2020-10-01 17:45:53 +01:00
Sergio Martins
c035df7e85
Improve the heuristics for auto-hide prefered side bar
...
Now it counts the number of borders it's touching to decide.
Then checks aspect ratio too.
Can still be improved, but it's a start. Will gather feedback
before changing it further.
2020-10-01 17:16:41 +01:00
Sergio Martins
92f81e28ca
Merge branch '1.0' into master
2020-10-01 11:08:39 +01:00
Sergio Martins
d42fb81790
Windows: Fix artifacts when dragging window to another screen
...
Qt does its best to honour our custom WM_NCCALCSIZE processing,
except when the window moves to another screen. So help Qt a bit
and trigger a WM_NCCALCSIZE message, which Qt intercepts and takes
notes of the custom margins.
Fixes #46
2020-09-30 22:12:40 +01:00
Sergio Martins
73934e2f90
Always call FloatingWindow::create() in the CTOR
...
0x051000 was a typo, as it's Qt 5.16, not 5.10.
Since it's been running fine for 5.15 for so long, let's remove
special cases and have the same path for all Qt versions.
2020-09-30 22:07:07 +01:00
Allen Winter
58af9e2516
tst_multisplitter.cpp - add braces to make msvc2013 happy
...
Change-Id: I562a8b14c9c6713fc15116397b5c215138a0c9cb
2020-09-30 09:25:01 -04:00
Sergio Martins
4228c044ea
Fix false-positive caught by Coverity
...
It's benign
2020-09-30 10:58:36 +01:00
Sergio Martins
ccc0aec968
Remove some dead code which is no longer used
2020-09-30 10:39:04 +01:00
Sergio Martins
3718d3fe79
Silence false-positive pointed out by Coverity
2020-09-30 10:33:58 +01:00
Sergio Martins
26ed9b722b
Don't allow to turn off native dragging on Windows
...
Native dragging is much better as Windows deals with crossing screen
boundaries, there's no reason not to want that.
Client-side moving is buggy within Qt, depending on the HDPI setting.
Fixes #86
Fixes #78
2020-09-30 09:01:09 +01:00
Sergio Martins
6751669249
Fix flaky test on 5.14, it's benign
2020-09-29 23:21:36 +01:00
Sergio Martins
c7955dce1e
Update ChangeLog and README
...
1.1 is due out soon, won't have QtQuick yetx
2020-09-29 21:10:47 +01:00
Sergio Martins
2e432f402f
Also update floating action when removing from a FloatingWindow
...
Fixes #79
2020-09-29 21:05:45 +01:00
Sergio Martins
07791cd901
Fix another case where floating actions weren't updated
...
Relates to issue #79
2020-09-29 20:50:02 +01:00
Sergio Martins
1458da92d9
minimal example: Use fusion too
...
Looks better in general
2020-09-29 18:10:12 +01:00
Sergio Martins
c56f998292
Use Qt::MitterJoin when drawing rectangle
...
As it's not the default. Otherwise there's artifacts with hdpi scaling
2020-09-29 13:38:44 +01:00
Sergio Martins
991075d69e
Windows: Start a native drag as soon as possible
...
Native drag works much better with HDPI crossing screens.
Relates to issue #78
2020-09-29 12:39:10 +01:00
Sergio Martins
234ca75728
tests: minor: Use QCOMPARE instead of QVERIFY
2020-09-28 22:10:00 +01:00
Allen Winter
e34d62d3e5
src/private/multisplitter/Item.cpp - fix compile with msvc2013
...
might be choking on the QStringLiteral being a lambda
used into a [] ??
2020-09-28 16:49:59 -04:00
Allen Winter
423be28afd
various - misspelling--
2020-09-28 16:40:27 -04:00
Sergio Martins
eb7bed9601
Fix build with -Werror
2020-09-28 19:00:40 +01:00
Sergio Martins
fa09521012
Adjust unit-test, according to the latest change
2020-09-28 18:55:55 +01:00
Sergio Martins
bb30f322a3
Fix size when docking a floating window
...
The docked widget would have the size of the window's contents,
we should use the size of the floating window instead.
The difference is just the title bar. When docked, the title bar
belongs do Frame, while when Floating it belongs to FloatingWindow.
When doing the docking calculation the frame's title bar is still hidden
Fixes issue #84
2020-09-28 18:47:46 +01:00
Sergio Martins
0e35c93ae5
Update ChangeLog
2020-09-27 18:02:56 +01:00
Sergio Martins
603224e553
FrameWidget: Fix painting the border on HDPI
...
Work in floating point instead of int.
2020-09-27 18:00:15 +01:00
Sergio Martins
9b82063d52
Fix drawing the FloatingWindowWidget border on HDPI
...
left and top margins were smaller than bottom and right.
2020-09-27 17:49:29 +01:00
Sergio Martins
c210a523e3
Focus the newly dropped dock widget
...
When we drag a dock widget into a another widget, we should focus it
Fixes issue #77
2020-09-26 17:44:30 +01:00
Sergio Martins
e33151d482
Add a failing test for issue #77
2020-09-26 17:15:46 +01:00
Sergio Martins
835f67a106
Mark DropArea::drop() as private
...
It's an implementation detail
2020-09-26 17:08:23 +01:00
Sergio Martins
a50f6ec602
Added DockWidgetBase::isFocused Q_PROPERTY
...
For GammaRay convenience. For QML too.
The getter and signal already existed.
For issue #73
2020-09-25 19:35:28 +01:00
Sergio Martins
4a49dbc6b4
Add a DockWidget::isFloatingChanged() signal
...
For issue #73
2020-09-25 19:25:58 +01:00
Sergio Martins
05c843397b
Add one more test
...
tabbed dock widget aren't floating either
2020-09-25 18:32:06 +01:00
Sergio Martins
e4871eb340
Fix floating action not being triggered in some cases
...
When docking a dock widget into a floating widget, then both
are not "floating" anymore, as there's two of them in the layout
Fixes #79
2020-09-25 18:28:32 +01:00
Sergio Martins
0e696ff2dd
FloatingWindow: Also use margin when using aero-snap
...
It's always good to have contents margin. Initially the idea was
that we were adding margin just to make the client resize handler
work better. But no reason to have different visual aspect depending
on if you have aero-snap or not
Fixes applications needing to look the same on all platforms.
2020-09-25 11:23:03 +01:00
Sergio Martins
9f15773a9b
Fix dragging by tabbar if there's a line edit in the tab bar
...
User was able to drag and line edit wouldn't get focus.
This is a hot fix, not the most elegant way to do it.
2020-09-25 11:02:35 +01:00
Sergio Martins
a00984f95a
Fix potential crash at shutdown
...
QWidget DTOR can trigger a focus change, which triggers
DockRegistry::onFocusObjectChanged(), which would dereference the
dockwidget
2020-09-24 16:05:38 +01:00
Allen Winter
c7e9632f18
src/MainWindow.cpp - minor header order
2020-09-22 11:22:40 -04:00
Sergio Martins
7080712501
Rename the tab's title if its dock widget changes
2020-09-21 16:19:35 +01:00
Sergio Martins
03b574434c
Fix non-developer build
...
Fixes #76
2020-09-21 10:07:04 +01:00
Sergio Martins
6a46744073
Make Flag_AutoHideSupport public
...
Ready to be tested by the public
2020-09-21 00:19:20 +01:00
Sergio Martins
7e52c510b3
Fix rendering vertical sidebars on scaled monitors
2020-09-21 00:14:09 +01:00
Sergio Martins
9bf060af9a
SideBar: Support sending to West/East too
...
Algorithm can be made smarter, but this is good for now
2020-09-20 23:53:26 +01:00
Sergio Martins
b5973fcf8c
Fix sidebar test
...
We're not hidding them, they just occupy 0 it seems
2020-09-20 23:50:46 +01:00
Sergio Martins
ac7d06d4fe
When closing overlay, remove it from side bar too
...
Added test.
2020-09-20 23:46:37 +01:00
Sergio Martins
75e9137e3a
Increase a bit the side of the overlays
2020-09-20 23:18:46 +01:00
Sergio Martins
5168940422
When enabling auto-hide, don't overlay it immediately
...
Instead, hide it. Will be overlayed when the user toggles it.
2020-09-20 23:16:40 +01:00
Sergio Martins
cfd2dafa53
Remove bogus debug
2020-09-20 23:15:01 +01:00
Sergio Martins
188b0a0edd
Don't style side-bar buttons of overlayed widgets
...
As mouse-over is already using the same color. Would be nice
to have some different style for the currently overlayed window.
2020-09-20 23:09:33 +01:00
Sergio Martins
206c418ebc
Make TitleBarWidget::buttonAreaWidth() generic
...
Nowadays we have much more buttons
2020-09-20 22:59:25 +01:00
Sergio Martins
b0acf8d1ae
Disable floating button when using auto-hide
...
TitleBar is a bit crowded otherwise. User can still pass
& ~Flag_TitleBarNoFloatButton if he really wants both buttons.
2020-09-20 22:54:51 +01:00
Sergio Martins
f279ea41e6
Add tooltips to title bar buttons
2020-09-20 22:43:10 +01:00
Sergio Martins
d2a929f35d
Minor whitespace fix
2020-09-20 22:26:51 +01:00
Sergio Martins
6f5258b5dd
Add auto-hide iconsz
2020-09-20 22:25:56 +01:00
Sergio Martins
4f223a9439
Change color of active/hovered SideBarButton
2020-09-20 20:59:54 +01:00
Sergio Martins
ea98eb3d44
Restyle the StyleBarButtons a bit
2020-09-20 20:30:40 +01:00
Sergio Martins
cdb8f85620
Fix overlay positions when on left/right
...
Was off by a few pixels, looks good now
2020-09-20 19:37:53 +01:00
Sergio Martins
f459dcb8b3
length of overlayed dockwidgets now accounts for open sidebars
...
For example, if we're showing a bottom overlay, but the left
sidebar is visible, then the bottom overlay can't be so wide
2020-09-20 19:20:35 +01:00
Sergio Martins
967a539e71
Simplify SideBarButton::sizeHint()
2020-09-20 19:08:52 +01:00
Sergio Martins
db615da0ee
Override from QToolButton to have our own SideBarButton
...
Has proper size when vertical.
Text isn't vertical yet though.
2020-09-20 19:06:47 +01:00
Sergio Martins
c4b420bd31
Add a fwd-header for SideBarWidget too
2020-09-20 18:09:54 +01:00
Sergio Martins
a6c4730c44
SideBar is now constructed by the framework widget factory
...
Means it can be overridden by the user
2020-09-20 18:08:23 +01:00
Sergio Martins
eb1f4c5a14
Auto-hide overlays when clicking elsewhere
...
That's what auto-hide is all about
2020-09-20 17:25:40 +01:00
Sergio Martins
b303af738c
Improve position for north/south overlays
2020-09-20 16:56:57 +01:00
Sergio Martins
af5e11a265
Update the overlay's geometry when we resize the main window
2020-09-20 16:38:03 +01:00
Sergio Martins
8d7627069c
Factor out some code into updateOverlayGeometry()
...
So it's reusable
2020-09-20 16:30:43 +01:00
Sergio Martins
9e94c0d67d
The auto-hide button now works as expected
...
1st click it show the overlay and adds to sidebar
2nd click it hides the overlay, removes from sidebar and restores the dockwidget
2020-09-20 14:13:39 +01:00
Sergio Martins
55ddacf978
Partially revert previous commit
...
toggling overlay visibility won't remove it from the sidebar afterall.
User will need to explicitly press the auto-hide button
2020-09-20 13:56:52 +01:00
Sergio Martins
005e0552b6
Delete SideBarButton when dock widget is removed from sidebar
2020-09-20 13:53:49 +01:00
Sergio Martins
54b28c42e2
Added DockWidgetBase::isOverlayed()
2020-09-20 13:48:17 +01:00
Sergio Martins
2659ddb76b
refactor: Decouple moveToSideBar from overlaying
...
overlaying just shows/hides the overlay, and not requires
the dock widget was added to the sidebar before
2020-09-20 13:44:04 +01:00
Sergio Martins
c85873c6ce
Added MainWindowBase::sideBarForDockWidget(dw)
...
Just a getter.
2020-09-20 13:24:18 +01:00
Sergio Martins
6e32f3f915
Added SideBar::mainWindow()
...
It's just a getter.
2020-09-20 13:18:34 +01:00
Sergio Martins
b8891a5727
Start implementing overlaying on top of main window
2020-09-20 12:56:31 +01:00
Sergio Martins
fcb6f5a6af
Use the top sidebar too
2020-09-19 12:16:51 +01:00
Sergio Martins
0365f3194d
Added Item::adjacentLayoutBorders()
2020-09-19 11:50:00 +01:00
Sergio Martins
76e2ec6429
Add East, West and North sidebars too
...
Instead of just south.
Only south is used for now though.
2020-09-19 11:00:42 +01:00
Sergio Martins
a5d0a202a5
Add enum with sidebar location
2020-09-19 10:35:36 +01:00
Sergio Martins
def752632f
tests: fix flaky test on macOS
2020-09-19 00:08:47 +01:00
Sergio Martins
f296048063
tests: Stabilize two tests on XCB
...
Spacings/margins are different. Anyway, that QVERIFY isn't
very important, mostly useless.
2020-09-18 23:44:34 +01:00
Sergio Martins
1c1b816292
Fix tst_maximumSizePolicy with qpa xcb
2020-09-18 23:28:14 +01:00
Sergio Martins
fbd463e18b
tests: debug++
2020-09-18 19:42:26 +01:00
Sergio Martins
9e01363648
tests: debug++
2020-09-18 19:40:37 +01:00
Sergio Martins
67bf7e9775
tst_raise: raise the window before starting
...
needed on macOS
2020-09-18 19:34:09 +01:00
Sergio Martins
d8c2100b24
tests: Set object name for debugging
2020-09-18 19:30:28 +01:00
Sergio Martins
d1a3e39f17
tests: Improve debug message
2020-09-18 19:27:17 +01:00
Sergio Martins
3d5c081333
tests: Debugging a macOS failure
2020-09-18 19:24:49 +01:00
Sergio Martins
e1085fb770
Add experimental support for minimization to side-bar
...
Auto-hide not working yet. Just minimization.
Internal for now. Will be public once finished.
2020-09-18 18:35:41 +01:00
Sergio Martins
c294c19be7
Fix Frame having a null DropArea
...
Fixes inMainWindow() signal not being emitted sometimes
2020-09-18 18:34:49 +01:00
Sergio Martins
87726fb0a7
Minor style: Reduce nesting level in Frame::setDropArea()
2020-09-18 18:34:28 +01:00
Sergio Martins
d28e61f412
Minor tidying
2020-09-18 17:48:31 +01:00
Sergio Martins
890e750c23
Trying to fix Windows/MinGW build
2020-09-18 17:48:04 +01:00
Sergio Martins
1fe5cfd121
Added Frame::mainWindow()
2020-09-18 17:40:38 +01:00
Sergio Martins
c8eaf88cf1
Added DockWidgetBase::mainWindow()
2020-09-18 17:20:41 +01:00
Sergio Martins
f3f812205d
Pass the new title to DockWidget::titleChanged() signal
2020-09-18 17:12:38 +01:00
Sergio Martins
7b2ec52831
Fix build on 5.9/mingw
2020-09-18 16:59:01 +01:00
Sergio Martins
72785cf869
Updated ChangeLog and README with new features and bugfixes
2020-09-17 21:54:36 +01:00
Sergio Martins
e92ef472b3
Floating windows now support a minimize button
...
Introduced Flag_TitleBarHasMinimizeButton for it.
It implies Flag_DontUseUtilityFloatingWindows too, since Qt::Tool
don't appear in the task bar.
example: kddockwidgets_example -k
2020-09-17 21:46:28 +01:00
Sergio Martins
deec6ffa31
Windows: Fix windows have 0 min-size
...
Also tested on HDPI configurations and added the device pixel ratio
into account, as Windows works in native pixels
2020-09-17 18:37:13 +01:00
Sergio Martins
47779c8d0a
Fix non-native move screwing up the size when moving across screens
...
The drag to the 2nd monitor was native, as we detected HTCAPTION,
but the drag back to 1st monitor was non-native. Non native is not
recommended, not great with HDPI in Qt.
The bug we were mixing native pos from win32 with Qt's logical
positions.
Fixes #72
2020-09-17 09:43:38 +01:00
Allen Winter
3e9e802b6c
buildsystem - do not build docs by default
2020-09-16 16:04:18 -04:00
Sergio Martins
d76b27863f
Don't center floating window if user moved it
...
Fixes #75
2020-09-16 16:51:05 +01:00
Sergio Martins
576627eb17
Always outter indicators if the center is obscured with something else
...
If there's some other floating window over our drop zone, then it's
very difficult to drop if there's no outter indicators.
Now we'll show the outter indicators if we suspect there's some other
window obscuring
2020-09-16 12:54:09 +01:00
Sergio Martins
74adb5f021
Fix floating window's title bar not being correct
...
FloatingWindow::hasSingleFrame() was true, but FloatingWindow::frames()
returned 2 of them, since frames() is based on child count and it hadn't
been reparented yet
Not commiting to 1.0 since it touches the layouting engine.
All tests pass and testing showed no side effects though, so should be fine for
1.0 too
Fixes #74
2020-09-15 19:52:48 +01:00
Allen Winter
dcdcef1fb2
Merge branch '1.0'
2020-09-15 08:45:20 -04:00
Sergio Martins
beb2128804
example: Added --no-aero-snap for debugging purposes
2020-09-14 22:28:15 +01:00
Sergio Martins
85cb289bc4
Also focus when clicking on the current tab
...
Fixes issue #71
2020-09-14 21:08:48 +01:00
Sergio Martins
5293943a50
Add TabBar::frame()
...
Returns the Frame this TabBar is in.
2020-09-14 21:07:51 +01:00
Sergio Martins
ee4d720c51
Added test for issue #71
2020-09-14 20:54:35 +01:00
Allen Winter
f8b698e669
Merge branch '1.0'
2020-09-13 09:41:53 -04:00
Sergio Martins
87ba2e0ee7
example: Add option to test combinations of Qt::Tool and parent
...
for internal testing
2020-09-13 13:30:55 +01:00
Sergio Martins
eaeed567f3
Don't have a parent window when using Qt::Window
...
Otherwise Qt::Window behaves like Qt::Tool, on Windows
2020-09-13 13:22:48 +01:00
Sergio Martins
a2054359a2
Minor code move, so next diff is short
2020-09-13 12:48:25 +01:00
Sergio Martins
85b533d4c4
Minor code move
2020-09-13 12:47:04 +01:00
Sergio Martins
2d2c8524ee
Introduce Config::Flag_DontUseUtilityWindowsForFloating
...
Controls whether windows get Qt::Tool or not
2020-09-13 12:24:26 +01:00
Sergio Martins
62271b11a7
Update .gitignore
2020-09-13 12:12:13 +01:00
Sergio Martins
869cacc568
Use mouse events for tst_titleBarFocusedWhenTabsChange
...
So we can test clicking on a current tab too.
Also since changing tabs programatically shouldn't change focus,
which I'll fix soon
2020-09-12 00:39:10 +01:00
Sergio Martins
0155790b02
tests: add Test::clickOn()
2020-09-12 00:33:34 +01:00
Sergio Martins
2cb25fefe4
Minor: Add the tab widget as a member
2020-09-11 23:40:41 +01:00
Sergio Martins
98225ac9a3
Fix DockWidget::isInMainWindow()
...
FloatingWindows are parented to the main window, so we need to stop
the loop once isWindow().
The tests didn't catch this because the floating window in the test
was created before the main window, so it truly didn't have a parent
Fixes #69
2020-09-11 22:33:25 +01:00
Sergio Martins
4bdfc35c8c
Changing tabs should also activate our focus scope
...
Fixes #70
2020-09-09 21:03:00 +01:00
Sergio Martins
f090a51485
example: Make title bar focusable when debugging focus
2020-09-07 20:26:09 +01:00
Sergio Martins
b510c2fd5f
Added DockWidget::isInMainWindow()
...
For task #69 .
A signal would be nice too, though.
2020-09-07 15:27:54 +01:00
Sergio Martins
03e58c7443
update change log regarding issue #68
2020-09-04 17:17:23 +01:00
Sergio Martins
676086ba90
Update .gitignore
2020-09-04 17:17:23 +01:00
Allen Winter
c8a5bd3f15
.../quick/qml/ClassicIndicator.qml - license+copyright header
2020-09-04 12:15:31 -04:00
Sergio Martins
6b28a804f8
example: Allow to demo the focus scope
...
set KDDW_DEBUG_FOCUS
2020-09-04 17:06:32 +01:00
Allen Winter
7c5e159677
Merge branch '1.0'
2020-09-03 18:55:08 -04:00
Allen Winter
933a535494
Merge branch '1.0'
2020-09-03 08:08:55 -04:00
Allen Winter
eac2cff09c
Merge branch '1.0'
2020-09-03 08:07:47 -04:00
Allen Winter
cf8f25988c
Merge branch '1.0'
2020-09-03 07:58:52 -04:00
Allen Winter
633dc06e6f
Merge branch '1.0'
2020-09-02 11:54:06 -04:00
Allen Winter
eddcfef5d8
Merge branch '1.0'
2020-08-31 18:19:44 -04:00
Allen Winter
ba3890acfa
Merge branch '1.0'
2020-08-31 13:22:24 -04:00
Sergio Martins
6cf527403e
Merge branch '1.0' into master
2020-08-30 17:53:04 +01:00
Sergio Martins
92843b4972
Merge branch '1.0' into master
2020-08-30 14:46:28 +01:00
Allen Winter
b2df16dcb0
Merge branch '1.0'
2020-08-27 12:23:38 -04:00
Sergio Martins
8bb15f5447
Updated ChangeLog
2020-08-27 15:30:17 +01:00
Sergio Martins
2977f0b8c6
Introduce Config::Flag_AlwaysTitleBarWhenFloating
...
Allows to improve on Flag_HideTitleBarWhenTabsVisible.
Flag_HideTitleBarWhenTabsVisible will hide title bar regardless
if the window is floating or docked. By enabling Flag_AlwaysTitleBarWhenFloating
the title bar will only be hidden if docked.
Demo: ./bin/kddockwidgets_example -qt
Fixes #64
2020-08-27 15:14:55 +01:00
Sergio Martins
251423116f
Merge branch '1.0' into master
2020-08-27 14:54:18 +01:00
Sergio Martins
04e2a71b66
Merge branch '1.0' into master
2020-08-25 22:00:25 +01:00
Sergio Martins
a06fec51c8
Merge branch '1.0' into master
2020-08-25 21:54:32 +01:00
Sergio Martins
83eda81263
Minor code simplification
2020-08-24 17:58:42 +01:00
Sergio Martins
1bb476ca95
Merge branch '1.0' into master
2020-08-24 14:38:06 +01:00
Sergio Martins
f0ac455ec1
Allow the window being dragged to be transparent
2020-08-23 17:44:57 +01:00
Sergio Martins
44b2fc6944
indicators: Improve style for segmented indicators
2020-08-23 17:23:37 +01:00
Sergio Martins
113e6453ea
example: Show usage of segmented indicators
2020-08-23 16:57:48 +01:00
Sergio Martins
283d814dc6
indicators: Also install the headers
...
So that the example app can show how to switch style type
2020-08-23 16:43:54 +01:00
Sergio Martins
034dc25483
indicators: Remove type()
...
There's no point in using it
2020-08-23 16:22:21 +01:00
Sergio Martins
b1333b2c4c
ChangeLog: Update the changelog for 1.1
2020-08-23 13:52:16 +01:00
Sergio Martins
ff58ff72f9
Merge branch '1.0' into master
2020-08-23 13:47:52 +01:00
Sergio Martins
00b4dbc821
Add a Segmented Indicator
...
Just a POC of a new indicator style
2020-08-23 13:24:27 +01:00
Sergio Martins
35076bbdb6
indicators: Update the indicator's visibility in the base class
...
So derived classes don't have to.
Doesn't affect ClassicIndicators, since it uses a separate
window for them. But useful for new indicator types.
2020-08-22 19:58:45 +01:00
Sergio Martins
2dc98804f4
qml|indicators: Use frame geometry instead of frame rect
...
The rect is always at 0,0, not very useful.
2020-08-22 19:53:20 +01:00
Sergio Martins
961600fe74
qtquick: fix build
...
MainWindow.h is specific to QtWidgets
2020-08-22 19:19:59 +01:00
Sergio Martins
7fdca76a4c
indicators: Use enum class for the type
2020-08-22 19:16:24 +01:00
Sergio Martins
32592f6ad1
classic indicators: Remove unneeded hidding in ctor
...
Already done in base class
2020-08-22 19:13:26 +01:00
Sergio Martins
1545e98e6d
Merge branch '1.0' into master
2020-08-22 18:58:42 +01:00
Allen Winter
85b3feb10b
Merge branch '1.0'
2020-08-15 10:15:26 -04:00
Sergio Martins
d9fdd20caa
Add DockWidgetBase::isFocusedChanged
...
Fixes : #60
2020-08-15 00:46:41 +01:00
Sergio Martins
9e2d001ac5
Add DockWidget::isFocused() for issue #60
...
Needs a signal now
2020-08-14 23:51:35 +01:00
Sergio Martins
750f9b6142
tests: Add strong-focus to the widget
2020-08-14 23:00:14 +01:00
Sergio Martins
1c3cf8cf2d
Merge branch '1.0' into master
2020-08-14 18:47:42 +01:00
Sergio Martins
db19cb40d7
Merge branch '1.0' into master
2020-08-14 18:30:00 +01:00
Sergio Martins
037fa76fff
Fix building user apps out of repo
...
Our example was being built as part of KDDW, so that worked fine.
Now it can also be built with an installed KDDW.
Problem was the folder hiearchy in the installed include dir
didn't match the folder hiearchy in the source repo
Fixes #62
2020-08-14 17:49:24 +01:00
Sergio Martins
caa2ece751
qml: Move the 1st test from tst_docks to tst_common
2020-08-13 00:46:55 +01:00
Sergio Martins
22f2975f3c
tests: createMainWindow() works for qml now too
2020-08-13 00:46:55 +01:00
Sergio Martins
d3323d824a
tests: Make createMainWindow return MainWindowBase
...
Instead of QMainWindow, so it works with qml too
2020-08-13 00:46:55 +01:00
Allen Winter
41d1ea8f61
various fixes for the OBS config
2020-08-12 18:07:40 -04:00
Sergio Martins
1e85b1e7fb
tests: Share EnsureTopLevelsDeleted with qml too
...
So we can start to copy tests to tst_common without hacking them
2020-08-12 22:45:59 +01:00
Sergio Martins
75464708af
Remove unneeded debug
2020-08-12 22:00:23 +01:00
Sergio Martins
f007451442
Fix case where floatAction() wouldn't trigger
...
Fixes #58
2020-08-12 21:21:04 +01:00
Allen Winter
f591270d46
CMakeLists.txt - increase numbers. this will be v1.1 some day
2020-08-12 13:00:35 -04:00
Allen Winter
390423d0c1
Merge branch '1.0'
2020-08-12 12:59:09 -04:00
Sergio Martins
1aed8c7429
Merge branch '1.0' into master
2020-08-12 11:09:06 +01:00
Sergio Martins
0aee56114b
qml: Dropping a dragged window now works
2020-08-11 23:40:07 +01:00
Sergio Martins
b3ec7423e8
qml: The inner indicators are now centered
2020-08-11 22:19:51 +01:00
Sergio Martins
179cd4cf45
qml: Add properties for outter/inner indicators visibility
2020-08-11 22:19:51 +01:00
Sergio Martins
75d26c3cce
qml: Draw the inner indicators too
2020-08-11 22:19:51 +01:00
Allen Winter
9071664ef2
.../ClassicIndicatorsOverlay.qml - copyright+license header
2020-08-11 08:14:00 -04:00
Sergio Martins
1980f9c42c
qml: Fix namespaced build
2020-08-11 09:59:25 +01:00
Sergio Martins
2c917dcd7c
qml: Show 4 proper indicators when dragging in a floating window
...
They don't do much yet, but at least appear.
2020-08-11 01:35:28 +01:00
Allen Winter
5ccf15b9ed
Merge branch '1.0'
2020-08-10 17:07:05 -04:00
Sergio Martins
7eaac87640
qml: Add a ClassicIndicatorsOverlay.qml file
...
Doesn't do much yet
2020-08-10 19:05:59 +01:00
Sergio Martins
5b9f08c754
Remove mapTo/From global from Layouting::Widget
...
Use the ones from QWidgetAdapter instead
2020-08-10 19:05:02 +01:00
Sergio Martins
02c165163a
DragController: Use the geometry of the QWindow
...
While this works fine for QtWidgets, where the geometry of the
top-level QWidget is the same as the QWindow, it doesn't work
for QtQuick, where the geometry of the root item starts at 0,0
2020-08-10 19:03:15 +01:00
Sergio Martins
4bbc0f1d4f
qml: Create drop indicator overlay too
...
The actual impl isn't done yet though
2020-08-09 22:45:15 +01:00
Sergio Martins
cf692797b6
qml: ClassicIndicators are now abstracted and built
...
The QtQuick counterpart just needs to be implemented
2020-08-09 20:27:05 +01:00
Sergio Martins
0e4ec055b2
Remove unused function
2020-08-09 20:05:38 +01:00
Sergio Martins
cf7c25cd88
Remove old cruft "rubberBandIsTopLevel" which we don't use
2020-08-09 19:23:52 +01:00
Sergio Martins
60b5eb00a3
Move IndicatorWindow to its own file
...
As it's the part that will be different with QtQuick.
ClassicIndicators can be shared.
2020-08-09 19:19:31 +01:00
Sergio Martins
0705b4da72
qml: Make Indicator class a implementation detail of QtWidgets
...
No longer accessed by ClassicIndicators
2020-08-09 18:57:23 +01:00
Sergio Martins
09b3e685a9
IndicatorWindow: Make some members private
2020-08-09 18:53:30 +01:00
Sergio Martins
64791eec82
qml: decouple ClassicIndicator from QRubberBand
...
the rubber band is now returned from the factory, meaning it can
be a QQuickItem when QtQuick is being used
Still need to remove the QtWidget'isms from IndicatorWindow
though
2020-08-09 18:39:56 +01:00
Sergio Martins
dc3aa354ec
Minor code styling: Remove unneeded indentation
2020-08-09 18:13:23 +01:00
Sergio Martins
890784ba5a
Finish FocusScope support
...
When clicking on a TitleBar the focus will be redirected to either:
- Last widget that had focus inside the scope
- To the DockWidget. Implies the user setting a guest widget that
accepts focus
Fixes : #56
2020-08-08 17:34:06 +01:00
Sergio Martins
c9468bef8a
example: Add some helper code to debug focus
2020-08-08 17:34:06 +01:00
Sergio Martins
0b4c017f22
qml: Add subs regarding focus
2020-08-08 17:34:06 +01:00
Sergio Martins
6de558773f
Merge branch '1.0' into master
2020-08-08 17:33:53 +01:00
Sergio Martins
94258abf43
Decouple title bar icon from tab bar icon
...
You can now use different icons, or even just set an icon for the
title bar but not tab bar
Fixes #57
2020-08-08 14:05:42 +01:00
Sergio Martins
10026ba191
Add FocusScope behaviour to TitleBar
...
Github issue #56 is not a KDDW bug, it's how Qt works. QtWidgets don't
have focus scope. But let's workaround and handroll our own FocusScope.
Now the title bar can be colored differently if the dock widget it controls
contains any focused children.
This just implements half of the story. You have to focus a child
for the title bar to change color. Clicking the title bar directly
isn't done yet. Needs to be figured out. What do we focus when clicking it?
TitleBars usually don't care about keyboard focus. Probably we
just use the user's widget as a focus proxy.
2020-08-08 12:33:23 +01:00