KDDockWidgets API Documentation  1.5
QWidgetAdapter.h
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 
12 #ifndef KDDOCKWIDGETS_QWIDGETADAPTER_H
13 #define KDDOCKWIDGETS_QWIDGETADAPTER_H
14 
15 #if !defined(KDDOCKWIDGETS_QTWIDGETS) && !defined(KDDOCKWIDGETS_QTQUICK)
16 #define KDDOCKWIDGETS_QTWIDGETS
17 #endif
18 
19 #include <QWindow>
20 
28 namespace KDDockWidgets {
29 namespace Private {
30 
31 inline bool isMinimized(QWindow *window)
32 {
33  return window && (window->windowStates() & Qt::WindowMinimized);
34 }
35 
36 }
37 }
38 
39 #ifdef KDDOCKWIDGETS_QTWIDGETS
41 #include "private/widgets/QWidgetAdapter_widgets_p.h"
42 #include <QMainWindow>
43 namespace KDDockWidgets {
44 class MainWindow;
45 class DockWidget;
53 }
54 #else
56 #include "private/quick/QWidgetAdapter_quick_p.h"
57 namespace KDDockWidgets {
58 class MainWindowQuick;
59 class DockWidgetQuick;
60 typedef KDDockWidgets::QWidgetAdapter QWidgetOrQuick;
63 typedef KDDockWidgets::MainWindowQuick MainWindowType;
64 typedef KDDockWidgets::MainWindowQuick MDIMainWindowBase;
66 typedef QQuickItem WidgetType;
67 }
68 #endif
69 
70 namespace KDDockWidgets {
75 class LayoutGuestWidget : public KDDockWidgets::QWidgetAdapter, public LayoutGuestWidgetBase
76 {
77  Q_OBJECT
78 public:
80  : QWidgetAdapter(parent)
81  , LayoutGuestWidgetBase(this)
82  {
83  }
84 
85  ~LayoutGuestWidget() override;
86 };
87 }
88 
89 #endif
QMainWindow
Widget_qwidget.h
A Layouting::Widget that's deals in QWidget.
QWindow
QWidget
KDDockWidgets::DockWidgetQuick
Represents a dock widget.
Definition: DockWidgetQuick.h:40
KDDockWidgets::LayoutGuestWidget::LayoutGuestWidget
LayoutGuestWidget(QWidgetOrQuick *parent)
Definition: QWidgetAdapter.h:79
Layouting::Widget_qwidget
A Layouting::Widget that's deals in QWidget Allows to host a QWidget in the layout.
Definition: Widget_qwidget.h:28
KDDockWidgets::DockWidget
Represents a dock widget.
Definition: DockWidget.h:38
KDDockWidgets::LayoutGuestWidget::~LayoutGuestWidget
~LayoutGuestWidget() override
Qt::WindowMinimized
WindowMinimized
KDDockWidgets::LayoutGuestWidget
LayoutGuestWidget is the type that Item will host.
Definition: QWidgetAdapter.h:76
Widget_quick.h
A Layouting::Widget that's deals in QQuickItem.
KDDockWidgets::MainWindow
The QMainwindow sub-class that the application should use to be able to dock KDDockWidget::DockWidget...
Definition: MainWindow.h:33
KDDockWidgets::QWidgetOrQuick
QWidget QWidgetOrQuick
Definition: QWidgetAdapter.h:45
KDDockWidgets::QMainWindowOrQuick
QMainWindow QMainWindowOrQuick
Definition: QWidgetAdapter.h:47
KDDockWidgets
Definition: Config.cpp:36
Layouting::Widget_quick
A Layouting::Widget that's deals in QQuickItem Allows to host a QQuickItem in the layout.
Definition: Widget_quick.h:30
KDDockWidgets::DockWidgetType
KDDockWidgets::DockWidget DockWidgetType
Definition: QWidgetAdapter.h:51
KDDockWidgets::Private::isMinimized
bool isMinimized(QWindow *window)
Definition: QWidgetAdapter.h:31
KDDockWidgets::WidgetType
QWidget WidgetType
Definition: QWidgetAdapter.h:52
QWindow::windowStates
Qt::WindowStates windowStates() const const
KDDockWidgets::LayoutGuestWidgetBase
Layouting::Widget_qwidget LayoutGuestWidgetBase
Definition: QWidgetAdapter.h:48
KDDockWidgets::MDIMainWindowBase
KDDockWidgets::MainWindow MDIMainWindowBase
Definition: QWidgetAdapter.h:50
Layouting::Widget::parent
QObject * parent() const
Definition: Widget.h:128
KDDockWidgets::MainWindowType
KDDockWidgets::MainWindow MainWindowType
Definition: QWidgetAdapter.h:49

© 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:20 for KDDockWidgets API Documentation by doxygen 1.8.20