13#include "views/View.h"
16#include <QQuickWindow>
31 if (
auto v = qobject_cast<QtQuick::View *>(parent))
34 const auto children = parent->childItems();
35 for (QQuickItem *item : children) {
43std::shared_ptr<Core::View> Window::rootView()
const
45 if (
auto quickwindow = qobject_cast<QQuickWindow *>(m_window)) {
46 auto contentItem = quickwindow->contentItem();
52 const auto children = contentItem->childItems();
53 Q_ASSERT(!children.isEmpty());
57 qWarning() << Q_FUNC_INFO <<
"Expected QQuickView";
60 qWarning() << Q_FUNC_INFO <<
"Window does not have a root";
64Core::Window::Ptr Window::transientParent()
const
66 if (
QWindow *w = m_window->transientParent())
67 return Core::Window::Ptr(
new Window(w));
72void Window::setVisible(
bool is)
74 QtCommon::Window::setVisible(is);
75 if (
auto root = rootView())
79bool Window::supportsHonouringLayoutMinSize()
const
84 if (
auto view = rootView()) {
87 return view->is(Core::ViewType::FloatingWindow);
Core::View * topMostKDDWView(QQuickItem *parent)