Commit Graph

31 Commits

Author SHA1 Message Date
Sergio Martins
69c7d3fd57 Remove View::maximumSize() as we already have View::maxSizeHint()
Having both was due to QWidgets having both. For QtQuick and other
frontends we only want the latter.
2022-08-07 14:49:32 +01:00
Sergio Martins
7d21516f6d Add a m_thisWeakPtr member to Views
Allows to promote back to shared pointer
2022-07-02 20:12:33 +01:00
Sergio Martins
2eb72114d7 Share View::setObjectName() implementation between qtwidgets/qtquick 2022-06-28 20:12:07 +01:00
Sergio Martins
82b3aba854 Remove ViewWrapper*h from public API 2022-06-24 17:20:09 +01:00
Sergio Martins
10c918b93c Use View instead of ViewWrapper in the api
The latter will be an implementation detail soon
2022-06-24 00:10:50 +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
1acbf48786 Don't depend directly on QSizePolicy, as that's QtWidgets
Introduce our own enum. Soon our qtquick frontend won't link
against QtWidgets
2022-06-11 18:22:38 +01:00
Sergio Martins
581451c342 Remove old ViewWrapper::asDropArea()
It's unneeded, and it wasn't implemented for QtQuick
2022-06-06 10:28:44 +01:00
Sergio Martins
1a47d52ed9 Make View::handle() non virtual
So we can still do comparisons if ~View_qtwidgets was already called.
Otherwise it would be calling a pure-virtual.
2022-05-15 12:55:55 +01:00
Sergio Martins
df61c35314 Implemented ViewWrapper::sizePolicy() 2022-05-14 09:26:07 +01:00
Sergio Martins
313be585ae tests: More focus tests 2022-05-11 17:23:31 +01:00
Sergio Martins
8a725298de Added View::hasFocus() 2022-05-11 00:02:18 +01:00
Sergio Martins
73e6822a1d Added View::focusPolicy() 2022-05-10 23:23:27 +01:00
Sergio Martins
16816d47d6 Added Window::screen()
Which allows to make View::screen() non-virtual
2022-05-02 23:24:49 +01:00
Sergio Martins
cccd3a47f0 View::closeWindow() is no longer virtual.
Implementation is common to all frontends.
Renamed it to closeRootView() to be consistent.
2022-05-02 17:54:00 +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
fff3adf967 Rename View::window() to View::rootView()
window() was an artifact of Qt4 times, when QWindow didn't exist yet.
2022-05-01 22:52:00 +01:00
Sergio Martins
3416a74723 Don't make View::move(QPoint) pure-virtual
We already have a virtual overload, just call it.
2022-05-01 20:12:32 +01:00
Sergio Martins
f3934ebd2c Rename View::isTopLevel() to isRootView() 2022-04-30 01:06:03 +01:00
Sergio Martins
c55cac97d0 tests: Add unit-test for View::setParent() 2022-04-29 18:46:28 +01:00
Sergio Martins
3d1b450cbb Remove View::minimumSizeHint()
It's a QWidget specific concept, so move it to the qtwidgets
frontendcode. QtQuick won't need it.
2022-04-29 00:27:07 +01:00
Sergio Martins
93ccaff407 test: Fix test failure due to unimplemented wrapper method 2022-04-28 21:27:32 +01:00
Sergio Martins
860a1a1bb0 Move DropArea into Controllers namespace
In preparation for View/Controller split.
2022-04-23 12:14:30 +01:00
Sergio Martins
0249b0e933 Remove more usages of asQWidget()
Adds View::mapTo()
2022-04-20 23:18:41 +01:00
Sergio Martins
2f59fb197b Remove more usages of asQWidget() 2022-04-20 23:07:16 +01:00
Sergio Martins
d2b5bedfa1 tests: Remove another usage of deprecated asQWidget() 2022-04-19 19:14:58 +01:00
Sergio Martins
a3d1990857 tests: Port more tests away from asQWidget() 2022-04-14 18:05:23 +01:00
Sergio Martins
d6fd54cec4 Por all usages of QWindop/windowHandle to KDDockWidgets::Window
Removes a lot of asQWidget() code and is also prepared for non-Qt
views.
2022-04-09 19:21:56 +01:00
Sergio Martins
43faf85eb4 Add View::isNull()
ViewWrappers don't have ownership of the gui element.
The gui element might have been deleted, leaving us with a
stale wrapper

For impl simply use a QPointer in the QtWidgets and QtQuick
backends
2022-04-05 21:50:21 +01:00
Sergio Martins
55ab08129a Deal the wrappers in shared_ptr instead of unique_ptr
Easier to pass around and better for our use case, where we
actual can have shared usage
2022-04-04 22:14:19 +01:00
Sergio Martins
e593233b8f Renamed views_qtwidgets/ into qtwidgets/views/
As there will be some files that are specific to QtWidgets and
but aren't views
2022-04-03 23:51:02 +01:00