Commit Graph

60 Commits

Author SHA1 Message Date
Allen Winter
93e60a743e update copyright year 2022-01-20 08:05:26 -05: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
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
863691c313 Remove some private API from DockWidgetBase.h
Moved it into the pimpl
2021-02-06 16:32:13 +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
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
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
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
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
d2c55a67df qtquick: Fix more tests 2020-11-25 16:28:54 +00:00
Sergio Martins
12f3ba9074 qtquick: Fix some tests 2020-11-25 16:02:42 +00:00
Sergio Martins
ad3f4141c8 qtquick|tests: Fix main window QWindow not being resized 2020-11-24 18:40:22 +00: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
09793b3481 tests: Port more tests to QtQuick
31 to go
2020-11-06 23:33:02 +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
473f03360c tests: Fix Wweak-vtables warnings 2020-10-26 18:59:21 +00:00
Sergio Martins
c4cc6b3e6e tests: Port more tests to QtQuick 2020-10-25 22:39:10 +00: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
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
b5478bcb0d tests: Enable a bunch of tests for QtQuick
only one is failing
2020-10-11 11:44:47 +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
721f08e29b tests: Show the QQuickView and cleanit up
Also commit main.qml I forgot
2020-10-03 22:49:27 +01:00
Sergio Martins
b9e3024720 tst_common now passes for QtQuick
Needed a view
2020-10-03 22:10:38 +01:00
Sergio Martins
0155790b02 tests: add Test::clickOn() 2020-09-12 00:33:34 +01:00
Sergio Martins
961600fe74 qtquick: fix build
MainWindow.h is specific to QtWidgets
2020-08-22 19:19:59 +01:00
Sergio Martins
750f9b6142 tests: Add strong-focus to the widget 2020-08-14 23:00:14 +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
Sergio Martins
fd56ab7932 qml: Introduce tst_common
Will be moving tests that are common to both QtWidgets and QtQuick
2020-08-02 22:16:03 +01:00
Allen Winter
b4f49895c2 clarify: licensing is GPL2 or GPL3 or commercial licensed
follow the REUSE specs
2020-07-24 18:16:13 -04:00
Sergio Martins
86e58dd8a7 Merge MultiSplitterLayout into MultiSplitter
No need to have two. It's a leftover from the old layouting engine
2020-06-11 16:34:28 +01:00
Sergio Martins
ecfa43f801 Decouple TabWidget from Frame
TabWidget is now an implementation detail of FrameWidget.
QQuick will roll their own stuff with similar api, but no need to
abstract QTabWidget and QTabBar
2020-06-03 22:18:44 +01:00
Sergio Martins
944138273f Tests: stabilize tst_embeddedMainWindow
Going 50px into the window was too short and didn't reach the embedded
window to show the indicators.

Also, it's the inner indicator we want, the other isn't visible as the
window is single frame
2020-05-25 20:11:01 +01:00
Sergio Martins
0df9943aa5 Fix fuzzer test 11.json and other tests that worked by luck
mapFrom/toRoot were wrong
2020-05-07 16:30:45 +01:00
Sergio Martins
97c1ca30fd Layouting engine rewrite
The layouting was becoming too complex to maintain and to introduce
new features. Was even buggy, the fuzzer was constantly finding
bugs, which took hours to workaround.

Problem with the old layout engine is that there was a catch 22, between
Items driving the separators, and separators driving the anchors.

The new layout is much simpler, both in implementation and conceptually.
There's simply a recursive hierarchy of Item elements. An Item can either
have a QWidget to show, or be a ItemContainer, which contains Item children,
and so forth. Each ItemContainer is either vertical or horizontal. That's enough
to represent the "nested multi-splitter" concept which KDDW uses.

After each item insertion/deletion/resize, the separators are regenerated. They
are essentially dumb now.

TODO:
- Separators are drawn, but are not interactive yet
- There's 5 tests failing
- LayoutSaver scalling functionality
2020-05-04 00:02:03 +01:00
Sergio Martins
eabcdfb945 Add unit-test for affinity 2020-03-01 15:03:29 +00:00
Sergio Martins
63e662323f Added unit-test for Flag_DoubleClickMaximizes 2020-02-27 15:13:01 +00:00
Allen Winter
df692686e7 various - update copyright year 2020-01-07 11:36:56 -05:00
Sergio Martins
787f7802be Move the private code into a private/ folder
It's nice to have a similar include hierarchy at build time and install
time.

It also makes things more explicit
2019-10-20 19:24:54 +01:00
Sergio Martins
c1ea98825e Improve includes 2019-08-12 16:41:00 +01:00
Sergio Martins
daef0c470e Try to not expose the tab bar
It's an implementation detail of FrameWidget. Makes porting
to QtQuick easier
2019-08-08 10:08:38 +01:00
Sergio Martins
89757def76 Abstract TabWidget away from QtWidgets, so can be used for QtQuick 2019-08-08 00:41:48 +01:00
Sergio Martins
5613030fd3 Revert "Remove DOCKS_EXPORT_FOR_UNIT_TESTS to simplify things
Maybe let's keep it, since it's on very core classes that
users shouldn't change

This reverts commit db4167dd1f.
2019-08-06 22:08:00 +01:00
Sergio Martins
db4167dd1f Remove DOCKS_EXPORT_FOR_UNIT_TESTS to simplify things
And also to give more power to the user
2019-08-06 22:05:30 +01:00
Sergio Martins
49bd0b42be Add unit-test for dragging by tab widget directly 2019-08-06 21:12:34 +01:00
Sergio Martins
fc90d1e506 Move more code into tests/utils.cpp 2019-08-06 20:45:16 +01:00
Sergio Martins
1c7d0c0059 tests: refactor drag() to support dragging the TabWidget directly 2019-08-06 20:22:20 +01:00
Sergio Martins
fb837b7713 Move DockWidget.cpp into widgets/
As it's specific to QtWidgets. It's mostly empty now
and inheriting from DockWidgetBase, but we'll move a few stuff.
2019-08-05 23:35:44 +01:00
Sergio Martins
f5e72e7bed Fix available space calculation when there's placeholders
When layout is empty we don't need to account for the space
occupied by the new anchor. But neither when all the items
are placeholders
2019-07-25 23:15:12 +01:00