office-gobmx/vcl/qt6/QtInstanceBuilder.cxx
OmkarAcharekar 9b3a2996e7 tdf#130857 qt weld: Add QtInstanceBuilder skeleton
Add new `QtInstanceBuilder` that derives from
`weld::Builder` and is meant to use
`weld::Widget` implementations using native
Qt widgets.

Override `SalInstance::CreateBuilder` in
`QtInstance` to return an instance of the new
`QtInstanceBuilder` for UI files that that one
can handle/supports.

As of now, `QtInstanceBuilder` doesn't yet
implement what's needed, so
`QtInstanceBuilder::IsUIFileSupported` currently
still always returns `false`, meaning that
`SalInstanceBuilder` is still always used in
practice.

The idea is to implement funcationality needed for a
specific UI file/dialog in `QtInstanceBuilder`, then add
it to the set of supported UI files in
`QtInstanceBuilder::IsUIFileSupported`.
This allows looking at one .ui file at a time and only having
to implement what is relevant for that particular one, without
having to implement the full weld API at once.

The use of `QtInstanceBuilder` can completely be
disabled by starting LO with environment variable
`SAL_VCL_QT_NO_WELDED_WIDGETS` set.

This commit is mostly extraced from Omkar Acharekar's WIP
Gerrit change [1] (patch set 22) with some further
adjustments by Michael Weghorn. Patch set 23
of that WIP Gerrit change demonstrates adding
support for a dialog (the "Save Document?" one), but
still needs more work.

[1] https://gerrit.libreoffice.org/c/core/+/161831

Co-authored-by: Michael Weghorn <m.weghorn@posteo.de>
Change-Id: If2d1ea30d43c2c1d84d64e577035489c8e158a7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173592
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-18 20:01:32 +02:00

1 line
No EOL
39 B
C++

#include "../qt5/QtInstanceBuilder.cxx"