Commit Graph

68 Commits

Author SHA1 Message Date
Allen Winter
d9ba67dee7 Fix SPDX headers that were broken by clang-format line break 2022-10-25 12:44:25 -04: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
958d1500e5 Remove unneeded View.h include and tidy forward declarations
Fixes #311
2022-09-05 21:34:11 +01:00
Sergio Martins
6757370ca0 Add more documentation 2022-08-15 21:36:31 +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
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
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
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
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
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
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
f640d8852b Fix maximize button not being updated
Moved logic into controller
2022-06-25 16:29:41 +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
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
Sérgio Martins
5b7630b318 Fix namespaced build 2022-06-24 20:36:01 +01:00
Sergio Martins
0a9506cd21 Probably fix Qt namespaced build 2022-06-24 17:00:01 +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
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
b9773cd262 qtquick: Move some Q_INVOKABLES to the views
As only the views are exposed
2022-06-19 23:27:21 +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
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
7ae49ee330 qtquick: Move last DockWidget Q_PROPERTY from controller to view 2022-06-18 00:34:26 +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
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
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
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
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
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
126ed773cd Make MainWindow::init() private 2022-06-15 16:55:46 +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