Commit Graph

4504 Commits

Author SHA1 Message Date
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
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
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
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