Commit Graph

42 Commits

Author SHA1 Message Date
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
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
24040ccfbf Remove some unneeded code, already covered in TabBar.cpp 2022-08-14 23:11:51 +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
ca0f767f21 Add more documentation and make interfaces simpler 2022-08-13 23:08:10 +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
d8189e3e03 .clang-format: wrap at column 100 2022-08-05 16:49:00 +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
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
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
3dd455bfb7 Port some code away from View::asQObject()
Use View_qt::asObject() instead
2022-06-27 23:37:27 +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
8be6183543 Include cleanup
Removed unneeded controllers/ includes from headers
2022-06-18 09:15:30 +01:00
Sergio Martins
7e7c9d7300 Rename the remaining view interfaces to *ViewInterface 2022-06-17 18:56:34 +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
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
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
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
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
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
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
1ead71442f qtquick: Remove old rubber band code, this has been ported already 2022-06-04 20:41:57 +01:00
Sergio Martins
a2b5f40ed1 qtquick: Implement Stack_qtquick::tabBarObj() 2022-06-04 20:38:40 +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
bb4f5a5037 Mass renaming of last usages of FrameworkWidgetFactory 2022-05-19 08:12:29 +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
9f7c4cb217 Removed the DockWidgetBase typedef
That existed only to ease porting
2022-05-10 22:53:16 +01:00
Sergio Martins
984bcd5f06 qtquick: Ported Frame view to the new architecture 2022-05-08 12:20:33 +01:00
Sergio Martins
9d5c7bfc53 qtquick: Ported TabWidget to the new architecture 2022-05-06 18:04:25 +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
c94705593f Update qtquick stubs
Not compilable yet, but not in cmake either
2022-04-04 21:54:27 +01:00
Sergio Martins
b76e45064f Add View_qtquick stub 2022-04-04 19:06:17 +01:00