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