KDDockWidgets API Documentation  1.5
QWidgetAdapter_quick.cpp
Go to the documentation of this file.
1 /*
2  This file is part of KDDockWidgets.
3 
4  SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5  Author: SĂ©rgio Martins <sergio.martins@kdab.com>
6 
7  SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8 
9  Contact KDAB at <info@kdab.com> for commercial licensing options.
10 */
11 
21 #include "QWidgetAdapter.h"
22 #include "MainWindowBase.h"
23 
24 #include "../DockRegistry_p.h"
25 #include "../Utils_p.h"
26 #include "../FloatingWindow_p.h"
27 
28 #include <QResizeEvent>
29 #include <QMouseEvent>
30 #include <QQmlComponent>
31 #include <QQuickItem>
32 #include <QQmlEngine>
33 #include <QQuickView>
34 #include <QScopedValueRollback>
35 
36 using namespace KDDockWidgets;
37 
38 namespace KDDockWidgets {
39 
45 class MouseEventRedirector : public QObject
46 {
47  Q_OBJECT
48 public:
49  explicit MouseEventRedirector(QObject *eventSource, QObject *eventTarget)
50  : QObject(eventTarget)
51  , m_eventSource(eventSource)
52  , m_eventTarget(eventTarget)
53  {
54  eventSource->installEventFilter(this);
55 
56  // Each source can only have one MouseEventRedirector
57  auto oldRedirector = s_mouseEventRedirectors.take(eventSource);
58  if (oldRedirector) {
59  eventSource->removeEventFilter(oldRedirector);
60  oldRedirector->deleteLater();
61  }
62 
63  s_mouseEventRedirectors.insert(eventSource, this);
64  }
65 
66  static MouseEventRedirector *redirectorForSource(QObject *eventSource)
67  {
68  return s_mouseEventRedirectors.value(eventSource);
69  }
70 
71  ~MouseEventRedirector() override;
72 
73  bool eventFilter(QObject *source, QEvent *ev) override
74  {
75  QMouseEvent *me = mouseEvent(ev);
76  if (!me)
77  return false;
78 
79  // MouseArea.enable is different from Item.enabled. The former still lets the events
80  // go through event loops. So query MouseArea.enable here and bail out if false.
81  const QVariant v = source->property("enabled");
82  if (v.isValid() && !v.toBool())
83  return false;
84 
85  // Finally send the event
86  m_eventTarget->setProperty("cursorPosition", m_eventSource->property("cursorPosition"));
87  qApp->sendEvent(m_eventTarget, me);
88  m_eventTarget->setProperty("cursorPosition", CursorPosition_Undefined);
89 
90  return false;
91  }
92 
93  QObject *const m_eventSource;
94  QObject *const m_eventTarget;
95  static QHash<QObject *, MouseEventRedirector *> s_mouseEventRedirectors;
96 };
97 
98 QHash<QObject *, MouseEventRedirector *> MouseEventRedirector::s_mouseEventRedirectors = {};
99 
100 MouseEventRedirector::~MouseEventRedirector()
101 {
102  s_mouseEventRedirectors.remove(m_eventSource);
103 }
104 
105 }
106 
108 {
109  return flags & (Qt::Window | Qt::Tool);
110 }
111 
112 static QQuickItem *actualParentItem(QQuickItem *candidateParentItem, Qt::WindowFlags flags)
113 {
114  // When we have a top-level, such as FloatingWindow, we only want to set QObject parentship
115  // and not parentItem.
116  return flagsAreTopLevelFlags(flags) ? nullptr
117  : candidateParentItem;
118 }
119 
120 QWidgetAdapter::QWidgetAdapter(QQuickItem *parent, Qt::WindowFlags flags)
121  : QQuickItem(actualParentItem(parent, flags))
122  , m_windowFlags(flags)
123 {
124  if (parent && flagsAreTopLevelFlags(flags)) {
125  // See comment in actualParentItem(). We set only the QObject parent. Mimics QWidget behaviour
126  QObject::setParent(parent);
127  }
128 
129  connect(this, &QQuickItem::widthChanged, this, [this] {
130  onResize(size());
131  updateGeometry();
132  });
133 
134  connect(this, &QQuickItem::heightChanged, this, [this] {
135  if (!m_windowIsBeingDestroyed) { // If Window is being destroyed we don't bother
136  onResize(size());
137  updateGeometry();
138  }
139  });
140 
141  setSize(QSize(800, 800));
142 }
143 
144 QWidgetAdapter::~QWidgetAdapter()
145 {
146 }
147 
148 void QWidgetAdapter::raiseAndActivate()
149 {
150  if (QWindow *w = windowHandle()) {
151  w->raise();
152  w->requestActivate();
153  }
154 }
155 
156 void QWidgetAdapter::setWindowOpacity(qreal level)
157 {
158  if (QWindow *w = windowHandle())
159  w->setOpacity(level);
160 }
161 
162 bool QWidgetAdapter::onResize(QSize)
163 {
164  return false;
165 }
166 void QWidgetAdapter::onLayoutRequest()
167 {
168 }
169 void QWidgetAdapter::onMousePress()
170 {
171 }
172 void QWidgetAdapter::onMouseMove(QPoint)
173 {
174 }
175 void QWidgetAdapter::onMouseRelease()
176 {
177 }
178 void QWidgetAdapter::onCloseEvent(QCloseEvent *)
179 {
180 }
181 
182 void QWidgetAdapter::itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data)
183 {
184  QQuickItem::itemChange(change, data);
185 
186  // Emulate the QWidget behaviour as QQuickItem doesn't receive some QEvents.
187  switch (change) {
188  case QQuickItem::ItemParentHasChanged: {
190  qApp->sendEvent(this, &ev); // Not calling event() directly, otherwise it would skip event filters
191  Q_EMIT parentChanged(this);
192  break;
193  }
194  case QQuickItem::ItemVisibleHasChanged: {
195  if (m_inSetParent) {
196  // Setting parent to nullptr will emit visible true in QtQuick
197  // which we don't want, as we're going to hide it (as we do with QtWidgets)
198  break;
199  }
200 
201  QEvent ev(isVisible() ? QEvent::Show : QEvent::Hide);
202  event(&ev);
203  break;
204  }
205  default:
206  break;
207  }
208 }
209 
210 void QWidgetAdapter::QQUICKITEMgeometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
211 {
212  // Send a few events manually, since QQuickItem doesn't do it for us.
213  QQuickItem::QQUICKITEMgeometryChanged(newGeometry, oldGeometry);
214 
215  // Not calling event() directly, otherwise it would skip event filters
216 
217  if (newGeometry.size() != oldGeometry.size()) {
219  qApp->sendEvent(this, &ev);
220  }
221 
222  if (newGeometry.topLeft() != oldGeometry.topLeft()) {
223  QEvent ev(QEvent::Move);
224  qApp->sendEvent(this, &ev);
225  }
226 
227  Q_EMIT itemGeometryChanged();
228 }
229 
230 void QWidgetAdapter::raise()
231 {
232  if (isTopLevel()) {
233  if (QWindow *w = windowHandle())
234  w->raise();
235  } else if (auto p = QQuickItem::parentItem()) {
236  // It's not a top-level, so just increase its Z-order
237  const auto siblings = p->childItems();
238  QQuickItem *last = siblings.last();
239  if (last != this)
240  stackAfter(last);
241  }
242 }
243 
244 QSize QWidgetAdapter::minimumSize() const
245 {
246  if (m_isWrapper) {
247  const auto children = childItems();
248  if (!children.isEmpty()) {
249  const QSize min = children.constFirst()->property("kddockwidgets_min_size").toSize();
250  return min.expandedTo(Layouting::Item::hardcodedMinimumSize);
251  }
252  }
253 
254  const QSize min = property("kddockwidgets_min_size").toSize();
255  return min.expandedTo(Layouting::Item::hardcodedMinimumSize);
256 }
257 
258 QSize QWidgetAdapter::maximumSize() const
259 {
260  if (m_isWrapper) {
261  const auto children = childItems();
262  if (!children.isEmpty()) {
263  const QSize max = children.constFirst()->property("kddockwidgets_max_size").toSize();
264  return max.isEmpty() ? Layouting::Item::hardcodedMaximumSize
265  : max.boundedTo(Layouting::Item::hardcodedMaximumSize);
266  }
267  }
268 
269  const QSize max = property("kddockwidgets_max_size").toSize();
270  return max.isEmpty() ? Layouting::Item::hardcodedMaximumSize
271  : max.boundedTo(Layouting::Item::hardcodedMaximumSize);
272 }
273 
274 WId QWidgetAdapter::winId() const
275 {
276  if (QWindow *w = windowHandle())
277  return w->winId();
278 
279  return WId(-1);
280 }
281 
282 FloatingWindow *QWidgetAdapter::floatingWindow() const
283 {
284  if (auto fw = qobject_cast<FloatingWindow *>(window()))
285  return fw;
286 
287  return nullptr;
288 }
289 
290 QRect QWidgetAdapter::geometry() const
291 {
292  if (isTopLevel()) {
293  if (QWindow *w = windowHandle()) {
294  return w->geometry();
295  }
296  }
297 
298  return KDDockWidgets::Private::geometry(this);
299 }
300 
301 QRect QWidgetAdapter::normalGeometry() const
302 {
303  // TODO: There's no such concept in QWindow, do we need to workaround for QtQuick ?
304  return QWidgetAdapter::geometry();
305 }
306 
307 void QWidgetAdapter::setNormalGeometry(QRect geo)
308 {
309  if (!isTopLevel())
310  return;
311 
312  if (QWindow *w = windowHandle()) {
313  if (isNormalWindowState(w->windowStates())) {
314  w->setGeometry(geo);
315  } else {
316  // Nothing better at this point, as QWindow doesn't have this concept
317  qDebug() << Q_FUNC_INFO << "TODO";
318  }
319  }
320 }
321 
322 QRect QWidgetAdapter::rect() const
323 {
324  return QRectF(0, 0, width(), height()).toRect();
325 }
326 
327 QPoint QWidgetAdapter::pos() const
328 {
329  return geometry().topLeft();
330 }
331 
332 void QWidgetAdapter::show()
333 {
334  setVisible(true);
335 }
336 
337 void QWidgetAdapter::setFixedHeight(int height)
338 {
339  setHeight(height);
340 }
341 
342 void QWidgetAdapter::setFixedWidth(int width)
343 {
344  setWidth(width);
345 }
346 
347 void QWidgetAdapter::setGeometry(QRect rect)
348 {
349  setWidth(rect.width());
350  setHeight(rect.height());
351  move(rect.topLeft());
352 }
353 
354 QRect QWidgetAdapter::frameGeometry() const
355 {
356  if (QWindow *w = windowHandle())
357  return w->frameGeometry();
358 
359  return geometry();
360 }
361 
362 void QWidgetAdapter::grabMouse()
363 {
364  QQuickItem::grabMouse();
365 }
366 
367 void QWidgetAdapter::releaseMouse()
368 {
369  QQuickItem::ungrabMouse();
370 }
371 
372 void QWidgetAdapter::releaseKeyboard()
373 {
374  // Not needed apparently
375 }
376 
377 void QWidgetAdapter::setMinimumSize(QSize sz)
378 {
379  if (minimumSize() != sz) {
380  setProperty("kddockwidgets_min_size", sz);
381  updateGeometry();
382  }
383 }
384 
385 void QWidgetAdapter::setMaximumSize(QSize sz)
386 {
387  if (maximumSize() != sz) {
388  setProperty("kddockwidgets_max_size", sz);
389  updateGeometry();
390  }
391 }
392 
393 void QWidgetAdapter::setMaximumSize(int w, int h)
394 {
395  QWidgetAdapter::setMaximumSize(QSize(w, h));
396 }
397 
398 void QWidgetAdapter::setMinimumSize(int w, int h)
399 {
400  QWidgetAdapter::setMinimumSize(QSize(w, h));
401 }
402 
403 void QWidgetAdapter::updateGeometry()
404 {
405  Q_EMIT geometryUpdated();
406 }
407 
408 void QWidgetAdapter::resize(QSize sz)
409 {
410  setWidth(sz.width());
411  setHeight(sz.height());
412 }
413 
414 void QWidgetAdapter::resize(int w, int h)
415 {
416  resize({ w, h });
417 }
418 
419 bool QWidgetAdapter::isWindow() const
420 {
421  QQuickItem *parent = parentItem();
422  if (!parent)
423  return true;
424 
425  if (QQuickView *w = quickView()) {
426  if (parent == w->contentItem() || parent == w->rootObject())
427  return true;
428  }
429 
430  return false;
431 }
432 
433 bool QWidgetAdapter::isMaximized() const
434 {
435  if (QWindow *w = windowHandle())
436  return w->windowStates() & Qt::WindowMaximized;
437 
438  return false;
439 }
440 
441 bool QWidgetAdapter::isMinimized() const
442 {
443  if (QWindow *w = windowHandle())
444  return w->windowStates() & Qt::WindowMinimized;
445 
446  return false;
447 }
448 
449 bool KDDockWidgets::QWidgetAdapter::isActiveWindow() const
450 {
451  if (QWindow *w = windowHandle())
452  return w->isActive();
453 
454  return false;
455 }
456 
457 void QWidgetAdapter::showMaximized()
458 {
459  if (QWindow *w = windowHandle())
460  w->showMaximized();
461 }
462 
463 void QWidgetAdapter::showMinimized()
464 {
465  if (QWindow *w = windowHandle())
466  w->showMinimized();
467 }
468 
469 void QWidgetAdapter::showNormal()
470 {
471  if (QWindow *w = windowHandle())
472  w->showNormal();
473 }
474 
475 QQuickView *QWidgetAdapter::quickView() const
476 {
477  return qobject_cast<QQuickView *>(QQuickItem::window());
478 }
479 
480 QWindow *QWidgetAdapter::windowHandle() const
481 {
482  return QQuickItem::window();
483 }
484 
485 QWidgetAdapter *QWidgetAdapter::window() const
486 {
487  // We return the top-most QWidgetAdapter
488 
489  if (QWidgetAdapter *w = parentWidget(/*includeTransient =*/false))
490  return w->window();
491 
492  return const_cast<QWidgetAdapter *>(this);
493 }
494 
495 QWidgetAdapter *QWidgetAdapter::parentWidget(bool includeTransient) const
496 {
497  QQuickItem *p = parentItem();
498  while (p) {
499  if (auto qa = qobject_cast<QWidgetAdapter *>(p))
500  return qa;
501 
502  p = p->parentItem();
503  }
504 
505  if (includeTransient) {
506  if (QQuickView *w = quickView()) {
507  // Here we're mimicking QWidget::parentWidget(), which can return the transient parent of the QWindow.
508  MainWindowBase *mw = DockRegistry::self()->mainWindowForHandle(w->transientParent());
509  if (mw)
510  return mw;
511  }
512  }
513 
514 
515  return nullptr;
516 }
517 
518 QPoint QWidgetAdapter::mapToGlobal(QPoint pt) const
519 {
520  return QQuickItem::mapToGlobal(pt).toPoint();
521 }
522 
523 QPoint QWidgetAdapter::mapFromGlobal(QPoint pt) const
524 {
525  return QQuickItem::mapFromGlobal(pt).toPoint();
526 }
527 
528 QPoint QWidgetAdapter::mapTo(const QQuickItem *parent, QPoint pos) const
529 {
530  if (!parent)
531  return {};
532 
533  return parent->mapFromGlobal(QQuickItem::mapToGlobal(pos)).toPoint();
534 }
535 
536 bool QWidgetAdapter::testAttribute(Qt::WidgetAttribute attr) const
537 {
538  return m_widgetAttributes & attr;
539 }
540 
541 void QWidgetAdapter::setAttribute(Qt::WidgetAttribute attr, bool enable)
542 {
543  if (enable)
544  m_widgetAttributes |= attr;
545  else
546  m_widgetAttributes &= ~attr;
547 }
548 
549 void QWidgetAdapter::setWindowTitle(const QString &title)
550 {
551  if (QWindow *window = windowHandle())
552  window->setTitle(title);
553 }
554 
555 void QWidgetAdapter::setWindowIcon(const QIcon &icon)
556 {
557  if (QWindow *window = windowHandle())
558  window->setIcon(icon);
559 }
560 
561 bool QWidgetAdapter::close()
562 {
563  QCloseEvent ev;
564  onCloseEvent(&ev);
565 
566  if (ev.isAccepted()) {
567  setVisible(false);
568  return true;
569  }
570 
571  return false;
572 }
573 
574 QQuickItem *QWidgetAdapter::childAt(QPoint p) const
575 {
576  return QQuickItem::childAt(p.x(), p.y());
577 }
578 
579 void QWidgetAdapter::move(QPoint pt)
580 {
581  move(pt.x(), pt.y());
582 }
583 
584 void QWidgetAdapter::move(int x, int y)
585 {
586  if (isTopLevel()) {
587  if (QWindow *w = windowHandle()) {
588  w->setPosition(x, y);
589  return;
590  }
591  }
592 
593  setX(x);
594  setY(y);
595  setAttribute(Qt::WA_Moved);
596 }
597 
598 void QWidgetAdapter::setSize(QSize size)
599 {
600  QQuickItem::setSize(QSizeF(size));
601 }
602 
603 void QWidgetAdapter::setParent(QQuickItem *p)
604 {
605  {
606  QScopedValueRollback<bool> guard(m_inSetParent, true);
607 
608  QQuickItem::setParent(p);
609  QQuickItem::setParentItem(p);
610  }
611 
612  // Mimic QWidget::setParent(), hide widget when setting parent
613  if (!p)
614  setVisible(false);
615 }
616 
617 void QWidgetAdapter::activateWindow()
618 {
619  if (QWindow *w = windowHandle())
620  w->requestActivate();
621 }
622 
623 void QWidgetAdapter::setSizePolicy(QSizePolicy sp)
624 {
625  m_sizePolicy = sp;
626 }
627 
628 QSizePolicy QWidgetAdapter::sizePolicy() const
629 {
630  return m_sizePolicy;
631 }
632 
633 QSize QWidgetAdapter::sizeHint() const
634 {
635  return m_sizeHint;
636 }
637 
638 bool QWidgetAdapter::hasFocus() const
639 {
640  return hasActiveFocus();
641 }
642 
643 void QWidgetAdapter::setWindowFlag(int flag, bool enable)
644 {
645  Q_UNUSED(flag);
646  Q_UNUSED(enable);
647 }
648 
649 Qt::WindowFlags QWidgetAdapter::windowFlags() const
650 {
651  return m_windowFlags;
652 }
653 
655 QQuickItem *QWidgetAdapter::createItem(QQmlEngine *engine, const QString &filename)
656 {
657  QQmlComponent component(engine, filename);
658  QObject *obj = component.create();
659  if (!obj) {
660  qWarning() << Q_FUNC_INFO << component.errorString();
661  return nullptr;
662  }
663 
664  return qobject_cast<QQuickItem *>(obj);
665 }
666 
667 void QWidgetAdapter::makeItemFillParent(QQuickItem *item)
668 {
669  // This is equivalent to "anchors.fill: parent
670 
671  if (!item) {
672  qWarning() << Q_FUNC_INFO << "Invalid item";
673  return;
674  }
675 
676  QQuickItem *parentItem = item->parentItem();
677  if (!parentItem) {
678  qWarning() << Q_FUNC_INFO << "Invalid parentItem for" << item;
679  return;
680  }
681 
682  QObject *anchors = item->property("anchors").value<QObject *>();
683  if (!anchors) {
684  qWarning() << Q_FUNC_INFO << "Invalid anchors for" << item;
685  return;
686  }
687 
688  anchors->setProperty("fill", QVariant::fromValue(parentItem));
689 }
690 
691 void QWidgetAdapter::setFlag(Qt::WindowType f, bool on)
692 {
693  if (on) {
694  m_windowFlags |= f;
695  } else {
696  m_windowFlags &= ~f;
697  }
698 }
699 
700 Qt::FocusPolicy QWidgetAdapter::focusPolicy() const
701 {
702  return m_focusPolicy;
703 }
704 
705 void QWidgetAdapter::setFocusPolicy(Qt::FocusPolicy policy)
706 {
707  m_focusPolicy = policy;
708 }
709 
710 void QWidgetAdapter::setFocus(Qt::FocusReason reason)
711 {
712  QQuickItem::setFocus(true, reason);
713  forceActiveFocus(reason);
714 }
715 
716 void QWidgetAdapter::render(QPainter *)
717 {
718  qWarning() << Q_FUNC_INFO << "Implement me";
719 }
720 
721 void QWidgetAdapter::setMouseTracking(bool enabled)
722 {
723  m_mouseTrackingEnabled = enabled;
724 }
725 
726 bool QWidgetAdapter::event(QEvent *ev)
727 {
728  if (ev->type() == QEvent::Close)
729  onCloseEvent(static_cast<QCloseEvent *>(ev));
730 
731  return QQuickItem::event(ev);
732 }
733 
734 bool QWidgetAdapter::eventFilter(QObject *watched, QEvent *ev)
735 {
736  if (qobject_cast<QWindow *>(watched)) {
737  if (m_mouseTrackingEnabled) {
738  switch (ev->type()) {
739  case QEvent::MouseMove:
742  ev->ignore();
743  qApp->sendEvent(this, ev);
744  //qDebug() << "Mouse event" << ev;
745  if (ev->isAccepted())
746  return true;
747  break;
748  default:
749  break;
750  }
751  }
752  }
753 
754  return QQuickItem::eventFilter(watched, ev);
755 }
756 
757 QScreen *QWidgetAdapter::screen() const
758 {
759  if (QQuickView *w = quickView()) {
760  return w->screen();
761  }
762 
763  return nullptr;
764 }
765 
766 void QWidgetAdapter::setWindowIsBeingDestroyed(bool is)
767 {
768  m_windowIsBeingDestroyed = is;
769 }
770 
771 void QWidgetAdapter::create()
772 {
773  // Nothing to do, for QtQuick ?
774 }
775 
776 QQuickItem *KDDockWidgets::Private::widgetForWindow(QWindow *window)
777 {
778  if (!window)
779  return nullptr;
780 
781  return window->property("kddockwidgets_qwidget").value<QQuickItem *>();
782 }
783 
784 void QWidgetAdapter::redirectMouseEvents(QObject *source)
785 {
786  if (auto existingRedirector = MouseEventRedirector::redirectorForSource(source)) {
787  if (existingRedirector->m_eventTarget == this) {
788  // Nothing to do. The specified event source is already redirecting to this instance
789  return;
790  }
791  }
792 
793  new MouseEventRedirector(source, this);
794 }
795 
796 void QWidgetAdapter::setIsWrapper()
797 {
798  m_isWrapper = true;
799 }
800 
801 bool QWidgetAdapter::isWrapper() const
802 {
803  return m_isWrapper;
804 }
805 
806 LayoutGuestWidget::~LayoutGuestWidget() = default;
807 
808 #include "QWidgetAdapter_quick.moc"
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::removeEventFilter
void removeEventFilter(QObject *obj)
QVariant::isValid
bool isValid() const const
QEvent::ParentChange
ParentChange
QRect::topLeft
QPoint topLeft() const const
QVariant::fromValue
QVariant fromValue(const T &value)
QRect
QRectF::toRect
QRect toRect() const const
QVariant::value
T value() const const
QSize::isEmpty
bool isEmpty() const const
actualParentItem
static QQuickItem * actualParentItem(QQuickItem *candidateParentItem, Qt::WindowFlags flags)
Definition: QWidgetAdapter_quick.cpp:112
QWindow
QRect::width
int width() const const
QSize
QPoint::x
int x() const const
QPoint::y
int y() const const
QSize::width
int width() const const
QPainter
KDDockWidgets::CursorPosition_Undefined
@ CursorPosition_Undefined
Definition: KDDockWidgets.h:241
QMouseEvent
QScreen
MainWindowBase.h
The MainWindow base-class that's shared between QtWidgets and QtQuick stack.
QWidgetAdapter.h
Abstraction for supporting both QtWidgets and QtQuick.
Qt::WindowFlags
typedef WindowFlags
QSizePolicy
QCloseEvent
QObject
Qt::FocusReason
FocusReason
QSize::height
int height() const const
QRectF::topLeft
QPointF topLeft() const const
QString
QEvent::isAccepted
bool isAccepted() const const
QObject::installEventFilter
void installEventFilter(QObject *filterObj)
QSize::boundedTo
QSize boundedTo(const QSize &otherSize) const const
Qt::WindowMaximized
WindowMaximized
QIcon
QVariant::toBool
bool toBool() const const
QObject::setProperty
bool setProperty(const char *name, const QVariant &value)
QSize::expandedTo
QSize expandedTo(const QSize &otherSize) const const
QRect::height
int height() const const
QHash::remove
int remove(const Key &key)
QEvent::type
QEvent::Type type() const const
QEvent
QObject::setParent
void setParent(QObject *parent)
QSizeF
QEvent::ignore
void ignore()
QRectF
KDDockWidgets
Definition: Config.cpp:36
QScopedValueRollback
QRectF::size
QSizeF size() const const
KDDockWidgets::Private::isMinimized
bool isMinimized(QWindow *window)
Definition: QWidgetAdapter.h:31
KDDockWidgets::MainWindowBase
The MainWindow base-class. MainWindow and MainWindowBase are only split in two so we can share some c...
Definition: MainWindowBase.h:56
flagsAreTopLevelFlags
static bool flagsAreTopLevelFlags(Qt::WindowFlags flags)
Definition: QWidgetAdapter_quick.cpp:107
QVariant
Qt::FocusPolicy
FocusPolicy
QHash< QObject *, MouseEventRedirector * >
Qt::WidgetAttribute
WidgetAttribute
QPoint
QObject::property
QVariant property(const char *name) const const

© 2019-2022 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated on Mon Mar 7 2022 02:01:21 for KDDockWidgets API Documentation by doxygen 1.8.20