d536532f66
By not using a QQuickView it becomes possible to just use a PlasmaCore.Dialog or a Quick.Window in the TabBox qml and thus it's possible to simplify the qml code. To support this a new SwitcherItem is introduced and exported to QML. It's a simple QObject providing all the properties which used to be exported to the root context. A declarative TabBox is expected to use one of these items. The C++ side finds the Switcher and for that supports the case that the SwitcherItem is the rootItem or a child item. A declarative TabBox has also to create a QQuickWindow, e.g. a PlasmaCore.Dialog. The visibility of that window should be controlled through the visible property on the SwitcherItem. The underlying C++ implementation assumes that a TabBox only uses one window (it needs to get destroyed once it's hidden and included in highlight windows). Thanks to this change it's no longer needed to reload the TabBox whenever it gets shown or the alternative TabBox gets shown. Instead the same QML script can get reused. Other created switchers are ignored as the visible property won't be changed to true. |
||
---|---|---|
.. | ||
qml | ||
tests | ||
clientmodel.cpp | ||
clientmodel.h | ||
CMakeLists.txt | ||
declarative.cpp | ||
declarative.h | ||
desktopchain.cpp | ||
desktopchain.h | ||
desktopmodel.cpp | ||
desktopmodel.h | ||
kwindesktopswitcher.desktop | ||
kwinwindowswitcher.desktop | ||
switcheritem.cpp | ||
switcheritem.h | ||
tabbox.cpp | ||
tabbox.h | ||
tabboxconfig.cpp | ||
tabboxconfig.h | ||
tabboxhandler.cpp | ||
tabboxhandler.h |